/// <summary>Snippet for GetParentalStatusView</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetParentalStatusViewResourceNames()
 {
     // Create client
     ParentalStatusViewServiceClient parentalStatusViewServiceClient = ParentalStatusViewServiceClient.Create();
     // Initialize request argument(s)
     ParentalStatusViewName resourceName = ParentalStatusViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]");
     // Make the request
     ParentalStatusView response = parentalStatusViewServiceClient.GetParentalStatusView(resourceName);
 }
コード例 #2
0
 /// <summary>Snippet for GetParentalStatusView</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetParentalStatusView()
 {
     // Create client
     ParentalStatusViewServiceClient parentalStatusViewServiceClient = ParentalStatusViewServiceClient.Create();
     // Initialize request argument(s)
     string resourceName = "customers/[CUSTOMER_ID]/parentalStatusViews/[AD_GROUP_ID]~[CRITERION_ID]";
     // Make the request
     ParentalStatusView response = parentalStatusViewServiceClient.GetParentalStatusView(resourceName);
 }
 /// <summary>Snippet for GetParentalStatusView</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetParentalStatusView()
 {
     // Create client
     ParentalStatusViewServiceClient parentalStatusViewServiceClient = ParentalStatusViewServiceClient.Create();
     // Initialize request argument(s)
     string resourceName = "customers/[CUSTOMER]/parentalStatusViews/[PARENTAL_STATUS_VIEW]";
     // Make the request
     ParentalStatusView response = parentalStatusViewServiceClient.GetParentalStatusView(resourceName);
 }
コード例 #4
0
 /// <summary>Snippet for GetParentalStatusView</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetParentalStatusViewResourceNames()
 {
     // Create client
     ParentalStatusViewServiceClient parentalStatusViewServiceClient = ParentalStatusViewServiceClient.Create();
     // Initialize request argument(s)
     ParentalStatusViewName resourceName = ParentalStatusViewName.FromCustomerParentalStatusView("[CUSTOMER]", "[PARENTAL_STATUS_VIEW]");
     // Make the request
     ParentalStatusView response = parentalStatusViewServiceClient.GetParentalStatusView(resourceName);
 }
        /// <summary>Snippet for GetParentalStatusViewAsync</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 GetParentalStatusViewRequestObjectAsync()
        {
            // Create client
            ParentalStatusViewServiceClient parentalStatusViewServiceClient = await ParentalStatusViewServiceClient.CreateAsync();

            // Initialize request argument(s)
            GetParentalStatusViewRequest request = new GetParentalStatusViewRequest
            {
                ResourceNameAsParentalStatusViewName = ParentalStatusViewName.FromCustomerParentalStatusView("[CUSTOMER]", "[PARENTAL_STATUS_VIEW]"),
            };
            // Make the request
            ParentalStatusView response = await parentalStatusViewServiceClient.GetParentalStatusViewAsync(request);
        }
        /// <summary>Snippet for GetParentalStatusViewAsync</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 GetParentalStatusViewRequestObjectAsync()
        {
            // Create client
            ParentalStatusViewServiceClient parentalStatusViewServiceClient = await ParentalStatusViewServiceClient.CreateAsync();

            // Initialize request argument(s)
            GetParentalStatusViewRequest request = new GetParentalStatusViewRequest
            {
                ResourceNameAsParentalStatusViewName = ParentalStatusViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"),
            };
            // Make the request
            ParentalStatusView response = await parentalStatusViewServiceClient.GetParentalStatusViewAsync(request);
        }
コード例 #7
0
        /// <summary>Snippet for GetParentalStatusViewAsync</summary>
        public async Task GetParentalStatusViewAsync()
        {
            // Snippet: GetParentalStatusViewAsync(string, CallSettings)
            // Additional: GetParentalStatusViewAsync(string, CancellationToken)
            // Create client
            ParentalStatusViewServiceClient parentalStatusViewServiceClient = await ParentalStatusViewServiceClient.CreateAsync();

            // Initialize request argument(s)
            string resourceName = "customers/[CUSTOMER]/parentalStatusViews/[PARENTAL_STATUS_VIEW]";
            // Make the request
            ParentalStatusView response = await parentalStatusViewServiceClient.GetParentalStatusViewAsync(resourceName);

            // End snippet
        }
コード例 #8
0
 /// <summary>Snippet for GetParentalStatusView</summary>
 public void GetParentalStatusViewRequestObject()
 {
     // Snippet: GetParentalStatusView(GetParentalStatusViewRequest, CallSettings)
     // Create client
     ParentalStatusViewServiceClient parentalStatusViewServiceClient = ParentalStatusViewServiceClient.Create();
     // Initialize request argument(s)
     GetParentalStatusViewRequest request = new GetParentalStatusViewRequest
     {
         ResourceNameAsParentalStatusViewName = ParentalStatusViewName.FromCustomerParentalStatusView("[CUSTOMER]", "[PARENTAL_STATUS_VIEW]"),
     };
     // Make the request
     ParentalStatusView response = parentalStatusViewServiceClient.GetParentalStatusView(request);
     // End snippet
 }
コード例 #9
0
        /// <summary>Snippet for GetParentalStatusViewAsync</summary>
        public async Task GetParentalStatusViewResourceNamesAsync()
        {
            // Snippet: GetParentalStatusViewAsync(ParentalStatusViewName, CallSettings)
            // Additional: GetParentalStatusViewAsync(ParentalStatusViewName, CancellationToken)
            // Create client
            ParentalStatusViewServiceClient parentalStatusViewServiceClient = await ParentalStatusViewServiceClient.CreateAsync();

            // Initialize request argument(s)
            ParentalStatusViewName resourceName = ParentalStatusViewName.FromCustomerParentalStatusView("[CUSTOMER]", "[PARENTAL_STATUS_VIEW]");
            // Make the request
            ParentalStatusView response = await parentalStatusViewServiceClient.GetParentalStatusViewAsync(resourceName);

            // End snippet
        }
 /// <summary>Snippet for GetParentalStatusView</summary>
 public void GetParentalStatusViewRequestObject()
 {
     // Snippet: GetParentalStatusView(GetParentalStatusViewRequest, CallSettings)
     // Create client
     ParentalStatusViewServiceClient parentalStatusViewServiceClient = ParentalStatusViewServiceClient.Create();
     // Initialize request argument(s)
     GetParentalStatusViewRequest request = new GetParentalStatusViewRequest
     {
         ResourceNameAsParentalStatusViewName = ParentalStatusViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"),
     };
     // Make the request
     ParentalStatusView response = parentalStatusViewServiceClient.GetParentalStatusView(request);
     // End snippet
 }
        /// <summary>Snippet for GetParentalStatusViewAsync</summary>
        public async Task GetParentalStatusViewResourceNamesAsync()
        {
            // Snippet: GetParentalStatusViewAsync(ParentalStatusViewName, CallSettings)
            // Additional: GetParentalStatusViewAsync(ParentalStatusViewName, CancellationToken)
            // Create client
            ParentalStatusViewServiceClient parentalStatusViewServiceClient = await ParentalStatusViewServiceClient.CreateAsync();

            // Initialize request argument(s)
            ParentalStatusViewName resourceName = ParentalStatusViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]");
            // Make the request
            ParentalStatusView response = await parentalStatusViewServiceClient.GetParentalStatusViewAsync(resourceName);

            // End snippet
        }
コード例 #12
0
        public void GetParentalStatusView2()
        {
            Mock <ParentalStatusViewService.ParentalStatusViewServiceClient> mockGrpcClient = new Mock <ParentalStatusViewService.ParentalStatusViewServiceClient>(MockBehavior.Strict);
            GetParentalStatusViewRequest request = new GetParentalStatusViewRequest
            {
                ResourceName = new ParentalStatusViewName("[CUSTOMER]", "[PARENTAL_STATUS_VIEW]").ToString(),
            };
            ParentalStatusView expectedResponse = new ParentalStatusView
            {
                ResourceName = "resourceName2625949903",
            };

            mockGrpcClient.Setup(x => x.GetParentalStatusView(request, It.IsAny <CallOptions>()))
            .Returns(expectedResponse);
            ParentalStatusViewServiceClient client = new ParentalStatusViewServiceClientImpl(mockGrpcClient.Object, null);
            ParentalStatusView response            = client.GetParentalStatusView(request);

            Assert.AreEqual(expectedResponse, response);
            mockGrpcClient.VerifyAll();
        }
コード例 #13
0
        public async Task GetParentalStatusViewAsync()
        {
            Mock <ParentalStatusViewService.ParentalStatusViewServiceClient> mockGrpcClient = new Mock <ParentalStatusViewService.ParentalStatusViewServiceClient>(MockBehavior.Strict);
            GetParentalStatusViewRequest expectedRequest = new GetParentalStatusViewRequest
            {
                ResourceName = new ParentalStatusViewName("[CUSTOMER]", "[PARENTAL_STATUS_VIEW]").ToString(),
            };
            ParentalStatusView expectedResponse = new ParentalStatusView
            {
                ResourceName = "resourceName2625949903",
            };

            mockGrpcClient.Setup(x => x.GetParentalStatusViewAsync(expectedRequest, It.IsAny <CallOptions>()))
            .Returns(new Grpc.Core.AsyncUnaryCall <ParentalStatusView>(Task.FromResult(expectedResponse), null, null, null, null));
            ParentalStatusViewServiceClient client   = new ParentalStatusViewServiceClientImpl(mockGrpcClient.Object, null);
            string             formattedResourceName = new ParentalStatusViewName("[CUSTOMER]", "[PARENTAL_STATUS_VIEW]").ToString();
            ParentalStatusView response = await client.GetParentalStatusViewAsync(formattedResourceName);

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