public void GetCampaignExtensionSetting()
        {
            moq::Mock <CampaignExtensionSettingService.CampaignExtensionSettingServiceClient> mockGrpcClient = new moq::Mock <CampaignExtensionSettingService.CampaignExtensionSettingServiceClient>(moq::MockBehavior.Strict);
            GetCampaignExtensionSettingRequest request = new GetCampaignExtensionSettingRequest
            {
                ResourceNameAsCampaignExtensionSettingName = gagvr::CampaignExtensionSettingName.FromCustomerCampaignExtensionSetting("[CUSTOMER]", "[CAMPAIGN_EXTENSION_SETTING]"),
            };
            gagvr::CampaignExtensionSetting expectedResponse = new gagvr::CampaignExtensionSetting
            {
                ResourceNameAsCampaignExtensionSettingName = gagvr::CampaignExtensionSettingName.FromCustomerCampaignExtensionSetting("[CUSTOMER]", "[CAMPAIGN_EXTENSION_SETTING]"),
                ExtensionType          = gagve::ExtensionTypeEnum.Types.ExtensionType.Promotion,
                CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"),
                ExtensionFeedItemsAsExtensionFeedItemNames =
                {
                    gagvr::ExtensionFeedItemName.FromCustomerExtensionFeedItem("[CUSTOMER]", "[EXTENSION_FEED_ITEM]"),
                },
                Device = gagve::ExtensionSettingDeviceEnum.Types.ExtensionSettingDevice.Unknown,
            };

            mockGrpcClient.Setup(x => x.GetCampaignExtensionSetting(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(expectedResponse);
            CampaignExtensionSettingServiceClient client   = new CampaignExtensionSettingServiceClientImpl(mockGrpcClient.Object, null);
            gagvr::CampaignExtensionSetting       response = client.GetCampaignExtensionSetting(request.ResourceName);

            Assert.AreEqual(expectedResponse, response);
            mockGrpcClient.VerifyAll();
        }
        public async stt::Task MutateCampaignExtensionSettingsAsync()
        {
            moq::Mock <CampaignExtensionSettingService.CampaignExtensionSettingServiceClient> mockGrpcClient = new moq::Mock <CampaignExtensionSettingService.CampaignExtensionSettingServiceClient>(moq::MockBehavior.Strict);
            MutateCampaignExtensionSettingsRequest request = new MutateCampaignExtensionSettingsRequest
            {
                CustomerId = "customer_id3b3724cb",
                Operations =
                {
                    new CampaignExtensionSettingOperation(),
                },
            };
            MutateCampaignExtensionSettingsResponse expectedResponse = new MutateCampaignExtensionSettingsResponse
            {
                Results =
                {
                    new MutateCampaignExtensionSettingResult(),
                },
                PartialFailureError = new gr::Status(),
            };

            mockGrpcClient.Setup(x => x.MutateCampaignExtensionSettingsAsync(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall <MutateCampaignExtensionSettingsResponse>(stt::Task.FromResult(expectedResponse), null, null, null, null));
            CampaignExtensionSettingServiceClient   client = new CampaignExtensionSettingServiceClientImpl(mockGrpcClient.Object, null);
            MutateCampaignExtensionSettingsResponse responseCallSettings = await client.MutateCampaignExtensionSettingsAsync(request.CustomerId, request.Operations, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None));

            Assert.AreEqual(expectedResponse, responseCallSettings);
            MutateCampaignExtensionSettingsResponse responseCancellationToken = await client.MutateCampaignExtensionSettingsAsync(request.CustomerId, request.Operations, st::CancellationToken.None);

            Assert.AreEqual(expectedResponse, responseCancellationToken);
            mockGrpcClient.VerifyAll();
        }
        public async stt::Task GetCampaignExtensionSettingRequestObjectAsync()
        {
            moq::Mock <CampaignExtensionSettingService.CampaignExtensionSettingServiceClient> mockGrpcClient = new moq::Mock <CampaignExtensionSettingService.CampaignExtensionSettingServiceClient>(moq::MockBehavior.Strict);
            GetCampaignExtensionSettingRequest request = new GetCampaignExtensionSettingRequest
            {
                ResourceNameAsCampaignExtensionSettingName = gagvr::CampaignExtensionSettingName.FromCustomerCampaignExtensionSetting("[CUSTOMER]", "[CAMPAIGN_EXTENSION_SETTING]"),
            };
            gagvr::CampaignExtensionSetting expectedResponse = new gagvr::CampaignExtensionSetting
            {
                ResourceNameAsCampaignExtensionSettingName = gagvr::CampaignExtensionSettingName.FromCustomerCampaignExtensionSetting("[CUSTOMER]", "[CAMPAIGN_EXTENSION_SETTING]"),
                ExtensionType          = gagve::ExtensionTypeEnum.Types.ExtensionType.Promotion,
                CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"),
                ExtensionFeedItemsAsExtensionFeedItemNames =
                {
                    gagvr::ExtensionFeedItemName.FromCustomerExtensionFeedItem("[CUSTOMER]", "[EXTENSION_FEED_ITEM]"),
                },
                Device = gagve::ExtensionSettingDeviceEnum.Types.ExtensionSettingDevice.Unknown,
            };

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

            Assert.AreEqual(expectedResponse, responseCallSettings);
            gagvr::CampaignExtensionSetting responseCancellationToken = await client.GetCampaignExtensionSettingAsync(request, st::CancellationToken.None);

            Assert.AreEqual(expectedResponse, responseCancellationToken);
            mockGrpcClient.VerifyAll();
        }
        public void MutateCampaignExtensionSettingsRequestObject()
        {
            moq::Mock <CampaignExtensionSettingService.CampaignExtensionSettingServiceClient> mockGrpcClient = new moq::Mock <CampaignExtensionSettingService.CampaignExtensionSettingServiceClient>(moq::MockBehavior.Strict);
            MutateCampaignExtensionSettingsRequest request = new MutateCampaignExtensionSettingsRequest
            {
                CustomerId = "customer_id3b3724cb",
                Operations =
                {
                    new CampaignExtensionSettingOperation(),
                },
                PartialFailure      = false,
                ValidateOnly        = true,
                ResponseContentType = gagve::ResponseContentTypeEnum.Types.ResponseContentType.ResourceNameOnly,
            };
            MutateCampaignExtensionSettingsResponse expectedResponse = new MutateCampaignExtensionSettingsResponse
            {
                Results =
                {
                    new MutateCampaignExtensionSettingResult(),
                },
                PartialFailureError = new gr::Status(),
            };

            mockGrpcClient.Setup(x => x.MutateCampaignExtensionSettings(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(expectedResponse);
            CampaignExtensionSettingServiceClient   client   = new CampaignExtensionSettingServiceClientImpl(mockGrpcClient.Object, null);
            MutateCampaignExtensionSettingsResponse response = client.MutateCampaignExtensionSettings(request);

            xunit::Assert.Same(expectedResponse, response);
            mockGrpcClient.VerifyAll();
        }
        public void MutateCampaignExtensionSettings()
        {
            moq::Mock <CampaignExtensionSettingService.CampaignExtensionSettingServiceClient> mockGrpcClient = new moq::Mock <CampaignExtensionSettingService.CampaignExtensionSettingServiceClient>(moq::MockBehavior.Strict);
            MutateCampaignExtensionSettingsRequest request = new MutateCampaignExtensionSettingsRequest
            {
                CustomerId = "customer_id3b3724cb",
                Operations =
                {
                    new CampaignExtensionSettingOperation(),
                },
            };
            MutateCampaignExtensionSettingsResponse expectedResponse = new MutateCampaignExtensionSettingsResponse
            {
                Results =
                {
                    new MutateCampaignExtensionSettingResult(),
                },
                PartialFailureError = new gr::Status(),
            };

            mockGrpcClient.Setup(x => x.MutateCampaignExtensionSettings(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(expectedResponse);
            CampaignExtensionSettingServiceClient   client   = new CampaignExtensionSettingServiceClientImpl(mockGrpcClient.Object, null);
            MutateCampaignExtensionSettingsResponse response = client.MutateCampaignExtensionSettings(request.CustomerId, request.Operations);

            Assert.AreEqual(expectedResponse, response);
            mockGrpcClient.VerifyAll();
        }
        public async Task MutateCampaignExtensionSettingsAsync3()
        {
            Mock <CampaignExtensionSettingService.CampaignExtensionSettingServiceClient> mockGrpcClient = new Mock <CampaignExtensionSettingService.CampaignExtensionSettingServiceClient>(MockBehavior.Strict);
            MutateCampaignExtensionSettingsRequest request = new MutateCampaignExtensionSettingsRequest
            {
                CustomerId = "customerId-1772061412",
                Operations = { },
            };
            MutateCampaignExtensionSettingsResponse expectedResponse = new MutateCampaignExtensionSettingsResponse();

            mockGrpcClient.Setup(x => x.MutateCampaignExtensionSettingsAsync(request, It.IsAny <CallOptions>()))
            .Returns(new Grpc.Core.AsyncUnaryCall <MutateCampaignExtensionSettingsResponse>(Task.FromResult(expectedResponse), null, null, null, null));
            CampaignExtensionSettingServiceClient   client   = new CampaignExtensionSettingServiceClientImpl(mockGrpcClient.Object, null);
            MutateCampaignExtensionSettingsResponse response = await client.MutateCampaignExtensionSettingsAsync(request);

            Assert.AreEqual(expectedResponse, response);
            mockGrpcClient.VerifyAll();
        }
        public void MutateCampaignExtensionSettings3()
        {
            Mock <CampaignExtensionSettingService.CampaignExtensionSettingServiceClient> mockGrpcClient = new Mock <CampaignExtensionSettingService.CampaignExtensionSettingServiceClient>(MockBehavior.Strict);
            MutateCampaignExtensionSettingsRequest request = new MutateCampaignExtensionSettingsRequest
            {
                CustomerId = "customerId-1772061412",
                Operations = { },
            };
            MutateCampaignExtensionSettingsResponse expectedResponse = new MutateCampaignExtensionSettingsResponse();

            mockGrpcClient.Setup(x => x.MutateCampaignExtensionSettings(request, It.IsAny <CallOptions>()))
            .Returns(expectedResponse);
            CampaignExtensionSettingServiceClient   client   = new CampaignExtensionSettingServiceClientImpl(mockGrpcClient.Object, null);
            MutateCampaignExtensionSettingsResponse response = client.MutateCampaignExtensionSettings(request);

            Assert.AreEqual(expectedResponse, response);
            mockGrpcClient.VerifyAll();
        }
        public void GetCampaignExtensionSetting2()
        {
            Mock <CampaignExtensionSettingService.CampaignExtensionSettingServiceClient> mockGrpcClient = new Mock <CampaignExtensionSettingService.CampaignExtensionSettingServiceClient>(MockBehavior.Strict);
            GetCampaignExtensionSettingRequest request = new GetCampaignExtensionSettingRequest
            {
                ResourceName = new CampaignExtensionSettingName("[CUSTOMER]", "[CAMPAIGN_EXTENSION_SETTING]").ToString(),
            };
            CampaignExtensionSetting expectedResponse = new CampaignExtensionSetting
            {
                ResourceName = "resourceName2625949903",
            };

            mockGrpcClient.Setup(x => x.GetCampaignExtensionSetting(request, It.IsAny <CallOptions>()))
            .Returns(expectedResponse);
            CampaignExtensionSettingServiceClient client = new CampaignExtensionSettingServiceClientImpl(mockGrpcClient.Object, null);
            CampaignExtensionSetting response            = client.GetCampaignExtensionSetting(request);

            Assert.AreEqual(expectedResponse, response);
            mockGrpcClient.VerifyAll();
        }
        public async Task GetCampaignExtensionSettingAsync()
        {
            Mock <CampaignExtensionSettingService.CampaignExtensionSettingServiceClient> mockGrpcClient = new Mock <CampaignExtensionSettingService.CampaignExtensionSettingServiceClient>(MockBehavior.Strict);
            GetCampaignExtensionSettingRequest expectedRequest = new GetCampaignExtensionSettingRequest
            {
                ResourceName = new CampaignExtensionSettingName("[CUSTOMER]", "[CAMPAIGN_EXTENSION_SETTING]").ToString(),
            };
            CampaignExtensionSetting expectedResponse = new CampaignExtensionSetting
            {
                ResourceName = "resourceName2625949903",
            };

            mockGrpcClient.Setup(x => x.GetCampaignExtensionSettingAsync(expectedRequest, It.IsAny <CallOptions>()))
            .Returns(new Grpc.Core.AsyncUnaryCall <CampaignExtensionSetting>(Task.FromResult(expectedResponse), null, null, null, null));
            CampaignExtensionSettingServiceClient client = new CampaignExtensionSettingServiceClientImpl(mockGrpcClient.Object, null);
            string formattedResourceName      = new CampaignExtensionSettingName("[CUSTOMER]", "[CAMPAIGN_EXTENSION_SETTING]").ToString();
            CampaignExtensionSetting response = await client.GetCampaignExtensionSettingAsync(formattedResourceName);

            Assert.AreEqual(expectedResponse, response);
            mockGrpcClient.VerifyAll();
        }
        public async Task MutateCampaignExtensionSettingsAsync()
        {
            Mock <CampaignExtensionSettingService.CampaignExtensionSettingServiceClient> mockGrpcClient = new Mock <CampaignExtensionSettingService.CampaignExtensionSettingServiceClient>(MockBehavior.Strict);
            MutateCampaignExtensionSettingsRequest expectedRequest = new MutateCampaignExtensionSettingsRequest
            {
                CustomerId     = "customerId-1772061412",
                Operations     = { },
                PartialFailure = true,
                ValidateOnly   = false,
            };
            MutateCampaignExtensionSettingsResponse expectedResponse = new MutateCampaignExtensionSettingsResponse();

            mockGrpcClient.Setup(x => x.MutateCampaignExtensionSettingsAsync(expectedRequest, It.IsAny <CallOptions>()))
            .Returns(new Grpc.Core.AsyncUnaryCall <MutateCampaignExtensionSettingsResponse>(Task.FromResult(expectedResponse), null, null, null, null));
            CampaignExtensionSettingServiceClient client = new CampaignExtensionSettingServiceClientImpl(mockGrpcClient.Object, null);
            string customerId = "customerId-1772061412";
            IEnumerable <CampaignExtensionSettingOperation> operations = new List <CampaignExtensionSettingOperation>();
            bool partialFailure = true;
            bool validateOnly   = false;
            MutateCampaignExtensionSettingsResponse response = await client.MutateCampaignExtensionSettingsAsync(customerId, operations, partialFailure, validateOnly);

            Assert.AreEqual(expectedResponse, response);
            mockGrpcClient.VerifyAll();
        }