public void GetHealth()
        {
            moq::Mock <TargetPools.TargetPoolsClient> mockGrpcClient = new moq::Mock <TargetPools.TargetPoolsClient>(moq::MockBehavior.Strict);

            mockGrpcClient.Setup(x => x.CreateOperationsClientForRegionOperations()).Returns(new moq::Mock <lro::Operations.OperationsClient>().Object);
            GetHealthTargetPoolRequest request = new GetHealthTargetPoolRequest
            {
                TargetPool = "target_pool65e437ac",
                Region     = "regionedb20d96",
                Project    = "projectaa6ff846",
                InstanceReferenceResource = new InstanceReference(),
            };
            TargetPoolInstanceHealth expectedResponse = new TargetPoolInstanceHealth
            {
                Kind         = "kindf7aa39d9",
                HealthStatus = { new HealthStatus(), },
            };

            mockGrpcClient.Setup(x => x.GetHealth(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(expectedResponse);
            TargetPoolsClient        client   = new TargetPoolsClientImpl(mockGrpcClient.Object, null);
            TargetPoolInstanceHealth response = client.GetHealth(request.Project, request.Region, request.TargetPool, request.InstanceReferenceResource);

            xunit::Assert.Same(expectedResponse, response);
            mockGrpcClient.VerifyAll();
        }
        public async stt::Task GetHealthAsync()
        {
            moq::Mock <TargetPools.TargetPoolsClient> mockGrpcClient = new moq::Mock <TargetPools.TargetPoolsClient>(moq::MockBehavior.Strict);

            mockGrpcClient.Setup(x => x.CreateOperationsClientForRegionOperations()).Returns(new moq::Mock <lro::Operations.OperationsClient>().Object);
            GetHealthTargetPoolRequest request = new GetHealthTargetPoolRequest
            {
                TargetPool = "target_pool65e437ac",
                Region     = "regionedb20d96",
                Project    = "projectaa6ff846",
                InstanceReferenceResource = new InstanceReference(),
            };
            TargetPoolInstanceHealth expectedResponse = new TargetPoolInstanceHealth
            {
                Kind         = "kindf7aa39d9",
                HealthStatus = { new HealthStatus(), },
            };

            mockGrpcClient.Setup(x => x.GetHealthAsync(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall <TargetPoolInstanceHealth>(stt::Task.FromResult(expectedResponse), null, null, null, null));
            TargetPoolsClient        client = new TargetPoolsClientImpl(mockGrpcClient.Object, null);
            TargetPoolInstanceHealth responseCallSettings = await client.GetHealthAsync(request.Project, request.Region, request.TargetPool, request.InstanceReferenceResource, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None));

            xunit::Assert.Same(expectedResponse, responseCallSettings);
            TargetPoolInstanceHealth responseCancellationToken = await client.GetHealthAsync(request.Project, request.Region, request.TargetPool, request.InstanceReferenceResource, st::CancellationToken.None);

            xunit::Assert.Same(expectedResponse, responseCancellationToken);
            mockGrpcClient.VerifyAll();
        }
        public async stt::Task GetRequestObjectAsync()
        {
            moq::Mock <TargetPools.TargetPoolsClient> mockGrpcClient = new moq::Mock <TargetPools.TargetPoolsClient>(moq::MockBehavior.Strict);

            mockGrpcClient.Setup(x => x.CreateOperationsClientForRegionOperations()).Returns(new moq::Mock <lro::Operations.OperationsClient>().Object);
            GetTargetPoolRequest request = new GetTargetPoolRequest
            {
                TargetPool = "target_pool65e437ac",
                Region     = "regionedb20d96",
                Project    = "projectaa6ff846",
            };
            TargetPool expectedResponse = new TargetPool
            {
                Id        = 11672635353343658936UL,
                Kind      = "kindf7aa39d9",
                Name      = "name1c9368b0",
                Instances =
                {
                    "instances5432a96f",
                },
                CreationTimestamp = "creation_timestamp235e59a1",
                BackupPool        = "backup_pool2446601c",
                Region            = "regionedb20d96",
                FailoverRatio     = -7.1869584E+17F,
                Description       = "description2cf9da67",
                HealthChecks      =
                {
                    "health_checksedb1f3f8",
                },
                SelfLink        = "self_link7e87f12d",
                SessionAffinity = "session_affinitye702dadf",
            };

            mockGrpcClient.Setup(x => x.GetAsync(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall <TargetPool>(stt::Task.FromResult(expectedResponse), null, null, null, null));
            TargetPoolsClient client = new TargetPoolsClientImpl(mockGrpcClient.Object, null);
            TargetPool        responseCallSettings = await client.GetAsync(request, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None));

            xunit::Assert.Same(expectedResponse, responseCallSettings);
            TargetPool responseCancellationToken = await client.GetAsync(request, st::CancellationToken.None);

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

            mockGrpcClient.Setup(x => x.CreateOperationsClientForRegionOperations()).Returns(new moq::Mock <lro::Operations.OperationsClient>().Object);
            GetTargetPoolRequest request = new GetTargetPoolRequest
            {
                TargetPool = "target_pool65e437ac",
                Region     = "regionedb20d96",
                Project    = "projectaa6ff846",
            };
            TargetPool expectedResponse = new TargetPool
            {
                Id        = 11672635353343658936UL,
                Kind      = "kindf7aa39d9",
                Name      = "name1c9368b0",
                Instances =
                {
                    "instances5432a96f",
                },
                CreationTimestamp = "creation_timestamp235e59a1",
                BackupPool        = "backup_pool2446601c",
                Region            = "regionedb20d96",
                FailoverRatio     = -7.1869584E+17F,
                Description       = "description2cf9da67",
                HealthChecks      =
                {
                    "health_checksedb1f3f8",
                },
                SelfLink        = "self_link7e87f12d",
                SessionAffinity = TargetPool.Types.SessionAffinity.GeneratedCookie,
            };

            mockGrpcClient.Setup(x => x.Get(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(expectedResponse);
            TargetPoolsClient client   = new TargetPoolsClientImpl(mockGrpcClient.Object, null);
            TargetPool        response = client.Get(request);

            xunit::Assert.Same(expectedResponse, response);
            mockGrpcClient.VerifyAll();
        }