blob: e89ad8a2974e8f7c89200dda294a9af4143273eb [file]
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
// Generated from bindings/java ServiceConfig definitions.
using OpenDAL.ServiceConfig.Abstractions;
namespace OpenDAL.ServiceConfig
{
/// <summary>
/// Configuration for service lakefs.
/// </summary>
public sealed class LakefsServiceConfig : IServiceConfig
{
/// <summary>
/// Name of the branch or a commit ID. Default is main. This is optional.
/// </summary>
public string? Branch { get; init; }
/// <summary>
/// Base url. This is required.
/// </summary>
public string? Endpoint { get; init; }
/// <summary>
/// Password for Lakefs basic authentication. This is required.
/// </summary>
public string? Password { get; init; }
/// <summary>
/// The repository name This is required.
/// </summary>
public string? Repository { get; init; }
/// <summary>
/// Root of this backend. Can be "/path/to/dir". Default is "/".
/// </summary>
public string? Root { get; init; }
/// <summary>
/// Username for Lakefs basic authentication. This is required.
/// </summary>
public string? Username { get; init; }
public string Scheme => "lakefs";
public IReadOnlyDictionary<string, string> ToOptions()
{
var map = new Dictionary<string, string>();
if (Branch is not null)
{
map["branch"] = Utilities.ToOptionString(Branch);
}
if (Endpoint is not null)
{
map["endpoint"] = Utilities.ToOptionString(Endpoint);
}
if (Password is not null)
{
map["password"] = Utilities.ToOptionString(Password);
}
if (Repository is not null)
{
map["repository"] = Utilities.ToOptionString(Repository);
}
if (Root is not null)
{
map["root"] = Utilities.ToOptionString(Root);
}
if (Username is not null)
{
map["username"] = Utilities.ToOptionString(Username);
}
return map;
}
}
}