/// <summary>Snippet for GetCampaignBidModifier</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetCampaignBidModifierResourceNames()
 {
     // Create client
     CampaignBidModifierServiceClient campaignBidModifierServiceClient = CampaignBidModifierServiceClient.Create();
     // Initialize request argument(s)
     CampaignBidModifierName resourceName = CampaignBidModifierName.FromCustomerCampaignBidModifier("[CUSTOMER]", "[CAMPAIGN_BID_MODIFIER]");
     // Make the request
     CampaignBidModifier response = campaignBidModifierServiceClient.GetCampaignBidModifier(resourceName);
 }
Ejemplo n.º 2
0
        /// <summary>Snippet for GetCampaignBidModifierAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task GetCampaignBidModifierResourceNamesAsync()
        {
            // Create client
            CampaignBidModifierServiceClient campaignBidModifierServiceClient = await CampaignBidModifierServiceClient.CreateAsync();

            // Initialize request argument(s)
            CampaignBidModifierName resourceName = CampaignBidModifierName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]");
            // Make the request
            CampaignBidModifier response = await campaignBidModifierServiceClient.GetCampaignBidModifierAsync(resourceName);
        }
 /// <summary>Snippet for GetCampaignBidModifier</summary>
 public void GetCampaignBidModifierResourceNames()
 {
     // Snippet: GetCampaignBidModifier(CampaignBidModifierName, CallSettings)
     // Create client
     CampaignBidModifierServiceClient campaignBidModifierServiceClient = CampaignBidModifierServiceClient.Create();
     // Initialize request argument(s)
     CampaignBidModifierName resourceName = CampaignBidModifierName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]");
     // Make the request
     CampaignBidModifier response = campaignBidModifierServiceClient.GetCampaignBidModifier(resourceName);
     // End snippet
 }
Ejemplo n.º 4
0
 /// <summary>Snippet for GetCampaignBidModifier</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetCampaignBidModifierRequestObject()
 {
     // Create client
     CampaignBidModifierServiceClient campaignBidModifierServiceClient = CampaignBidModifierServiceClient.Create();
     // Initialize request argument(s)
     GetCampaignBidModifierRequest request = new GetCampaignBidModifierRequest
     {
         ResourceNameAsCampaignBidModifierName = CampaignBidModifierName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"),
     };
     // Make the request
     CampaignBidModifier response = campaignBidModifierServiceClient.GetCampaignBidModifier(request);
 }
Ejemplo n.º 5
0
        /// <summary>Snippet for GetCampaignBidModifierAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task GetCampaignBidModifierRequestObjectAsync()
        {
            // Create client
            CampaignBidModifierServiceClient campaignBidModifierServiceClient = await CampaignBidModifierServiceClient.CreateAsync();

            // Initialize request argument(s)
            GetCampaignBidModifierRequest request = new GetCampaignBidModifierRequest
            {
                ResourceNameAsCampaignBidModifierName = CampaignBidModifierName.FromCustomerCampaignBidModifier("[CUSTOMER]", "[CAMPAIGN_BID_MODIFIER]"),
            };
            // Make the request
            CampaignBidModifier response = await campaignBidModifierServiceClient.GetCampaignBidModifierAsync(request);
        }
Ejemplo n.º 6
0
 /// <summary>Snippet for GetCampaignBidModifier</summary>
 public void GetCampaignBidModifierRequestObject()
 {
     // Snippet: GetCampaignBidModifier(GetCampaignBidModifierRequest, CallSettings)
     // Create client
     CampaignBidModifierServiceClient campaignBidModifierServiceClient = CampaignBidModifierServiceClient.Create();
     // Initialize request argument(s)
     GetCampaignBidModifierRequest request = new GetCampaignBidModifierRequest
     {
         ResourceNameAsCampaignBidModifierName = CampaignBidModifierName.FromCustomerCampaignBidModifier("[CUSTOMER]", "[CAMPAIGN_BID_MODIFIER]"),
     };
     // Make the request
     CampaignBidModifier response = campaignBidModifierServiceClient.GetCampaignBidModifier(request);
     // End snippet
 }
Ejemplo n.º 7
0
        /// <summary>Snippet for GetCampaignBidModifierAsync</summary>
        public async Task GetCampaignBidModifierResourceNamesAsync()
        {
            // Snippet: GetCampaignBidModifierAsync(CampaignBidModifierName, CallSettings)
            // Additional: GetCampaignBidModifierAsync(CampaignBidModifierName, CancellationToken)
            // Create client
            CampaignBidModifierServiceClient campaignBidModifierServiceClient = await CampaignBidModifierServiceClient.CreateAsync();

            // Initialize request argument(s)
            CampaignBidModifierName resourceName = CampaignBidModifierName.FromCustomerCampaignBidModifier("[CUSTOMER]", "[CAMPAIGN_BID_MODIFIER]");
            // Make the request
            CampaignBidModifier response = await campaignBidModifierServiceClient.GetCampaignBidModifierAsync(resourceName);

            // End snippet
        }
        /// <summary>Snippet for GetCampaignBidModifierAsync</summary>
        public async Task GetCampaignBidModifierRequestObjectAsync()
        {
            // Snippet: GetCampaignBidModifierAsync(GetCampaignBidModifierRequest, CallSettings)
            // Additional: GetCampaignBidModifierAsync(GetCampaignBidModifierRequest, CancellationToken)
            // Create client
            CampaignBidModifierServiceClient campaignBidModifierServiceClient = await CampaignBidModifierServiceClient.CreateAsync();

            // Initialize request argument(s)
            GetCampaignBidModifierRequest request = new GetCampaignBidModifierRequest
            {
                ResourceNameAsCampaignBidModifierName = CampaignBidModifierName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"),
            };
            // Make the request
            CampaignBidModifier response = await campaignBidModifierServiceClient.GetCampaignBidModifierAsync(request);

            // End snippet
        }
        public async Task GetCampaignBidModifierAsync()
        {
            Mock <CampaignBidModifierService.CampaignBidModifierServiceClient> mockGrpcClient = new Mock <CampaignBidModifierService.CampaignBidModifierServiceClient>(MockBehavior.Strict);
            GetCampaignBidModifierRequest expectedRequest = new GetCampaignBidModifierRequest
            {
                ResourceName = new CampaignBidModifierName("[CUSTOMER]", "[CAMPAIGN_BID_MODIFIER]").ToString(),
            };
            CampaignBidModifier expectedResponse = new CampaignBidModifier
            {
                ResourceName = "resourceName2625949903",
            };

            mockGrpcClient.Setup(x => x.GetCampaignBidModifierAsync(expectedRequest, It.IsAny <CallOptions>()))
            .Returns(new Grpc.Core.AsyncUnaryCall <CampaignBidModifier>(Task.FromResult(expectedResponse), null, null, null, null));
            CampaignBidModifierServiceClient client = new CampaignBidModifierServiceClientImpl(mockGrpcClient.Object, null);
            string formattedResourceName            = new CampaignBidModifierName("[CUSTOMER]", "[CAMPAIGN_BID_MODIFIER]").ToString();
            CampaignBidModifier response            = await client.GetCampaignBidModifierAsync(formattedResourceName);

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