diff --git a/apis/Google.Cloud.Kms.V1/Google.Cloud.Kms.V1/GrpcCtorCompatibility.cs b/apis/Google.Cloud.Kms.V1/Google.Cloud.Kms.V1/GrpcCtorCompatibility.cs deleted file mode 100644 index 9b51d216d3fc..000000000000 --- a/apis/Google.Cloud.Kms.V1/Google.Cloud.Kms.V1/GrpcCtorCompatibility.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed 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 -// -// https://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. - -// Partial class constructors to preserve compatibility when migrating -// from gRPC 1.x to 2.x tooling. - -using Grpc.Core; -using System; - -namespace Google.Cloud.Kms.V1 -{ - public partial class KeyManagementService - { - public partial class KeyManagementServiceClient - { - /// Creates a new client using a channel. - /// The channel to use to make remote calls. - [Obsolete("This constructor overload is present for compatibility only, and will be removed in the next major version")] - public KeyManagementServiceClient(Channel channel) : base(channel) - { - } - } - } -} diff --git a/apis/Google.Cloud.Kms.V1/Google.Cloud.Kms.V1/IamPartialClasses.cs b/apis/Google.Cloud.Kms.V1/Google.Cloud.Kms.V1/IamPartialClasses.cs deleted file mode 100644 index f924bee457c7..000000000000 --- a/apis/Google.Cloud.Kms.V1/Google.Cloud.Kms.V1/IamPartialClasses.cs +++ /dev/null @@ -1,973 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed 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 -// -// https://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. - -using gax = Google.Api.Gax; -using gaxgrpc = Google.Api.Gax.Grpc; -using iam = Google.Cloud.Iam.V1; -using st = System.Threading; -using stt = System.Threading.Tasks; -using sys = System; -using scg = System.Collections.Generic; - -namespace Google.Cloud.Kms.V1 -{ - // Partial classes to implement the IAM interface via a client on the same channel. - // KMS implements IAM in a different way to most other clients; the methods were generated via reroute_to_grpc_interface - // in the monolithic generator, but that functionality is not part of the microgenerator. - - public partial class KeyManagementServiceSettings - { - /// - /// for synchronous and asynchronous calls to - /// KeyManagementServiceClient.SetIamPolicy and KeyManagementServiceClient.SetIamPolicyAsync. - /// - /// By default, retry will not be attempted. - public gaxgrpc::CallSettings SetIamPolicySettings { get; set; } - - /// - /// for synchronous and asynchronous calls to - /// KeyManagementServiceClient.GetIamPolicy and KeyManagementServiceClient.GetIamPolicyAsync. - /// - /// By default, retry will not be attempted. - public gaxgrpc::CallSettings GetIamPolicySettings { get; set; } - - /// - /// for synchronous and asynchronous calls to - /// KeyManagementServiceClient.TestIamPermissions and KeyManagementServiceClient.TestIamPermissionsAsync. - /// - /// By default, retry will not be attempted. - public gaxgrpc::CallSettings TestIamPermissionsSettings { get; set; } - } - - public partial class KeyManagementServiceClient - { - /// - /// Sets the access control policy on the specified resource. Replaces - /// any existing policy. - /// - /// Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and - /// PERMISSION_DENIED - /// - /// - /// REQUIRED: The resource for which the policy is being specified. - /// See the operation documentation for the appropriate value for this field. - /// - /// - /// REQUIRED: The complete policy to be applied to the `resource`. The size of - /// the policy is limited to a few 10s of KB. An empty policy is a - /// valid policy but certain Cloud Platform services (such as Projects) - /// might reject them. - /// - /// - /// If not null, applies overrides to this RPC call. - /// - /// - /// A Task containing the RPC response. - /// - public virtual stt::Task SetIamPolicyAsync( - gax::IResourceName resource, - iam::Policy policy, - gaxgrpc::CallSettings callSettings = null) => SetIamPolicyAsync( - new iam::SetIamPolicyRequest - { - ResourceAsResourceName = gax::GaxPreconditions.CheckNotNull(resource, nameof(resource)), - Policy = gax::GaxPreconditions.CheckNotNull(policy, nameof(policy)), - }, - callSettings); - - /// - /// Sets the access control policy on the specified resource. Replaces - /// any existing policy. - /// - /// Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and - /// PERMISSION_DENIED - /// - /// - /// REQUIRED: The resource for which the policy is being specified. - /// See the operation documentation for the appropriate value for this field. - /// - /// - /// REQUIRED: The complete policy to be applied to the `resource`. The size of - /// the policy is limited to a few 10s of KB. An empty policy is a - /// valid policy but certain Cloud Platform services (such as Projects) - /// might reject them. - /// - /// - /// A to use for this RPC. - /// - /// - /// A Task containing the RPC response. - /// - public virtual stt::Task SetIamPolicyAsync( - gax::IResourceName resource, - iam::Policy policy, - st::CancellationToken cancellationToken) => SetIamPolicyAsync( - resource, - policy, - gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); - - /// - /// Sets the access control policy on the specified resource. Replaces - /// any existing policy. - /// - /// Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and - /// PERMISSION_DENIED - /// - /// - /// REQUIRED: The resource for which the policy is being specified. - /// See the operation documentation for the appropriate value for this field. - /// - /// - /// REQUIRED: The complete policy to be applied to the `resource`. The size of - /// the policy is limited to a few 10s of KB. An empty policy is a - /// valid policy but certain Cloud Platform services (such as Projects) - /// might reject them. - /// - /// - /// If not null, applies overrides to this RPC call. - /// - /// - /// The RPC response. - /// - public virtual iam::Policy SetIamPolicy( - gax::IResourceName resource, - iam::Policy policy, - gaxgrpc::CallSettings callSettings = null) => SetIamPolicy( - new iam::SetIamPolicyRequest - { - ResourceAsResourceName = gax::GaxPreconditions.CheckNotNull(resource, nameof(resource)), - Policy = gax::GaxPreconditions.CheckNotNull(policy, nameof(policy)), - }, - callSettings); - - /// - /// Sets the access control policy on the specified resource. Replaces - /// any existing policy. - /// - /// Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and - /// PERMISSION_DENIED - /// - /// - /// REQUIRED: The resource for which the policy is being specified. - /// See the operation documentation for the appropriate value for this field. - /// - /// - /// REQUIRED: The complete policy to be applied to the `resource`. The size of - /// the policy is limited to a few 10s of KB. An empty policy is a - /// valid policy but certain Cloud Platform services (such as Projects) - /// might reject them. - /// - /// - /// If not null, applies overrides to this RPC call. - /// - /// - /// A Task containing the RPC response. - /// - public virtual stt::Task SetIamPolicyAsync( - string resource, - iam::Policy policy, - gaxgrpc::CallSettings callSettings = null) => SetIamPolicyAsync( - new iam::SetIamPolicyRequest - { - Resource = gax::GaxPreconditions.CheckNotNullOrEmpty(resource, nameof(resource)), - Policy = gax::GaxPreconditions.CheckNotNull(policy, nameof(policy)), - }, - callSettings); - - /// - /// Sets the access control policy on the specified resource. Replaces - /// any existing policy. - /// - /// Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and - /// PERMISSION_DENIED - /// - /// - /// REQUIRED: The resource for which the policy is being specified. - /// See the operation documentation for the appropriate value for this field. - /// - /// - /// REQUIRED: The complete policy to be applied to the `resource`. The size of - /// the policy is limited to a few 10s of KB. An empty policy is a - /// valid policy but certain Cloud Platform services (such as Projects) - /// might reject them. - /// - /// - /// A to use for this RPC. - /// - /// - /// A Task containing the RPC response. - /// - public virtual stt::Task SetIamPolicyAsync( - string resource, - iam::Policy policy, - st::CancellationToken cancellationToken) => SetIamPolicyAsync( - resource, - policy, - gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); - - /// - /// Sets the access control policy on the specified resource. Replaces - /// any existing policy. - /// - /// Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and - /// PERMISSION_DENIED - /// - /// - /// REQUIRED: The resource for which the policy is being specified. - /// See the operation documentation for the appropriate value for this field. - /// - /// - /// REQUIRED: The complete policy to be applied to the `resource`. The size of - /// the policy is limited to a few 10s of KB. An empty policy is a - /// valid policy but certain Cloud Platform services (such as Projects) - /// might reject them. - /// - /// - /// If not null, applies overrides to this RPC call. - /// - /// - /// The RPC response. - /// - public virtual iam::Policy SetIamPolicy( - string resource, - iam::Policy policy, - gaxgrpc::CallSettings callSettings = null) => SetIamPolicy( - new iam::SetIamPolicyRequest - { - Resource = gax::GaxPreconditions.CheckNotNullOrEmpty(resource, nameof(resource)), - Policy = gax::GaxPreconditions.CheckNotNull(policy, nameof(policy)), - }, - callSettings); - - /// - /// Sets the access control policy on the specified resource. Replaces - /// any existing policy. - /// - /// Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and - /// PERMISSION_DENIED - /// - /// - /// The request object containing all of the parameters for the API call. - /// - /// - /// If not null, applies overrides to this RPC call. - /// - /// - /// A Task containing the RPC response. - /// - public virtual stt::Task SetIamPolicyAsync( - iam::SetIamPolicyRequest request, - gaxgrpc::CallSettings callSettings = null) - { - throw new sys::NotImplementedException(); - } - - /// - /// Sets the access control policy on the specified resource. Replaces - /// any existing policy. - /// - /// Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and - /// PERMISSION_DENIED - /// - /// - /// The request object containing all of the parameters for the API call. - /// - /// - /// A to use for this RPC. - /// - /// - /// A Task containing the RPC response. - /// - public virtual stt::Task SetIamPolicyAsync( - iam::SetIamPolicyRequest request, - st::CancellationToken cancellationToken) => SetIamPolicyAsync( - request, - gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); - - /// - /// Sets the access control policy on the specified resource. Replaces - /// any existing policy. - /// - /// Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and - /// PERMISSION_DENIED - /// - /// - /// The request object containing all of the parameters for the API call. - /// - /// - /// If not null, applies overrides to this RPC call. - /// - /// - /// The RPC response. - /// - public virtual iam::Policy SetIamPolicy( - iam::SetIamPolicyRequest request, - gaxgrpc::CallSettings callSettings = null) - { - throw new sys::NotImplementedException(); - } - - /// - /// Gets the access control policy for a resource. Returns an empty policy - /// if the resource exists and does not have a policy set. - /// - /// - /// REQUIRED: The resource for which the policy is being requested. - /// See the operation documentation for the appropriate value for this field. - /// - /// - /// If not null, applies overrides to this RPC call. - /// - /// - /// A Task containing the RPC response. - /// - public virtual stt::Task GetIamPolicyAsync( - gax::IResourceName resource, - gaxgrpc::CallSettings callSettings = null) => GetIamPolicyAsync( - new iam::GetIamPolicyRequest - { - ResourceAsResourceName = gax::GaxPreconditions.CheckNotNull(resource, nameof(resource)), - }, - callSettings); - - /// - /// Gets the access control policy for a resource. Returns an empty policy - /// if the resource exists and does not have a policy set. - /// - /// - /// REQUIRED: The resource for which the policy is being requested. - /// See the operation documentation for the appropriate value for this field. - /// - /// - /// A to use for this RPC. - /// - /// - /// A Task containing the RPC response. - /// - public virtual stt::Task GetIamPolicyAsync( - gax::IResourceName resource, - st::CancellationToken cancellationToken) => GetIamPolicyAsync( - resource, - gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); - - /// - /// Gets the access control policy for a resource. Returns an empty policy - /// if the resource exists and does not have a policy set. - /// - /// - /// REQUIRED: The resource for which the policy is being requested. - /// See the operation documentation for the appropriate value for this field. - /// - /// - /// If not null, applies overrides to this RPC call. - /// - /// - /// The RPC response. - /// - public virtual iam::Policy GetIamPolicy( - gax::IResourceName resource, - gaxgrpc::CallSettings callSettings = null) => GetIamPolicy( - new iam::GetIamPolicyRequest - { - ResourceAsResourceName = gax::GaxPreconditions.CheckNotNull(resource, nameof(resource)), - }, - callSettings); - - /// - /// Gets the access control policy for a resource. Returns an empty policy - /// if the resource exists and does not have a policy set. - /// - /// - /// REQUIRED: The resource for which the policy is being requested. - /// See the operation documentation for the appropriate value for this field. - /// - /// - /// If not null, applies overrides to this RPC call. - /// - /// - /// A Task containing the RPC response. - /// - public virtual stt::Task GetIamPolicyAsync( - string resource, - gaxgrpc::CallSettings callSettings = null) => GetIamPolicyAsync( - new iam::GetIamPolicyRequest - { - Resource = gax::GaxPreconditions.CheckNotNullOrEmpty(resource, nameof(resource)), - }, - callSettings); - - /// - /// Gets the access control policy for a resource. Returns an empty policy - /// if the resource exists and does not have a policy set. - /// - /// - /// REQUIRED: The resource for which the policy is being requested. - /// See the operation documentation for the appropriate value for this field. - /// - /// - /// A to use for this RPC. - /// - /// - /// A Task containing the RPC response. - /// - public virtual stt::Task GetIamPolicyAsync( - string resource, - st::CancellationToken cancellationToken) => GetIamPolicyAsync( - resource, - gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); - - /// - /// Gets the access control policy for a resource. Returns an empty policy - /// if the resource exists and does not have a policy set. - /// - /// - /// REQUIRED: The resource for which the policy is being requested. - /// See the operation documentation for the appropriate value for this field. - /// - /// - /// If not null, applies overrides to this RPC call. - /// - /// - /// The RPC response. - /// - public virtual iam::Policy GetIamPolicy( - string resource, - gaxgrpc::CallSettings callSettings = null) => GetIamPolicy( - new iam::GetIamPolicyRequest - { - Resource = gax::GaxPreconditions.CheckNotNullOrEmpty(resource, nameof(resource)), - }, - callSettings); - - /// - /// Gets the access control policy for a resource. Returns an empty policy - /// if the resource exists and does not have a policy set. - /// - /// - /// The request object containing all of the parameters for the API call. - /// - /// - /// If not null, applies overrides to this RPC call. - /// - /// - /// A Task containing the RPC response. - /// - public virtual stt::Task GetIamPolicyAsync( - iam::GetIamPolicyRequest request, - gaxgrpc::CallSettings callSettings = null) - { - throw new sys::NotImplementedException(); - } - - /// - /// Gets the access control policy for a resource. Returns an empty policy - /// if the resource exists and does not have a policy set. - /// - /// - /// The request object containing all of the parameters for the API call. - /// - /// - /// A to use for this RPC. - /// - /// - /// A Task containing the RPC response. - /// - public virtual stt::Task GetIamPolicyAsync( - iam::GetIamPolicyRequest request, - st::CancellationToken cancellationToken) => GetIamPolicyAsync( - request, - gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); - - /// - /// Gets the access control policy for a resource. Returns an empty policy - /// if the resource exists and does not have a policy set. - /// - /// - /// The request object containing all of the parameters for the API call. - /// - /// - /// If not null, applies overrides to this RPC call. - /// - /// - /// The RPC response. - /// - public virtual iam::Policy GetIamPolicy( - iam::GetIamPolicyRequest request, - gaxgrpc::CallSettings callSettings = null) - { - throw new sys::NotImplementedException(); - } - - /// - /// Returns permissions that a caller has on the specified resource. If the - /// resource does not exist, this will return an empty set of - /// permissions, not a NOT_FOUND error. - /// - /// Note: This operation is designed to be used for building - /// permission-aware UIs and command-line tools, not for authorization - /// checking. This operation may "fail open" without warning. - /// - /// - /// REQUIRED: The resource for which the policy detail is being requested. - /// See the operation documentation for the appropriate value for this field. - /// - /// - /// The set of permissions to check for the `resource`. Permissions with - /// wildcards (such as '*' or 'storage.*') are not allowed. For more - /// information see - /// [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - /// - /// - /// If not null, applies overrides to this RPC call. - /// - /// - /// A Task containing the RPC response. - /// - public virtual stt::Task TestIamPermissionsAsync( - gax::IResourceName resource, - scg::IEnumerable permissions, - gaxgrpc::CallSettings callSettings = null) => TestIamPermissionsAsync( - new iam::TestIamPermissionsRequest - { - ResourceAsResourceName = gax::GaxPreconditions.CheckNotNull(resource, nameof(resource)), - Permissions = { gax::GaxPreconditions.CheckNotNull(permissions, nameof(permissions)) }, - }, - callSettings); - - /// - /// Returns permissions that a caller has on the specified resource. If the - /// resource does not exist, this will return an empty set of - /// permissions, not a NOT_FOUND error. - /// - /// Note: This operation is designed to be used for building - /// permission-aware UIs and command-line tools, not for authorization - /// checking. This operation may "fail open" without warning. - /// - /// - /// REQUIRED: The resource for which the policy detail is being requested. - /// See the operation documentation for the appropriate value for this field. - /// - /// - /// The set of permissions to check for the `resource`. Permissions with - /// wildcards (such as '*' or 'storage.*') are not allowed. For more - /// information see - /// [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - /// - /// - /// A to use for this RPC. - /// - /// - /// A Task containing the RPC response. - /// - public virtual stt::Task TestIamPermissionsAsync( - gax::IResourceName resource, - scg::IEnumerable permissions, - st::CancellationToken cancellationToken) => TestIamPermissionsAsync( - resource, - permissions, - gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); - - /// - /// Returns permissions that a caller has on the specified resource. If the - /// resource does not exist, this will return an empty set of - /// permissions, not a NOT_FOUND error. - /// - /// Note: This operation is designed to be used for building - /// permission-aware UIs and command-line tools, not for authorization - /// checking. This operation may "fail open" without warning. - /// - /// - /// REQUIRED: The resource for which the policy detail is being requested. - /// See the operation documentation for the appropriate value for this field. - /// - /// - /// The set of permissions to check for the `resource`. Permissions with - /// wildcards (such as '*' or 'storage.*') are not allowed. For more - /// information see - /// [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - /// - /// - /// If not null, applies overrides to this RPC call. - /// - /// - /// The RPC response. - /// - public virtual iam::TestIamPermissionsResponse TestIamPermissions( - gax::IResourceName resource, - scg::IEnumerable permissions, - gaxgrpc::CallSettings callSettings = null) => TestIamPermissions( - new iam::TestIamPermissionsRequest - { - ResourceAsResourceName = gax::GaxPreconditions.CheckNotNull(resource, nameof(resource)), - Permissions = { gax::GaxPreconditions.CheckNotNull(permissions, nameof(permissions)) }, - }, - callSettings); - - /// - /// Returns permissions that a caller has on the specified resource. If the - /// resource does not exist, this will return an empty set of - /// permissions, not a NOT_FOUND error. - /// - /// Note: This operation is designed to be used for building - /// permission-aware UIs and command-line tools, not for authorization - /// checking. This operation may "fail open" without warning. - /// - /// - /// REQUIRED: The resource for which the policy detail is being requested. - /// See the operation documentation for the appropriate value for this field. - /// - /// - /// The set of permissions to check for the `resource`. Permissions with - /// wildcards (such as '*' or 'storage.*') are not allowed. For more - /// information see - /// [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - /// - /// - /// If not null, applies overrides to this RPC call. - /// - /// - /// A Task containing the RPC response. - /// - public virtual stt::Task TestIamPermissionsAsync( - string resource, - scg::IEnumerable permissions, - gaxgrpc::CallSettings callSettings = null) => TestIamPermissionsAsync( - new iam::TestIamPermissionsRequest - { - Resource = gax::GaxPreconditions.CheckNotNullOrEmpty(resource, nameof(resource)), - Permissions = { gax::GaxPreconditions.CheckNotNull(permissions, nameof(permissions)) }, - }, - callSettings); - - /// - /// Returns permissions that a caller has on the specified resource. If the - /// resource does not exist, this will return an empty set of - /// permissions, not a NOT_FOUND error. - /// - /// Note: This operation is designed to be used for building - /// permission-aware UIs and command-line tools, not for authorization - /// checking. This operation may "fail open" without warning. - /// - /// - /// REQUIRED: The resource for which the policy detail is being requested. - /// See the operation documentation for the appropriate value for this field. - /// - /// - /// The set of permissions to check for the `resource`. Permissions with - /// wildcards (such as '*' or 'storage.*') are not allowed. For more - /// information see - /// [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - /// - /// - /// A to use for this RPC. - /// - /// - /// A Task containing the RPC response. - /// - public virtual stt::Task TestIamPermissionsAsync( - string resource, - scg::IEnumerable permissions, - st::CancellationToken cancellationToken) => TestIamPermissionsAsync( - resource, - permissions, - gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); - - /// - /// Returns permissions that a caller has on the specified resource. If the - /// resource does not exist, this will return an empty set of - /// permissions, not a NOT_FOUND error. - /// - /// Note: This operation is designed to be used for building - /// permission-aware UIs and command-line tools, not for authorization - /// checking. This operation may "fail open" without warning. - /// - /// - /// REQUIRED: The resource for which the policy detail is being requested. - /// See the operation documentation for the appropriate value for this field. - /// - /// - /// The set of permissions to check for the `resource`. Permissions with - /// wildcards (such as '*' or 'storage.*') are not allowed. For more - /// information see - /// [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - /// - /// - /// If not null, applies overrides to this RPC call. - /// - /// - /// The RPC response. - /// - public virtual iam::TestIamPermissionsResponse TestIamPermissions( - string resource, - scg::IEnumerable permissions, - gaxgrpc::CallSettings callSettings = null) => TestIamPermissions( - new iam::TestIamPermissionsRequest - { - Resource = gax::GaxPreconditions.CheckNotNullOrEmpty(resource, nameof(resource)), - Permissions = { gax::GaxPreconditions.CheckNotNull(permissions, nameof(permissions)) }, - }, - callSettings); - - /// - /// Returns permissions that a caller has on the specified resource. If the - /// resource does not exist, this will return an empty set of - /// permissions, not a NOT_FOUND error. - /// - /// Note: This operation is designed to be used for building - /// permission-aware UIs and command-line tools, not for authorization - /// checking. This operation may "fail open" without warning. - /// - /// - /// The request object containing all of the parameters for the API call. - /// - /// - /// If not null, applies overrides to this RPC call. - /// - /// - /// A Task containing the RPC response. - /// - public virtual stt::Task TestIamPermissionsAsync( - iam::TestIamPermissionsRequest request, - gaxgrpc::CallSettings callSettings = null) - { - throw new sys::NotImplementedException(); - } - - /// - /// Returns permissions that a caller has on the specified resource. If the - /// resource does not exist, this will return an empty set of - /// permissions, not a NOT_FOUND error. - /// - /// Note: This operation is designed to be used for building - /// permission-aware UIs and command-line tools, not for authorization - /// checking. This operation may "fail open" without warning. - /// - /// - /// The request object containing all of the parameters for the API call. - /// - /// - /// A to use for this RPC. - /// - /// - /// A Task containing the RPC response. - /// - public virtual stt::Task TestIamPermissionsAsync( - iam::TestIamPermissionsRequest request, - st::CancellationToken cancellationToken) => TestIamPermissionsAsync( - request, - gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); - - /// - /// Returns permissions that a caller has on the specified resource. If the - /// resource does not exist, this will return an empty set of - /// permissions, not a NOT_FOUND error. - /// - /// Note: This operation is designed to be used for building - /// permission-aware UIs and command-line tools, not for authorization - /// checking. This operation may "fail open" without warning. - /// - /// - /// The request object containing all of the parameters for the API call. - /// - /// - /// If not null, applies overrides to this RPC call. - /// - /// - /// The RPC response. - /// - public virtual iam::TestIamPermissionsResponse TestIamPermissions( - iam::TestIamPermissionsRequest request, - gaxgrpc::CallSettings callSettings = null) - { - throw new sys::NotImplementedException(); - } - } - - public partial class KeyManagementServiceClientImpl - { - private gaxgrpc::ApiCall _callSetIamPolicy; - private gaxgrpc::ApiCall _callGetIamPolicy; - private gaxgrpc::ApiCall _callTestIamPermissions; - - partial void OnConstruction(KeyManagementService.KeyManagementServiceClient grpcClient, KeyManagementServiceSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper) - { - iam::IAMPolicy.IAMPolicyClient grpcIAMPolicyClient = grpcClient.CreateIAMPolicyClient(); - _callSetIamPolicy = clientHelper.BuildApiCall( - grpcIAMPolicyClient.SetIamPolicyAsync, grpcIAMPolicyClient.SetIamPolicy, effectiveSettings.SetIamPolicySettings) - .WithGoogleRequestParam("resource", request => request.Resource); - _callGetIamPolicy = clientHelper.BuildApiCall( - grpcIAMPolicyClient.GetIamPolicyAsync, grpcIAMPolicyClient.GetIamPolicy, effectiveSettings.GetIamPolicySettings) - .WithGoogleRequestParam("resource", request => request.Resource); - _callTestIamPermissions = clientHelper.BuildApiCall( - grpcIAMPolicyClient.TestIamPermissionsAsync, grpcIAMPolicyClient.TestIamPermissions, effectiveSettings.TestIamPermissionsSettings) - .WithGoogleRequestParam("resource", request => request.Resource); - Modify_ApiCall(ref _callSetIamPolicy); - Modify_SetIamPolicyApiCall(ref _callSetIamPolicy); - Modify_ApiCall(ref _callGetIamPolicy); - Modify_GetIamPolicyApiCall(ref _callGetIamPolicy); - Modify_ApiCall(ref _callTestIamPermissions); - Modify_TestIamPermissionsApiCall(ref _callTestIamPermissions); - } - - // Partial methods mostly provided to avoid having to change the implementation methods significantly. - partial void Modify_SetIamPolicyApiCall(ref gaxgrpc::ApiCall call); - partial void Modify_GetIamPolicyApiCall(ref gaxgrpc::ApiCall call); - partial void Modify_TestIamPermissionsApiCall(ref gaxgrpc::ApiCall call); - partial void Modify_SetIamPolicyRequest(ref iam::SetIamPolicyRequest request, ref gaxgrpc::CallSettings settings); - partial void Modify_GetIamPolicyRequest(ref iam::GetIamPolicyRequest request, ref gaxgrpc::CallSettings settings); - partial void Modify_TestIamPermissionsRequest(ref iam::TestIamPermissionsRequest request, ref gaxgrpc::CallSettings settings); - - /// - /// Sets the access control policy on the specified resource. Replaces - /// any existing policy. - /// - /// Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and - /// PERMISSION_DENIED - /// - /// - /// The request object containing all of the parameters for the API call. - /// - /// - /// If not null, applies overrides to this RPC call. - /// - /// - /// A Task containing the RPC response. - /// - public override stt::Task SetIamPolicyAsync( - iam::SetIamPolicyRequest request, - gaxgrpc::CallSettings callSettings = null) - { - Modify_SetIamPolicyRequest(ref request, ref callSettings); - return _callSetIamPolicy.Async(request, callSettings); - } - - /// - /// Sets the access control policy on the specified resource. Replaces - /// any existing policy. - /// - /// Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and - /// PERMISSION_DENIED - /// - /// - /// The request object containing all of the parameters for the API call. - /// - /// - /// If not null, applies overrides to this RPC call. - /// - /// - /// The RPC response. - /// - public override iam::Policy SetIamPolicy( - iam::SetIamPolicyRequest request, - gaxgrpc::CallSettings callSettings = null) - { - Modify_SetIamPolicyRequest(ref request, ref callSettings); - return _callSetIamPolicy.Sync(request, callSettings); - } - - /// - /// Gets the access control policy for a resource. Returns an empty policy - /// if the resource exists and does not have a policy set. - /// - /// - /// The request object containing all of the parameters for the API call. - /// - /// - /// If not null, applies overrides to this RPC call. - /// - /// - /// A Task containing the RPC response. - /// - public override stt::Task GetIamPolicyAsync( - iam::GetIamPolicyRequest request, - gaxgrpc::CallSettings callSettings = null) - { - Modify_GetIamPolicyRequest(ref request, ref callSettings); - return _callGetIamPolicy.Async(request, callSettings); - } - - /// - /// Gets the access control policy for a resource. Returns an empty policy - /// if the resource exists and does not have a policy set. - /// - /// - /// The request object containing all of the parameters for the API call. - /// - /// - /// If not null, applies overrides to this RPC call. - /// - /// - /// The RPC response. - /// - public override iam::Policy GetIamPolicy( - iam::GetIamPolicyRequest request, - gaxgrpc::CallSettings callSettings = null) - { - Modify_GetIamPolicyRequest(ref request, ref callSettings); - return _callGetIamPolicy.Sync(request, callSettings); - } - - /// - /// Returns permissions that a caller has on the specified resource. If the - /// resource does not exist, this will return an empty set of - /// permissions, not a NOT_FOUND error. - /// - /// Note: This operation is designed to be used for building - /// permission-aware UIs and command-line tools, not for authorization - /// checking. This operation may "fail open" without warning. - /// - /// - /// The request object containing all of the parameters for the API call. - /// - /// - /// If not null, applies overrides to this RPC call. - /// - /// - /// A Task containing the RPC response. - /// - public override stt::Task TestIamPermissionsAsync( - iam::TestIamPermissionsRequest request, - gaxgrpc::CallSettings callSettings = null) - { - Modify_TestIamPermissionsRequest(ref request, ref callSettings); - return _callTestIamPermissions.Async(request, callSettings); - } - - /// - /// Returns permissions that a caller has on the specified resource. If the - /// resource does not exist, this will return an empty set of - /// permissions, not a NOT_FOUND error. - /// - /// Note: This operation is designed to be used for building - /// permission-aware UIs and command-line tools, not for authorization - /// checking. This operation may "fail open" without warning. - /// - /// - /// The request object containing all of the parameters for the API call. - /// - /// - /// If not null, applies overrides to this RPC call. - /// - /// - /// The RPC response. - /// - public override iam::TestIamPermissionsResponse TestIamPermissions( - iam::TestIamPermissionsRequest request, - gaxgrpc::CallSettings callSettings = null) - { - Modify_TestIamPermissionsRequest(ref request, ref callSettings); - return _callTestIamPermissions.Sync(request, callSettings); - } - } -}