/// <summary>
        /// Returns the list of AdGroupCriterion that match the query.
        ///
        /// @param query The SQL-like AWQL query string
        /// @returns A list of AdGroupCriterion
        /// @throws ApiException when the query is invalid or there are errors processing the request.
        /// </summary>
        public async Task <AdGroupCriterionPage> QueryAsync(string query)
        {
            var binding = new AdGroupCriterionServiceSoapBinding("https://adwords.google.com/api/adwords/cm/v201609/AdGroupCriterionService", _config.AccessToken, _config.Timeout, _config.EnableGzipCompression, _netUtil, _logger);
            var inData  = new SoapData <AdGroupCriterionServiceRequestHeader, AdGroupCriterionServiceQuery>();

            inData.Header = new AdGroupCriterionServiceRequestHeader();
            AssignHeaderValues(inData.Header);
            inData.Body       = new AdGroupCriterionServiceQuery();
            inData.Body.Query = query;
            var outData = await binding.QueryAsync(inData).ConfigureAwait(false);

            return(outData.Body.Rval);
        }
        /// <summary>
        /// Adds labels to the AdGroupCriterion or removes labels from the AdGroupCriterion
        /// <p>Add - Apply an existing label to an existing
        /// {@linkplain AdGroupCriterion ad group criterion}. The {@code adGroupId} and
        /// {@code criterionId}
        /// must reference an existing {@linkplain AdGroupCriterion ad group criterion}. The
        /// {@code labelId} must reference an existing {@linkplain Label label}.
        /// <p>Remove - Removes the link between the specified
        /// {@linkplain AdGroupCriterion ad group criterion} and {@linkplain Label label}.</p>
        /// @param operations the operations to apply
        /// @return a list of AdGroupCriterionLabel where each entry in the list is the result of
        /// applying the operation in the input list with the same index. For an
        /// add operation, the returned AdGroupCriterionLabel contains the AdGroupId, CriterionId and the
        /// LabelId. In the case of a remove operation, the returned AdGroupCriterionLabel will only have
        /// AdGroupId and CriterionId.
        /// @throws ApiException when there are one or more errors with the request
        /// </summary>
        public async Task <AdGroupCriterionLabelReturnValue> MutateLabelAsync(IEnumerable <AdGroupCriterionLabelOperation> operations)
        {
            var binding = new AdGroupCriterionServiceSoapBinding("https://adwords.google.com/api/adwords/cm/v201609/AdGroupCriterionService", _config.AccessToken, _config.Timeout, _config.EnableGzipCompression, _netUtil, _logger);
            var inData  = new SoapData <AdGroupCriterionServiceRequestHeader, AdGroupCriterionServiceMutateLabel>();

            inData.Header = new AdGroupCriterionServiceRequestHeader();
            AssignHeaderValues(inData.Header);
            inData.Body            = new AdGroupCriterionServiceMutateLabel();
            inData.Body.Operations = new List <AdGroupCriterionLabelOperation>(operations);
            var outData = await binding.MutateLabelAsync(inData).ConfigureAwait(false);

            return(outData.Body.Rval);
        }