Exemplo n.º 1
0
 /// <summary>Snippet for GetAdGroupAudienceView</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetAdGroupAudienceViewResourceNames()
 {
     // Create client
     AdGroupAudienceViewServiceClient adGroupAudienceViewServiceClient = AdGroupAudienceViewServiceClient.Create();
     // Initialize request argument(s)
     AdGroupAudienceViewName resourceName = AdGroupAudienceViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]");
     // Make the request
     AdGroupAudienceView response = adGroupAudienceViewServiceClient.GetAdGroupAudienceView(resourceName);
 }
 /// <summary>Snippet for GetAdGroupAudienceView</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetAdGroupAudienceView()
 {
     // Create client
     AdGroupAudienceViewServiceClient adGroupAudienceViewServiceClient = AdGroupAudienceViewServiceClient.Create();
     // Initialize request argument(s)
     string resourceName = "customers/[CUSTOMER]/adGroupAudienceViews/[AD_GROUP_AUDIENCE_VIEW]";
     // Make the request
     AdGroupAudienceView response = adGroupAudienceViewServiceClient.GetAdGroupAudienceView(resourceName);
 }
Exemplo n.º 3
0
        /// <summary>Snippet for GetAdGroupAudienceViewAsync</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 GetAdGroupAudienceViewResourceNamesAsync()
        {
            // Create client
            AdGroupAudienceViewServiceClient adGroupAudienceViewServiceClient = await AdGroupAudienceViewServiceClient.CreateAsync();

            // Initialize request argument(s)
            AdGroupAudienceViewName resourceName = AdGroupAudienceViewName.FromCustomerAdGroupAudienceView("[CUSTOMER]", "[AD_GROUP_AUDIENCE_VIEW]");
            // Make the request
            AdGroupAudienceView response = await adGroupAudienceViewServiceClient.GetAdGroupAudienceViewAsync(resourceName);
        }
Exemplo n.º 4
0
        /// <summary>Snippet for GetAdGroupAudienceViewAsync</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 GetAdGroupAudienceViewAsync()
        {
            // Create client
            AdGroupAudienceViewServiceClient adGroupAudienceViewServiceClient = await AdGroupAudienceViewServiceClient.CreateAsync();

            // Initialize request argument(s)
            string resourceName = "customers/[CUSTOMER_ID]/adGroupAudienceViews/[AD_GROUP_ID]~[CRITERION_ID]";
            // Make the request
            AdGroupAudienceView response = await adGroupAudienceViewServiceClient.GetAdGroupAudienceViewAsync(resourceName);
        }
Exemplo n.º 5
0
 /// <summary>Snippet for GetAdGroupAudienceView</summary>
 public void GetAdGroupAudienceView()
 {
     // Snippet: GetAdGroupAudienceView(string, CallSettings)
     // Create client
     AdGroupAudienceViewServiceClient adGroupAudienceViewServiceClient = AdGroupAudienceViewServiceClient.Create();
     // Initialize request argument(s)
     string resourceName = "customers/[CUSTOMER_ID]/adGroupAudienceViews/[AD_GROUP_ID]~[CRITERION_ID]";
     // Make the request
     AdGroupAudienceView response = adGroupAudienceViewServiceClient.GetAdGroupAudienceView(resourceName);
     // End snippet
 }
Exemplo n.º 6
0
 /// <summary>Snippet for GetAdGroupAudienceView</summary>
 public void GetAdGroupAudienceViewResourceNames()
 {
     // Snippet: GetAdGroupAudienceView(AdGroupAudienceViewName, CallSettings)
     // Create client
     AdGroupAudienceViewServiceClient adGroupAudienceViewServiceClient = AdGroupAudienceViewServiceClient.Create();
     // Initialize request argument(s)
     AdGroupAudienceViewName resourceName = AdGroupAudienceViewName.FromCustomerAdGroupAudienceView("[CUSTOMER]", "[AD_GROUP_AUDIENCE_VIEW]");
     // Make the request
     AdGroupAudienceView response = adGroupAudienceViewServiceClient.GetAdGroupAudienceView(resourceName);
     // End snippet
 }
Exemplo n.º 7
0
 /// <summary>Snippet for GetAdGroupAudienceView</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetAdGroupAudienceViewRequestObject()
 {
     // Create client
     AdGroupAudienceViewServiceClient adGroupAudienceViewServiceClient = AdGroupAudienceViewServiceClient.Create();
     // Initialize request argument(s)
     GetAdGroupAudienceViewRequest request = new GetAdGroupAudienceViewRequest
     {
         ResourceNameAsAdGroupAudienceViewName = AdGroupAudienceViewName.FromCustomerAdGroupAudienceView("[CUSTOMER]", "[AD_GROUP_AUDIENCE_VIEW]"),
     };
     // Make the request
     AdGroupAudienceView response = adGroupAudienceViewServiceClient.GetAdGroupAudienceView(request);
 }
        /// <summary>Snippet for GetAdGroupAudienceViewAsync</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 GetAdGroupAudienceViewRequestObjectAsync()
        {
            // Create client
            AdGroupAudienceViewServiceClient adGroupAudienceViewServiceClient = await AdGroupAudienceViewServiceClient.CreateAsync();

            // Initialize request argument(s)
            GetAdGroupAudienceViewRequest request = new GetAdGroupAudienceViewRequest
            {
                ResourceNameAsAdGroupAudienceViewName = AdGroupAudienceViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"),
            };
            // Make the request
            AdGroupAudienceView response = await adGroupAudienceViewServiceClient.GetAdGroupAudienceViewAsync(request);
        }
Exemplo n.º 9
0
        /// <summary>Snippet for GetAdGroupAudienceViewAsync</summary>
        public async Task GetAdGroupAudienceViewAsync()
        {
            // Snippet: GetAdGroupAudienceViewAsync(string, CallSettings)
            // Additional: GetAdGroupAudienceViewAsync(string, CancellationToken)
            // Create client
            AdGroupAudienceViewServiceClient adGroupAudienceViewServiceClient = await AdGroupAudienceViewServiceClient.CreateAsync();

            // Initialize request argument(s)
            string resourceName = "customers/[CUSTOMER_ID]/adGroupAudienceViews/[AD_GROUP_ID]~[CRITERION_ID]";
            // Make the request
            AdGroupAudienceView response = await adGroupAudienceViewServiceClient.GetAdGroupAudienceViewAsync(resourceName);

            // End snippet
        }
Exemplo n.º 10
0
 /// <summary>Snippet for GetAdGroupAudienceView</summary>
 public void GetAdGroupAudienceViewRequestObject()
 {
     // Snippet: GetAdGroupAudienceView(GetAdGroupAudienceViewRequest, CallSettings)
     // Create client
     AdGroupAudienceViewServiceClient adGroupAudienceViewServiceClient = AdGroupAudienceViewServiceClient.Create();
     // Initialize request argument(s)
     GetAdGroupAudienceViewRequest request = new GetAdGroupAudienceViewRequest
     {
         ResourceNameAsAdGroupAudienceViewName = AdGroupAudienceViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"),
     };
     // Make the request
     AdGroupAudienceView response = adGroupAudienceViewServiceClient.GetAdGroupAudienceView(request);
     // End snippet
 }
Exemplo n.º 11
0
        /// <summary>Snippet for GetAdGroupAudienceViewAsync</summary>
        public async Task GetAdGroupAudienceViewResourceNamesAsync()
        {
            // Snippet: GetAdGroupAudienceViewAsync(AdGroupAudienceViewName, CallSettings)
            // Additional: GetAdGroupAudienceViewAsync(AdGroupAudienceViewName, CancellationToken)
            // Create client
            AdGroupAudienceViewServiceClient adGroupAudienceViewServiceClient = await AdGroupAudienceViewServiceClient.CreateAsync();

            // Initialize request argument(s)
            AdGroupAudienceViewName resourceName = AdGroupAudienceViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]");
            // Make the request
            AdGroupAudienceView response = await adGroupAudienceViewServiceClient.GetAdGroupAudienceViewAsync(resourceName);

            // End snippet
        }
Exemplo n.º 12
0
        /// <summary>Snippet for GetAdGroupAudienceViewAsync</summary>
        public async Task GetAdGroupAudienceViewRequestObjectAsync()
        {
            // Snippet: GetAdGroupAudienceViewAsync(GetAdGroupAudienceViewRequest, CallSettings)
            // Additional: GetAdGroupAudienceViewAsync(GetAdGroupAudienceViewRequest, CancellationToken)
            // Create client
            AdGroupAudienceViewServiceClient adGroupAudienceViewServiceClient = await AdGroupAudienceViewServiceClient.CreateAsync();

            // Initialize request argument(s)
            GetAdGroupAudienceViewRequest request = new GetAdGroupAudienceViewRequest
            {
                ResourceNameAsAdGroupAudienceViewName = AdGroupAudienceViewName.FromCustomerAdGroupAudienceView("[CUSTOMER]", "[AD_GROUP_AUDIENCE_VIEW]"),
            };
            // Make the request
            AdGroupAudienceView response = await adGroupAudienceViewServiceClient.GetAdGroupAudienceViewAsync(request);

            // End snippet
        }
        public void GetAdGroupAudienceView2()
        {
            Mock <AdGroupAudienceViewService.AdGroupAudienceViewServiceClient> mockGrpcClient = new Mock <AdGroupAudienceViewService.AdGroupAudienceViewServiceClient>(MockBehavior.Strict);
            GetAdGroupAudienceViewRequest request = new GetAdGroupAudienceViewRequest
            {
                ResourceName = new AdGroupAudienceViewName("[CUSTOMER]", "[AD_GROUP_AUDIENCE_VIEW]").ToString(),
            };
            AdGroupAudienceView expectedResponse = new AdGroupAudienceView
            {
                ResourceName = "resourceName2625949903",
            };

            mockGrpcClient.Setup(x => x.GetAdGroupAudienceView(request, It.IsAny <CallOptions>()))
            .Returns(expectedResponse);
            AdGroupAudienceViewServiceClient client = new AdGroupAudienceViewServiceClientImpl(mockGrpcClient.Object, null);
            AdGroupAudienceView response            = client.GetAdGroupAudienceView(request);

            Assert.AreEqual(expectedResponse, response);
            mockGrpcClient.VerifyAll();
        }
        public async Task GetAdGroupAudienceViewAsync()
        {
            Mock <AdGroupAudienceViewService.AdGroupAudienceViewServiceClient> mockGrpcClient = new Mock <AdGroupAudienceViewService.AdGroupAudienceViewServiceClient>(MockBehavior.Strict);
            GetAdGroupAudienceViewRequest expectedRequest = new GetAdGroupAudienceViewRequest
            {
                ResourceName = new AdGroupAudienceViewName("[CUSTOMER]", "[AD_GROUP_AUDIENCE_VIEW]").ToString(),
            };
            AdGroupAudienceView expectedResponse = new AdGroupAudienceView
            {
                ResourceName = "resourceName2625949903",
            };

            mockGrpcClient.Setup(x => x.GetAdGroupAudienceViewAsync(expectedRequest, It.IsAny <CallOptions>()))
            .Returns(new Grpc.Core.AsyncUnaryCall <AdGroupAudienceView>(Task.FromResult(expectedResponse), null, null, null, null));
            AdGroupAudienceViewServiceClient client = new AdGroupAudienceViewServiceClientImpl(mockGrpcClient.Object, null);
            string formattedResourceName            = new AdGroupAudienceViewName("[CUSTOMER]", "[AD_GROUP_AUDIENCE_VIEW]").ToString();
            AdGroupAudienceView response            = await client.GetAdGroupAudienceViewAsync(formattedResourceName);

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