| /* |
| * 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 webhdfs. |
| /// </summary> |
| public sealed class WebhdfsServiceConfig : IServiceConfig |
| { |
| /// <summary> |
| /// atomic_write_dir of this backend |
| /// </summary> |
| public string? AtomicWriteDir { get; init; } |
| /// <summary> |
| /// Delegation token for webhdfs. |
| /// </summary> |
| public string? Delegation { get; init; } |
| /// <summary> |
| /// Disable batch listing |
| /// </summary> |
| public bool? DisableListBatch { get; init; } |
| /// <summary> |
| /// Endpoint for webhdfs. |
| /// </summary> |
| public string? Endpoint { get; init; } |
| /// <summary> |
| /// Root for webhdfs. |
| /// </summary> |
| public string? Root { get; init; } |
| /// <summary> |
| /// Name of the user for webhdfs. |
| /// </summary> |
| public string? UserName { get; init; } |
| |
| public string Scheme => "webhdfs"; |
| |
| public IReadOnlyDictionary<string, string> ToOptions() |
| { |
| var map = new Dictionary<string, string>(); |
| if (AtomicWriteDir is not null) |
| { |
| map["atomic_write_dir"] = Utilities.ToOptionString(AtomicWriteDir); |
| } |
| if (Delegation is not null) |
| { |
| map["delegation"] = Utilities.ToOptionString(Delegation); |
| } |
| if (DisableListBatch is not null) |
| { |
| map["disable_list_batch"] = Utilities.ToOptionString(DisableListBatch); |
| } |
| if (Endpoint is not null) |
| { |
| map["endpoint"] = Utilities.ToOptionString(Endpoint); |
| } |
| if (Root is not null) |
| { |
| map["root"] = Utilities.ToOptionString(Root); |
| } |
| if (UserName is not null) |
| { |
| map["user_name"] = Utilities.ToOptionString(UserName); |
| } |
| return map; |
| } |
| } |
| |
| } |