public void UpdateChannelPartnerLinkRequestObject()
        {
            moq::Mock <CloudChannelService.CloudChannelServiceClient> mockGrpcClient = new moq::Mock <CloudChannelService.CloudChannelServiceClient>(moq::MockBehavior.Strict);

            mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock <lro::Operations.OperationsClient>().Object);
            UpdateChannelPartnerLinkRequest request = new UpdateChannelPartnerLinkRequest
            {
                Name = "name1c9368b0",
                ChannelPartnerLink = new ChannelPartnerLink(),
                UpdateMask         = new wkt::FieldMask(),
            };
            ChannelPartnerLink expectedResponse = new ChannelPartnerLink
            {
                Name = "name1c9368b0",
                ResellerCloudIdentityId = "reseller_cloud_identity_id1b90ae2b",
                LinkState     = ChannelPartnerLinkState.Revoked,
                InviteLinkUri = "invite_link_urie81ac099",
                CreateTime    = new wkt::Timestamp(),
                UpdateTime    = new wkt::Timestamp(),
                PublicId      = "public_id4d74e21e",
                ChannelPartnerCloudIdentityInfo = new CloudIdentityInfo(),
            };

            mockGrpcClient.Setup(x => x.UpdateChannelPartnerLink(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(expectedResponse);
            CloudChannelServiceClient client   = new CloudChannelServiceClientImpl(mockGrpcClient.Object, null);
            ChannelPartnerLink        response = client.UpdateChannelPartnerLink(request);

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

            mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock <lro::Operations.OperationsClient>().Object);
            UpdateChannelPartnerLinkRequest request = new UpdateChannelPartnerLinkRequest
            {
                Name = "name1c9368b0",
                ChannelPartnerLink = new ChannelPartnerLink(),
                UpdateMask         = new wkt::FieldMask(),
            };
            ChannelPartnerLink expectedResponse = new ChannelPartnerLink
            {
                Name = "name1c9368b0",
                ResellerCloudIdentityId = "reseller_cloud_identity_id1b90ae2b",
                LinkState     = ChannelPartnerLinkState.Revoked,
                InviteLinkUri = "invite_link_urie81ac099",
                CreateTime    = new wkt::Timestamp(),
                UpdateTime    = new wkt::Timestamp(),
                PublicId      = "public_id4d74e21e",
                ChannelPartnerCloudIdentityInfo = new CloudIdentityInfo(),
            };

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

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

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

            mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock <lro::Operations.OperationsClient>().Object);
            GetEntitlementRequest request = new GetEntitlementRequest
            {
                EntitlementName = EntitlementName.FromAccountCustomerEntitlement("[ACCOUNT]", "[CUSTOMER]", "[ENTITLEMENT]"),
            };
            Entitlement expectedResponse = new Entitlement
            {
                EntitlementName    = EntitlementName.FromAccountCustomerEntitlement("[ACCOUNT]", "[CUSTOMER]", "[ENTITLEMENT]"),
                CreateTime         = new wkt::Timestamp(),
                UpdateTime         = new wkt::Timestamp(),
                OfferAsOfferName   = OfferName.FromAccountOffer("[ACCOUNT]", "[OFFER]"),
                CommitmentSettings = new CommitmentSettings(),
                ProvisioningState  = Entitlement.Types.ProvisioningState.Unspecified,
                ProvisionedService = new ProvisionedService(),
                SuspensionReasons  =
                {
                    Entitlement.Types.SuspensionReason.TrialEnded,
                },
                PurchaseOrderId = "purchase_order_id4111e034",
                TrialSettings   = new TrialSettings(),
                AssociationInfo = new AssociationInfo(),
                Parameters      = { new Parameter(), },
            };

            mockGrpcClient.Setup(x => x.GetEntitlement(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(expectedResponse);
            CloudChannelServiceClient client = new CloudChannelServiceClientImpl(mockGrpcClient.Object, null);
            Entitlement response             = client.GetEntitlement(request);

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

            mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock <lro::Operations.OperationsClient>().Object);
            GetCustomerRequest request = new GetCustomerRequest
            {
                CustomerName = CustomerName.FromAccountCustomer("[ACCOUNT]", "[CUSTOMER]"),
            };
            Customer expectedResponse = new Customer
            {
                CustomerName       = CustomerName.FromAccountCustomer("[ACCOUNT]", "[CUSTOMER]"),
                OrgDisplayName     = "org_display_nameb29ddfcb",
                OrgPostalAddress   = new gt::PostalAddress(),
                PrimaryContactInfo = new ContactInfo(),
                AlternateEmail     = "alternate_email3cdfc6ce",
                Domain             = "domaine8825fad",
                CreateTime         = new wkt::Timestamp(),
                UpdateTime         = new wkt::Timestamp(),
                CloudIdentityId    = "cloud_identity_idcb2e1526",
                LanguageCode       = "language_code2f6c7160",
                CloudIdentityInfo  = new CloudIdentityInfo(),
                ChannelPartnerId   = "channel_partner_ida548fd43",
            };

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

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

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

            mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock <lro::Operations.OperationsClient>().Object);
            UpdateCustomerRequest request = new UpdateCustomerRequest
            {
                Customer   = new Customer(),
                UpdateMask = new wkt::FieldMask(),
            };
            Customer expectedResponse = new Customer
            {
                CustomerName       = CustomerName.FromAccountCustomer("[ACCOUNT]", "[CUSTOMER]"),
                OrgDisplayName     = "org_display_nameb29ddfcb",
                OrgPostalAddress   = new gt::PostalAddress(),
                PrimaryContactInfo = new ContactInfo(),
                AlternateEmail     = "alternate_email3cdfc6ce",
                Domain             = "domaine8825fad",
                CreateTime         = new wkt::Timestamp(),
                UpdateTime         = new wkt::Timestamp(),
                CloudIdentityId    = "cloud_identity_idcb2e1526",
                LanguageCode       = "language_code2f6c7160",
                CloudIdentityInfo  = new CloudIdentityInfo(),
                ChannelPartnerId   = "channel_partner_ida548fd43",
            };

            mockGrpcClient.Setup(x => x.UpdateCustomer(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(expectedResponse);
            CloudChannelServiceClient client = new CloudChannelServiceClientImpl(mockGrpcClient.Object, null);
            Customer response = client.UpdateCustomer(request);

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

            mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock <lro::Operations.OperationsClient>().Object);
            CheckCloudIdentityAccountsExistRequest request = new CheckCloudIdentityAccountsExistRequest
            {
                Parent = "parent7858e4d0",
                Domain = "domaine8825fad",
            };
            CheckCloudIdentityAccountsExistResponse expectedResponse = new CheckCloudIdentityAccountsExistResponse
            {
                CloudIdentityAccounts =
                {
                    new CloudIdentityCustomerAccount(),
                },
            };

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

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

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

            mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock <lro::Operations.OperationsClient>().Object);
            CheckCloudIdentityAccountsExistRequest request = new CheckCloudIdentityAccountsExistRequest
            {
                Parent = "parent7858e4d0",
                Domain = "domaine8825fad",
            };
            CheckCloudIdentityAccountsExistResponse expectedResponse = new CheckCloudIdentityAccountsExistResponse
            {
                CloudIdentityAccounts =
                {
                    new CloudIdentityCustomerAccount(),
                },
            };

            mockGrpcClient.Setup(x => x.CheckCloudIdentityAccountsExist(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(expectedResponse);
            CloudChannelServiceClient client = new CloudChannelServiceClientImpl(mockGrpcClient.Object, null);
            CheckCloudIdentityAccountsExistResponse response = client.CheckCloudIdentityAccountsExist(request);

            xunit::Assert.Same(expectedResponse, response);
            mockGrpcClient.VerifyAll();
        }
        public void DeleteCustomerResourceNames()
        {
            moq::Mock <CloudChannelService.CloudChannelServiceClient> mockGrpcClient = new moq::Mock <CloudChannelService.CloudChannelServiceClient>(moq::MockBehavior.Strict);

            mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock <lro::Operations.OperationsClient>().Object);
            DeleteCustomerRequest request = new DeleteCustomerRequest
            {
                CustomerName = CustomerName.FromAccountCustomer("[ACCOUNT]", "[CUSTOMER]"),
            };
            wkt::Empty expectedResponse = new wkt::Empty {
            };

            mockGrpcClient.Setup(x => x.DeleteCustomer(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(expectedResponse);
            CloudChannelServiceClient client = new CloudChannelServiceClientImpl(mockGrpcClient.Object, null);

            client.DeleteCustomer(request.CustomerName);
            mockGrpcClient.VerifyAll();
        }
        public async stt::Task DeleteCustomerResourceNamesAsync()
        {
            moq::Mock <CloudChannelService.CloudChannelServiceClient> mockGrpcClient = new moq::Mock <CloudChannelService.CloudChannelServiceClient>(moq::MockBehavior.Strict);

            mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock <lro::Operations.OperationsClient>().Object);
            DeleteCustomerRequest request = new DeleteCustomerRequest
            {
                CustomerName = CustomerName.FromAccountCustomer("[ACCOUNT]", "[CUSTOMER]"),
            };
            wkt::Empty expectedResponse = new wkt::Empty {
            };

            mockGrpcClient.Setup(x => x.DeleteCustomerAsync(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall <wkt::Empty>(stt::Task.FromResult(expectedResponse), null, null, null, null));
            CloudChannelServiceClient client = new CloudChannelServiceClientImpl(mockGrpcClient.Object, null);
            await client.DeleteCustomerAsync(request.CustomerName, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None));

            await client.DeleteCustomerAsync(request.CustomerName, st::CancellationToken.None);

            mockGrpcClient.VerifyAll();
        }