public async stt::Task SetIamPolicyAsync()
        {
            moq::Mock <RegionDisks.RegionDisksClient> mockGrpcClient = new moq::Mock <RegionDisks.RegionDisksClient>(moq::MockBehavior.Strict);

            mockGrpcClient.Setup(x => x.CreateOperationsClientForRegionOperations()).Returns(new moq::Mock <lro::Operations.OperationsClient>().Object);
            SetIamPolicyRegionDiskRequest request = new SetIamPolicyRegionDiskRequest
            {
                Region   = "regionedb20d96",
                Resource = "resource164eab96",
                Project  = "projectaa6ff846",
                RegionSetPolicyRequestResource = new RegionSetPolicyRequest(),
            };
            Policy expectedResponse = new Policy
            {
                Etag         = "etage8ad7218",
                Rules        = { new Rule(), },
                AuditConfigs = { new AuditConfig(), },
                Version      = 271578922,
                Bindings     = { new Binding(), },
                IamOwned     = false,
            };

            mockGrpcClient.Setup(x => x.SetIamPolicyAsync(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall <Policy>(stt::Task.FromResult(expectedResponse), null, null, null, null));
            RegionDisksClient client = new RegionDisksClientImpl(mockGrpcClient.Object, null);
            Policy            responseCallSettings = await client.SetIamPolicyAsync(request.Project, request.Region, request.Resource, request.RegionSetPolicyRequestResource, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None));

            xunit::Assert.Same(expectedResponse, responseCallSettings);
            Policy responseCancellationToken = await client.SetIamPolicyAsync(request.Project, request.Region, request.Resource, request.RegionSetPolicyRequestResource, st::CancellationToken.None);

            xunit::Assert.Same(expectedResponse, responseCancellationToken);
            mockGrpcClient.VerifyAll();
        }
        public void SetIamPolicy()
        {
            moq::Mock <RegionDisks.RegionDisksClient> mockGrpcClient = new moq::Mock <RegionDisks.RegionDisksClient>(moq::MockBehavior.Strict);

            mockGrpcClient.Setup(x => x.CreateOperationsClientForRegionOperations()).Returns(new moq::Mock <lro::Operations.OperationsClient>().Object);
            SetIamPolicyRegionDiskRequest request = new SetIamPolicyRegionDiskRequest
            {
                Region   = "regionedb20d96",
                Resource = "resource164eab96",
                Project  = "projectaa6ff846",
                RegionSetPolicyRequestResource = new RegionSetPolicyRequest(),
            };
            Policy expectedResponse = new Policy
            {
                Etag         = "etage8ad7218",
                Rules        = { new Rule(), },
                AuditConfigs = { new AuditConfig(), },
                Version      = 271578922,
                Bindings     = { new Binding(), },
                IamOwned     = false,
            };

            mockGrpcClient.Setup(x => x.SetIamPolicy(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(expectedResponse);
            RegionDisksClient client   = new RegionDisksClientImpl(mockGrpcClient.Object, null);
            Policy            response = client.SetIamPolicy(request.Project, request.Region, request.Resource, request.RegionSetPolicyRequestResource);

            xunit::Assert.Same(expectedResponse, response);
            mockGrpcClient.VerifyAll();
        }
 /// <summary>Snippet for SetIamPolicy</summary>
 public void SetIamPolicyRequestObject()
 {
     // Snippet: SetIamPolicy(SetIamPolicyRegionDiskRequest, CallSettings)
     // Create client
     RegionDisksClient regionDisksClient = RegionDisksClient.Create();
     // Initialize request argument(s)
     SetIamPolicyRegionDiskRequest request = new SetIamPolicyRegionDiskRequest
     {
         Region   = "",
         Resource = "",
         Project  = "",
         RegionSetPolicyRequestResource = new RegionSetPolicyRequest(),
     };
     // Make the request
     Policy response = regionDisksClient.SetIamPolicy(request);
     // End snippet
 }
        /// <summary>Snippet for SetIamPolicyAsync</summary>
        public async Task SetIamPolicyRequestObjectAsync()
        {
            // Snippet: SetIamPolicyAsync(SetIamPolicyRegionDiskRequest, CallSettings)
            // Additional: SetIamPolicyAsync(SetIamPolicyRegionDiskRequest, CancellationToken)
            // Create client
            RegionDisksClient regionDisksClient = await RegionDisksClient.CreateAsync();

            // Initialize request argument(s)
            SetIamPolicyRegionDiskRequest request = new SetIamPolicyRegionDiskRequest
            {
                Region   = "",
                Resource = "",
                Project  = "",
                RegionSetPolicyRequestResource = new RegionSetPolicyRequest(),
            };
            // Make the request
            Policy response = await regionDisksClient.SetIamPolicyAsync(request);

            // End snippet
        }