Ejemplo n.º 1
0
 /// <summary>Snippet for GetManagedPlacementView</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetManagedPlacementViewResourceNames()
 {
     // Create client
     ManagedPlacementViewServiceClient managedPlacementViewServiceClient = ManagedPlacementViewServiceClient.Create();
     // Initialize request argument(s)
     ManagedPlacementViewName resourceName = ManagedPlacementViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]");
     // Make the request
     ManagedPlacementView response = managedPlacementViewServiceClient.GetManagedPlacementView(resourceName);
 }
 /// <summary>Snippet for GetManagedPlacementView</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetManagedPlacementViewResourceNames()
 {
     // Create client
     ManagedPlacementViewServiceClient managedPlacementViewServiceClient = ManagedPlacementViewServiceClient.Create();
     // Initialize request argument(s)
     ManagedPlacementViewName resourceName = ManagedPlacementViewName.FromCustomerManagedPlacementView("[CUSTOMER]", "[MANAGED_PLACEMENT_VIEW]");
     // Make the request
     ManagedPlacementView response = managedPlacementViewServiceClient.GetManagedPlacementView(resourceName);
 }
Ejemplo n.º 3
0
        /// <summary>Snippet for GetManagedPlacementViewAsync</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 GetManagedPlacementViewRequestObjectAsync()
        {
            // Create client
            ManagedPlacementViewServiceClient managedPlacementViewServiceClient = await ManagedPlacementViewServiceClient.CreateAsync();

            // Initialize request argument(s)
            GetManagedPlacementViewRequest request = new GetManagedPlacementViewRequest
            {
                ResourceNameAsManagedPlacementViewName = ManagedPlacementViewName.FromCustomerManagedPlacementView("[CUSTOMER]", "[MANAGED_PLACEMENT_VIEW]"),
            };
            // Make the request
            ManagedPlacementView response = await managedPlacementViewServiceClient.GetManagedPlacementViewAsync(request);
        }
        /// <summary>Snippet for GetManagedPlacementViewAsync</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 GetManagedPlacementViewRequestObjectAsync()
        {
            // Create client
            ManagedPlacementViewServiceClient managedPlacementViewServiceClient = await ManagedPlacementViewServiceClient.CreateAsync();

            // Initialize request argument(s)
            GetManagedPlacementViewRequest request = new GetManagedPlacementViewRequest
            {
                ResourceNameAsManagedPlacementViewName = ManagedPlacementViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"),
            };
            // Make the request
            ManagedPlacementView response = await managedPlacementViewServiceClient.GetManagedPlacementViewAsync(request);
        }
Ejemplo n.º 5
0
 /// <summary>Snippet for GetManagedPlacementView</summary>
 public void GetManagedPlacementViewRequestObject()
 {
     // Snippet: GetManagedPlacementView(GetManagedPlacementViewRequest, CallSettings)
     // Create client
     ManagedPlacementViewServiceClient managedPlacementViewServiceClient = ManagedPlacementViewServiceClient.Create();
     // Initialize request argument(s)
     GetManagedPlacementViewRequest request = new GetManagedPlacementViewRequest
     {
         ResourceNameAsManagedPlacementViewName = ManagedPlacementViewName.FromCustomerManagedPlacementView("[CUSTOMER]", "[MANAGED_PLACEMENT_VIEW]"),
     };
     // Make the request
     ManagedPlacementView response = managedPlacementViewServiceClient.GetManagedPlacementView(request);
     // End snippet
 }
Ejemplo n.º 6
0
        /// <summary>Snippet for GetManagedPlacementViewAsync</summary>
        public async Task GetManagedPlacementViewResourceNamesAsync()
        {
            // Snippet: GetManagedPlacementViewAsync(ManagedPlacementViewName, CallSettings)
            // Additional: GetManagedPlacementViewAsync(ManagedPlacementViewName, CancellationToken)
            // Create client
            ManagedPlacementViewServiceClient managedPlacementViewServiceClient = await ManagedPlacementViewServiceClient.CreateAsync();

            // Initialize request argument(s)
            ManagedPlacementViewName resourceName = ManagedPlacementViewName.FromCustomerManagedPlacementView("[CUSTOMER]", "[MANAGED_PLACEMENT_VIEW]");
            // Make the request
            ManagedPlacementView response = await managedPlacementViewServiceClient.GetManagedPlacementViewAsync(resourceName);

            // End snippet
        }
Ejemplo n.º 7
0
 /// <summary>Snippet for GetManagedPlacementView</summary>
 public void GetManagedPlacementViewRequestObject()
 {
     // Snippet: GetManagedPlacementView(GetManagedPlacementViewRequest, CallSettings)
     // Create client
     ManagedPlacementViewServiceClient managedPlacementViewServiceClient = ManagedPlacementViewServiceClient.Create();
     // Initialize request argument(s)
     GetManagedPlacementViewRequest request = new GetManagedPlacementViewRequest
     {
         ResourceNameAsManagedPlacementViewName = ManagedPlacementViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"),
     };
     // Make the request
     ManagedPlacementView response = managedPlacementViewServiceClient.GetManagedPlacementView(request);
     // End snippet
 }
Ejemplo n.º 8
0
        /// <summary>Snippet for GetManagedPlacementViewAsync</summary>
        public async Task GetManagedPlacementViewResourceNamesAsync()
        {
            // Snippet: GetManagedPlacementViewAsync(ManagedPlacementViewName, CallSettings)
            // Additional: GetManagedPlacementViewAsync(ManagedPlacementViewName, CancellationToken)
            // Create client
            ManagedPlacementViewServiceClient managedPlacementViewServiceClient = await ManagedPlacementViewServiceClient.CreateAsync();

            // Initialize request argument(s)
            ManagedPlacementViewName resourceName = ManagedPlacementViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]");
            // Make the request
            ManagedPlacementView response = await managedPlacementViewServiceClient.GetManagedPlacementViewAsync(resourceName);

            // End snippet
        }
Ejemplo n.º 9
0
        public async Task GetManagedPlacementViewAsync()
        {
            Mock <ManagedPlacementViewService.ManagedPlacementViewServiceClient> mockGrpcClient = new Mock <ManagedPlacementViewService.ManagedPlacementViewServiceClient>(MockBehavior.Strict);
            GetManagedPlacementViewRequest expectedRequest = new GetManagedPlacementViewRequest
            {
                ResourceName = new ManagedPlacementViewName("[CUSTOMER]", "[MANAGED_PLACEMENT_VIEW]").ToString(),
            };
            ManagedPlacementView expectedResponse = new ManagedPlacementView
            {
                ResourceName = "resourceName2625949903",
            };

            mockGrpcClient.Setup(x => x.GetManagedPlacementViewAsync(expectedRequest, It.IsAny <CallOptions>()))
            .Returns(new Grpc.Core.AsyncUnaryCall <ManagedPlacementView>(Task.FromResult(expectedResponse), null, null, null, null));
            ManagedPlacementViewServiceClient client = new ManagedPlacementViewServiceClientImpl(mockGrpcClient.Object, null);
            string formattedResourceName             = new ManagedPlacementViewName("[CUSTOMER]", "[MANAGED_PLACEMENT_VIEW]").ToString();
            ManagedPlacementView response            = await client.GetManagedPlacementViewAsync(formattedResourceName);

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