/// <summary>Snippet for GetAdScheduleView</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void GetAdScheduleView() { // Create client AdScheduleViewServiceClient adScheduleViewServiceClient = AdScheduleViewServiceClient.Create(); // Initialize request argument(s) string resourceName = "customers/[CUSTOMER]/adScheduleViews/[AD_SCHEDULE_VIEW]"; // Make the request AdScheduleView response = adScheduleViewServiceClient.GetAdScheduleView(resourceName); }
/// <summary>Snippet for GetAdScheduleView</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void GetAdScheduleView() { // Create client AdScheduleViewServiceClient adScheduleViewServiceClient = AdScheduleViewServiceClient.Create(); // Initialize request argument(s) string resourceName = "customers/[CUSTOMER_ID]/adScheduleViews/[CAMPAIGN_ID]~[CRITERION_ID]"; // Make the request AdScheduleView response = adScheduleViewServiceClient.GetAdScheduleView(resourceName); }
/// <summary>Snippet for GetAdScheduleView</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void GetAdScheduleViewResourceNames() { // Create client AdScheduleViewServiceClient adScheduleViewServiceClient = AdScheduleViewServiceClient.Create(); // Initialize request argument(s) AdScheduleViewName resourceName = AdScheduleViewName.FromCustomerAdScheduleView("[CUSTOMER]", "[AD_SCHEDULE_VIEW]"); // Make the request AdScheduleView response = adScheduleViewServiceClient.GetAdScheduleView(resourceName); }
/// <summary>Snippet for GetAdScheduleView</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void GetAdScheduleViewResourceNames() { // Create client AdScheduleViewServiceClient adScheduleViewServiceClient = AdScheduleViewServiceClient.Create(); // Initialize request argument(s) AdScheduleViewName resourceName = AdScheduleViewName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"); // Make the request AdScheduleView response = adScheduleViewServiceClient.GetAdScheduleView(resourceName); }
/// <summary>Snippet for GetAdScheduleViewAsync</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 GetAdScheduleViewRequestObjectAsync() { // Create client AdScheduleViewServiceClient adScheduleViewServiceClient = await AdScheduleViewServiceClient.CreateAsync(); // Initialize request argument(s) GetAdScheduleViewRequest request = new GetAdScheduleViewRequest { ResourceNameAsAdScheduleViewName = AdScheduleViewName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), }; // Make the request AdScheduleView response = await adScheduleViewServiceClient.GetAdScheduleViewAsync(request); }
/// <summary>Snippet for GetAdScheduleViewAsync</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 GetAdScheduleViewRequestObjectAsync() { // Create client AdScheduleViewServiceClient adScheduleViewServiceClient = await AdScheduleViewServiceClient.CreateAsync(); // Initialize request argument(s) GetAdScheduleViewRequest request = new GetAdScheduleViewRequest { ResourceNameAsAdScheduleViewName = AdScheduleViewName.FromCustomerAdScheduleView("[CUSTOMER]", "[AD_SCHEDULE_VIEW]"), }; // Make the request AdScheduleView response = await adScheduleViewServiceClient.GetAdScheduleViewAsync(request); }
/// <summary>Snippet for GetAdScheduleViewAsync</summary> public async Task GetAdScheduleViewAsync() { // Snippet: GetAdScheduleViewAsync(string, CallSettings) // Additional: GetAdScheduleViewAsync(string, CancellationToken) // Create client AdScheduleViewServiceClient adScheduleViewServiceClient = await AdScheduleViewServiceClient.CreateAsync(); // Initialize request argument(s) string resourceName = "customers/[CUSTOMER]/adScheduleViews/[AD_SCHEDULE_VIEW]"; // Make the request AdScheduleView response = await adScheduleViewServiceClient.GetAdScheduleViewAsync(resourceName); // End snippet }
/// <summary>Snippet for GetAdScheduleView</summary> public void GetAdScheduleViewRequestObject() { // Snippet: GetAdScheduleView(GetAdScheduleViewRequest, CallSettings) // Create client AdScheduleViewServiceClient adScheduleViewServiceClient = AdScheduleViewServiceClient.Create(); // Initialize request argument(s) GetAdScheduleViewRequest request = new GetAdScheduleViewRequest { ResourceNameAsAdScheduleViewName = AdScheduleViewName.FromCustomerAdScheduleView("[CUSTOMER]", "[AD_SCHEDULE_VIEW]"), }; // Make the request AdScheduleView response = adScheduleViewServiceClient.GetAdScheduleView(request); // End snippet }
/// <summary>Snippet for GetAdScheduleViewAsync</summary> public async Task GetAdScheduleViewResourceNamesAsync() { // Snippet: GetAdScheduleViewAsync(AdScheduleViewName, CallSettings) // Additional: GetAdScheduleViewAsync(AdScheduleViewName, CancellationToken) // Create client AdScheduleViewServiceClient adScheduleViewServiceClient = await AdScheduleViewServiceClient.CreateAsync(); // Initialize request argument(s) AdScheduleViewName resourceName = AdScheduleViewName.FromCustomerAdScheduleView("[CUSTOMER]", "[AD_SCHEDULE_VIEW]"); // Make the request AdScheduleView response = await adScheduleViewServiceClient.GetAdScheduleViewAsync(resourceName); // End snippet }
/// <summary>Snippet for GetAdScheduleView</summary> public void GetAdScheduleViewRequestObject() { // Snippet: GetAdScheduleView(GetAdScheduleViewRequest, CallSettings) // Create client AdScheduleViewServiceClient adScheduleViewServiceClient = AdScheduleViewServiceClient.Create(); // Initialize request argument(s) GetAdScheduleViewRequest request = new GetAdScheduleViewRequest { ResourceNameAsAdScheduleViewName = AdScheduleViewName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), }; // Make the request AdScheduleView response = adScheduleViewServiceClient.GetAdScheduleView(request); // End snippet }
/// <summary>Snippet for GetAdScheduleViewAsync</summary> public async Task GetAdScheduleViewResourceNamesAsync() { // Snippet: GetAdScheduleViewAsync(AdScheduleViewName, CallSettings) // Additional: GetAdScheduleViewAsync(AdScheduleViewName, CancellationToken) // Create client AdScheduleViewServiceClient adScheduleViewServiceClient = await AdScheduleViewServiceClient.CreateAsync(); // Initialize request argument(s) AdScheduleViewName resourceName = AdScheduleViewName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"); // Make the request AdScheduleView response = await adScheduleViewServiceClient.GetAdScheduleViewAsync(resourceName); // End snippet }
public void GetAdScheduleView2() { Mock <AdScheduleViewService.AdScheduleViewServiceClient> mockGrpcClient = new Mock <AdScheduleViewService.AdScheduleViewServiceClient>(MockBehavior.Strict); GetAdScheduleViewRequest request = new GetAdScheduleViewRequest { ResourceName = new AdScheduleViewName("[CUSTOMER]", "[AD_SCHEDULE_VIEW]").ToString(), }; AdScheduleView expectedResponse = new AdScheduleView { ResourceName = "resourceName2625949903", }; mockGrpcClient.Setup(x => x.GetAdScheduleView(request, It.IsAny <CallOptions>())) .Returns(expectedResponse); AdScheduleViewServiceClient client = new AdScheduleViewServiceClientImpl(mockGrpcClient.Object, null); AdScheduleView response = client.GetAdScheduleView(request); Assert.AreEqual(expectedResponse, response); mockGrpcClient.VerifyAll(); }
public async Task GetAdScheduleViewAsync() { Mock <AdScheduleViewService.AdScheduleViewServiceClient> mockGrpcClient = new Mock <AdScheduleViewService.AdScheduleViewServiceClient>(MockBehavior.Strict); GetAdScheduleViewRequest expectedRequest = new GetAdScheduleViewRequest { ResourceName = new AdScheduleViewName("[CUSTOMER]", "[AD_SCHEDULE_VIEW]").ToString(), }; AdScheduleView expectedResponse = new AdScheduleView { ResourceName = "resourceName2625949903", }; mockGrpcClient.Setup(x => x.GetAdScheduleViewAsync(expectedRequest, It.IsAny <CallOptions>())) .Returns(new Grpc.Core.AsyncUnaryCall <AdScheduleView>(Task.FromResult(expectedResponse), null, null, null, null)); AdScheduleViewServiceClient client = new AdScheduleViewServiceClientImpl(mockGrpcClient.Object, null); string formattedResourceName = new AdScheduleViewName("[CUSTOMER]", "[AD_SCHEDULE_VIEW]").ToString(); AdScheduleView response = await client.GetAdScheduleViewAsync(formattedResourceName); Assert.AreEqual(expectedResponse, response); mockGrpcClient.VerifyAll(); }