| /* |
| * 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. |
| */ |
| |
| // DO NOT EDIT IT MANUALLY. This file is generated by opendal/dev/src/generate/dotnet.rs. |
| |
| using OpenDAL.ServiceConfig.Abstractions; |
| |
| namespace OpenDAL.ServiceConfig |
| { |
| /// <summary> |
| /// Configuration for service gcs-grpc. |
| /// </summary> |
| public sealed class GcsGrpcServiceConfig : IServiceConfig |
| { |
| /// <summary> |
| /// Bucket name. |
| /// </summary> |
| public string? Bucket { get; init; } |
| /// <summary> |
| /// Base64-encoded service account credential. |
| /// </summary> |
| public string? Credential { get; init; } |
| /// <summary> |
| /// Path to a service account credential file. |
| /// </summary> |
| public string? CredentialPath { get; init; } |
| /// <summary> |
| /// Disable environment and well-known credential loading. |
| /// </summary> |
| public bool? DisableConfigLoad { get; init; } |
| /// <summary> |
| /// Disable the GCE metadata credential provider. |
| /// </summary> |
| public bool? DisableVmMetadata { get; init; } |
| /// <summary> |
| /// gRPC endpoint. |
| /// </summary> |
| public string? Endpoint { get; init; } |
| /// <summary> |
| /// Root path for all operations. |
| /// </summary> |
| public string? Root { get; init; } |
| /// <summary> |
| /// OAuth 2.0 scope. |
| /// </summary> |
| public string? Scope { get; init; } |
| /// <summary> |
| /// Service account used by the GCE metadata server. |
| /// </summary> |
| public string? ServiceAccount { get; init; } |
| /// <summary> |
| /// Send requests without authentication. |
| /// </summary> |
| public bool? SkipSignature { get; init; } |
| /// <summary> |
| /// OAuth 2.0 access token. |
| /// </summary> |
| public string? Token { get; init; } |
| |
| public string Scheme => "gcs-grpc"; |
| |
| public IReadOnlyDictionary<string, string> ToOptions() |
| { |
| var map = new Dictionary<string, string>(); |
| if (Bucket is not null) |
| { |
| map["bucket"] = Utilities.ToOptionString(Bucket); |
| } |
| if (Credential is not null) |
| { |
| map["credential"] = Utilities.ToOptionString(Credential); |
| } |
| if (CredentialPath is not null) |
| { |
| map["credential_path"] = Utilities.ToOptionString(CredentialPath); |
| } |
| if (DisableConfigLoad is not null) |
| { |
| map["disable_config_load"] = Utilities.ToOptionString(DisableConfigLoad); |
| } |
| if (DisableVmMetadata is not null) |
| { |
| map["disable_vm_metadata"] = Utilities.ToOptionString(DisableVmMetadata); |
| } |
| if (Endpoint is not null) |
| { |
| map["endpoint"] = Utilities.ToOptionString(Endpoint); |
| } |
| if (Root is not null) |
| { |
| map["root"] = Utilities.ToOptionString(Root); |
| } |
| if (Scope is not null) |
| { |
| map["scope"] = Utilities.ToOptionString(Scope); |
| } |
| if (ServiceAccount is not null) |
| { |
| map["service_account"] = Utilities.ToOptionString(ServiceAccount); |
| } |
| if (SkipSignature is not null) |
| { |
| map["skip_signature"] = Utilities.ToOptionString(SkipSignature); |
| } |
| if (Token is not null) |
| { |
| map["token"] = Utilities.ToOptionString(Token); |
| } |
| return map; |
| } |
| } |
| |
| } |