/// <summary>Snippet for GetSearchTermView</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetSearchTermViewResourceNames()
 {
     // Create client
     SearchTermViewServiceClient searchTermViewServiceClient = SearchTermViewServiceClient.Create();
     // Initialize request argument(s)
     SearchTermViewName resourceName = SearchTermViewName.FromCustomerSearchTermView("[CUSTOMER]", "[SEARCH_TERM_VIEW]");
     // Make the request
     SearchTermView response = searchTermViewServiceClient.GetSearchTermView(resourceName);
 }
 /// <summary>Snippet for GetSearchTermView</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetSearchTermViewResourceNames()
 {
     // Create client
     SearchTermViewServiceClient searchTermViewServiceClient = SearchTermViewServiceClient.Create();
     // Initialize request argument(s)
     SearchTermViewName resourceName = SearchTermViewName.FromCustomerCampaignAdGroupQuery("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[AD_GROUP_ID]", "[QUERY]");
     // Make the request
     SearchTermView response = searchTermViewServiceClient.GetSearchTermView(resourceName);
 }
示例#3
0
        /// <summary>Snippet for GetSearchTermViewAsync</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 GetSearchTermViewRequestObjectAsync()
        {
            // Create client
            SearchTermViewServiceClient searchTermViewServiceClient = await SearchTermViewServiceClient.CreateAsync();

            // Initialize request argument(s)
            GetSearchTermViewRequest request = new GetSearchTermViewRequest
            {
                ResourceNameAsSearchTermViewName = SearchTermViewName.FromCustomerCampaignAdGroupQuery("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[AD_GROUP_ID]", "[QUERY]"),
            };
            // Make the request
            SearchTermView response = await searchTermViewServiceClient.GetSearchTermViewAsync(request);
        }
        /// <summary>Snippet for GetSearchTermViewAsync</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 GetSearchTermViewRequestObjectAsync()
        {
            // Create client
            SearchTermViewServiceClient searchTermViewServiceClient = await SearchTermViewServiceClient.CreateAsync();

            // Initialize request argument(s)
            GetSearchTermViewRequest request = new GetSearchTermViewRequest
            {
                ResourceNameAsSearchTermViewName = SearchTermViewName.FromCustomerSearchTermView("[CUSTOMER]", "[SEARCH_TERM_VIEW]"),
            };
            // Make the request
            SearchTermView response = await searchTermViewServiceClient.GetSearchTermViewAsync(request);
        }
 /// <summary>Snippet for GetSearchTermView</summary>
 public void GetSearchTermViewRequestObject()
 {
     // Snippet: GetSearchTermView(GetSearchTermViewRequest, CallSettings)
     // Create client
     SearchTermViewServiceClient searchTermViewServiceClient = SearchTermViewServiceClient.Create();
     // Initialize request argument(s)
     GetSearchTermViewRequest request = new GetSearchTermViewRequest
     {
         ResourceNameAsSearchTermViewName = SearchTermViewName.FromCustomerCampaignAdGroupQuery("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[AD_GROUP_ID]", "[QUERY]"),
     };
     // Make the request
     SearchTermView response = searchTermViewServiceClient.GetSearchTermView(request);
     // End snippet
 }
        /// <summary>Snippet for GetSearchTermViewAsync</summary>
        public async Task GetSearchTermViewResourceNamesAsync()
        {
            // Snippet: GetSearchTermViewAsync(SearchTermViewName, CallSettings)
            // Additional: GetSearchTermViewAsync(SearchTermViewName, CancellationToken)
            // Create client
            SearchTermViewServiceClient searchTermViewServiceClient = await SearchTermViewServiceClient.CreateAsync();

            // Initialize request argument(s)
            SearchTermViewName resourceName = SearchTermViewName.FromCustomerCampaignAdGroupQuery("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[AD_GROUP_ID]", "[QUERY]");
            // Make the request
            SearchTermView response = await searchTermViewServiceClient.GetSearchTermViewAsync(resourceName);

            // End snippet
        }
示例#7
0
 /// <summary>Snippet for GetSearchTermView</summary>
 public void GetSearchTermViewRequestObject()
 {
     // Snippet: GetSearchTermView(GetSearchTermViewRequest, CallSettings)
     // Create client
     SearchTermViewServiceClient searchTermViewServiceClient = SearchTermViewServiceClient.Create();
     // Initialize request argument(s)
     GetSearchTermViewRequest request = new GetSearchTermViewRequest
     {
         ResourceNameAsSearchTermViewName = SearchTermViewName.FromCustomerSearchTermView("[CUSTOMER]", "[SEARCH_TERM_VIEW]"),
     };
     // Make the request
     SearchTermView response = searchTermViewServiceClient.GetSearchTermView(request);
     // End snippet
 }
示例#8
0
        /// <summary>Snippet for GetSearchTermViewAsync</summary>
        public async Task GetSearchTermViewResourceNamesAsync()
        {
            // Snippet: GetSearchTermViewAsync(SearchTermViewName, CallSettings)
            // Additional: GetSearchTermViewAsync(SearchTermViewName, CancellationToken)
            // Create client
            SearchTermViewServiceClient searchTermViewServiceClient = await SearchTermViewServiceClient.CreateAsync();

            // Initialize request argument(s)
            SearchTermViewName resourceName = SearchTermViewName.FromCustomerSearchTermView("[CUSTOMER]", "[SEARCH_TERM_VIEW]");
            // Make the request
            SearchTermView response = await searchTermViewServiceClient.GetSearchTermViewAsync(resourceName);

            // End snippet
        }
示例#9
0
        public async Task GetSearchTermViewAsync()
        {
            Mock <SearchTermViewService.SearchTermViewServiceClient> mockGrpcClient = new Mock <SearchTermViewService.SearchTermViewServiceClient>(MockBehavior.Strict);
            GetSearchTermViewRequest expectedRequest = new GetSearchTermViewRequest
            {
                ResourceName = new SearchTermViewName("[CUSTOMER]", "[SEARCH_TERM_VIEW]").ToString(),
            };
            SearchTermView expectedResponse = new SearchTermView
            {
                ResourceName = "resourceName2625949903",
            };

            mockGrpcClient.Setup(x => x.GetSearchTermViewAsync(expectedRequest, It.IsAny <CallOptions>()))
            .Returns(new Grpc.Core.AsyncUnaryCall <SearchTermView>(Task.FromResult(expectedResponse), null, null, null, null));
            SearchTermViewServiceClient client   = new SearchTermViewServiceClientImpl(mockGrpcClient.Object, null);
            string         formattedResourceName = new SearchTermViewName("[CUSTOMER]", "[SEARCH_TERM_VIEW]").ToString();
            SearchTermView response = await client.GetSearchTermViewAsync(formattedResourceName);

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