Ejemplo n.º 1
0
        /// <summary>Snippet for GetAdGroupAdAsync</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 GetAdGroupAdResourceNamesAsync()
        {
            // Create client
            AdGroupAdServiceClient adGroupAdServiceClient = await AdGroupAdServiceClient.CreateAsync();

            // Initialize request argument(s)
            AdGroupAdName resourceName = AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER]", "[AD_GROUP_AD]");
            // Make the request
            AdGroupAd response = await adGroupAdServiceClient.GetAdGroupAdAsync(resourceName);
        }
        /// <summary>Snippet for GetAdGroupAdAsync</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 GetAdGroupAdAsync()
        {
            // Create client
            AdGroupAdServiceClient adGroupAdServiceClient = await AdGroupAdServiceClient.CreateAsync();

            // Initialize request argument(s)
            string resourceName = "customers/[CUSTOMER]/adGroupAds/[AD_GROUP_AD]";
            // Make the request
            AdGroupAd response = await adGroupAdServiceClient.GetAdGroupAdAsync(resourceName);
        }
        /// <summary>Snippet for GetAdGroupAdAsync</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 GetAdGroupAdRequestObjectAsync()
        {
            // Create client
            AdGroupAdServiceClient adGroupAdServiceClient = await AdGroupAdServiceClient.CreateAsync();

            // Initialize request argument(s)
            GetAdGroupAdRequest request = new GetAdGroupAdRequest
            {
                ResourceNameAsAdGroupAdName = AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[AD_ID]"),
            };
            // Make the request
            AdGroupAd response = await adGroupAdServiceClient.GetAdGroupAdAsync(request);
        }
        /// <summary>Snippet for MutateAdGroupAdsAsync</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 MutateAdGroupAdsAsync()
        {
            // Create client
            AdGroupAdServiceClient adGroupAdServiceClient = await AdGroupAdServiceClient.CreateAsync();

            // Initialize request argument(s)
            string customerId = "";
            IEnumerable <AdGroupAdOperation> operations = new AdGroupAdOperation[]
            {
                new AdGroupAdOperation(),
            };
            // Make the request
            MutateAdGroupAdsResponse response = await adGroupAdServiceClient.MutateAdGroupAdsAsync(customerId, operations);
        }
        /// <summary>Snippet for GetAdGroupAdAsync</summary>
        public async Task GetAdGroupAdAsync()
        {
            // Snippet: GetAdGroupAdAsync(string, CallSettings)
            // Additional: GetAdGroupAdAsync(string, CancellationToken)
            // Create client
            AdGroupAdServiceClient adGroupAdServiceClient = await AdGroupAdServiceClient.CreateAsync();

            // Initialize request argument(s)
            string resourceName = "customers/[CUSTOMER_ID]/adGroupAds/[AD_GROUP_ID]~[AD_ID]";
            // Make the request
            AdGroupAd response = await adGroupAdServiceClient.GetAdGroupAdAsync(resourceName);

            // End snippet
        }
        /// <summary>Snippet for GetAdGroupAdAsync</summary>
        public async Task GetAdGroupAdResourceNamesAsync()
        {
            // Snippet: GetAdGroupAdAsync(AdGroupAdName, CallSettings)
            // Additional: GetAdGroupAdAsync(AdGroupAdName, CancellationToken)
            // Create client
            AdGroupAdServiceClient adGroupAdServiceClient = await AdGroupAdServiceClient.CreateAsync();

            // Initialize request argument(s)
            AdGroupAdName resourceName = AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[AD_ID]");
            // Make the request
            AdGroupAd response = await adGroupAdServiceClient.GetAdGroupAdAsync(resourceName);

            // End snippet
        }
        /// <summary>Snippet for MutateAdGroupAdsAsync</summary>
        public async Task MutateAdGroupAdsAsync()
        {
            // Snippet: MutateAdGroupAdsAsync(string, IEnumerable<AdGroupAdOperation>, CallSettings)
            // Additional: MutateAdGroupAdsAsync(string, IEnumerable<AdGroupAdOperation>, CancellationToken)
            // Create client
            AdGroupAdServiceClient adGroupAdServiceClient = await AdGroupAdServiceClient.CreateAsync();

            // Initialize request argument(s)
            string customerId = "";
            IEnumerable <AdGroupAdOperation> operations = new AdGroupAdOperation[]
            {
                new AdGroupAdOperation(),
            };
            // Make the request
            MutateAdGroupAdsResponse response = await adGroupAdServiceClient.MutateAdGroupAdsAsync(customerId, operations);

            // End snippet
        }
        /// <summary>Snippet for MutateAdGroupAdsAsync</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 MutateAdGroupAdsRequestObjectAsync()
        {
            // Create client
            AdGroupAdServiceClient adGroupAdServiceClient = await AdGroupAdServiceClient.CreateAsync();

            // Initialize request argument(s)
            MutateAdGroupAdsRequest request = new MutateAdGroupAdsRequest
            {
                CustomerId = "",
                Operations =
                {
                    new AdGroupAdOperation(),
                },
                PartialFailure = false,
                ValidateOnly   = false,
            };
            // Make the request
            MutateAdGroupAdsResponse response = await adGroupAdServiceClient.MutateAdGroupAdsAsync(request);
        }
        /// <summary>Snippet for MutateAdGroupAdsAsync</summary>
        public async Task MutateAdGroupAdsRequestObjectAsync()
        {
            // Snippet: MutateAdGroupAdsAsync(MutateAdGroupAdsRequest, CallSettings)
            // Additional: MutateAdGroupAdsAsync(MutateAdGroupAdsRequest, CancellationToken)
            // Create client
            AdGroupAdServiceClient adGroupAdServiceClient = await AdGroupAdServiceClient.CreateAsync();

            // Initialize request argument(s)
            MutateAdGroupAdsRequest request = new MutateAdGroupAdsRequest
            {
                CustomerId = "",
                Operations =
                {
                    new AdGroupAdOperation(),
                },
                PartialFailure = false,
                ValidateOnly   = false,
            };
            // Make the request
            MutateAdGroupAdsResponse response = await adGroupAdServiceClient.MutateAdGroupAdsAsync(request);

            // End snippet
        }