/// <summary>Snippet for GetAdGroupCriterionLabelAsync</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 GetAdGroupCriterionLabelResourceNamesAsync()
 {
     // Create client
     AdGroupCriterionLabelServiceClient adGroupCriterionLabelServiceClient = await AdGroupCriterionLabelServiceClient.CreateAsync();
     // Initialize request argument(s)
     AdGroupCriterionLabelName resourceName = AdGroupCriterionLabelName.FromCustomerAdGroupCriterionLabel("[CUSTOMER]", "[AD_GROUP_CRITERION_LABEL]");
     // Make the request
     AdGroupCriterionLabel response = await adGroupCriterionLabelServiceClient.GetAdGroupCriterionLabelAsync(resourceName);
 }
 /// <summary>Snippet for GetAdGroupCriterionLabel</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetAdGroupCriterionLabelResourceNames()
 {
     // Create client
     AdGroupCriterionLabelServiceClient adGroupCriterionLabelServiceClient = AdGroupCriterionLabelServiceClient.Create();
     // Initialize request argument(s)
     AdGroupCriterionLabelName resourceName = AdGroupCriterionLabelName.FromCustomerAdGroupCriterionLabel("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]", "[LABEL_ID]");
     // Make the request
     AdGroupCriterionLabel response = adGroupCriterionLabelServiceClient.GetAdGroupCriterionLabel(resourceName);
 }
Пример #3
0
 /// <summary>Snippet for GetAdGroupCriterionLabel</summary>
 public void GetAdGroupCriterionLabelResourceNames()
 {
     // Snippet: GetAdGroupCriterionLabel(AdGroupCriterionLabelName, CallSettings)
     // Create client
     AdGroupCriterionLabelServiceClient adGroupCriterionLabelServiceClient = AdGroupCriterionLabelServiceClient.Create();
     // Initialize request argument(s)
     AdGroupCriterionLabelName resourceName = AdGroupCriterionLabelName.FromCustomerAdGroupCriterionLabel("[CUSTOMER]", "[AD_GROUP_CRITERION_LABEL]");
     // Make the request
     AdGroupCriterionLabel response = adGroupCriterionLabelServiceClient.GetAdGroupCriterionLabel(resourceName);
     // End snippet
 }
 /// <summary>Snippet for GetAdGroupCriterionLabel</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetAdGroupCriterionLabelRequestObject()
 {
     // Create client
     AdGroupCriterionLabelServiceClient adGroupCriterionLabelServiceClient = AdGroupCriterionLabelServiceClient.Create();
     // Initialize request argument(s)
     GetAdGroupCriterionLabelRequest request = new GetAdGroupCriterionLabelRequest
     {
         ResourceNameAsAdGroupCriterionLabelName = AdGroupCriterionLabelName.FromCustomerAdGroupCriterionLabel("[CUSTOMER]", "[AD_GROUP_CRITERION_LABEL]"),
     };
     // Make the request
     AdGroupCriterionLabel response = adGroupCriterionLabelServiceClient.GetAdGroupCriterionLabel(request);
 }
Пример #5
0
        /// <summary>Snippet for GetAdGroupCriterionLabelAsync</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 GetAdGroupCriterionLabelRequestObjectAsync()
        {
            // Create client
            AdGroupCriterionLabelServiceClient adGroupCriterionLabelServiceClient = await AdGroupCriterionLabelServiceClient.CreateAsync();

            // Initialize request argument(s)
            GetAdGroupCriterionLabelRequest request = new GetAdGroupCriterionLabelRequest
            {
                ResourceNameAsAdGroupCriterionLabelName = AdGroupCriterionLabelName.FromCustomerAdGroupCriterionLabel("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]", "[LABEL_ID]"),
            };
            // Make the request
            AdGroupCriterionLabel response = await adGroupCriterionLabelServiceClient.GetAdGroupCriterionLabelAsync(request);
        }
Пример #6
0
        /// <summary>Snippet for GetAdGroupCriterionLabelAsync</summary>
        public async Task GetAdGroupCriterionLabelResourceNamesAsync()
        {
            // Snippet: GetAdGroupCriterionLabelAsync(AdGroupCriterionLabelName, CallSettings)
            // Additional: GetAdGroupCriterionLabelAsync(AdGroupCriterionLabelName, CancellationToken)
            // Create client
            AdGroupCriterionLabelServiceClient adGroupCriterionLabelServiceClient = await AdGroupCriterionLabelServiceClient.CreateAsync();

            // Initialize request argument(s)
            AdGroupCriterionLabelName resourceName = AdGroupCriterionLabelName.FromCustomerAdGroupCriterionLabel("[CUSTOMER]", "[AD_GROUP_CRITERION_LABEL]");
            // Make the request
            AdGroupCriterionLabel response = await adGroupCriterionLabelServiceClient.GetAdGroupCriterionLabelAsync(resourceName);

            // End snippet
        }
        public async Task GetAdGroupCriterionLabelAsync()
        {
            Mock <AdGroupCriterionLabelService.AdGroupCriterionLabelServiceClient> mockGrpcClient = new Mock <AdGroupCriterionLabelService.AdGroupCriterionLabelServiceClient>(MockBehavior.Strict);
            GetAdGroupCriterionLabelRequest expectedRequest = new GetAdGroupCriterionLabelRequest
            {
                ResourceName = new AdGroupCriterionLabelName("[CUSTOMER]", "[AD_GROUP_CRITERION_LABEL]").ToString(),
            };
            AdGroupCriterionLabel expectedResponse = new AdGroupCriterionLabel
            {
                ResourceName = "resourceName2625949903",
            };

            mockGrpcClient.Setup(x => x.GetAdGroupCriterionLabelAsync(expectedRequest, It.IsAny <CallOptions>()))
            .Returns(new Grpc.Core.AsyncUnaryCall <AdGroupCriterionLabel>(Task.FromResult(expectedResponse), null, null, null, null));
            AdGroupCriterionLabelServiceClient client = new AdGroupCriterionLabelServiceClientImpl(mockGrpcClient.Object, null);
            string formattedResourceName   = new AdGroupCriterionLabelName("[CUSTOMER]", "[AD_GROUP_CRITERION_LABEL]").ToString();
            AdGroupCriterionLabel response = await client.GetAdGroupCriterionLabelAsync(formattedResourceName);

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