/// <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 GetManagedPlacementView() { // Create client ManagedPlacementViewServiceClient managedPlacementViewServiceClient = ManagedPlacementViewServiceClient.Create(); // Initialize request argument(s) string resourceName = "customers/[CUSTOMER]/managedPlacementViews/[MANAGED_PLACEMENT_VIEW]"; // 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); }
/// <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 GetManagedPlacementView() { // Create client ManagedPlacementViewServiceClient managedPlacementViewServiceClient = ManagedPlacementViewServiceClient.Create(); // Initialize request argument(s) string resourceName = "customers/[CUSTOMER_ID]/managedPlacementViews/[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.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"); // Make the request ManagedPlacementView response = managedPlacementViewServiceClient.GetManagedPlacementView(resourceName); }
/// <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); }
/// <summary>Snippet for GetManagedPlacementViewAsync</summary> public async Task GetManagedPlacementViewAsync() { // Snippet: GetManagedPlacementViewAsync(string, CallSettings) // Additional: GetManagedPlacementViewAsync(string, CancellationToken) // Create client ManagedPlacementViewServiceClient managedPlacementViewServiceClient = await ManagedPlacementViewServiceClient.CreateAsync(); // Initialize request argument(s) string resourceName = "customers/[CUSTOMER]/managedPlacementViews/[MANAGED_PLACEMENT_VIEW]"; // Make the request ManagedPlacementView response = await managedPlacementViewServiceClient.GetManagedPlacementViewAsync(resourceName); // End snippet }
/// <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 }
/// <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 }
/// <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 }
/// <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 }
public void GetManagedPlacementView2() { Mock <ManagedPlacementViewService.ManagedPlacementViewServiceClient> mockGrpcClient = new Mock <ManagedPlacementViewService.ManagedPlacementViewServiceClient>(MockBehavior.Strict); GetManagedPlacementViewRequest request = new GetManagedPlacementViewRequest { ResourceName = new ManagedPlacementViewName("[CUSTOMER]", "[MANAGED_PLACEMENT_VIEW]").ToString(), }; ManagedPlacementView expectedResponse = new ManagedPlacementView { ResourceName = "resourceName2625949903", }; mockGrpcClient.Setup(x => x.GetManagedPlacementView(request, It.IsAny <CallOptions>())) .Returns(expectedResponse); ManagedPlacementViewServiceClient client = new ManagedPlacementViewServiceClientImpl(mockGrpcClient.Object, null); ManagedPlacementView response = client.GetManagedPlacementView(request); Assert.AreEqual(expectedResponse, response); mockGrpcClient.VerifyAll(); }
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(); }