/// <summary>Snippet for GetAdAsync</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 GetAdAsync()
        {
            // Create client
            AdServiceClient adServiceClient = await AdServiceClient.CreateAsync();

            // Initialize request argument(s)
            string resourceName = "customers/[CUSTOMER_ID]/ads/[AD_ID]";
            // Make the request
            Ad response = await adServiceClient.GetAdAsync(resourceName);
        }
        /// <summary>Snippet for GetAdAsync</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 GetAdResourceNamesAsync()
        {
            // Create client
            AdServiceClient adServiceClient = await AdServiceClient.CreateAsync();

            // Initialize request argument(s)
            AdName resourceName = AdName.FromCustomerAd("[CUSTOMER]", "[AD]");
            // Make the request
            Ad response = await adServiceClient.GetAdAsync(resourceName);
        }
        /// <summary>Snippet for MutateAdsAsync</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 MutateAdsAsync()
        {
            // Create client
            AdServiceClient adServiceClient = await AdServiceClient.CreateAsync();

            // Initialize request argument(s)
            string customerId = "";
            IEnumerable <AdOperation> operations = new AdOperation[] { new AdOperation(), };
            // Make the request
            MutateAdsResponse response = await adServiceClient.MutateAdsAsync(customerId, operations);
        }
        /// <summary>Snippet for GetAdAsync</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 GetAdRequestObjectAsync()
        {
            // Create client
            AdServiceClient adServiceClient = await AdServiceClient.CreateAsync();

            // Initialize request argument(s)
            GetAdRequest request = new GetAdRequest
            {
                ResourceNameAsAdName = AdName.FromCustomerAd("[CUSTOMER_ID]", "[AD_ID]"),
            };
            // Make the request
            Ad response = await adServiceClient.GetAdAsync(request);
        }
        /// <summary>Snippet for GetAdAsync</summary>
        public async Task GetAdAsync()
        {
            // Snippet: GetAdAsync(string, CallSettings)
            // Additional: GetAdAsync(string, CancellationToken)
            // Create client
            AdServiceClient adServiceClient = await AdServiceClient.CreateAsync();

            // Initialize request argument(s)
            string resourceName = "customers/[CUSTOMER_ID]/ads/[AD_ID]";
            // Make the request
            Ad response = await adServiceClient.GetAdAsync(resourceName);

            // End snippet
        }
        /// <summary>Snippet for GetAdAsync</summary>
        public async Task GetAdResourceNamesAsync()
        {
            // Snippet: GetAdAsync(AdName, CallSettings)
            // Additional: GetAdAsync(AdName, CancellationToken)
            // Create client
            AdServiceClient adServiceClient = await AdServiceClient.CreateAsync();

            // Initialize request argument(s)
            AdName resourceName = AdName.FromCustomerAd("[CUSTOMER_ID]", "[AD_ID]");
            // Make the request
            Ad response = await adServiceClient.GetAdAsync(resourceName);

            // End snippet
        }
        /// <summary>Snippet for MutateAdsAsync</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 MutateAdsRequestObjectAsync()
        {
            // Create client
            AdServiceClient adServiceClient = await AdServiceClient.CreateAsync();

            // Initialize request argument(s)
            MutateAdsRequest request = new MutateAdsRequest
            {
                CustomerId = "",
                Operations = { new AdOperation(), },
            };
            // Make the request
            MutateAdsResponse response = await adServiceClient.MutateAdsAsync(request);
        }
        /// <summary>Snippet for MutateAdsAsync</summary>
        public async Task MutateAdsAsync()
        {
            // Snippet: MutateAdsAsync(string, IEnumerable<AdOperation>, CallSettings)
            // Additional: MutateAdsAsync(string, IEnumerable<AdOperation>, CancellationToken)
            // Create client
            AdServiceClient adServiceClient = await AdServiceClient.CreateAsync();

            // Initialize request argument(s)
            string customerId = "";
            IEnumerable <AdOperation> operations = new AdOperation[] { new AdOperation(), };
            // Make the request
            MutateAdsResponse response = await adServiceClient.MutateAdsAsync(customerId, operations);

            // End snippet
        }
        /// <summary>Snippet for MutateAdsAsync</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 MutateAdsRequestObjectAsync()
        {
            // Create client
            AdServiceClient adServiceClient = await AdServiceClient.CreateAsync();

            // Initialize request argument(s)
            MutateAdsRequest request = new MutateAdsRequest
            {
                CustomerId          = "",
                Operations          = { new AdOperation(), },
                ValidateOnly        = false,
                PartialFailure      = false,
                ResponseContentType = ResponseContentTypeEnum.Types.ResponseContentType.Unspecified,
            };
            // Make the request
            MutateAdsResponse response = await adServiceClient.MutateAdsAsync(request);
        }
Ejemplo n.º 10
0
        /// <summary>Snippet for MutateAdsAsync</summary>
        public async Task MutateAdsRequestObjectAsync()
        {
            // Snippet: MutateAdsAsync(MutateAdsRequest, CallSettings)
            // Additional: MutateAdsAsync(MutateAdsRequest, CancellationToken)
            // Create client
            AdServiceClient adServiceClient = await AdServiceClient.CreateAsync();

            // Initialize request argument(s)
            MutateAdsRequest request = new MutateAdsRequest
            {
                CustomerId = "",
                Operations = { new AdOperation(), },
            };
            // Make the request
            MutateAdsResponse response = await adServiceClient.MutateAdsAsync(request);

            // End snippet
        }