/// <summary>Snippet for GetSmartCampaignSearchTermView</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetSmartCampaignSearchTermViewRequestObject()
 {
     // Create client
     SmartCampaignSearchTermViewServiceClient smartCampaignSearchTermViewServiceClient = SmartCampaignSearchTermViewServiceClient.Create();
     // Initialize request argument(s)
     GetSmartCampaignSearchTermViewRequest request = new GetSmartCampaignSearchTermViewRequest
     {
         ResourceNameAsSmartCampaignSearchTermViewName = SmartCampaignSearchTermViewName.FromCustomerCampaignQuery("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[QUERY]"),
     };
     // Make the request
     SmartCampaignSearchTermView response = smartCampaignSearchTermViewServiceClient.GetSmartCampaignSearchTermView(request);
 }
        /// <summary>Snippet for GetSmartCampaignSearchTermViewAsync</summary>
        public async Task GetSmartCampaignSearchTermViewRequestObjectAsync()
        {
            // Snippet: GetSmartCampaignSearchTermViewAsync(GetSmartCampaignSearchTermViewRequest, CallSettings)
            // Additional: GetSmartCampaignSearchTermViewAsync(GetSmartCampaignSearchTermViewRequest, CancellationToken)
            // Create client
            SmartCampaignSearchTermViewServiceClient smartCampaignSearchTermViewServiceClient = await SmartCampaignSearchTermViewServiceClient.CreateAsync();

            // Initialize request argument(s)
            GetSmartCampaignSearchTermViewRequest request = new GetSmartCampaignSearchTermViewRequest
            {
                ResourceNameAsSmartCampaignSearchTermViewName = SmartCampaignSearchTermViewName.FromCustomerCampaignQuery("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[QUERY]"),
            };
            // Make the request
            SmartCampaignSearchTermView response = await smartCampaignSearchTermViewServiceClient.GetSmartCampaignSearchTermViewAsync(request);

            // End snippet
        }
        public void GetSmartCampaignSearchTermView()
        {
            moq::Mock <SmartCampaignSearchTermViewService.SmartCampaignSearchTermViewServiceClient> mockGrpcClient = new moq::Mock <SmartCampaignSearchTermViewService.SmartCampaignSearchTermViewServiceClient>(moq::MockBehavior.Strict);
            GetSmartCampaignSearchTermViewRequest request = new GetSmartCampaignSearchTermViewRequest
            {
                ResourceNameAsSmartCampaignSearchTermViewName = gagvr::SmartCampaignSearchTermViewName.FromCustomerCampaignQuery("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[QUERY]"),
            };
            gagvr::SmartCampaignSearchTermView expectedResponse = new gagvr::SmartCampaignSearchTermView
            {
                ResourceNameAsSmartCampaignSearchTermViewName = gagvr::SmartCampaignSearchTermViewName.FromCustomerCampaignQuery("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[QUERY]"),
                SearchTerm             = "search_term6c01a1df",
                CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"),
            };

            mockGrpcClient.Setup(x => x.GetSmartCampaignSearchTermView(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(expectedResponse);
            SmartCampaignSearchTermViewServiceClient client   = new SmartCampaignSearchTermViewServiceClientImpl(mockGrpcClient.Object, null);
            gagvr::SmartCampaignSearchTermView       response = client.GetSmartCampaignSearchTermView(request.ResourceName);

            Assert.AreEqual(expectedResponse, response);
            mockGrpcClient.VerifyAll();
        }
        public async stt::Task GetSmartCampaignSearchTermViewRequestObjectAsync()
        {
            moq::Mock <SmartCampaignSearchTermViewService.SmartCampaignSearchTermViewServiceClient> mockGrpcClient = new moq::Mock <SmartCampaignSearchTermViewService.SmartCampaignSearchTermViewServiceClient>(moq::MockBehavior.Strict);
            GetSmartCampaignSearchTermViewRequest request = new GetSmartCampaignSearchTermViewRequest
            {
                ResourceNameAsSmartCampaignSearchTermViewName = gagvr::SmartCampaignSearchTermViewName.FromCustomerCampaignQuery("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[QUERY]"),
            };
            gagvr::SmartCampaignSearchTermView expectedResponse = new gagvr::SmartCampaignSearchTermView
            {
                ResourceNameAsSmartCampaignSearchTermViewName = gagvr::SmartCampaignSearchTermViewName.FromCustomerCampaignQuery("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[QUERY]"),
                SearchTerm             = "search_term6c01a1df",
                CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"),
            };

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

            Assert.AreEqual(expectedResponse, responseCallSettings);
            gagvr::SmartCampaignSearchTermView responseCancellationToken = await client.GetSmartCampaignSearchTermViewAsync(request, st::CancellationToken.None);

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