diff --git a/ChangeLog b/ChangeLog index 9dde24649..ea24ea720 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +0.4.0: + - Adding support for Google Ads API v0_3. + 0.3.0: - Adding support for Google Ads API v0_2. - Bumping dependency for google-gax to 1.3 to match generated service clients. diff --git a/examples/advanced_operations/add_ad_group_bid_modifier.rb b/examples/advanced_operations/add_ad_group_bid_modifier.rb new file mode 100644 index 000000000..070b12ac9 --- /dev/null +++ b/examples/advanced_operations/add_ad_group_bid_modifier.rb @@ -0,0 +1,125 @@ +#!/usr/bin/env ruby +# Encoding: utf-8 +# +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# This example demonstrates how to add an ad group bid modifier for mobile +# devices. To get ad group bid modifiers, +# see advanced_operations/get_ad_group_bid_modifier.rb + +require 'optparse' +require 'google/ads/googleads' + +def add_ad_group_bid_modifier(customer_id, ad_group_id, bid_modifier_value) + # GoogleadsClient will read a config file from ENV['HOME']/googleads_config.rb + # when called without parameters + client = Google::Ads::Googleads::GoogleadsClient.new + + # Create Ad Group Bid Modifier Service + ad_group_bid_modifier_service = client.service(:AdGroupBidModifier) + + # Creates an ad group bid modifier for mobile devices with the specified + # ad group ID and bid modifier value. + ad_group_bid_modifier = client.resource(:AdGroupBidModifier) + + # Sets the ad group. + ad_group_resource = client.path.ad_group(customer_id, ad_group_id) + ad_group_bid_modifier.ad_group = client.wrapper.string(ad_group_resource) + + # Sets the Bid Modifier. + ad_group_bid_modifier.bid_modifier = client.wrapper.double(bid_modifier_value) + + # Sets the Device. + ad_group_bid_modifier.device = client.resource(:DeviceInfo) + ad_group_bid_modifier.device.type = client.enum(:Device)::MOBILE + + # Create the operation. + operation = client.operation(:AdGroupBidModifier) + operation['create'] = ad_group_bid_modifier + + # Add the ad group ad. + response = ad_group_bid_modifier_service.mutate_ad_group_bid_modifiers( + customer_id, [operation]) + + puts sprintf('Added %d ad group bid modifiers:', response.results.size) + response.results.each do |added_ad_group_bid_modifier| + puts sprintf("\t%s", added_ad_group_bid_modifier.resource_name) + end +end + +if __FILE__ == $0 + options = {} + # The following parameter(s) should be provided to run the example. You can + # either specify these by changing the INSERT_XXX_ID_HERE values below, or on + # the command line. + # + # Parameters passed on the command line will override any parameters set in + # code. + # + # Running the example with -h will print the command line usage. + options[:customer_id] = 'INSERT_CUSTOMER_ID_HERE' + options[:ad_group_id] = 'INSERT_AD_GROUP_ID_HERE' + options[:bid_modifier_value] = 1.5 + + OptionParser.new do |opts| + opts.banner = sprintf('Usage: %s [options]', File.basename(__FILE__)) + + opts.separator '' + opts.separator 'Options:' + + opts.on('-C', '--customer-id CUSTOMER-ID', String, 'Customer ID') do |v| + options[:customer_id] = v + end + + opts.on('-A', '--ad-group-id AD-GROUP-ID', String, 'AdGroup ID') do |v| + options[:ad_group_id] = v + end + + opts.on('-B', '--bid-modifier-value BID-MODIFIER-VALUE', String, + 'Bid Modifier Value') do |v| + options[:bid_modifier_value] = v + end + + opts.separator '' + opts.separator 'Help:' + + opts.on_tail('-h', '--help', 'Show this message') do + puts opts + exit + end + end.parse! + + begin + add_ad_group_bid_modifier(options[:customer_id], + options[:ad_group_id], options[:bid_modifier_value]) + rescue Google::Ads::Googleads::Errors::GoogleAdsError => e + e.failure.errors.each do |error| + STDERR.printf("Error with message: %s\n", error.message) + if error.location + error.location.field_path_elements.each do |field_path_element| + STDERR.printf("\tOn field: %s\n", field_path_element.field_name) + end + end + error.error_code.to_h.each do |k, v| + next if v == :UNSPECIFIED + STDERR.printf("\tType: %s\n\tCode: %s\n", k, v) + end + end + rescue Google::Gax::RetryError => e + STDERR.printf("Error: '%s'\n\tCause: '%s'\n\tCode: %d\n\tDetails: '%s'\n" \ + "\tRequest-Id: '%s'\n", e.message, e.cause.message, e.cause.code, + e.cause.details, e.cause.metadata['request-id']) + end +end diff --git a/examples/advanced_operations/create_and_attach_shared_keyword_set.rb b/examples/advanced_operations/create_and_attach_shared_keyword_set.rb new file mode 100755 index 000000000..b70e67eeb --- /dev/null +++ b/examples/advanced_operations/create_and_attach_shared_keyword_set.rb @@ -0,0 +1,150 @@ +#!/usr/bin/env ruby +# Encoding: utf-8 +# +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# This example creates a shared list of negative broad match keywords. It then +# attaches them to a campaign. + +require 'optparse' +require 'google/ads/googleads' +require 'date' + +def create_and_attach_shared_keyword_set(customer_id, campaign_id) + # GoogleadsClient will read a config file from ENV['HOME']/googleads_config.rb + # when called without parameters + + client = Google::Ads::Googleads::GoogleadsClient.new + + shared_set_service = client.service(:SharedSet) + shared_criterion_service = client.service(:SharedCriterion) + campaign_shared_set_service = client.service(:CampaignSharedSet) + + # Keywords to create a shared set of. + keywords = ['mars cruise', 'mars hotels'] + + # Create shared negative keyword set. + shared_set = client.resource(:SharedSet) + shared_set.name = client.wrapper.string( + sprintf('API Negative keyword list - %s', (Time.new.to_f * 1000).to_i)) + shared_set.type = client.enum(:SharedSetType)::NEGATIVE_KEYWORDS + + operation = client.operation(:SharedSet) + operation.create = shared_set + + response = shared_set_service.mutate_shared_sets(customer_id, [operation]) + + shared_set_resource_name = response.results.first.resource_name + puts sprintf('Created shared set %s', shared_set_resource_name) + + shared_criteria = keywords.map do |keyword| + shared_criterion = client.resource(:SharedCriterion) + keyword_info = client.resource(:KeywordInfo) + keyword_info.text = client.wrapper.string(keyword) + keyword_info.match_type = client.enum(:KeywordMatchType)::BROAD + shared_criterion.keyword = keyword_info + shared_criterion.shared_set = + client.wrapper.string(shared_set_resource_name) + + shared_criterion + end + + operations = shared_criteria.map do |criterion| + operation = client.operation(:SharedCriterion) + operation.create = criterion + + operation + end + + response = shared_criterion_service.mutate_shared_criteria(customer_id, + operations) + + response.results.each do |result| + puts sprintf('Created shared criterion %s', result.resource_name) + end + + campaign_set = client.resource(:CampaignSharedSet) + campaign_set.campaign = client.wrapper.string( + client.path.campaign(customer_id, campaign_id)) + campaign_set.shared_set = client.wrapper.string(shared_set_resource_name) + + operation = client.operation(:CampaignSharedSet) + operation.create = campaign_set + + response = campaign_shared_set_service.mutate_campaign_shared_sets( + customer_id, [operation]) + + puts sprintf('Created campaign shared set %s', + response.results.first.resource_name) +end + +if __FILE__ == $PROGRAM_NAME + options = {} + # The following parameter(s) should be provided to run the example. You can + # either specify these by changing the INSERT_XXX_ID_HERE values below, or on + # the command line. + # + # Parameters passed on the command line will override any parameters set in + # code. + # + # Running the example with -h will print the command line usage. + options[:customer_id] = 'INSERT_CUSTOMER_ID_HERE' + options[:campaign_id] = 'INSERT_CAMPAIGN_ID_HERE' + + OptionParser.new do |opts| + opts.banner = sprintf('Usage: ruby %s [options]', File.basename(__FILE__)) + + opts.separator '' + opts.separator 'Options:' + + opts.on('-C', '--customer-id CUSTOMER-ID', String, 'Customer ID') do |v| + options[:customer_id] = v + end + + opts.on('-c', '--campaign-id CAMPAIGN-ID', String, 'Campaign ID') do |v| + options[:campaign_id] = v + end + + opts.separator '' + opts.separator 'Help:' + + opts.on_tail('-h', '--help', 'Show this message') do + puts opts + exit + end + end.parse! + + begin + create_and_attach_shared_keyword_set(options[:customer_id], + options[:campaign_id]) + rescue Google::Ads::Googleads::Errors::GoogleAdsError => e + e.failure.errors.each do |error| + STDERR.printf("Error with message: %s\n", error.message) + if error.location + error.location.field_path_elements.each do |field_path_element| + STDERR.printf("\tOn field: %s\n", field_path_element.field_name) + end + end + error.error_code.to_h.each do |k, v| + next if v == :UNSPECIFIED + STDERR.printf("\tType: %s\n\tCode: %s\n", k, v) + end + end + rescue Google::Gax::RetryError => e + STDERR.printf("Error: '%s'\n\tCause: '%s'\n\tCode: %d\n\tDetails: '%s'\n" \ + "\tRequest-Id: '%s'\n", e.message, e.cause.message, e.cause.code, + e.cause.details, e.cause.metadata['request-id']) + end +end diff --git a/examples/advanced_operations/find_and_remove_criteria_from_shared_set.rb b/examples/advanced_operations/find_and_remove_criteria_from_shared_set.rb new file mode 100755 index 000000000..93ec8208f --- /dev/null +++ b/examples/advanced_operations/find_and_remove_criteria_from_shared_set.rb @@ -0,0 +1,154 @@ +#!/usr/bin/env ruby +# Encoding: utf-8 +# +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# This example demonstrates how to find shared sets, shared set criteria, and +# how to remove them. + +require 'optparse' +require 'google/ads/googleads' + +def find_and_remove_criteria_from_shared_set(customer_id, campaign_id) + # GoogleadsClient will read a config file from ENV['HOME']/googleads_config.rb + # when called without parameters + + client = Google::Ads::Googleads::GoogleadsClient.new + + ga_service = client.service(:GoogleAds) + shared_criterion_service = client.service(:SharedCriterion) + + shared_set_ids = [] + criterion_ids = [] + + # First, retrieve all shared sets associated with the campaign. + query = <<~QUERY + SELECT shared_set.id, shared_set.name + FROM campaign_shared_set + WHERE campaign.id = #{campaign_id} + QUERY + + response = ga_service.search(customer_id, query, page_size: PAGE_SIZE) + + response.each do |row| + shared_set = row.shared_set + puts sprintf("Campaign shared set ID %d and name '%s' was found.", + shared_set.id, shared_set.name) + + shared_set_ids << shared_set.id + end + + # Next, retrieve shared criteria for all found shared sets. + query = <<~QUERY + SELECT shared_criterion.type, shared_criterion.keyword.text, + shared_criterion.keyword.match_type, shared_set.id + FROM shared_criterion + WHERE shared_set.id IN (#{shared_set_ids.join(',')}) + QUERY + + response = ga_service.search(customer_id, query, page_size: PAGE_SIZE) + + response.each do |row| + shared_criterion = row.shared_criterion + if shared_criterion.type == :KEYWORD + puts sprintf( + "Shared criterion with resource name '%s' for negative keyword " + + "with text '%s' and match type '%s' was found.", + shared_criterion.resource_name, + shared_criterion.keyword.text, + shared_criterion.keyword.match_type) + else + puts sprintf("Shared criterion with resource name '%s' was found.", + shared_criterion.resource_name) + end + + criterion_ids << shared_criterion.resource_name + end + + # Finally, remove the criteria. + operations = criterion_ids.map do |criterion| + operation = client.operation(:SharedCriterion) + operation.remove = criterion + + operation + end + + response = shared_criterion_service.mutate_shared_criteria(customer_id, + operations) + response.results.each do |result| + puts sprintf("Removed shared criterion %s", result.resource_name) + end +end + +if __FILE__ == $PROGRAM_NAME + PAGE_SIZE = 1000 + + options = {} + # The following parameter(s) should be provided to run the example. You can + # either specify these by changing the INSERT_XXX_ID_HERE values below, or on + # the command line. + # + # Parameters passed on the command line will override any parameters set in + # code. + # + # Running the example with -h will print the command line usage. + options[:customer_id] = 'INSERT_CUSTOMER_ID_HERE' + options[:campaign_id] = 'INSERT_CAMPAIGN_ID_HERE' + + OptionParser.new do |opts| + opts.banner = sprintf('Usage: ruby %s [options]', File.basename(__FILE__)) + + opts.separator '' + opts.separator 'Options:' + + opts.on('-C', '--customer-id CUSTOMER-ID', String, 'Customer ID') do |v| + options[:customer_id] = v + end + + opts.on('-c', '--campaign-id CAMPAIGN-ID', String, 'Campaign ID') do |v| + options[:campaign_id] = v + end + + opts.separator '' + opts.separator 'Help:' + + opts.on_tail('-h', '--help', 'Show this message') do + puts opts + exit + end + end.parse! + + begin + find_and_remove_criteria_from_shared_set(options[:customer_id], + options[:campaign_id]) + rescue Google::Ads::Googleads::Errors::GoogleAdsError => e + e.failure.errors.each do |error| + STDERR.printf("Error with message: %s\n", error.message) + if error.location + error.location.field_path_elements.each do |field_path_element| + STDERR.printf("\tOn field: %s\n", field_path_element.field_name) + end + end + error.error_code.to_h.each do |k, v| + next if v == :UNSPECIFIED + STDERR.printf("\tType: %s\n\tCode: %s\n", k, v) + end + end + rescue Google::Gax::RetryError => e + STDERR.printf("Error: '%s'\n\tCause: '%s'\n\tCode: %d\n\tDetails: '%s'\n" \ + "\tRequest-Id: '%s'\n", e.message, e.cause.message, e.cause.code, + e.cause.details, e.cause.metadata['request-id']) + end +end diff --git a/examples/advanced_operations/get_ad_group_bid_modifiers.rb b/examples/advanced_operations/get_ad_group_bid_modifiers.rb new file mode 100644 index 000000000..cebb87877 --- /dev/null +++ b/examples/advanced_operations/get_ad_group_bid_modifiers.rb @@ -0,0 +1,129 @@ +#!/usr/bin/env ruby +# Encoding: utf-8 +# +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# This example gets ad group bid modifiers. + +require 'optparse' +require 'google/ads/googleads' + +def get_ad_group_bid_modifiers(customer_id, ad_group_id = nil) + # GoogleadsClient will read a config file from ENV['HOME']/googleads_config.rb + # when called without parameters + client = Google::Ads::Googleads::GoogleadsClient.new + + ga_service = client.service(:GoogleAds) + + search_query = <<~QUERY + SELECT ad_group.id, + ad_group_bid_modifier.criterion_id, + ad_group_bid_modifier.bid_modifier, + ad_group_bid_modifier.device.type, + campaign.id + FROM ad_group_bid_modifier + QUERY + + if ad_group_id + search_query << sprintf('WHERE ad_group.id = %s', ad_group_id) + end + + response = ga_service.search( + customer_id, + search_query, + page_size: PAGE_SIZE + ) + + response.each do |row| + ad_group_bid_modifier = row.ad_group_bid_modifier + ad_group = row.ad_group + campaign = row.campaign + bid_modifier = '"nil"' + + if ad_group_bid_modifier.bid_modifier + bid_modifier = sprintf("%.2f", ad_group_bid_modifier.bid_modifier) + end + + puts sprintf('Ad group bid modifier with criterion ID %s, bid ' \ + 'modifier value %s, device type %s was found in ad group ' \ + 'ID %s of campaign ID %s.', + ad_group_bid_modifier.criterion_id, + bid_modifier, + ad_group_bid_modifier.device.type, + ad_group.id, + campaign.id + ) + end +end + +if __FILE__ == $0 + PAGE_SIZE = 1000 + options = {} + # The following parameter(s) should be provided to run the example. You can + # either specify these by changing the INSERT_XXX_ID_HERE values below, or on + # the command line. + # + # Parameters passed on the command line will override any parameters set in + # code. + # + # Running the example with -h will print the command line usage. + options[:customer_id] = 'INSERT_CUSTOMER_ID_HERE' + options[:ad_group_id] = nil + + OptionParser.new do |opts| + opts.banner = sprintf('Usage: %s [options]', File.basename(__FILE__)) + + opts.separator '' + opts.separator 'Options:' + + opts.on('-C', '--customer-id CUSTOMER-ID', String, 'Customer ID') do |v| + options[:customer_id] = v + end + + opts.on('-A', '--ad-group-id AD-GROUP-ID', String, + '(Optional) AdGroup ID') do |v| + options[:ad_group_id] = v + end + + opts.separator '' + opts.separator 'Help:' + + opts.on_tail('-h', '--help', 'Show this message') do + puts opts + exit + end + end.parse! + + begin + get_ad_group_bid_modifiers(options[:customer_id], options[:ad_group_id]) + rescue Google::Ads::Googleads::Errors::GoogleAdsError => e + e.failure.errors.each do |error| + STDERR.printf("Error with message: %s\n", error.message) + if error.location + error.location.field_path_elements.each do |field_path_element| + STDERR.printf("\tOn field: %s\n", field_path_element.field_name) + end + end + error.error_code.to_h.each do |k, v| + next if v == :UNSPECIFIED + STDERR.printf("\tType: %s\n\tCode: %s\n", k, v) + end + end + rescue Google::Gax::RetryError => e + STDERR.printf("Error: '%s'\n\tCause: '%s'\n\tCode: %d\n\tDetails: '%s'\n" \ + "\tRequest-Id: '%s'\n", e.message, e.cause.message, e.cause.code, + e.cause.details, e.cause.metadata['request-id']) + end +end diff --git a/examples/basic_operations/get_artifact_metadata.rb b/examples/basic_operations/get_artifact_metadata.rb new file mode 100644 index 000000000..58548d93b --- /dev/null +++ b/examples/basic_operations/get_artifact_metadata.rb @@ -0,0 +1,129 @@ +#!/usr/bin/env ruby +# Encoding: utf-8 +# +# Copyright:: Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# This example gets the metadata, such as whether the artifact is selectable, +# filterable and sortable, of an artifact. The artifact can be either a resource +# (such as customer, campaign) or a field (such as metrics.impressions, +# campaign.id). It'll also show the data type and artifacts that are +# selectable with the artifact. + +require 'optparse' +require 'google/ads/googleads' + +def get_artifact_metadata(artifact_name) + # This will read a config file from ENV['HOME']/googleads_config.rb + # when called without parameters. + client = Google::Ads::Googleads::GoogleadsClient.new + + gaf_service = client.service(:GoogleAdsField) + + query = <<~QUERY + SELECT + name, + category, + selectable, + filterable, + sortable, + selectable_with, + data_type, + is_repeated + QUERY + + query << sprintf("WHERE name = '%s'", artifact_name) + + response = gaf_service.search_google_ads_fields(query) + + if response.response.results.empty? + puts sprintf("The specified artifact '%s' doesn't exist", artifact_name) + return + end + + response.each do |row| + puts sprintf("An artifact named '%s' with category '%s' and data type " \ + '%s %s selectable, %s filterable, %s sortable and %s repeated.', + row.name.value, + row.category, + row.data_type, + is_or_not(row.selectable.value), + is_or_not(row.filterable.value), + is_or_not(row.sortable.value), + is_or_not(row.is_repeated.value) + ) + + unless row.selectable_with.empty? + puts 'The artifact can be selected with the following artifacts:' + puts (row.selectable_with.sort_by { |field| field.value }) + end + end +end + +# Returns "is" when the specified value is true and "is not" when the +# specified value is false +def is_or_not(bool) + bool ? 'is' : 'is not' +end + +if __FILE__ == $PROGRAM_NAME + options = {} + + # The following parameter(s) should be provided to run the example. You can + # either specify these by changing the INSERT_XXX_ID_HERE values below, or on + # the command line. + # + # Parameters passed on the command line will override any parameters set in + # code. + # + # Running the example with -h will print the command line usage. + options[:artifact_name] = 'campaign' + + OptionParser.new do |opts| + opts.banner = sprintf('Usage: ruby %s [options]', File.basename(__FILE__)) + + opts.separator '' + opts.separator 'Options:' + + help_msg = 'Artifact Name (e.g. a resource such as customer, campaign' \ + ' or a field such as metrics.impressions, campaign.id)' + + opts.on('-A', '--artifact-name ARTIFACT-NAME', String, help_msg) do |v| + options[:artifact_name] = v + end + + opts.separator '' + opts.separator 'Help:' + + opts.on_tail('-h', '--help', 'Show this message') do + puts opts + exit + end + end.parse! + + begin + get_artifact_metadata(options[:artifact_name]) + rescue Google::Ads::Googleads::Errors::GoogleAdsError => e + e.failure.errors.each do |error| + error.error_code.to_h.each do |k, v| + next if v == :UNSPECIFIED + STDERR.printf("Error: %s\nDetails: %s\n", k, v) + end + end + rescue Google::Gax::RetryError => e + STDERR.printf("Error: '%s'\n\tCause: '%s'\n\tCode: %d\n\tDetails: '%s'\n" \ + "\tRequest-Id: '%s'\n", e.message, e.cause.message, e.cause.code, + e.cause.details, e.cause.metadata['request-id']) + end +end diff --git a/examples/campaign_management/add_bid_modifier.rb b/examples/campaign_management/add_bid_modifier.rb new file mode 100644 index 000000000..e2002b44d --- /dev/null +++ b/examples/campaign_management/add_bid_modifier.rb @@ -0,0 +1,125 @@ +#!/usr/bin/env ruby +# Encoding: utf-8 +# +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# This example demonstrates how to add a campaign-level bid modifier +# for call interactions. + +require 'optparse' +require 'google/ads/googleads' + +def add_campaign_bid_modifier(customer_id, campaign_id, bid_modifier) + # GoogleadsClient will read a config file from ENV['HOME']/googleads_config.rb + # when called without parameters + client = Google::Ads::Googleads::GoogleadsClient.new + + # Create campaign Bid Modifier Service + campaign_bid_modifier_service = client.service(:CampaignBidModifier) + + # Creates a campaign bid modifier for mobile devices with the specified + # campaign ID and bid modifier value. + campaign_bid_modifier = client.resource(:CampaignBidModifier) + + # Sets the campaign. + campaign_resource = client.path.campaign(customer_id, campaign_id) + campaign_bid_modifier.campaign = client.wrapper.string(campaign_resource) + + # Sets the Bid Modifier. + campaign_bid_modifier.bid_modifier = client.wrapper.double(bid_modifier) + + # Sets the Interaction Type. + campaign_bid_modifier.interaction_type = client.resource(:InteractionType) + campaign_bid_modifier.interaction_type.type = + client.enum(:InteractionType)::CALLS + + # Create the operation. + operation = client.operation(:CampaignBidModifier) + operation['create'] = campaign_bid_modifier + + # Add the Campaign Bid Modifier + response = campaign_bid_modifier_service.mutate_campaign_bid_modifiers( + customer_id, [operation]) + + puts sprintf('Added %d campaign bid modifiers:', response.results.size) + response.results.each do |added_campaign_bid_modifier| + puts sprintf("\t%s", added_campaign_bid_modifier.resource_name) + end +end + +if __FILE__ == $0 + options = {} + # The following parameter(s) should be provided to run the example. You can + # either specify these by changing the INSERT_XXX_ID_HERE values below, or on + # the command line. + # + # Parameters passed on the command line will override any parameters set in + # code. + # + # Running the example with -h will print the command line usage. + options[:customer_id] = 'INSERT_CUSTOMER_ID_HERE' + options[:campaign_id] = 'INSERT_CAMPAIGN_ID_HERE' + options[:bid_modifier] = 'INSERT_BID_MODIFIER_HERE' + + OptionParser.new do |opts| + opts.banner = sprintf('Usage: %s [options]', File.basename(__FILE__)) + + opts.separator '' + opts.separator 'Options:' + + opts.on('-C', '--customer-id CUSTOMER-ID', String, 'Customer ID') do |v| + options[:customer_id] = v + end + + opts.on('-A', '--campaign-id CAMPAIGN-ID', String, 'Campaign ID') do |v| + options[:campaign_id] = v + end + + opts.on('-B', '--bid-modifier BID-MODIFIER', String, + 'Bid Modifier') do |v| + options[:bid_modifier] = v.to_f + end + + opts.separator '' + opts.separator 'Help:' + + opts.on_tail('-h', '--help', 'Show this message') do + puts opts + exit + end + end.parse! + + begin + add_campaign_bid_modifier(options[:customer_id], + options[:campaign_id], options[:bid_modifier]) + rescue Google::Ads::Googleads::Errors::GoogleAdsError => e + e.failure.errors.each do |error| + STDERR.printf("Error with message: %s\n", error.message) + if error.location + error.location.field_path_elements.each do |field_path_element| + STDERR.printf("\tOn field: %s\n", field_path_element.field_name) + end + end + error.error_code.to_h.each do |k, v| + next if v == :UNSPECIFIED + STDERR.printf("\tType: %s\n\tCode: %s\n", k, v) + end + end + rescue Google::Gax::RetryError => e + STDERR.printf("Error: '%s'\n\tCause: '%s'\n\tCode: %d\n\tDetails: '%s'\n" \ + "\tRequest-Id: '%s'\n", e.message, e.cause.message, e.cause.code, + e.cause.details, e.cause.metadata['request-id']) + end +end diff --git a/examples/campaign_management/add_campaign_group.rb b/examples/campaign_management/add_campaign_group.rb new file mode 100644 index 000000000..1cbfb653c --- /dev/null +++ b/examples/campaign_management/add_campaign_group.rb @@ -0,0 +1,152 @@ +#!/usr/bin/env ruby +# Encoding: utf-8 +# +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# This example adds a campaign group and then adds campaigns to the group. +# To get campaigns, run get_campaigns.rb. + +require 'optparse' +require 'google/ads/googleads' + +def add_campaign_group(client, customer_id) + # Create campaign group Service + campaign_group_service = client.service(:CampaignGroup) + + # Create a campaign group and set its name. + campaign_group = client.resource(:CampaignGroup) + campaign_group.name = client.wrapper.string( + sprintf("Mars campaign group #%s", (Time.new.to_f * 1000).to_i)) + + # Create the operation. + campaign_group_operation = client.operation(:CampaignGroup) + campaign_group_operation['create'] = campaign_group + + # Add the campaign group. + response = campaign_group_service.mutate_campaign_groups( + customer_id, [campaign_group_operation]) + + campaign_group_resource_name = response.results.first.resource_name + + puts sprintf('Added campaign group with resource name: %s', + campaign_group_resource_name) + + campaign_group_resource_name +end + +def add_campaigns_to_group(client, customer_id, campaign_group_resource_name, + campaign_ids) + # Create campaign group Service + campaign_service = client.service(:Campaign) + + campaign_operations = [] + + # Create a Campaign Resource and related Update Operation for each ID + campaign_ids.each do |campaign_id| + # Create a campaign group and set its name. + campaign = client.resource(:Campaign) + campaign.resource_name = client.path.campaign(customer_id, campaign_id) + + # Create an update mask for the changes in the Campaign + mask = client.field_mask.with campaign do + campaign.campaign_group = + client.wrapper.string(campaign_group_resource_name) + end + + # Create the operation. + operation = { + update: campaign, + update_mask: mask + } + + campaign_operations << operation + end + + # Add the campaign group. + response = campaign_service.mutate_campaigns(customer_id, campaign_operations) + + puts sprintf("Added %d campaigns to campaign group with resource name %s:", + response.results.length, campaign_group_resource_name) + + response.results.each do |updated_campaign| + puts sprintf("\t%s", updated_campaign.resource_name) + end +end + +if __FILE__ == $0 + options = {} + # The following parameter(s) should be provided to run the example. You can + # either specify these by changing the INSERT_XXX_ID_HERE values below, or on + # the command line. + # + # Parameters passed on the command line will override any parameters set in + # code. + # + # Running the example with -h will print the command line usage. + options[:customer_id] = 'INSERT_CUSTOMER_ID_HERE' + options[:campaign_ids] = [] + + OptionParser.new do |opts| + opts.banner = sprintf('Usage: %s [options]', File.basename(__FILE__)) + + opts.separator '' + opts.separator 'Options:' + + opts.on('-C', '--customer-id CUSTOMER-ID', String, 'Customer ID') do |v| + options[:customer_id] = v + end + + opts.on('-A', '--campaign-id CAMPAIGN-ID', String, 'Campaign ID') do |v| + options[:campaign_ids] << v + end + + opts.separator '' + opts.separator 'Help:' + + opts.on_tail('-h', '--help', 'Show this message') do + puts opts + exit + end + end.parse! + + begin + # GoogleadsClient will read a config file from ENV['HOME']/googleads_config.rb + # when called without parameters + client = Google::Ads::Googleads::GoogleadsClient.new + + campaign_group_resource_name = + add_campaign_group(client, options[:customer_id]) + + add_campaigns_to_group(client, options[:customer_id], + campaign_group_resource_name, options[:campaign_ids]) + rescue Google::Ads::Googleads::Errors::GoogleAdsError => e + e.failure.errors.each do |error| + STDERR.printf("Error with message: %s\n", error.message) + if error.location + error.location.field_path_elements.each do |field_path_element| + STDERR.printf("\tOn field: %s\n", field_path_element.field_name) + end + end + error.error_code.to_h.each do |k, v| + next if v == :UNSPECIFIED + STDERR.printf("\tType: %s\n\tCode: %s\n", k, v) + end + end + rescue Google::Gax::RetryError => e + STDERR.printf("Error: '%s'\n\tCause: '%s'\n\tCode: %d\n\tDetails: '%s'\n" \ + "\tRequest-Id: '%s'\n", e.message, e.cause.message, e.cause.code, + e.cause.details, e.cause.metadata['request-id']) + end +end diff --git a/examples/hotel_ads/add_hotel_ad.rb b/examples/hotel_ads/add_hotel_ad.rb new file mode 100644 index 000000000..796b70ff5 --- /dev/null +++ b/examples/hotel_ads/add_hotel_ad.rb @@ -0,0 +1,264 @@ +#!/usr/bin/env ruby +# Encoding: utf-8 +# +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# This example creates a hotel campaign, a hotel ad group, and a hotel ad group +# ad. +# +# Prerequisite: You need to have access to the Hotel Ads Center, which can be +# granted during integration with Google Hotels. The integration instructions +# can be found at: +# https://support.google.com/hotelprices/answer/6101897 + +require 'optparse' +require 'google/ads/googleads' +require 'date' + +def add_hotel_ads(customer_id, hotel_center_account_id, + cpc_bid_ceiling_micro_amount) + # GoogleadsClient will read a config file from ENV['HOME']/googleads_config.rb + # when called without parameters + client = Google::Ads::Googleads::GoogleadsClient.new + + # Create a budget to be used by the campaign that will be created below. + budget_resource = add_campaign_budget(client, customer_id) + + # Create a hotel campaign. + campaign_resource = add_hotel_campaign(client, customer_id, budget_resource, + hotel_center_account_id, cpc_bid_ceiling_micro_amount) + + # Create a hotel ad group. + ad_group_resource = add_hotel_ad_group(client, customer_id, campaign_resource) + + # Create a hotel ad group ad. + add_hotel_ad_group_ad(client, customer_id, ad_group_resource) +end + +# Creates a new campaign budget in the specified client account. +def add_campaign_budget(client, customer_id) + # Create the budget and set relevant fields. + budget = client.resource(:CampaignBudget) + budget.name = generate_random_name_field(client, + 'Interplanetary Cruise Budget') + budget.delivery_method = client.enum(:BudgetDeliveryMethod)::STANDARD + budget.amount_micros = client.wrapper.int64(50_000_000) + + # Create the budget operation. + campaign_budget_operation = client.operation(:CampaignBudget) + campaign_budget_operation['create'] = budget + + # Issue a mutate request. + campaign_budget_service = client.service(:CampaignBudget) + response = campaign_budget_service.mutate_campaign_budgets(customer_id, + [campaign_budget_operation]) + + # Fetch the new budget's resource name. + budget_resource = response.results.first.resource_name + + puts sprintf('Added budget with resource name "%s".', budget_resource) + + return budget_resource +end + +# Creates a new campaign in the specified client account. +def add_hotel_campaign(client, customer_id, budget_resource, + hotel_center_account_id, cpc_bid_ceiling_micro_amount) + # Create a campaign. + campaign = client.resource(:Campaign) + campaign.name = generate_random_name_field(client, + 'Interplanetary Cruise Campaign') + + # Configure settings related to hotel campaigns. + campaign.advertising_channel_type = + client.enum(:AdvertisingChannelType)::HOTEL + hotel_setting_info = client.resource(:HotelSettingInfo) + hotel_setting_info.hotel_center_id = + client.wrapper.int64(hotel_center_account_id) + campaign.hotel_setting = hotel_setting_info + + # Recommendation: Set the campaign to PAUSED when creating it to prevent the + # ads from immediately serving. Set to ENABLED once you've added targeting and + # the ads are ready to serve. + campaign.status = client.enum(:CampaignStatus)::PAUSED + + # Set the bidding strategy to PercentCpc. Only Manual CPC and Percent CPC can + # be used for hotel campaigns. + campaign.percent_cpc = client.resource(:PercentCpc) + campaign.percent_cpc.cpc_bid_ceiling_micros = + client.wrapper.int64(cpc_bid_ceiling_micro_amount) + + # Set the budget. + campaign.campaign_budget = client.wrapper.string(budget_resource) + + # Configures the campaign network options. Only Google Search is allowed for + # hotel campaigns. + network_settings = client.resource(:NetworkSettings) + network_settings.target_google_search = client.wrapper.bool(true) + campaign.network_settings = network_settings + + # Create a campaign operation. + campaign_operation = client.operation(:Campaign) + campaign_operation['create'] = campaign + + # Issue a mutate request to add the campaign. + campaign_service = client.service(:Campaign) + response = campaign_service.mutate_campaigns(customer_id, + [campaign_operation]) + + # Fetch the new campaign's resource name. + campaign_resource = response.results.first.resource_name + + puts sprintf('Added hotel campaign with resource name "%s".', + campaign_resource) + + return campaign_resource +end + +# Creates a new hotel ad group in the specified campaign. +def add_hotel_ad_group(client, customer_id, campaign_resource) + # Create an ad group. + ad_group = client.resource(:AdGroup) + ad_group.name = generate_random_name_field(client, + 'Earth to Mars Cruise') + + # Set the campaign. + ad_group.campaign = client.wrapper.string(campaign_resource) + + # Optional: Set the ad group type to HOTEL_ADS. + # This cannot be set to other types. + ad_group.type = client.enum(:AdGroupType)::HOTEL_ADS + ad_group.cpc_bid_micros = client.wrapper.int64(10_000_000) + ad_group.status = client.enum(:AdGroupStatus)::ENABLED + + # Create an ad group operation. + ad_group_operation = client.operation(:AdGroup) + ad_group_operation['create'] = ad_group + + # Issue a mutate request to add the ad group. + ad_group_service = client.service(:AdGroup) + response = ad_group_service.mutate_ad_groups(customer_id, + [ad_group_operation]) + + # Fetch the new ad group's resource name. + ad_group_resource = response.results.first.resource_name + + puts sprintf('Added hotel ad group with resource name "%s".', + ad_group_resource) + + return ad_group_resource +end + +# Creates a new hotel ad group ad in the specified ad group. +def add_hotel_ad_group_ad(client, customer_id, ad_group_resource) + # Create a new hotel ad. + ad = client.resource(:Ad) + ad.hotel_ad = client.resource(:HotelAdInfo) + + # Create a new ad group ad and sets the hotel ad to it. + ad_group_ad = client.resource(:AdGroupAd) + ad_group_ad.ad = ad + ad_group_ad.status = client.enum(:AdGroupAdStatus)::PAUSED + + # Set the ad group. + ad_group_ad.ad_group = client.wrapper.string(ad_group_resource) + + # Create an ad group ad operation. + ad_group_ad_operation = client.operation(:AdGroupAd) + ad_group_ad_operation['create'] = ad_group_ad + + # Issue a mutate request to add the ad group ad. + ad_group_ad_service = client.service(:AdGroupAd) + response = ad_group_ad_service.mutate_ad_group_ads(customer_id, + [ad_group_ad_operation]) + + # Fetch the new ad group ad's resource name. + ad_group_ad_resource = response.results.first.resource_name + + puts sprintf('Added hotel ad group ad with resource name "%s".', + ad_group_ad_resource) +end + +# Appends a random number to the provided description text and returns it as a +# string-wrapped value +def generate_random_name_field(client, text) + random_number = (Time.new.to_f * 100).to_i + formatted_name = sprintf('%s #%s', text, random_number) + client.wrapper.string(formatted_name) +end + +if __FILE__ == $0 + options = {} + # The following parameter(s) should be provided to run the example. You can + # either specify these by changing the INSERT_XXX_ID_HERE values below, or on + # the command line. + # + # Parameters passed on the command line will override any parameters set in + # code. + # + # Running the example with -h will print the command line usage. + options[:customer_id] = 'INSERT_CUSTOMER_ID_HERE' + options[:hotel_center_account_id] = 'INSERT_HOTEL_CENTER_ACCOUNT_ID_HERE' + options[:cpc_bid_ceiling_micro_amount] = 20_000_000 + + OptionParser.new do |opts| + opts.banner = sprintf('Usage: %s [options]', File.basename(__FILE__)) + opts.separator '' + opts.separator 'Options:' + opts.on('-C', '--customer-id CUSTOMER-ID', String, 'Customer ID') do |v| + options[:customer_id] = v + end + + opts.on('-H', '--hotel-center-account-id HOTEL-CENTER-ACCOUNT-ID', Integer, + 'Hotel Center Account ID') do |v| + options[:hotel_center_account_id] = v + end + + opts.on('-B', '--cpc-bid-ceiling-micro-amount CPC-BID-CEILING-MICRO_AMOUNT', + Integer, 'CPC Bid Ceiling Micro Amount') do |v| + options[:cpc_bid_ceiling_micro_amount] = v + end + + opts.separator '' + opts.separator 'Help:' + + opts.on_tail('-h', '--help', 'Show this message') do + puts opts + exit + end + end.parse! + + begin + add_hotel_ads(options[:customer_id], options[:hotel_center_account_id], + options[:cpc_bid_ceiling_micro_amount]) + rescue Google::Ads::Googleads::Errors::GoogleAdsError => e + e.failure.errors.each do |error| + STDERR.printf("Error with message: %s\n", error.message) + if error.location + error.location.field_path_elements.each do |field_path_element| + STDERR.printf("\tOn field: %s\n", field_path_element.field_name) + end + end + error.error_code.to_h.each do |k, v| + next if v == :UNSPECIFIED + STDERR.printf("\tType: %s\n\tCode: %s\n", k, v) + end + end + rescue Google::Gax::RetryError => e + STDERR.printf("Error: '%s'\n\tCause: '%s'\n\tCode: %d\n\tDetails: '%s'\n" \ + "\tRequest-Id: '%s'\n", e.message, e.cause.message, e.cause.code, + e.cause.details, e.cause.metadata['request-id']) + end +end diff --git a/examples/hotel_ads/add_hotel_ad_group_bid_modifiers.rb b/examples/hotel_ads/add_hotel_ad_group_bid_modifiers.rb new file mode 100644 index 000000000..9fb4f183a --- /dev/null +++ b/examples/hotel_ads/add_hotel_ad_group_bid_modifiers.rb @@ -0,0 +1,148 @@ +#!/usr/bin/env ruby +# Encoding: utf-8 +# +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# This example shows how to add ad group bid modifiers to a hotel ad group +# based on hotel check-in day and hotel length of stay. + +require 'optparse' +require 'google/ads/googleads' +require 'date' + +def add_hotel_ad_group_bid_modifiers(customer_id, ad_group_id) + # GoogleadsClient will read a config file from ENV['HOME']/googleads_config.rb + # when called without parameters + client = Google::Ads::Googleads::GoogleadsClient.new + operations = [] + + # 1) Creates an ad group bid modifier based on the hotel check-in day. + check_in_day_ad_group_bid_modifier = client.resource(:AdGroupBidModifier) + + # Sets the ad group. + ad_group_resource = client.path.ad_group(customer_id, ad_group_id) + check_in_day_ad_group_bid_modifier.ad_group = + client.wrapper.string(ad_group_resource) + + # Sets the check-in day to Monday. + hotel_check_in_day = client.resource(:HotelCheckInDayInfo) + hotel_check_in_day.day_of_week = client.enum(:DayOfWeek)::MONDAY + check_in_day_ad_group_bid_modifier.hotel_check_in_day = hotel_check_in_day + + # Sets the bid modifier value to 150%. + check_in_day_ad_group_bid_modifier.bid_modifier = client.wrapper.double(1.5) + + # Creates an ad group bid modifier operation. + check_in_day_ad_group_bid_modifier_operation = + client.operation(:AdGroupBidModifier) + check_in_day_ad_group_bid_modifier_operation['create'] = + check_in_day_ad_group_bid_modifier + operations << check_in_day_ad_group_bid_modifier_operation + + # 2) Creates an ad group bid modifier based on the hotel length of stay. + length_of_stay_ad_group_bid_modifier = client.resource(:AdGroupBidModifier) + + # Sets the ad group. + length_of_stay_ad_group_bid_modifier.ad_group = + client.wrapper.string(ad_group_resource) + + # Creates the hotel length of stay info. + length_of_stay_info = client.resource(:HotelLengthOfStayInfo) + length_of_stay_info.min_nights = client.wrapper.int64(3) + length_of_stay_info.max_nights = client.wrapper.int64(7) + length_of_stay_ad_group_bid_modifier.hotel_length_of_stay = + length_of_stay_info + + # Sets the bid modifier value to 170%. + length_of_stay_ad_group_bid_modifier.bid_modifier = client.wrapper.double(1.7) + + # Creates an ad group bid modifier operation. + length_of_stay_ad_group_bid_modifier_operation = + client.operation(:AdGroupBidModifier) + length_of_stay_ad_group_bid_modifier_operation['create'] = + length_of_stay_ad_group_bid_modifier + operations << length_of_stay_ad_group_bid_modifier_operation + + # 3) Issues a mutate request to add an ad group bid modifiers. + ad_group_bid_modifier_service = client.service(:AdGroupBidModifier) + response = ad_group_bid_modifier_service.mutate_ad_group_bid_modifiers( + customer_id, operations) + + # Print out resource names of the added ad group bid modifiers. + puts sprintf("Added %d hotel ad group bid modifiers:", response.results.size) + response.results.each do |added_ad_group_bid_modifier| + puts sprintf("\t%s", added_ad_group_bid_modifier.resource_name) + end +end + +if __FILE__ == $0 + options = {} + # The following parameter(s) should be provided to run the example. You can + # either specify these by changing the INSERT_XXX_ID_HERE values below, or on + # the command line. + # + # Parameters passed on the command line will override any parameters set in + # code. + # + # Running the example with -h will print the command line usage. + options[:customer_id] = 'INSERT_CUSTOMER_ID_HERE' + options[:ad_group_id] = 'INSERT_AD_GROUP_ID_HERE' + + OptionParser.new do |opts| + opts.banner = sprintf('Usage: %s [options]', File.basename(__FILE__)) + + opts.separator '' + opts.separator 'Options:' + + opts.on('-C', '--customer-id CUSTOMER-ID', String, 'Customer ID') do |v| + options[:customer_id] = v + end + + opts.on('-A', '--ad-group-id AD-GROUP-ID', Integer, + 'AdGroup ID') do |v| + options[:ad_group_id] = v + end + + opts.separator '' + opts.separator 'Help:' + + opts.on_tail('-h', '--help', 'Show this message') do + puts opts + exit + end + end.parse! + + begin + add_hotel_ad_group_bid_modifiers(options[:customer_id], + options[:ad_group_id]) + rescue Google::Ads::Googleads::Errors::GoogleAdsError => e + e.failure.errors.each do |error| + STDERR.printf("Error with message: %s\n", error.message) + if error.location + error.location.field_path_elements.each do |field_path_element| + STDERR.printf("\tOn field: %s\n", field_path_element.field_name) + end + end + error.error_code.to_h.each do |k, v| + next if v == :UNSPECIFIED + STDERR.printf("\tType: %s\n\tCode: %s\n", k, v) + end + end + rescue Google::Gax::RetryError => e + STDERR.printf("Error: '%s'\n\tCause: '%s'\n\tCode: %d\n\tDetails: '%s'\n" \ + "\tRequest-Id: '%s'\n", e.message, e.cause.message, e.cause.code, + e.cause.details, e.cause.metadata['request-id']) + end +end diff --git a/lib/google/ads/googleads/path_lookup_util.rb b/lib/google/ads/googleads/path_lookup_util.rb index 18849ddc5..4c04e3b8c 100644 --- a/lib/google/ads/googleads/path_lookup_util.rb +++ b/lib/google/ads/googleads/path_lookup_util.rb @@ -54,6 +54,12 @@ def bidding_strategy(customer_id, bidding_strategy_id) customer_id.to_s, bidding_strategy_id.to_s) end + def campaign_bid_modifier(customer_id, campaign_bid_modifier_id) + @proto_lookup_util.service(:CampaignBidModifier). + campaign_bid_modifier_path(customer_id.to_s, + campaign_bid_modifier_id.to_s) + end + def campaign_budget(customer_id, campaign_budget_id) @proto_lookup_util.service(:CampaignBudget).campaign_budget_path( customer_id.to_s, campaign_budget_id.to_s) @@ -66,6 +72,17 @@ def campaign_criterion(customer_id, campaign_id, criterion_id) ) end + def campaign_group(customer_id, campaign_group_id) + @proto_lookup_util.service(:CampaignGroup).campaign_group_path( + customer_id.to_s, campaign_group_id.to_s) + end + + def campaign_shared_set(customer_id, campaign_shared_set_id) + @proto_lookup_util.service(:CampaignSharedSet). + campaign_shared_set_path(customer_id.to_s, + campaign_shared_set_id.to_s) + end + def campaign(customer_id, campaign_id) @proto_lookup_util.service(:Campaign).campaign_path( customer_id.to_s, campaign_id.to_s) @@ -96,6 +113,18 @@ def recommendation(customer_id, recommendation_id) @proto_lookup_util.service(:Recommendation).recommendation_path( customer_id.to_s, recommendation_id.to_s) end + + def shared_criterion(customer_id, shared_set_id, criterion_id) + @proto_lookup_util.service(:SharedCriterion).shared_criteria_path( + customer_id.to_s, + sprintf('%s_%s', shared_set_id.to_s, criterion_id.to_s) + ) + end + + def shared_set(customer_id, shared_set_id) + @proto_lookup_util.service(:SharedSet).shared_set_path( + customer_id.to_s, shared_set_id.to_s) + end end end end diff --git a/lib/google/ads/googleads/proto_lookup_util.rb b/lib/google/ads/googleads/proto_lookup_util.rb index 94588bd81..7e8f7589e 100644 --- a/lib/google/ads/googleads/proto_lookup_util.rb +++ b/lib/google/ads/googleads/proto_lookup_util.rb @@ -49,11 +49,15 @@ class ProtoLookupUtil AdGroup: ['resources', 'ad_group_pb', 'AdGroup'], AdGroupBidModifier: ['resources', 'ad_group_bid_modifier_pb', 'AdGroupBidModifier'], + Ad: ['resources', 'ad_pb', 'Ad'], BiddingStrategy: ['resources', 'bidding_strategy_pb', 'BiddingStrategy'], + CampaignBidModifier: ['resources', 'campaign_bid_modifier_pb', + 'CampaignBidModifier'], CampaignBudget: ['resources', 'campaign_budget_pb', 'CampaignBudget'], CampaignCriterion: ['resources', 'campaign_criterion_pb', 'CampaignCriterion'], + CampaignGroup: ['resources', 'campaign_group_pb', 'CampaignGroup'], Campaign: ['resources', 'campaign_pb', 'Campaign'], NetworkSettings: ['resources', 'campaign_pb', 'Campaign::NetworkSettings'], @@ -61,6 +65,10 @@ class ProtoLookupUtil 'Campaign::HotelSettingInfo'], DynamicSearchAdsSetting: ['resources', 'campaign_pb', 'Campaign::DynamicSearchAdsSetting'], + ShoppingSetting: ['resources', 'campaign_pb', + 'Campaign::ShoppingSetting'], + CampaignSharedSet: ['resources', 'campaign_shared_set_pb', + 'CampaignSharedSet'], Customer: ['resources', 'customer_pb', 'Customer'], GeoTargetConstant: ['resources', 'geo_target_constant_pb', 'GeoTargetConstant'], @@ -84,16 +92,30 @@ class ProtoLookupUtil 'Recommendation::TargetCpaOptInRecommendation'], TargetCpaOptInRecommendationOption: ['resources', 'recommendation_pb', 'Recommendation::TargetCpaOptInRecommendation::TargetCpaOptInRecommendationOption'], - Ad: ['common', 'ad_pb', 'Ad'], - TextAdInfo: ['common', 'ad_pb', 'TextAdInfo'], - ExpandedTextAdInfo: ['common', 'ad_pb', 'ExpandedTextAdInfo'], - DynamicSearchAdInfo: ['common', 'ad_pb', 'DynamicSearchAdInfo'], - ResponsiveDisplayAdInfo: ['common', 'ad_pb', + MaximizeConversionsOptInRecommendation: ['resources', + 'recommendation_pb', + 'Recommendation::MaximizeConversionsOptInRecommendation'], + EnhancedCpcOptInRecommendation: ['resources', 'recommendation_pb', + 'Recommendation::EnhancedCpcOptInRecommendation'], + SearchPartnersOptInRecommendation: ['resources', 'recommendation_pb', + 'Recommendation::SearchPartnersOptInRecommendation'], + MaximizeClicksOptInRecommendation: ['resources', 'recommendation_pb', + 'Recommendation::MaximizeClicksOptInRecommendation'], + OptimizeAdRotationRecommendation: ['resources', 'recommendation_pb', + 'Recommendation::OptimizeAdRotationRecommendation'], + SharedCriterion: ['resources', 'shared_criterion_pb', + 'SharedCriterion'], + SharedSet: ['resources', 'shared_set_pb', 'SharedSet'], + TextAdInfo: ['common', 'ad_type_infos_pb', 'TextAdInfo'], + ExpandedTextAdInfo: ['common', 'ad_type_infos_pb', 'ExpandedTextAdInfo'], + DynamicSearchAdInfo: ['common', 'ad_type_infos_pb', 'DynamicSearchAdInfo'], + ResponsiveDisplayAdInfo: ['common', 'ad_type_infos_pb', 'ResponsiveDisplayAdInfo'], - CallOnlyAdInfo: ['common', 'ad_pb', 'CallOnlyAdInfo'], - ExpandedDynamicSearchAdInfo: ['common', 'ad_pb', + CallOnlyAdInfo: ['common', 'ad_type_infos_pb', 'CallOnlyAdInfo'], + ExpandedDynamicSearchAdInfo: ['common', 'ad_type_infos_pb', 'ExpandedDynamicSearchAdInfo'], - HotelAdInfo: ['common', 'ad_pb', 'HotelAdInfo'], + HotelAdInfo: ['common', 'ad_type_infos_pb', 'HotelAdInfo'], + ShoppingSmartAdInfo: ['common', 'ad_type_infos_pb', 'ShoppingSmartAdInfo'], EnhancedCpc: ['common', 'bidding_pb', 'EnhancedCpc'], ManualCpc: ['common', 'bidding_pb', 'ManualCpc'], ManualCpm: ['common', 'bidding_pb', 'ManualCpm'], @@ -108,7 +130,7 @@ class ProtoLookupUtil PercentCpc: ['common', 'bidding_pb', 'PercentCpc'], KeywordInfo: ['common', 'criteria_pb', 'KeywordInfo'], LocationInfo: ['common', 'criteria_pb', 'LocationInfo'], - PlatformInfo: ['common', 'criteria_pb', 'PlatformInfo'], + DeviceInfo: ['common', 'criteria_pb', 'DeviceInfo'], ListingGroupInfo: ['common', 'criteria_pb', 'ListingGroupInfo'], ListingDimensionInfo: ['common', 'criteria_pb', 'ListingDimensionInfo'], @@ -121,6 +143,9 @@ class ProtoLookupUtil HotelCityInfo: ['common', 'criteria_pb', 'HotelCityInfo'], ListingCustomAttributeInfo: ['common', 'criteria_pb', 'ListingCustomAttributeInfo'], + ProductConditionInfo: ['common', 'criteria_pb', + 'ProductConditionInfo'], + ProductTypeInfo: ['common', 'criteria_pb', 'ProductTypeInfo'], HotelDateSelectionTypeInfo: ['common', 'criteria_pb', 'HotelDateSelectionTypeInfo'], HotelAdvanceBookingWindowInfo: ['common', 'criteria_pb', @@ -128,9 +153,28 @@ class ProtoLookupUtil HotelLengthOfStayInfo: ['common', 'criteria_pb', 'HotelLengthOfStayInfo'], HotelCheckInDayInfo: ['common', 'criteria_pb', 'HotelCheckInDayInfo'], + InteractionTypeInfo: ['common', 'criteria_pb', 'InteractionTypeInfo'], + AdScheduleInfo: ['common', 'criteria_pb', 'AdScheduleInfo'], CustomParameter: ['common', 'custom_parameter_pb', 'CustomParameter'], Metrics: ['common', 'metrics_pb', 'Metrics'], PolicyViolationKey: ['common', 'policy_pb', 'PolicyViolationKey'], + PolicyTopicEntry: ['common', 'policy_pb', 'PolicyTopicEntry'], + PolicyTopicEvidence: ['common', 'policy_pb', 'PolicyTopicEvidence'], + TextList: ['common', 'policy_pb', 'PolicyTopicEvidence::TextList'], + WebsiteList: ['common', 'policy_pb', + 'PolicyTopicEvidence::WebsiteList'], + DestinationTextList: ['common', 'policy_pb', + 'PolicyTopicEvidence::DestinationTextList'], + DestinationMismatch: ['common', 'policy_pb', + 'PolicyTopicEvidence::DestinationMismatch'], + PolicyTopicConstraint: ['common', 'policy_pb', + 'PolicyTopicConstraint'], + CountryConstraintList: ['common', 'policy_pb', + 'PolicyTopicConstraint::CountryConstraintList'], + ResellerConstraint: ['common', 'policy_pb', + 'PolicyTopicConstraint::ResellerConstraint'], + CountryConstraint: ['common', 'policy_pb', + 'PolicyTopicConstraint::CountryConstraint'], Value: ['common', 'value_pb', 'Value'], CampaignBudgetParameters: ['services', 'recommendation_service_pb', 'ApplyRecommendationOperation::CampaignBudgetParameters'], @@ -159,11 +203,16 @@ class ProtoLookupUtil BiddingSource: ['bidding_source_pb', 'BiddingSource'], BiddingStrategyType: ['bidding_strategy_type_pb', 'BiddingStrategyType'], + BidModifierSource: ['bid_modifier_source_pb', 'BidModifierSource'], BudgetDeliveryMethod: ['budget_delivery_method_pb', 'BudgetDeliveryMethod'], BudgetStatus: ['budget_status_pb', 'BudgetStatus'], + CampaignGroupStatus: ['campaign_group_status_pb', + 'CampaignGroupStatus'], CampaignServingStatus: ['campaign_serving_status_pb', 'CampaignServingStatus'], + CampaignSharedSetStatus: ['campaign_shared_set_status_pb', + 'CampaignSharedSetStatus'], CampaignStatus: ['campaign_status_pb', 'CampaignStatus'], DayOfWeek: ['day_of_week_pb', 'DayOfWeek'], Device: ['device_pb', 'Device'], @@ -171,14 +220,28 @@ class ProtoLookupUtil 'GoogleAdsFieldCategory'], GoogleAdsFieldDataType: ['google_ads_field_data_type_pb', 'GoogleAdsFieldDataType'], + HotelDateSelectionType: ['hotel_date_selection_type_pb', + 'HotelDateSelectionType'], + InteractionType: ['interaction_type_pb', 'InteractionType'], KeywordMatchType: ['keyword_match_type_pb', 'KeywordMatchType'], ListingCustomAttributeIndex: ['listing_custom_attribute_index_pb', 'ListingCustomAttributeIndex'], ListingGroupType: ['listing_group_type_pb', 'ListingGroupType'], + MinuteOfHour: ['minute_of_hour_pb', 'MinuteOfHour'], + MonthOfYear: ['month_of_year_pb', 'MonthOfYear'], PageOnePromotedStrategyGoal: ['page_one_promoted_strategy_goal_pb', 'PageOnePromotedStrategyGoal'], + PolicyTopicEntryType: ['policy_topic_entry_type_pb', + 'PolicyTopicEntryType'], + PolicyTopicEvidenceDestinationMismatchUrlType: [ + 'policy_topic_evidence_destination_mismatch_url_type_pb', + 'PolicyTopicEvidenceDestinationMismatchUrlType'], + ProductCondition: ['product_condition_pb', 'ProductCondition'], + ProductTypeLevel: ['product_type_level_pb', 'ProductTypeLevel'], QualityScoreBucket: ['quality_score_bucket_pb', 'QualityScoreBucket'], RecommendationType: ['recommendation_type_pb', 'RecommendationType'], + SharedSetStatus: ['shared_set_status_pb', 'SharedSetStatus'], + SharedSetType: ['shared_set_type_pb', 'SharedSetType'], Slot: ['slot_pb', 'Slot'], TargetCpaOptInRecommendationGoal: [ 'target_cpa_opt_in_recommendation_goal_pb', @@ -194,11 +257,17 @@ class ProtoLookupUtil AdGroup: ['ad_group_service_client', 'AdGroupServiceClient'], BiddingStrategy: ['bidding_strategy_service_client', 'BiddingStrategyServiceClient'], + CampaignBidModifier: ['campaign_bid_modifier_service_client', + 'CampaignBidModifierServiceClient'], CampaignBudget: ['campaign_budget_service_client', 'CampaignBudgetServiceClient'], CampaignCriterion: ['campaign_criterion_service_client', 'CampaignCriterionServiceClient'], + CampaignGroup: ['campaign_group_service_client', + 'CampaignGroupServiceClient'], Campaign: ['campaign_service_client', 'CampaignServiceClient'], + CampaignSharedSet: ['campaign_shared_set_service_client', + 'CampaignSharedSetServiceClient'], Customer: ['customer_service_client', 'CustomerServiceClient'], GeoTargetConstant: ['geo_target_constant_service_client', 'GeoTargetConstantServiceClient'], @@ -208,7 +277,10 @@ class ProtoLookupUtil KeywordView: ['keyword_view_service_client', 'KeywordViewServiceClient'], Recommendation: ['recommendation_service_client', - 'RecommendationServiceClient'] + 'RecommendationServiceClient'], + SharedCriterion: ['shared_criterion_service_client', + 'SharedCriterionServiceClient'], + SharedSet: ['shared_set_service_client', 'SharedSetServiceClient'] }.freeze OPERATIONS = { @@ -222,11 +294,20 @@ class ProtoLookupUtil 'ApplyRecommendationOperation'], BiddingStrategy: ['bidding_strategy_service_pb', 'BiddingStrategyOperation'], + CampaignBidModifier: ['campaign_bid_modifier_service_pb', + 'CampaignBidModifierOperation'], CampaignBudget: ['campaign_budget_service_pb', 'CampaignBudgetOperation'], CampaignCriterion: ['campaign_criterion_service_pb', 'CampaignCriterionOperation'], + CampaignGroup: ['campaign_group_service_pb', + 'CampaignGroupOperation'], Campaign: ['campaign_service_pb', 'CampaignOperation'], + CampaignSharedSet: ['campaign_shared_set_service_pb', + 'CampaignSharedSetOperation'], + SharedCriterion: ['shared_criterion_service_pb', + 'SharedCriterionOperation'], + SharedSet: ['shared_set_service_pb', 'SharedSetOperation'] }.freeze def initialize(version) diff --git a/lib/google/ads/googleads/v0/common/ad_pb.rb b/lib/google/ads/googleads/v0/common/ad_type_infos_pb.rb similarity index 68% rename from lib/google/ads/googleads/v0/common/ad_pb.rb rename to lib/google/ads/googleads/v0/common/ad_type_infos_pb.rb index 4a4dd0c7c..99abe6fbc 100644 --- a/lib/google/ads/googleads/v0/common/ad_pb.rb +++ b/lib/google/ads/googleads/v0/common/ad_type_infos_pb.rb @@ -1,30 +1,10 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/ads/googleads/v0/common/ad.proto +# source: google/ads/googleads/v0/common/ad_type_infos.proto require 'google/protobuf' -require 'google/ads/googleads/v0/common/custom_parameter_pb' -require 'google/ads/googleads/v0/enums/ad_type_pb' require 'google/protobuf/wrappers_pb' Google::Protobuf::DescriptorPool.generated_pool.build do - add_message "google.ads.googleads.v0.common.Ad" do - optional :id, :message, 1, "google.protobuf.Int64Value" - repeated :final_urls, :message, 2, "google.protobuf.StringValue" - repeated :final_mobile_urls, :message, 16, "google.protobuf.StringValue" - optional :tracking_url_template, :message, 12, "google.protobuf.StringValue" - repeated :url_custom_parameters, :message, 10, "google.ads.googleads.v0.common.CustomParameter" - optional :display_url, :message, 4, "google.protobuf.StringValue" - optional :type, :enum, 5, "google.ads.googleads.v0.enums.AdTypeEnum.AdType" - oneof :ad_data do - optional :text_ad, :message, 6, "google.ads.googleads.v0.common.TextAdInfo" - optional :expanded_text_ad, :message, 7, "google.ads.googleads.v0.common.ExpandedTextAdInfo" - optional :dynamic_search_ad, :message, 8, "google.ads.googleads.v0.common.DynamicSearchAdInfo" - optional :responsive_display_ad, :message, 9, "google.ads.googleads.v0.common.ResponsiveDisplayAdInfo" - optional :call_only_ad, :message, 13, "google.ads.googleads.v0.common.CallOnlyAdInfo" - optional :expanded_dynamic_search_ad, :message, 14, "google.ads.googleads.v0.common.ExpandedDynamicSearchAdInfo" - optional :hotel_ad, :message, 15, "google.ads.googleads.v0.common.HotelAdInfo" - end - end add_message "google.ads.googleads.v0.common.TextAdInfo" do optional :headline, :message, 1, "google.protobuf.StringValue" optional :description1, :message, 2, "google.protobuf.StringValue" @@ -62,6 +42,8 @@ end add_message "google.ads.googleads.v0.common.HotelAdInfo" do end + add_message "google.ads.googleads.v0.common.ShoppingSmartAdInfo" do + end end module Google @@ -69,7 +51,6 @@ module Ads module Googleads module V0 module Common - Ad = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.common.Ad").msgclass TextAdInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.common.TextAdInfo").msgclass ExpandedTextAdInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.common.ExpandedTextAdInfo").msgclass DynamicSearchAdInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.common.DynamicSearchAdInfo").msgclass @@ -77,6 +58,7 @@ module Common CallOnlyAdInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.common.CallOnlyAdInfo").msgclass ExpandedDynamicSearchAdInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.common.ExpandedDynamicSearchAdInfo").msgclass HotelAdInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.common.HotelAdInfo").msgclass + ShoppingSmartAdInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.common.ShoppingSmartAdInfo").msgclass end end end diff --git a/lib/google/ads/googleads/v0/common/criteria_pb.rb b/lib/google/ads/googleads/v0/common/criteria_pb.rb index 14dfd0029..220129956 100644 --- a/lib/google/ads/googleads/v0/common/criteria_pb.rb +++ b/lib/google/ads/googleads/v0/common/criteria_pb.rb @@ -3,9 +3,16 @@ require 'google/protobuf' +require 'google/ads/googleads/v0/enums/day_of_week_pb' +require 'google/ads/googleads/v0/enums/device_pb' +require 'google/ads/googleads/v0/enums/hotel_date_selection_type_pb' +require 'google/ads/googleads/v0/enums/interaction_type_pb' require 'google/ads/googleads/v0/enums/keyword_match_type_pb' require 'google/ads/googleads/v0/enums/listing_custom_attribute_index_pb' require 'google/ads/googleads/v0/enums/listing_group_type_pb' +require 'google/ads/googleads/v0/enums/minute_of_hour_pb' +require 'google/ads/googleads/v0/enums/product_condition_pb' +require 'google/ads/googleads/v0/enums/product_type_level_pb' require 'google/protobuf/wrappers_pb' Google::Protobuf::DescriptorPool.generated_pool.build do add_message "google.ads.googleads.v0.common.KeywordInfo" do @@ -13,13 +20,15 @@ optional :match_type, :enum, 2, "google.ads.googleads.v0.enums.KeywordMatchTypeEnum.KeywordMatchType" end add_message "google.ads.googleads.v0.common.LocationInfo" do + optional :geo_target_constant, :message, 1, "google.protobuf.StringValue" end - add_message "google.ads.googleads.v0.common.PlatformInfo" do + add_message "google.ads.googleads.v0.common.DeviceInfo" do + optional :type, :enum, 1, "google.ads.googleads.v0.enums.DeviceEnum.Device" end add_message "google.ads.googleads.v0.common.ListingGroupInfo" do optional :type, :enum, 1, "google.ads.googleads.v0.enums.ListingGroupTypeEnum.ListingGroupType" optional :case_value, :message, 2, "google.ads.googleads.v0.common.ListingDimensionInfo" - optional :parent_criterion_id, :message, 3, "google.protobuf.Int64Value" + optional :parent_ad_group_criterion, :message, 3, "google.protobuf.StringValue" end add_message "google.ads.googleads.v0.common.ListingDimensionInfo" do oneof :dimension do @@ -30,6 +39,8 @@ optional :hotel_state, :message, 5, "google.ads.googleads.v0.common.HotelStateInfo" optional :hotel_city, :message, 6, "google.ads.googleads.v0.common.HotelCityInfo" optional :listing_custom_attribute, :message, 7, "google.ads.googleads.v0.common.ListingCustomAttributeInfo" + optional :product_condition, :message, 10, "google.ads.googleads.v0.common.ProductConditionInfo" + optional :product_type, :message, 12, "google.ads.googleads.v0.common.ProductTypeInfo" end end add_message "google.ads.googleads.v0.common.ListingBrandInfo" do @@ -54,7 +65,15 @@ optional :value, :message, 1, "google.protobuf.StringValue" optional :index, :enum, 2, "google.ads.googleads.v0.enums.ListingCustomAttributeIndexEnum.ListingCustomAttributeIndex" end + add_message "google.ads.googleads.v0.common.ProductConditionInfo" do + optional :condition, :enum, 1, "google.ads.googleads.v0.enums.ProductConditionEnum.ProductCondition" + end + add_message "google.ads.googleads.v0.common.ProductTypeInfo" do + optional :value, :message, 1, "google.protobuf.StringValue" + optional :level, :enum, 2, "google.ads.googleads.v0.enums.ProductTypeLevelEnum.ProductTypeLevel" + end add_message "google.ads.googleads.v0.common.HotelDateSelectionTypeInfo" do + optional :type, :enum, 1, "google.ads.googleads.v0.enums.HotelDateSelectionTypeEnum.HotelDateSelectionType" end add_message "google.ads.googleads.v0.common.HotelAdvanceBookingWindowInfo" do optional :min_days, :message, 1, "google.protobuf.Int64Value" @@ -65,6 +84,17 @@ optional :max_nights, :message, 2, "google.protobuf.Int64Value" end add_message "google.ads.googleads.v0.common.HotelCheckInDayInfo" do + optional :day_of_week, :enum, 1, "google.ads.googleads.v0.enums.DayOfWeekEnum.DayOfWeek" + end + add_message "google.ads.googleads.v0.common.InteractionTypeInfo" do + optional :type, :enum, 1, "google.ads.googleads.v0.enums.InteractionTypeEnum.InteractionType" + end + add_message "google.ads.googleads.v0.common.AdScheduleInfo" do + optional :start_minute, :enum, 1, "google.ads.googleads.v0.enums.MinuteOfHourEnum.MinuteOfHour" + optional :end_minute, :enum, 2, "google.ads.googleads.v0.enums.MinuteOfHourEnum.MinuteOfHour" + optional :start_hour, :message, 3, "google.protobuf.Int32Value" + optional :end_hour, :message, 4, "google.protobuf.Int32Value" + optional :day_of_week, :enum, 5, "google.ads.googleads.v0.enums.DayOfWeekEnum.DayOfWeek" end end @@ -75,7 +105,7 @@ module V0 module Common KeywordInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.common.KeywordInfo").msgclass LocationInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.common.LocationInfo").msgclass - PlatformInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.common.PlatformInfo").msgclass + DeviceInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.common.DeviceInfo").msgclass ListingGroupInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.common.ListingGroupInfo").msgclass ListingDimensionInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.common.ListingDimensionInfo").msgclass ListingBrandInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.common.ListingBrandInfo").msgclass @@ -85,10 +115,14 @@ module Common HotelStateInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.common.HotelStateInfo").msgclass HotelCityInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.common.HotelCityInfo").msgclass ListingCustomAttributeInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.common.ListingCustomAttributeInfo").msgclass + ProductConditionInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.common.ProductConditionInfo").msgclass + ProductTypeInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.common.ProductTypeInfo").msgclass HotelDateSelectionTypeInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.common.HotelDateSelectionTypeInfo").msgclass HotelAdvanceBookingWindowInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.common.HotelAdvanceBookingWindowInfo").msgclass HotelLengthOfStayInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.common.HotelLengthOfStayInfo").msgclass HotelCheckInDayInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.common.HotelCheckInDayInfo").msgclass + InteractionTypeInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.common.InteractionTypeInfo").msgclass + AdScheduleInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.common.AdScheduleInfo").msgclass end end end diff --git a/lib/google/ads/googleads/v0/common/metrics_pb.rb b/lib/google/ads/googleads/v0/common/metrics_pb.rb index 527188a24..5b08e9dd9 100644 --- a/lib/google/ads/googleads/v0/common/metrics_pb.rb +++ b/lib/google/ads/googleads/v0/common/metrics_pb.rb @@ -6,11 +6,11 @@ require 'google/protobuf/wrappers_pb' Google::Protobuf::DescriptorPool.generated_pool.build do add_message "google.ads.googleads.v0.common.Metrics" do - optional :all_conversion_rate, :message, 5, "google.protobuf.DoubleValue" - optional :all_conversion_value, :message, 6, "google.protobuf.DoubleValue" + optional :all_conversions_from_interactions_rate, :message, 65, "google.protobuf.DoubleValue" + optional :all_conversions_value, :message, 66, "google.protobuf.DoubleValue" optional :all_conversions, :message, 7, "google.protobuf.DoubleValue" optional :all_conversions_value_per_cost, :message, 62, "google.protobuf.DoubleValue" - optional :all_conversions_value_per_interaction, :message, 61, "google.protobuf.DoubleValue" + optional :all_conversions_from_interactions_value_per_interaction, :message, 67, "google.protobuf.DoubleValue" optional :average_cost, :message, 8, "google.protobuf.DoubleValue" optional :average_cpc, :message, 9, "google.protobuf.DoubleValue" optional :average_cpm, :message, 10, "google.protobuf.DoubleValue" @@ -20,13 +20,13 @@ optional :content_budget_lost_impression_share, :message, 20, "google.protobuf.DoubleValue" optional :content_impression_share, :message, 21, "google.protobuf.DoubleValue" optional :content_rank_lost_impression_share, :message, 22, "google.protobuf.DoubleValue" - optional :conversion_rate, :message, 23, "google.protobuf.DoubleValue" - optional :conversion_value, :message, 24, "google.protobuf.DoubleValue" - optional :conversion_value_per_cost, :message, 64, "google.protobuf.DoubleValue" - optional :conversion_value_per_interaction, :message, 63, "google.protobuf.DoubleValue" + optional :conversions_from_interactions_rate, :message, 69, "google.protobuf.DoubleValue" + optional :conversions_value, :message, 70, "google.protobuf.DoubleValue" + optional :conversions_value_per_cost, :message, 71, "google.protobuf.DoubleValue" + optional :conversions_from_interactions_value_per_interaction, :message, 72, "google.protobuf.DoubleValue" optional :conversions, :message, 25, "google.protobuf.DoubleValue" optional :cost_micros, :message, 26, "google.protobuf.Int64Value" - optional :cost_per_all_conversion, :message, 27, "google.protobuf.DoubleValue" + optional :cost_per_all_conversions, :message, 68, "google.protobuf.DoubleValue" optional :cost_per_conversion, :message, 28, "google.protobuf.DoubleValue" optional :cross_device_conversions, :message, 29, "google.protobuf.DoubleValue" optional :ctr, :message, 30, "google.protobuf.DoubleValue" diff --git a/lib/google/ads/googleads/v0/common/policy_pb.rb b/lib/google/ads/googleads/v0/common/policy_pb.rb index ee1c68549..78c7ebc62 100644 --- a/lib/google/ads/googleads/v0/common/policy_pb.rb +++ b/lib/google/ads/googleads/v0/common/policy_pb.rb @@ -3,12 +3,59 @@ require 'google/protobuf' +require 'google/ads/googleads/v0/enums/policy_topic_entry_type_pb' +require 'google/ads/googleads/v0/enums/policy_topic_evidence_destination_mismatch_url_type_pb' require 'google/protobuf/wrappers_pb' Google::Protobuf::DescriptorPool.generated_pool.build do add_message "google.ads.googleads.v0.common.PolicyViolationKey" do optional :policy_name, :message, 1, "google.protobuf.StringValue" optional :violating_text, :message, 2, "google.protobuf.StringValue" end + add_message "google.ads.googleads.v0.common.PolicyTopicEntry" do + optional :topic, :message, 1, "google.protobuf.StringValue" + optional :type, :enum, 2, "google.ads.googleads.v0.enums.PolicyTopicEntryTypeEnum.PolicyTopicEntryType" + repeated :evidences, :message, 3, "google.ads.googleads.v0.common.PolicyTopicEvidence" + repeated :constraints, :message, 4, "google.ads.googleads.v0.common.PolicyTopicConstraint" + end + add_message "google.ads.googleads.v0.common.PolicyTopicEvidence" do + oneof :value do + optional :http_code, :message, 2, "google.protobuf.Int32Value" + optional :website_list, :message, 3, "google.ads.googleads.v0.common.PolicyTopicEvidence.WebsiteList" + optional :text_list, :message, 4, "google.ads.googleads.v0.common.PolicyTopicEvidence.TextList" + optional :language_code, :message, 5, "google.protobuf.StringValue" + optional :destination_text_list, :message, 6, "google.ads.googleads.v0.common.PolicyTopicEvidence.DestinationTextList" + optional :destination_mismatch, :message, 7, "google.ads.googleads.v0.common.PolicyTopicEvidence.DestinationMismatch" + end + end + add_message "google.ads.googleads.v0.common.PolicyTopicEvidence.TextList" do + repeated :texts, :message, 1, "google.protobuf.StringValue" + end + add_message "google.ads.googleads.v0.common.PolicyTopicEvidence.WebsiteList" do + repeated :websites, :message, 1, "google.protobuf.StringValue" + end + add_message "google.ads.googleads.v0.common.PolicyTopicEvidence.DestinationTextList" do + repeated :destination_texts, :message, 1, "google.protobuf.StringValue" + end + add_message "google.ads.googleads.v0.common.PolicyTopicEvidence.DestinationMismatch" do + repeated :url_types, :enum, 1, "google.ads.googleads.v0.enums.PolicyTopicEvidenceDestinationMismatchUrlTypeEnum.PolicyTopicEvidenceDestinationMismatchUrlType" + end + add_message "google.ads.googleads.v0.common.PolicyTopicConstraint" do + oneof :value do + optional :country_constraint_list, :message, 1, "google.ads.googleads.v0.common.PolicyTopicConstraint.CountryConstraintList" + optional :reseller_constraint, :message, 2, "google.ads.googleads.v0.common.PolicyTopicConstraint.ResellerConstraint" + optional :certificate_missing_in_country_list, :message, 3, "google.ads.googleads.v0.common.PolicyTopicConstraint.CountryConstraintList" + optional :certificate_domain_mismatch_in_country_list, :message, 4, "google.ads.googleads.v0.common.PolicyTopicConstraint.CountryConstraintList" + end + end + add_message "google.ads.googleads.v0.common.PolicyTopicConstraint.CountryConstraintList" do + optional :total_targeted_countries, :message, 1, "google.protobuf.Int32Value" + repeated :countries, :message, 2, "google.ads.googleads.v0.common.PolicyTopicConstraint.CountryConstraint" + end + add_message "google.ads.googleads.v0.common.PolicyTopicConstraint.ResellerConstraint" do + end + add_message "google.ads.googleads.v0.common.PolicyTopicConstraint.CountryConstraint" do + optional :country_criterion, :message, 1, "google.protobuf.StringValue" + end end module Google @@ -17,6 +64,16 @@ module Googleads module V0 module Common PolicyViolationKey = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.common.PolicyViolationKey").msgclass + PolicyTopicEntry = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.common.PolicyTopicEntry").msgclass + PolicyTopicEvidence = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.common.PolicyTopicEvidence").msgclass + PolicyTopicEvidence::TextList = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.common.PolicyTopicEvidence.TextList").msgclass + PolicyTopicEvidence::WebsiteList = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.common.PolicyTopicEvidence.WebsiteList").msgclass + PolicyTopicEvidence::DestinationTextList = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.common.PolicyTopicEvidence.DestinationTextList").msgclass + PolicyTopicEvidence::DestinationMismatch = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.common.PolicyTopicEvidence.DestinationMismatch").msgclass + PolicyTopicConstraint = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.common.PolicyTopicConstraint").msgclass + PolicyTopicConstraint::CountryConstraintList = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.common.PolicyTopicConstraint.CountryConstraintList").msgclass + PolicyTopicConstraint::ResellerConstraint = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.common.PolicyTopicConstraint.ResellerConstraint").msgclass + PolicyTopicConstraint::CountryConstraint = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.common.PolicyTopicConstraint.CountryConstraint").msgclass end end end diff --git a/lib/google/ads/googleads/v0/enums/ad_group_type_pb.rb b/lib/google/ads/googleads/v0/enums/ad_group_type_pb.rb index 6dc86e813..a8120a7ad 100644 --- a/lib/google/ads/googleads/v0/enums/ad_group_type_pb.rb +++ b/lib/google/ads/googleads/v0/enums/ad_group_type_pb.rb @@ -10,7 +10,9 @@ value :UNSPECIFIED, 0 value :UNKNOWN, 1 value :SEARCH_STANDARD, 2 + value :DISPLAY_STANDARD, 3 value :HOTEL_ADS, 6 + value :SHOPPING_SMART_ADS, 7 end end diff --git a/lib/google/ads/googleads/v0/enums/ad_network_type_pb.rb b/lib/google/ads/googleads/v0/enums/ad_network_type_pb.rb index 57b0a2e18..f4c922eca 100644 --- a/lib/google/ads/googleads/v0/enums/ad_network_type_pb.rb +++ b/lib/google/ads/googleads/v0/enums/ad_network_type_pb.rb @@ -14,6 +14,7 @@ value :CONTENT, 4 value :YOUTUBE_SEARCH, 5 value :YOUTUBE_WATCH, 6 + value :MIXED, 7 end end diff --git a/lib/google/ads/googleads/v0/enums/ad_type_pb.rb b/lib/google/ads/googleads/v0/enums/ad_type_pb.rb index 464f74269..3e5e74727 100644 --- a/lib/google/ads/googleads/v0/enums/ad_type_pb.rb +++ b/lib/google/ads/googleads/v0/enums/ad_type_pb.rb @@ -16,6 +16,7 @@ value :CALL_ONLY_AD, 6 value :EXPANDED_DYNAMIC_SEARCH_AD, 7 value :HOTEL_AD, 8 + value :SHOPPING_SMART_AD, 9 end end diff --git a/lib/google/ads/googleads/v0/enums/advertising_channel_sub_type_pb.rb b/lib/google/ads/googleads/v0/enums/advertising_channel_sub_type_pb.rb index 9b295e45f..d2d654097 100644 --- a/lib/google/ads/googleads/v0/enums/advertising_channel_sub_type_pb.rb +++ b/lib/google/ads/googleads/v0/enums/advertising_channel_sub_type_pb.rb @@ -10,7 +10,10 @@ value :UNSPECIFIED, 0 value :UNKNOWN, 1 value :SEARCH_MOBILE_APP, 2 + value :DISPLAY_MOBILE_APP, 3 value :SEARCH_EXPRESS, 4 + value :DISPLAY_EXPRESS, 5 + value :SHOPPING_SMART_ADS, 6 end end diff --git a/lib/google/ads/googleads/v0/enums/advertising_channel_type_pb.rb b/lib/google/ads/googleads/v0/enums/advertising_channel_type_pb.rb index 695197fc6..f85e34c0f 100644 --- a/lib/google/ads/googleads/v0/enums/advertising_channel_type_pb.rb +++ b/lib/google/ads/googleads/v0/enums/advertising_channel_type_pb.rb @@ -10,6 +10,8 @@ value :UNSPECIFIED, 0 value :UNKNOWN, 1 value :SEARCH, 2 + value :DISPLAY, 3 + value :SHOPPING, 4 value :HOTEL, 5 end end diff --git a/lib/google/ads/googleads/v0/enums/bid_modifier_source_pb.rb b/lib/google/ads/googleads/v0/enums/bid_modifier_source_pb.rb new file mode 100644 index 000000000..8aad69113 --- /dev/null +++ b/lib/google/ads/googleads/v0/enums/bid_modifier_source_pb.rb @@ -0,0 +1,28 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v0/enums/bid_modifier_source.proto + +require 'google/protobuf' + +Google::Protobuf::DescriptorPool.generated_pool.build do + add_message "google.ads.googleads.v0.enums.BidModifierSourceEnum" do + end + add_enum "google.ads.googleads.v0.enums.BidModifierSourceEnum.BidModifierSource" do + value :UNSPECIFIED, 0 + value :UNKNOWN, 1 + value :CAMPAIGN, 2 + value :AD_GROUP, 3 + end +end + +module Google + module Ads + module Googleads + module V0 + module Enums + BidModifierSourceEnum = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.enums.BidModifierSourceEnum").msgclass + BidModifierSourceEnum::BidModifierSource = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.enums.BidModifierSourceEnum.BidModifierSource").enummodule + end + end + end + end +end diff --git a/lib/google/ads/googleads/v0/enums/campaign_group_status_pb.rb b/lib/google/ads/googleads/v0/enums/campaign_group_status_pb.rb new file mode 100644 index 000000000..6f30ab1f8 --- /dev/null +++ b/lib/google/ads/googleads/v0/enums/campaign_group_status_pb.rb @@ -0,0 +1,28 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v0/enums/campaign_group_status.proto + +require 'google/protobuf' + +Google::Protobuf::DescriptorPool.generated_pool.build do + add_message "google.ads.googleads.v0.enums.CampaignGroupStatusEnum" do + end + add_enum "google.ads.googleads.v0.enums.CampaignGroupStatusEnum.CampaignGroupStatus" do + value :UNSPECIFIED, 0 + value :UNKNOWN, 1 + value :ENABLED, 2 + value :REMOVED, 4 + end +end + +module Google + module Ads + module Googleads + module V0 + module Enums + CampaignGroupStatusEnum = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.enums.CampaignGroupStatusEnum").msgclass + CampaignGroupStatusEnum::CampaignGroupStatus = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.enums.CampaignGroupStatusEnum.CampaignGroupStatus").enummodule + end + end + end + end +end diff --git a/lib/google/ads/googleads/v0/enums/campaign_shared_set_status_pb.rb b/lib/google/ads/googleads/v0/enums/campaign_shared_set_status_pb.rb new file mode 100644 index 000000000..2cdccce4d --- /dev/null +++ b/lib/google/ads/googleads/v0/enums/campaign_shared_set_status_pb.rb @@ -0,0 +1,28 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v0/enums/campaign_shared_set_status.proto + +require 'google/protobuf' + +Google::Protobuf::DescriptorPool.generated_pool.build do + add_message "google.ads.googleads.v0.enums.CampaignSharedSetStatusEnum" do + end + add_enum "google.ads.googleads.v0.enums.CampaignSharedSetStatusEnum.CampaignSharedSetStatus" do + value :UNSPECIFIED, 0 + value :UNKNOWN, 1 + value :ENABLED, 2 + value :REMOVED, 3 + end +end + +module Google + module Ads + module Googleads + module V0 + module Enums + CampaignSharedSetStatusEnum = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.enums.CampaignSharedSetStatusEnum").msgclass + CampaignSharedSetStatusEnum::CampaignSharedSetStatus = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.enums.CampaignSharedSetStatusEnum.CampaignSharedSetStatus").enummodule + end + end + end + end +end diff --git a/lib/google/ads/googleads/v0/enums/criterion_type_pb.rb b/lib/google/ads/googleads/v0/enums/criterion_type_pb.rb index 6d3fdd0ff..7bae553c5 100644 --- a/lib/google/ads/googleads/v0/enums/criterion_type_pb.rb +++ b/lib/google/ads/googleads/v0/enums/criterion_type_pb.rb @@ -10,9 +10,10 @@ value :UNSPECIFIED, 0 value :UNKNOWN, 1 value :KEYWORD, 2 - value :PLATFORM, 6 + value :DEVICE, 6 value :LOCATION, 7 value :LISTING_GROUP, 8 + value :AD_SCHEDULE, 9 end end diff --git a/lib/google/ads/googleads/v0/enums/device_pb.rb b/lib/google/ads/googleads/v0/enums/device_pb.rb index a7cf08ced..76a947951 100644 --- a/lib/google/ads/googleads/v0/enums/device_pb.rb +++ b/lib/google/ads/googleads/v0/enums/device_pb.rb @@ -12,6 +12,7 @@ value :MOBILE, 2 value :TABLET, 3 value :DESKTOP, 4 + value :CONNECTED_TV, 5 end end diff --git a/lib/google/ads/googleads/v0/enums/hotel_date_selection_type_pb.rb b/lib/google/ads/googleads/v0/enums/hotel_date_selection_type_pb.rb new file mode 100644 index 000000000..76e0055f5 --- /dev/null +++ b/lib/google/ads/googleads/v0/enums/hotel_date_selection_type_pb.rb @@ -0,0 +1,28 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v0/enums/hotel_date_selection_type.proto + +require 'google/protobuf' + +Google::Protobuf::DescriptorPool.generated_pool.build do + add_message "google.ads.googleads.v0.enums.HotelDateSelectionTypeEnum" do + end + add_enum "google.ads.googleads.v0.enums.HotelDateSelectionTypeEnum.HotelDateSelectionType" do + value :UNSPECIFIED, 0 + value :UNKNOWN, 1 + value :DEFAULT_SELECTION, 50 + value :USER_SELECTED, 51 + end +end + +module Google + module Ads + module Googleads + module V0 + module Enums + HotelDateSelectionTypeEnum = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.enums.HotelDateSelectionTypeEnum").msgclass + HotelDateSelectionTypeEnum::HotelDateSelectionType = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.enums.HotelDateSelectionTypeEnum.HotelDateSelectionType").enummodule + end + end + end + end +end diff --git a/lib/google/ads/googleads/v0/enums/interaction_type_pb.rb b/lib/google/ads/googleads/v0/enums/interaction_type_pb.rb new file mode 100644 index 000000000..be1a91194 --- /dev/null +++ b/lib/google/ads/googleads/v0/enums/interaction_type_pb.rb @@ -0,0 +1,27 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v0/enums/interaction_type.proto + +require 'google/protobuf' + +Google::Protobuf::DescriptorPool.generated_pool.build do + add_message "google.ads.googleads.v0.enums.InteractionTypeEnum" do + end + add_enum "google.ads.googleads.v0.enums.InteractionTypeEnum.InteractionType" do + value :UNSPECIFIED, 0 + value :UNKNOWN, 1 + value :CALLS, 8000 + end +end + +module Google + module Ads + module Googleads + module V0 + module Enums + InteractionTypeEnum = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.enums.InteractionTypeEnum").msgclass + InteractionTypeEnum::InteractionType = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.enums.InteractionTypeEnum.InteractionType").enummodule + end + end + end + end +end diff --git a/lib/google/ads/googleads/v0/enums/minute_of_hour_pb.rb b/lib/google/ads/googleads/v0/enums/minute_of_hour_pb.rb new file mode 100644 index 000000000..a7850f681 --- /dev/null +++ b/lib/google/ads/googleads/v0/enums/minute_of_hour_pb.rb @@ -0,0 +1,30 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v0/enums/minute_of_hour.proto + +require 'google/protobuf' + +Google::Protobuf::DescriptorPool.generated_pool.build do + add_message "google.ads.googleads.v0.enums.MinuteOfHourEnum" do + end + add_enum "google.ads.googleads.v0.enums.MinuteOfHourEnum.MinuteOfHour" do + value :UNSPECIFIED, 0 + value :UNKNOWN, 1 + value :ZERO, 2 + value :FIFTEEN, 3 + value :THIRTY, 4 + value :FORTY_FIVE, 5 + end +end + +module Google + module Ads + module Googleads + module V0 + module Enums + MinuteOfHourEnum = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.enums.MinuteOfHourEnum").msgclass + MinuteOfHourEnum::MinuteOfHour = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.enums.MinuteOfHourEnum.MinuteOfHour").enummodule + end + end + end + end +end diff --git a/lib/google/ads/googleads/v0/enums/month_of_year_pb.rb b/lib/google/ads/googleads/v0/enums/month_of_year_pb.rb new file mode 100644 index 000000000..50fc52a8e --- /dev/null +++ b/lib/google/ads/googleads/v0/enums/month_of_year_pb.rb @@ -0,0 +1,38 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v0/enums/month_of_year.proto + +require 'google/protobuf' + +Google::Protobuf::DescriptorPool.generated_pool.build do + add_message "google.ads.googleads.v0.enums.MonthOfYearEnum" do + end + add_enum "google.ads.googleads.v0.enums.MonthOfYearEnum.MonthOfYear" do + value :UNSPECIFIED, 0 + value :UNKNOWN, 1 + value :JANUARY, 2 + value :FEBRUARY, 3 + value :MARCH, 4 + value :APRIL, 5 + value :MAY, 6 + value :JUNE, 7 + value :JULY, 8 + value :AUGUST, 9 + value :SEPTEMBER, 10 + value :OCTOBER, 11 + value :NOVEMBER, 12 + value :DECEMBER, 13 + end +end + +module Google + module Ads + module Googleads + module V0 + module Enums + MonthOfYearEnum = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.enums.MonthOfYearEnum").msgclass + MonthOfYearEnum::MonthOfYear = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.enums.MonthOfYearEnum.MonthOfYear").enummodule + end + end + end + end +end diff --git a/lib/google/ads/googleads/v0/enums/policy_topic_entry_type_pb.rb b/lib/google/ads/googleads/v0/enums/policy_topic_entry_type_pb.rb new file mode 100644 index 000000000..58023b17d --- /dev/null +++ b/lib/google/ads/googleads/v0/enums/policy_topic_entry_type_pb.rb @@ -0,0 +1,31 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v0/enums/policy_topic_entry_type.proto + +require 'google/protobuf' + +Google::Protobuf::DescriptorPool.generated_pool.build do + add_message "google.ads.googleads.v0.enums.PolicyTopicEntryTypeEnum" do + end + add_enum "google.ads.googleads.v0.enums.PolicyTopicEntryTypeEnum.PolicyTopicEntryType" do + value :UNSPECIFIED, 0 + value :UNKNOWN, 1 + value :PROHIBITED, 2 + value :LIMITED, 4 + value :DESCRIPTIVE, 5 + value :BROADENING, 6 + value :AREA_OF_INTEREST_ONLY, 7 + end +end + +module Google + module Ads + module Googleads + module V0 + module Enums + PolicyTopicEntryTypeEnum = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.enums.PolicyTopicEntryTypeEnum").msgclass + PolicyTopicEntryTypeEnum::PolicyTopicEntryType = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.enums.PolicyTopicEntryTypeEnum.PolicyTopicEntryType").enummodule + end + end + end + end +end diff --git a/lib/google/ads/googleads/v0/enums/policy_topic_evidence_destination_mismatch_url_type_pb.rb b/lib/google/ads/googleads/v0/enums/policy_topic_evidence_destination_mismatch_url_type_pb.rb new file mode 100644 index 000000000..e70e34466 --- /dev/null +++ b/lib/google/ads/googleads/v0/enums/policy_topic_evidence_destination_mismatch_url_type_pb.rb @@ -0,0 +1,31 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v0/enums/policy_topic_evidence_destination_mismatch_url_type.proto + +require 'google/protobuf' + +Google::Protobuf::DescriptorPool.generated_pool.build do + add_message "google.ads.googleads.v0.enums.PolicyTopicEvidenceDestinationMismatchUrlTypeEnum" do + end + add_enum "google.ads.googleads.v0.enums.PolicyTopicEvidenceDestinationMismatchUrlTypeEnum.PolicyTopicEvidenceDestinationMismatchUrlType" do + value :UNSPECIFIED, 0 + value :UNKNOWN, 1 + value :DISPLAY_URL, 2 + value :FINAL_URL, 3 + value :FINAL_MOBILE_URL, 4 + value :TRACKING_URL, 5 + value :MOBILE_TRACKING_URL, 6 + end +end + +module Google + module Ads + module Googleads + module V0 + module Enums + PolicyTopicEvidenceDestinationMismatchUrlTypeEnum = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.enums.PolicyTopicEvidenceDestinationMismatchUrlTypeEnum").msgclass + PolicyTopicEvidenceDestinationMismatchUrlTypeEnum::PolicyTopicEvidenceDestinationMismatchUrlType = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.enums.PolicyTopicEvidenceDestinationMismatchUrlTypeEnum.PolicyTopicEvidenceDestinationMismatchUrlType").enummodule + end + end + end + end +end diff --git a/lib/google/ads/googleads/v0/enums/product_condition_pb.rb b/lib/google/ads/googleads/v0/enums/product_condition_pb.rb new file mode 100644 index 000000000..ae89ec9b8 --- /dev/null +++ b/lib/google/ads/googleads/v0/enums/product_condition_pb.rb @@ -0,0 +1,30 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v0/enums/product_condition.proto + +require 'google/protobuf' + +Google::Protobuf::DescriptorPool.generated_pool.build do + add_message "google.ads.googleads.v0.enums.ProductConditionEnum" do + end + add_enum "google.ads.googleads.v0.enums.ProductConditionEnum.ProductCondition" do + value :UNSPECIFIED, 0 + value :UNKNOWN, 1 + value :OLD, 2 + value :NEW, 3 + value :REFURBISHED, 4 + value :USED, 5 + end +end + +module Google + module Ads + module Googleads + module V0 + module Enums + ProductConditionEnum = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.enums.ProductConditionEnum").msgclass + ProductConditionEnum::ProductCondition = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.enums.ProductConditionEnum.ProductCondition").enummodule + end + end + end + end +end diff --git a/lib/google/ads/googleads/v0/enums/product_type_level_pb.rb b/lib/google/ads/googleads/v0/enums/product_type_level_pb.rb new file mode 100644 index 000000000..20b3ec7ee --- /dev/null +++ b/lib/google/ads/googleads/v0/enums/product_type_level_pb.rb @@ -0,0 +1,31 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v0/enums/product_type_level.proto + +require 'google/protobuf' + +Google::Protobuf::DescriptorPool.generated_pool.build do + add_message "google.ads.googleads.v0.enums.ProductTypeLevelEnum" do + end + add_enum "google.ads.googleads.v0.enums.ProductTypeLevelEnum.ProductTypeLevel" do + value :UNSPECIFIED, 0 + value :UNKNOWN, 1 + value :PRODUCT_TYPE_L1, 2 + value :PRODUCT_TYPE_L2, 3 + value :PRODUCT_TYPE_L3, 4 + value :PRODUCT_TYPE_L4, 5 + value :PRODUCT_TYPE_L5, 6 + end +end + +module Google + module Ads + module Googleads + module V0 + module Enums + ProductTypeLevelEnum = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.enums.ProductTypeLevelEnum").msgclass + ProductTypeLevelEnum::ProductTypeLevel = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.enums.ProductTypeLevelEnum.ProductTypeLevel").enummodule + end + end + end + end +end diff --git a/lib/google/ads/googleads/v0/enums/recommendation_type_pb.rb b/lib/google/ads/googleads/v0/enums/recommendation_type_pb.rb index 9f152cc48..05e9e65aa 100644 --- a/lib/google/ads/googleads/v0/enums/recommendation_type_pb.rb +++ b/lib/google/ads/googleads/v0/enums/recommendation_type_pb.rb @@ -13,6 +13,11 @@ value :KEYWORD, 3 value :TEXT_AD, 4 value :TARGET_CPA_OPT_IN, 5 + value :MAXIMIZE_CONVERSIONS_OPT_IN, 6 + value :ENHANCED_CPC_OPT_IN, 7 + value :SEARCH_PARTNERS_OPT_IN, 8 + value :MAXIMIZE_CLICKS_OPT_IN, 9 + value :OPTIMIZE_AD_ROTATION, 10 end end diff --git a/lib/google/ads/googleads/v0/enums/shared_set_status_pb.rb b/lib/google/ads/googleads/v0/enums/shared_set_status_pb.rb new file mode 100644 index 000000000..97d144cfa --- /dev/null +++ b/lib/google/ads/googleads/v0/enums/shared_set_status_pb.rb @@ -0,0 +1,28 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v0/enums/shared_set_status.proto + +require 'google/protobuf' + +Google::Protobuf::DescriptorPool.generated_pool.build do + add_message "google.ads.googleads.v0.enums.SharedSetStatusEnum" do + end + add_enum "google.ads.googleads.v0.enums.SharedSetStatusEnum.SharedSetStatus" do + value :UNSPECIFIED, 0 + value :UNKNOWN, 1 + value :ENABLED, 2 + value :REMOVED, 3 + end +end + +module Google + module Ads + module Googleads + module V0 + module Enums + SharedSetStatusEnum = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.enums.SharedSetStatusEnum").msgclass + SharedSetStatusEnum::SharedSetStatus = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.enums.SharedSetStatusEnum.SharedSetStatus").enummodule + end + end + end + end +end diff --git a/lib/google/ads/googleads/v0/enums/shared_set_type_pb.rb b/lib/google/ads/googleads/v0/enums/shared_set_type_pb.rb new file mode 100644 index 000000000..b19abdd8f --- /dev/null +++ b/lib/google/ads/googleads/v0/enums/shared_set_type_pb.rb @@ -0,0 +1,28 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v0/enums/shared_set_type.proto + +require 'google/protobuf' + +Google::Protobuf::DescriptorPool.generated_pool.build do + add_message "google.ads.googleads.v0.enums.SharedSetTypeEnum" do + end + add_enum "google.ads.googleads.v0.enums.SharedSetTypeEnum.SharedSetType" do + value :UNSPECIFIED, 0 + value :UNKNOWN, 1 + value :NEGATIVE_KEYWORDS, 2 + value :NEGATIVE_PLACEMENTS, 3 + end +end + +module Google + module Ads + module Googleads + module V0 + module Enums + SharedSetTypeEnum = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.enums.SharedSetTypeEnum").msgclass + SharedSetTypeEnum::SharedSetType = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.enums.SharedSetTypeEnum.SharedSetType").enummodule + end + end + end + end +end diff --git a/lib/google/ads/googleads/v0/enums/slot_pb.rb b/lib/google/ads/googleads/v0/enums/slot_pb.rb index 11feef76a..9a92caa07 100644 --- a/lib/google/ads/googleads/v0/enums/slot_pb.rb +++ b/lib/google/ads/googleads/v0/enums/slot_pb.rb @@ -15,6 +15,7 @@ value :CONTENT, 5 value :SEARCH_PARTNER_TOP, 6 value :SEARCH_PARTNER_OTHER, 7 + value :MIXED, 8 end end diff --git a/lib/google/ads/googleads/v0/errors/authentication_error_pb.rb b/lib/google/ads/googleads/v0/errors/authentication_error_pb.rb index d95cd9778..467724a1d 100644 --- a/lib/google/ads/googleads/v0/errors/authentication_error_pb.rb +++ b/lib/google/ads/googleads/v0/errors/authentication_error_pb.rb @@ -26,6 +26,8 @@ value :LOGIN_COOKIE_INVALID, 20 value :FAILED_TO_RETRIEVE_LOGIN_COOKIE, 21 value :USER_ID_INVALID, 22 + value :TWO_STEP_VERIFICATION_NOT_ENROLLED, 23 + value :ADVANCED_PROTECTION_NOT_ENROLLED, 24 end end diff --git a/lib/google/ads/googleads/v0/errors/authorization_error_pb.rb b/lib/google/ads/googleads/v0/errors/authorization_error_pb.rb index 1253f07d8..cfafb171e 100644 --- a/lib/google/ads/googleads/v0/errors/authorization_error_pb.rb +++ b/lib/google/ads/googleads/v0/errors/authorization_error_pb.rb @@ -14,6 +14,8 @@ value :DEVELOPER_TOKEN_PROHIBITED, 4 value :PROJECT_DISABLED, 5 value :AUTHORIZATION_ERROR, 6 + value :ACTION_NOT_PERMITTED, 7 + value :INCOMPLETE_SIGNUP, 8 end end diff --git a/lib/google/ads/googleads/v0/errors/campaign_criterion_error_pb.rb b/lib/google/ads/googleads/v0/errors/campaign_criterion_error_pb.rb index 968bcb6c2..b2d092112 100644 --- a/lib/google/ads/googleads/v0/errors/campaign_criterion_error_pb.rb +++ b/lib/google/ads/googleads/v0/errors/campaign_criterion_error_pb.rb @@ -19,6 +19,7 @@ value :OPERATOR_NOT_SUPPORTED_FOR_CRITERION_TYPE, 9 value :SHOPPING_CAMPAIGN_SALES_COUNTRY_NOT_SUPPORTED_FOR_SALES_CHANNEL, 10 value :CANNOT_ADD_EXISTING_FIELD, 11 + value :CANNOT_UPDATE_NEGATIVE_CRITERION, 12 end end diff --git a/lib/google/ads/googleads/v0/errors/campaign_error_pb.rb b/lib/google/ads/googleads/v0/errors/campaign_error_pb.rb index 38e501e09..411562fb4 100644 --- a/lib/google/ads/googleads/v0/errors/campaign_error_pb.rb +++ b/lib/google/ads/googleads/v0/errors/campaign_error_pb.rb @@ -34,8 +34,6 @@ value :CAMPAIGN_LABEL_ALREADY_EXISTS, 25 value :MISSING_SHOPPING_SETTING, 26 value :INVALID_SHOPPING_SALES_COUNTRY, 27 - value :SHOPPING_MERCHANT_NOT_ALLOWED_FOR_PURCHASES_ON_GOOGLE, 28 - value :PURCHASES_ON_GOOGLE_NOT_SUPPORTED_FOR_SHOPPING_SALES_COUNTRY, 29 value :MISSING_UNIVERSAL_APP_CAMPAIGN_SETTING, 30 value :ADVERTISING_CHANNEL_TYPE_NOT_AVAILABLE_FOR_ACCOUNT_TYPE, 31 value :INVALID_ADVERTISING_CHANNEL_SUB_TYPE, 32 @@ -46,6 +44,7 @@ value :MISSING_HOTEL_CUSTOMER_LINK, 37 value :INVALID_HOTEL_CUSTOMER_LINK, 38 value :MISSING_HOTEL_SETTING, 39 + value :CANNOT_USE_SHARED_CAMPAIGN_BUDGET_WHILE_PART_OF_CAMPAIGN_GROUP, 40 end end diff --git a/lib/google/ads/googleads/v0/errors/campaign_group_error_pb.rb b/lib/google/ads/googleads/v0/errors/campaign_group_error_pb.rb new file mode 100644 index 000000000..98f299bd8 --- /dev/null +++ b/lib/google/ads/googleads/v0/errors/campaign_group_error_pb.rb @@ -0,0 +1,29 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v0/errors/campaign_group_error.proto + +require 'google/protobuf' + +Google::Protobuf::DescriptorPool.generated_pool.build do + add_message "google.ads.googleads.v0.errors.CampaignGroupErrorEnum" do + end + add_enum "google.ads.googleads.v0.errors.CampaignGroupErrorEnum.CampaignGroupError" do + value :UNSPECIFIED, 0 + value :UNKNOWN, 1 + value :CANNOT_REMOVE_CAMPAIGN_GROUP_WITH_ENABLED_OR_PAUSED_CAMPAIGNS, 2 + value :DUPLICATE_NAME, 3 + value :CANNOT_MODIFY_REMOVED_CAMPAIGN_GROUP, 4 + end +end + +module Google + module Ads + module Googleads + module V0 + module Errors + CampaignGroupErrorEnum = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.errors.CampaignGroupErrorEnum").msgclass + CampaignGroupErrorEnum::CampaignGroupError = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.errors.CampaignGroupErrorEnum.CampaignGroupError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/googleads/v0/errors/campaign_shared_set_error_pb.rb b/lib/google/ads/googleads/v0/errors/campaign_shared_set_error_pb.rb new file mode 100644 index 000000000..1cb9738c6 --- /dev/null +++ b/lib/google/ads/googleads/v0/errors/campaign_shared_set_error_pb.rb @@ -0,0 +1,27 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v0/errors/campaign_shared_set_error.proto + +require 'google/protobuf' + +Google::Protobuf::DescriptorPool.generated_pool.build do + add_message "google.ads.googleads.v0.errors.CampaignSharedSetErrorEnum" do + end + add_enum "google.ads.googleads.v0.errors.CampaignSharedSetErrorEnum.CampaignSharedSetError" do + value :UNSPECIFIED, 0 + value :UNKNOWN, 1 + value :SHARED_SET_ACCESS_DENIED, 2 + end +end + +module Google + module Ads + module Googleads + module V0 + module Errors + CampaignSharedSetErrorEnum = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.errors.CampaignSharedSetErrorEnum").msgclass + CampaignSharedSetErrorEnum::CampaignSharedSetError = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.errors.CampaignSharedSetErrorEnum.CampaignSharedSetError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/googleads/v0/errors/context_error_pb.rb b/lib/google/ads/googleads/v0/errors/context_error_pb.rb index 0e83cb9a4..2e78fe97e 100644 --- a/lib/google/ads/googleads/v0/errors/context_error_pb.rb +++ b/lib/google/ads/googleads/v0/errors/context_error_pb.rb @@ -10,6 +10,7 @@ value :UNSPECIFIED, 0 value :UNKNOWN, 1 value :OPERATION_NOT_PERMITTED_FOR_CONTEXT, 2 + value :OPERATION_NOT_PERMITTED_FOR_REMOVED_RESOURCE, 3 end end diff --git a/lib/google/ads/googleads/v0/errors/database_error_pb.rb b/lib/google/ads/googleads/v0/errors/database_error_pb.rb new file mode 100644 index 000000000..6c132e806 --- /dev/null +++ b/lib/google/ads/googleads/v0/errors/database_error_pb.rb @@ -0,0 +1,27 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v0/errors/database_error.proto + +require 'google/protobuf' + +Google::Protobuf::DescriptorPool.generated_pool.build do + add_message "google.ads.googleads.v0.errors.DatabaseErrorEnum" do + end + add_enum "google.ads.googleads.v0.errors.DatabaseErrorEnum.DatabaseError" do + value :UNSPECIFIED, 0 + value :UNKNOWN, 1 + value :CONCURRENT_MODIFICATION, 2 + end +end + +module Google + module Ads + module Googleads + module V0 + module Errors + DatabaseErrorEnum = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.errors.DatabaseErrorEnum").msgclass + DatabaseErrorEnum::DatabaseError = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.errors.DatabaseErrorEnum.DatabaseError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/googleads/v0/errors/enum_error_pb.rb b/lib/google/ads/googleads/v0/errors/enum_error_pb.rb new file mode 100644 index 000000000..2558ec88b --- /dev/null +++ b/lib/google/ads/googleads/v0/errors/enum_error_pb.rb @@ -0,0 +1,27 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v0/errors/enum_error.proto + +require 'google/protobuf' + +Google::Protobuf::DescriptorPool.generated_pool.build do + add_message "google.ads.googleads.v0.errors.EnumErrorEnum" do + end + add_enum "google.ads.googleads.v0.errors.EnumErrorEnum.EnumError" do + value :UNSPECIFIED, 0 + value :UNKNOWN, 1 + value :ENUM_VALUE_NOT_PERMITTED, 3 + end +end + +module Google + module Ads + module Googleads + module V0 + module Errors + EnumErrorEnum = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.errors.EnumErrorEnum").msgclass + EnumErrorEnum::EnumError = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.errors.EnumErrorEnum.EnumError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/googleads/v0/errors/errors_pb.rb b/lib/google/ads/googleads/v0/errors/errors_pb.rb index 48e6d9862..7fc04cf9e 100644 --- a/lib/google/ads/googleads/v0/errors/errors_pb.rb +++ b/lib/google/ads/googleads/v0/errors/errors_pb.rb @@ -20,17 +20,22 @@ require 'google/ads/googleads/v0/errors/campaign_budget_error_pb' require 'google/ads/googleads/v0/errors/campaign_criterion_error_pb' require 'google/ads/googleads/v0/errors/campaign_error_pb' +require 'google/ads/googleads/v0/errors/campaign_group_error_pb' +require 'google/ads/googleads/v0/errors/campaign_shared_set_error_pb' require 'google/ads/googleads/v0/errors/collection_size_error_pb' require 'google/ads/googleads/v0/errors/context_error_pb' require 'google/ads/googleads/v0/errors/criterion_error_pb' +require 'google/ads/googleads/v0/errors/database_error_pb' require 'google/ads/googleads/v0/errors/date_error_pb' require 'google/ads/googleads/v0/errors/date_range_error_pb' require 'google/ads/googleads/v0/errors/distinct_error_pb' +require 'google/ads/googleads/v0/errors/enum_error_pb' require 'google/ads/googleads/v0/errors/feed_attribute_reference_error_pb' require 'google/ads/googleads/v0/errors/field_error_pb' require 'google/ads/googleads/v0/errors/field_mask_error_pb' require 'google/ads/googleads/v0/errors/function_error_pb' require 'google/ads/googleads/v0/errors/function_parsing_error_pb' +require 'google/ads/googleads/v0/errors/header_error_pb' require 'google/ads/googleads/v0/errors/id_error_pb' require 'google/ads/googleads/v0/errors/image_error_pb' require 'google/ads/googleads/v0/errors/internal_error_pb' @@ -44,6 +49,7 @@ require 'google/ads/googleads/v0/errors/null_error_pb' require 'google/ads/googleads/v0/errors/operation_access_denied_error_pb' require 'google/ads/googleads/v0/errors/operator_error_pb' +require 'google/ads/googleads/v0/errors/policy_finding_error_pb' require 'google/ads/googleads/v0/errors/query_error_pb' require 'google/ads/googleads/v0/errors/quota_error_pb' require 'google/ads/googleads/v0/errors/range_error_pb' @@ -53,6 +59,8 @@ require 'google/ads/googleads/v0/errors/resource_access_denied_error_pb' require 'google/ads/googleads/v0/errors/resource_count_limit_exceeded_error_pb' require 'google/ads/googleads/v0/errors/setting_error_pb' +require 'google/ads/googleads/v0/errors/shared_criterion_error_pb' +require 'google/ads/googleads/v0/errors/shared_set_error_pb' require 'google/ads/googleads/v0/errors/string_format_error_pb' require 'google/ads/googleads/v0/errors/string_length_error_pb' require 'google/ads/googleads/v0/errors/url_field_error_pb' @@ -121,6 +129,14 @@ optional :ad_group_bid_modifier_error, :enum, 59, "google.ads.googleads.v0.errors.AdGroupBidModifierErrorEnum.AdGroupBidModifierError" optional :context_error, :enum, 60, "google.ads.googleads.v0.errors.ContextErrorEnum.ContextError" optional :field_error, :enum, 61, "google.ads.googleads.v0.errors.FieldErrorEnum.FieldError" + optional :shared_set_error, :enum, 62, "google.ads.googleads.v0.errors.SharedSetErrorEnum.SharedSetError" + optional :shared_criterion_error, :enum, 63, "google.ads.googleads.v0.errors.SharedCriterionErrorEnum.SharedCriterionError" + optional :campaign_shared_set_error, :enum, 64, "google.ads.googleads.v0.errors.CampaignSharedSetErrorEnum.CampaignSharedSetError" + optional :header_error, :enum, 66, "google.ads.googleads.v0.errors.HeaderErrorEnum.HeaderError" + optional :database_error, :enum, 67, "google.ads.googleads.v0.errors.DatabaseErrorEnum.DatabaseError" + optional :policy_finding_error, :enum, 68, "google.ads.googleads.v0.errors.PolicyFindingErrorEnum.PolicyFindingError" + optional :campaign_group_error, :enum, 69, "google.ads.googleads.v0.errors.CampaignGroupErrorEnum.CampaignGroupError" + optional :enum_error, :enum, 70, "google.ads.googleads.v0.errors.EnumErrorEnum.EnumError" end end add_message "google.ads.googleads.v0.errors.ErrorLocation" do @@ -134,6 +150,7 @@ add_message "google.ads.googleads.v0.errors.ErrorDetails" do optional :unpublished_error_code, :string, 1 optional :policy_violation_details, :message, 2, "google.ads.googleads.v0.errors.PolicyViolationDetails" + optional :policy_finding_details, :message, 3, "google.ads.googleads.v0.errors.PolicyFindingDetails" end add_message "google.ads.googleads.v0.errors.PolicyViolationDetails" do optional :external_policy_description, :string, 2 @@ -141,6 +158,9 @@ optional :external_policy_name, :string, 5 optional :is_exemptible, :bool, 6 end + add_message "google.ads.googleads.v0.errors.PolicyFindingDetails" do + repeated :policy_topic_entries, :message, 1, "google.ads.googleads.v0.common.PolicyTopicEntry" + end end module Google @@ -155,6 +175,7 @@ module Errors ErrorLocation::FieldPathElement = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.errors.ErrorLocation.FieldPathElement").msgclass ErrorDetails = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.errors.ErrorDetails").msgclass PolicyViolationDetails = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.errors.PolicyViolationDetails").msgclass + PolicyFindingDetails = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.errors.PolicyFindingDetails").msgclass end end end diff --git a/lib/google/ads/googleads/v0/errors/header_error_pb.rb b/lib/google/ads/googleads/v0/errors/header_error_pb.rb new file mode 100644 index 000000000..4f1cefc71 --- /dev/null +++ b/lib/google/ads/googleads/v0/errors/header_error_pb.rb @@ -0,0 +1,27 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v0/errors/header_error.proto + +require 'google/protobuf' + +Google::Protobuf::DescriptorPool.generated_pool.build do + add_message "google.ads.googleads.v0.errors.HeaderErrorEnum" do + end + add_enum "google.ads.googleads.v0.errors.HeaderErrorEnum.HeaderError" do + value :UNSPECIFIED, 0 + value :UNKNOWN, 1 + value :INVALID_USER_SELECTED_CUSTOMER_ID, 2 + end +end + +module Google + module Ads + module Googleads + module V0 + module Errors + HeaderErrorEnum = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.errors.HeaderErrorEnum").msgclass + HeaderErrorEnum::HeaderError = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.errors.HeaderErrorEnum.HeaderError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/googleads/v0/errors/mutate_error_pb.rb b/lib/google/ads/googleads/v0/errors/mutate_error_pb.rb index d1f3a53f1..00f20c22a 100644 --- a/lib/google/ads/googleads/v0/errors/mutate_error_pb.rb +++ b/lib/google/ads/googleads/v0/errors/mutate_error_pb.rb @@ -11,6 +11,7 @@ value :UNKNOWN, 1 value :RESOURCE_NOT_FOUND, 3 value :ID_EXISTS_IN_MULTIPLE_MUTATES, 7 + value :INCONSISTENT_FIELD_VALUES, 8 end end diff --git a/lib/google/ads/googleads/v0/errors/policy_finding_error_pb.rb b/lib/google/ads/googleads/v0/errors/policy_finding_error_pb.rb new file mode 100644 index 000000000..8a1a40337 --- /dev/null +++ b/lib/google/ads/googleads/v0/errors/policy_finding_error_pb.rb @@ -0,0 +1,27 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v0/errors/policy_finding_error.proto + +require 'google/protobuf' + +Google::Protobuf::DescriptorPool.generated_pool.build do + add_message "google.ads.googleads.v0.errors.PolicyFindingErrorEnum" do + end + add_enum "google.ads.googleads.v0.errors.PolicyFindingErrorEnum.PolicyFindingError" do + value :UNSPECIFIED, 0 + value :UNKNOWN, 1 + value :POLICY_FINDING, 2 + end +end + +module Google + module Ads + module Googleads + module V0 + module Errors + PolicyFindingErrorEnum = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.errors.PolicyFindingErrorEnum").msgclass + PolicyFindingErrorEnum::PolicyFindingError = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.errors.PolicyFindingErrorEnum.PolicyFindingError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/googleads/v0/errors/query_error_pb.rb b/lib/google/ads/googleads/v0/errors/query_error_pb.rb index 7343c8b63..9378bd77c 100644 --- a/lib/google/ads/googleads/v0/errors/query_error_pb.rb +++ b/lib/google/ads/googleads/v0/errors/query_error_pb.rb @@ -44,6 +44,7 @@ value :PROHIBITED_FIELD_IN_WHERE_CLAUSE, 24 value :PROHIBITED_RESOURCE_TYPE_IN_FROM_CLAUSE, 43 value :PROHIBITED_RESOURCE_TYPE_IN_SELECT_CLAUSE, 48 + value :PROHIBITED_RESOURCE_TYPE_IN_WHERE_CLAUSE, 58 value :PROHIBITED_METRIC_IN_SELECT_OR_WHERE_CLAUSE, 49 value :PROHIBITED_SEGMENT_IN_SELECT_OR_WHERE_CLAUSE, 51 value :PROHIBITED_SEGMENT_WITH_METRIC_IN_SELECT_OR_WHERE_CLAUSE, 53 diff --git a/lib/google/ads/googleads/v0/errors/quota_error_pb.rb b/lib/google/ads/googleads/v0/errors/quota_error_pb.rb index e1c6d65cd..0aaf425f7 100644 --- a/lib/google/ads/googleads/v0/errors/quota_error_pb.rb +++ b/lib/google/ads/googleads/v0/errors/quota_error_pb.rb @@ -11,6 +11,7 @@ value :UNKNOWN, 1 value :RESOURCE_EXHAUSTED, 2 value :ACCESS_PROHIBITED, 3 + value :RESOURCE_TEMPORARILY_EXHAUSTED, 4 end end diff --git a/lib/google/ads/googleads/v0/errors/recommendation_error_pb.rb b/lib/google/ads/googleads/v0/errors/recommendation_error_pb.rb index 5e07c271a..84f751bf1 100644 --- a/lib/google/ads/googleads/v0/errors/recommendation_error_pb.rb +++ b/lib/google/ads/googleads/v0/errors/recommendation_error_pb.rb @@ -15,6 +15,7 @@ value :POLICY_ERROR, 5 value :INVALID_BID_AMOUNT, 6 value :ADGROUP_KEYWORD_LIMIT, 7 + value :RECOMMENDATION_ALREADY_APPLIED, 8 end end diff --git a/lib/google/ads/googleads/v0/errors/shared_criterion_error_pb.rb b/lib/google/ads/googleads/v0/errors/shared_criterion_error_pb.rb new file mode 100644 index 000000000..c2b179b24 --- /dev/null +++ b/lib/google/ads/googleads/v0/errors/shared_criterion_error_pb.rb @@ -0,0 +1,27 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v0/errors/shared_criterion_error.proto + +require 'google/protobuf' + +Google::Protobuf::DescriptorPool.generated_pool.build do + add_message "google.ads.googleads.v0.errors.SharedCriterionErrorEnum" do + end + add_enum "google.ads.googleads.v0.errors.SharedCriterionErrorEnum.SharedCriterionError" do + value :UNSPECIFIED, 0 + value :UNKNOWN, 1 + value :CRITERION_TYPE_NOT_ALLOWED_FOR_SHARED_SET_TYPE, 2 + end +end + +module Google + module Ads + module Googleads + module V0 + module Errors + SharedCriterionErrorEnum = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.errors.SharedCriterionErrorEnum").msgclass + SharedCriterionErrorEnum::SharedCriterionError = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.errors.SharedCriterionErrorEnum.SharedCriterionError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/googleads/v0/errors/shared_set_error_pb.rb b/lib/google/ads/googleads/v0/errors/shared_set_error_pb.rb new file mode 100644 index 000000000..1d691125c --- /dev/null +++ b/lib/google/ads/googleads/v0/errors/shared_set_error_pb.rb @@ -0,0 +1,30 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v0/errors/shared_set_error.proto + +require 'google/protobuf' + +Google::Protobuf::DescriptorPool.generated_pool.build do + add_message "google.ads.googleads.v0.errors.SharedSetErrorEnum" do + end + add_enum "google.ads.googleads.v0.errors.SharedSetErrorEnum.SharedSetError" do + value :UNSPECIFIED, 0 + value :UNKNOWN, 1 + value :CUSTOMER_CANNOT_CREATE_SHARED_SET_OF_THIS_TYPE, 2 + value :DUPLICATE_NAME, 3 + value :SHARED_SET_REMOVED, 4 + value :SHARED_SET_IN_USE, 5 + end +end + +module Google + module Ads + module Googleads + module V0 + module Errors + SharedSetErrorEnum = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.errors.SharedSetErrorEnum").msgclass + SharedSetErrorEnum::SharedSetError = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.errors.SharedSetErrorEnum.SharedSetError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/googleads/v0/resources/ad_group_ad_pb.rb b/lib/google/ads/googleads/v0/resources/ad_group_ad_pb.rb index e467c66bb..907190008 100644 --- a/lib/google/ads/googleads/v0/resources/ad_group_ad_pb.rb +++ b/lib/google/ads/googleads/v0/resources/ad_group_ad_pb.rb @@ -3,15 +3,15 @@ require 'google/protobuf' -require 'google/ads/googleads/v0/common/ad_pb' require 'google/ads/googleads/v0/enums/ad_group_ad_status_pb' +require 'google/ads/googleads/v0/resources/ad_pb' require 'google/protobuf/wrappers_pb' Google::Protobuf::DescriptorPool.generated_pool.build do add_message "google.ads.googleads.v0.resources.AdGroupAd" do optional :resource_name, :string, 1 optional :status, :enum, 3, "google.ads.googleads.v0.enums.AdGroupAdStatusEnum.AdGroupAdStatus" optional :ad_group, :message, 4, "google.protobuf.StringValue" - optional :ad, :message, 5, "google.ads.googleads.v0.common.Ad" + optional :ad, :message, 5, "google.ads.googleads.v0.resources.Ad" end end diff --git a/lib/google/ads/googleads/v0/resources/ad_group_bid_modifier_pb.rb b/lib/google/ads/googleads/v0/resources/ad_group_bid_modifier_pb.rb index 49c28b593..17cca9d4f 100644 --- a/lib/google/ads/googleads/v0/resources/ad_group_bid_modifier_pb.rb +++ b/lib/google/ads/googleads/v0/resources/ad_group_bid_modifier_pb.rb @@ -4,6 +4,7 @@ require 'google/protobuf' require 'google/ads/googleads/v0/common/criteria_pb' +require 'google/ads/googleads/v0/enums/bid_modifier_source_pb' require 'google/protobuf/wrappers_pb' Google::Protobuf::DescriptorPool.generated_pool.build do add_message "google.ads.googleads.v0.resources.AdGroupBidModifier" do @@ -11,11 +12,14 @@ optional :ad_group, :message, 2, "google.protobuf.StringValue" optional :criterion_id, :message, 3, "google.protobuf.Int64Value" optional :bid_modifier, :message, 4, "google.protobuf.DoubleValue" + optional :base_ad_group, :message, 9, "google.protobuf.StringValue" + optional :bid_modifier_source, :enum, 10, "google.ads.googleads.v0.enums.BidModifierSourceEnum.BidModifierSource" oneof :criterion do optional :hotel_date_selection_type, :message, 5, "google.ads.googleads.v0.common.HotelDateSelectionTypeInfo" optional :hotel_advance_booking_window, :message, 6, "google.ads.googleads.v0.common.HotelAdvanceBookingWindowInfo" optional :hotel_length_of_stay, :message, 7, "google.ads.googleads.v0.common.HotelLengthOfStayInfo" optional :hotel_check_in_day, :message, 8, "google.ads.googleads.v0.common.HotelCheckInDayInfo" + optional :device, :message, 11, "google.ads.googleads.v0.common.DeviceInfo" end end end diff --git a/lib/google/ads/googleads/v0/resources/ad_pb.rb b/lib/google/ads/googleads/v0/resources/ad_pb.rb new file mode 100644 index 000000000..46648899e --- /dev/null +++ b/lib/google/ads/googleads/v0/resources/ad_pb.rb @@ -0,0 +1,42 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v0/resources/ad.proto + +require 'google/protobuf' + +require 'google/ads/googleads/v0/common/ad_type_infos_pb' +require 'google/ads/googleads/v0/common/custom_parameter_pb' +require 'google/ads/googleads/v0/enums/ad_type_pb' +require 'google/protobuf/wrappers_pb' +Google::Protobuf::DescriptorPool.generated_pool.build do + add_message "google.ads.googleads.v0.resources.Ad" do + optional :id, :message, 1, "google.protobuf.Int64Value" + repeated :final_urls, :message, 2, "google.protobuf.StringValue" + repeated :final_mobile_urls, :message, 16, "google.protobuf.StringValue" + optional :tracking_url_template, :message, 12, "google.protobuf.StringValue" + repeated :url_custom_parameters, :message, 10, "google.ads.googleads.v0.common.CustomParameter" + optional :display_url, :message, 4, "google.protobuf.StringValue" + optional :type, :enum, 5, "google.ads.googleads.v0.enums.AdTypeEnum.AdType" + oneof :ad_data do + optional :text_ad, :message, 6, "google.ads.googleads.v0.common.TextAdInfo" + optional :expanded_text_ad, :message, 7, "google.ads.googleads.v0.common.ExpandedTextAdInfo" + optional :dynamic_search_ad, :message, 8, "google.ads.googleads.v0.common.DynamicSearchAdInfo" + optional :responsive_display_ad, :message, 9, "google.ads.googleads.v0.common.ResponsiveDisplayAdInfo" + optional :call_only_ad, :message, 13, "google.ads.googleads.v0.common.CallOnlyAdInfo" + optional :expanded_dynamic_search_ad, :message, 14, "google.ads.googleads.v0.common.ExpandedDynamicSearchAdInfo" + optional :hotel_ad, :message, 15, "google.ads.googleads.v0.common.HotelAdInfo" + optional :shopping_smart_ad, :message, 17, "google.ads.googleads.v0.common.ShoppingSmartAdInfo" + end + end +end + +module Google + module Ads + module Googleads + module V0 + module Resources + Ad = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.resources.Ad").msgclass + end + end + end + end +end diff --git a/lib/google/ads/googleads/v0/resources/campaign_bid_modifier_pb.rb b/lib/google/ads/googleads/v0/resources/campaign_bid_modifier_pb.rb new file mode 100644 index 000000000..94ebcd283 --- /dev/null +++ b/lib/google/ads/googleads/v0/resources/campaign_bid_modifier_pb.rb @@ -0,0 +1,30 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v0/resources/campaign_bid_modifier.proto + +require 'google/protobuf' + +require 'google/ads/googleads/v0/common/criteria_pb' +require 'google/protobuf/wrappers_pb' +Google::Protobuf::DescriptorPool.generated_pool.build do + add_message "google.ads.googleads.v0.resources.CampaignBidModifier" do + optional :resource_name, :string, 1 + optional :campaign, :message, 2, "google.protobuf.StringValue" + optional :criterion_id, :message, 3, "google.protobuf.Int64Value" + optional :bid_modifier, :message, 4, "google.protobuf.DoubleValue" + oneof :criterion do + optional :interaction_type, :message, 5, "google.ads.googleads.v0.common.InteractionTypeInfo" + end + end +end + +module Google + module Ads + module Googleads + module V0 + module Resources + CampaignBidModifier = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.resources.CampaignBidModifier").msgclass + end + end + end + end +end diff --git a/lib/google/ads/googleads/v0/resources/campaign_criterion_pb.rb b/lib/google/ads/googleads/v0/resources/campaign_criterion_pb.rb index a7cb10768..1e3024e60 100644 --- a/lib/google/ads/googleads/v0/resources/campaign_criterion_pb.rb +++ b/lib/google/ads/googleads/v0/resources/campaign_criterion_pb.rb @@ -17,7 +17,8 @@ oneof :criterion do optional :keyword, :message, 8, "google.ads.googleads.v0.common.KeywordInfo" optional :location, :message, 12, "google.ads.googleads.v0.common.LocationInfo" - optional :platform, :message, 13, "google.ads.googleads.v0.common.PlatformInfo" + optional :device, :message, 13, "google.ads.googleads.v0.common.DeviceInfo" + optional :ad_schedule, :message, 15, "google.ads.googleads.v0.common.AdScheduleInfo" end end end diff --git a/lib/google/ads/googleads/v0/resources/campaign_group_pb.rb b/lib/google/ads/googleads/v0/resources/campaign_group_pb.rb new file mode 100644 index 000000000..ebb5be156 --- /dev/null +++ b/lib/google/ads/googleads/v0/resources/campaign_group_pb.rb @@ -0,0 +1,27 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v0/resources/campaign_group.proto + +require 'google/protobuf' + +require 'google/ads/googleads/v0/enums/campaign_group_status_pb' +require 'google/protobuf/wrappers_pb' +Google::Protobuf::DescriptorPool.generated_pool.build do + add_message "google.ads.googleads.v0.resources.CampaignGroup" do + optional :resource_name, :string, 1 + optional :id, :message, 3, "google.protobuf.Int64Value" + optional :name, :message, 4, "google.protobuf.StringValue" + optional :status, :enum, 5, "google.ads.googleads.v0.enums.CampaignGroupStatusEnum.CampaignGroupStatus" + end +end + +module Google + module Ads + module Googleads + module V0 + module Resources + CampaignGroup = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.resources.CampaignGroup").msgclass + end + end + end + end +end diff --git a/lib/google/ads/googleads/v0/resources/campaign_pb.rb b/lib/google/ads/googleads/v0/resources/campaign_pb.rb index 4f0f198bb..e6f7c5ff2 100644 --- a/lib/google/ads/googleads/v0/resources/campaign_pb.rb +++ b/lib/google/ads/googleads/v0/resources/campaign_pb.rb @@ -27,9 +27,11 @@ optional :network_settings, :message, 14, "google.ads.googleads.v0.resources.Campaign.NetworkSettings" optional :hotel_setting, :message, 32, "google.ads.googleads.v0.resources.Campaign.HotelSettingInfo" optional :dynamic_search_ads_setting, :message, 33, "google.ads.googleads.v0.resources.Campaign.DynamicSearchAdsSetting" + optional :shopping_setting, :message, 36, "google.ads.googleads.v0.resources.Campaign.ShoppingSetting" optional :campaign_budget, :message, 6, "google.protobuf.StringValue" optional :bidding_strategy_type, :enum, 22, "google.ads.googleads.v0.enums.BiddingStrategyTypeEnum.BiddingStrategyType" optional :start_date, :message, 19, "google.protobuf.StringValue" + optional :campaign_group, :message, 35, "google.protobuf.StringValue" optional :end_date, :message, 20, "google.protobuf.StringValue" oneof :campaign_bidding_strategy do optional :bidding_strategy, :message, 23, "google.protobuf.StringValue" @@ -58,6 +60,12 @@ optional :use_supplied_urls_only, :message, 3, "google.protobuf.BoolValue" repeated :feed_ids, :message, 4, "google.protobuf.Int64Value" end + add_message "google.ads.googleads.v0.resources.Campaign.ShoppingSetting" do + optional :merchant_id, :message, 1, "google.protobuf.Int64Value" + optional :sales_country, :message, 2, "google.protobuf.StringValue" + optional :campaign_priority, :message, 3, "google.protobuf.Int32Value" + optional :enable_local, :message, 4, "google.protobuf.BoolValue" + end end module Google @@ -69,6 +77,7 @@ module Resources Campaign::NetworkSettings = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.resources.Campaign.NetworkSettings").msgclass Campaign::HotelSettingInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.resources.Campaign.HotelSettingInfo").msgclass Campaign::DynamicSearchAdsSetting = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.resources.Campaign.DynamicSearchAdsSetting").msgclass + Campaign::ShoppingSetting = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.resources.Campaign.ShoppingSetting").msgclass end end end diff --git a/lib/google/ads/googleads/v0/resources/campaign_shared_set_pb.rb b/lib/google/ads/googleads/v0/resources/campaign_shared_set_pb.rb new file mode 100644 index 000000000..97fc76687 --- /dev/null +++ b/lib/google/ads/googleads/v0/resources/campaign_shared_set_pb.rb @@ -0,0 +1,27 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v0/resources/campaign_shared_set.proto + +require 'google/protobuf' + +require 'google/ads/googleads/v0/enums/campaign_shared_set_status_pb' +require 'google/protobuf/wrappers_pb' +Google::Protobuf::DescriptorPool.generated_pool.build do + add_message "google.ads.googleads.v0.resources.CampaignSharedSet" do + optional :resource_name, :string, 1 + optional :campaign, :message, 3, "google.protobuf.StringValue" + optional :shared_set, :message, 4, "google.protobuf.StringValue" + optional :status, :enum, 2, "google.ads.googleads.v0.enums.CampaignSharedSetStatusEnum.CampaignSharedSetStatus" + end +end + +module Google + module Ads + module Googleads + module V0 + module Resources + CampaignSharedSet = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.resources.CampaignSharedSet").msgclass + end + end + end + end +end diff --git a/lib/google/ads/googleads/v0/resources/recommendation_pb.rb b/lib/google/ads/googleads/v0/resources/recommendation_pb.rb index 61908bad6..b9313260a 100644 --- a/lib/google/ads/googleads/v0/resources/recommendation_pb.rb +++ b/lib/google/ads/googleads/v0/resources/recommendation_pb.rb @@ -3,10 +3,10 @@ require 'google/protobuf' -require 'google/ads/googleads/v0/common/ad_pb' require 'google/ads/googleads/v0/common/criteria_pb' require 'google/ads/googleads/v0/enums/recommendation_type_pb' require 'google/ads/googleads/v0/enums/target_cpa_opt_in_recommendation_goal_pb' +require 'google/ads/googleads/v0/resources/ad_pb' require 'google/protobuf/wrappers_pb' Google::Protobuf::DescriptorPool.generated_pool.build do add_message "google.ads.googleads.v0.resources.Recommendation" do @@ -16,11 +16,17 @@ optional :campaign_budget, :message, 5, "google.protobuf.StringValue" optional :campaign, :message, 6, "google.protobuf.StringValue" optional :ad_group, :message, 7, "google.protobuf.StringValue" + optional :dismissed, :message, 13, "google.protobuf.BoolValue" oneof :recommendation do optional :campaign_budget_recommendation, :message, 4, "google.ads.googleads.v0.resources.Recommendation.CampaignBudgetRecommendation" optional :keyword_recommendation, :message, 8, "google.ads.googleads.v0.resources.Recommendation.KeywordRecommendation" optional :text_ad_recommendation, :message, 9, "google.ads.googleads.v0.resources.Recommendation.TextAdRecommendation" optional :target_cpa_opt_in_recommendation, :message, 10, "google.ads.googleads.v0.resources.Recommendation.TargetCpaOptInRecommendation" + optional :maximize_conversions_opt_in_recommendation, :message, 11, "google.ads.googleads.v0.resources.Recommendation.MaximizeConversionsOptInRecommendation" + optional :enhanced_cpc_opt_in_recommendation, :message, 12, "google.ads.googleads.v0.resources.Recommendation.EnhancedCpcOptInRecommendation" + optional :search_partners_opt_in_recommendation, :message, 14, "google.ads.googleads.v0.resources.Recommendation.SearchPartnersOptInRecommendation" + optional :maximize_clicks_opt_in_recommendation, :message, 15, "google.ads.googleads.v0.resources.Recommendation.MaximizeClicksOptInRecommendation" + optional :optimize_ad_rotation_recommendation, :message, 16, "google.ads.googleads.v0.resources.Recommendation.OptimizeAdRotationRecommendation" end end add_message "google.ads.googleads.v0.resources.Recommendation.RecommendationImpact" do @@ -48,7 +54,7 @@ optional :recommended_cpc_bid_micros, :message, 2, "google.protobuf.Int64Value" end add_message "google.ads.googleads.v0.resources.Recommendation.TextAdRecommendation" do - optional :ad, :message, 1, "google.ads.googleads.v0.common.Ad" + optional :ad, :message, 1, "google.ads.googleads.v0.resources.Ad" optional :creation_date, :message, 2, "google.protobuf.StringValue" optional :auto_apply_date, :message, 3, "google.protobuf.StringValue" end @@ -62,6 +68,18 @@ optional :required_campaign_budget_amount_micros, :message, 3, "google.protobuf.Int64Value" optional :impact, :message, 4, "google.ads.googleads.v0.resources.Recommendation.RecommendationImpact" end + add_message "google.ads.googleads.v0.resources.Recommendation.MaximizeConversionsOptInRecommendation" do + optional :recommended_budget_amount_micros, :message, 1, "google.protobuf.Int64Value" + end + add_message "google.ads.googleads.v0.resources.Recommendation.EnhancedCpcOptInRecommendation" do + end + add_message "google.ads.googleads.v0.resources.Recommendation.SearchPartnersOptInRecommendation" do + end + add_message "google.ads.googleads.v0.resources.Recommendation.MaximizeClicksOptInRecommendation" do + optional :recommended_budget_amount_micros, :message, 1, "google.protobuf.Int64Value" + end + add_message "google.ads.googleads.v0.resources.Recommendation.OptimizeAdRotationRecommendation" do + end end module Google @@ -78,6 +96,11 @@ module Resources Recommendation::TextAdRecommendation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.resources.Recommendation.TextAdRecommendation").msgclass Recommendation::TargetCpaOptInRecommendation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.resources.Recommendation.TargetCpaOptInRecommendation").msgclass Recommendation::TargetCpaOptInRecommendation::TargetCpaOptInRecommendationOption = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.resources.Recommendation.TargetCpaOptInRecommendation.TargetCpaOptInRecommendationOption").msgclass + Recommendation::MaximizeConversionsOptInRecommendation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.resources.Recommendation.MaximizeConversionsOptInRecommendation").msgclass + Recommendation::EnhancedCpcOptInRecommendation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.resources.Recommendation.EnhancedCpcOptInRecommendation").msgclass + Recommendation::SearchPartnersOptInRecommendation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.resources.Recommendation.SearchPartnersOptInRecommendation").msgclass + Recommendation::MaximizeClicksOptInRecommendation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.resources.Recommendation.MaximizeClicksOptInRecommendation").msgclass + Recommendation::OptimizeAdRotationRecommendation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.resources.Recommendation.OptimizeAdRotationRecommendation").msgclass end end end diff --git a/lib/google/ads/googleads/v0/resources/shared_criterion_pb.rb b/lib/google/ads/googleads/v0/resources/shared_criterion_pb.rb new file mode 100644 index 000000000..bc3dcc5d1 --- /dev/null +++ b/lib/google/ads/googleads/v0/resources/shared_criterion_pb.rb @@ -0,0 +1,31 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v0/resources/shared_criterion.proto + +require 'google/protobuf' + +require 'google/ads/googleads/v0/common/criteria_pb' +require 'google/ads/googleads/v0/enums/criterion_type_pb' +require 'google/protobuf/wrappers_pb' +Google::Protobuf::DescriptorPool.generated_pool.build do + add_message "google.ads.googleads.v0.resources.SharedCriterion" do + optional :resource_name, :string, 1 + optional :shared_set, :message, 2, "google.protobuf.StringValue" + optional :criterion_id, :message, 26, "google.protobuf.Int64Value" + optional :type, :enum, 4, "google.ads.googleads.v0.enums.CriterionTypeEnum.CriterionType" + oneof :criterion do + optional :keyword, :message, 3, "google.ads.googleads.v0.common.KeywordInfo" + end + end +end + +module Google + module Ads + module Googleads + module V0 + module Resources + SharedCriterion = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.resources.SharedCriterion").msgclass + end + end + end + end +end diff --git a/lib/google/ads/googleads/v0/resources/shared_set_pb.rb b/lib/google/ads/googleads/v0/resources/shared_set_pb.rb new file mode 100644 index 000000000..607168a25 --- /dev/null +++ b/lib/google/ads/googleads/v0/resources/shared_set_pb.rb @@ -0,0 +1,31 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v0/resources/shared_set.proto + +require 'google/protobuf' + +require 'google/ads/googleads/v0/enums/shared_set_status_pb' +require 'google/ads/googleads/v0/enums/shared_set_type_pb' +require 'google/protobuf/wrappers_pb' +Google::Protobuf::DescriptorPool.generated_pool.build do + add_message "google.ads.googleads.v0.resources.SharedSet" do + optional :resource_name, :string, 1 + optional :id, :message, 2, "google.protobuf.Int64Value" + optional :type, :enum, 3, "google.ads.googleads.v0.enums.SharedSetTypeEnum.SharedSetType" + optional :name, :message, 4, "google.protobuf.StringValue" + optional :status, :enum, 5, "google.ads.googleads.v0.enums.SharedSetStatusEnum.SharedSetStatus" + optional :member_count, :message, 6, "google.protobuf.Int64Value" + optional :reference_count, :message, 7, "google.protobuf.Int64Value" + end +end + +module Google + module Ads + module Googleads + module V0 + module Resources + SharedSet = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.resources.SharedSet").msgclass + end + end + end + end +end diff --git a/lib/google/ads/googleads/v0/services.rb b/lib/google/ads/googleads/v0/services.rb new file mode 100644 index 000000000..2622fec18 --- /dev/null +++ b/lib/google/ads/googleads/v0/services.rb @@ -0,0 +1,1163 @@ +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require "google/ads/googleads/v0/services/ad_group_ad_service_client" +require "google/ads/googleads/v0/services/ad_group_bid_modifier_service_client" +require "google/ads/googleads/v0/services/ad_group_criterion_service_client" +require "google/ads/googleads/v0/services/ad_group_service_client" +require "google/ads/googleads/v0/services/bidding_strategy_service_client" +require "google/ads/googleads/v0/services/campaign_bid_modifier_service_client" +require "google/ads/googleads/v0/services/campaign_budget_service_client" +require "google/ads/googleads/v0/services/campaign_criterion_service_client" +require "google/ads/googleads/v0/services/campaign_group_service_client" +require "google/ads/googleads/v0/services/campaign_service_client" +require "google/ads/googleads/v0/services/campaign_shared_set_service_client" +require "google/ads/googleads/v0/services/customer_service_client" +require "google/ads/googleads/v0/services/geo_target_constant_service_client" +require "google/ads/googleads/v0/services/google_ads_field_service_client" +require "google/ads/googleads/v0/services/google_ads_service_client" +require "google/ads/googleads/v0/services/keyword_view_service_client" +require "google/ads/googleads/v0/services/recommendation_service_client" +require "google/ads/googleads/v0/services/shared_criterion_service_client" +require "google/ads/googleads/v0/services/shared_set_service_client" +require "google/ads/googleads/v0/errors/errors_pb" + +module Google + module Ads + module Googleads + # rubocop:disable LineLength + + ## + # # Ruby Client for Google Ads API ([Alpha](https://github.com/GoogleCloudPlatform/google-cloud-ruby#versioning)) + # + # [Google Ads API][Product Documentation]: + # Manage your AdWords accounts, campaigns, and reports with this REST-based + # API. + # - [Product Documentation][] + # + # ## Quick Start + # In order to use this library, you first need to go through the following + # steps: + # + # 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) + # 2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) + # 3. [Enable the Google Ads API.](https://console.cloud.google.com/apis/library/googleads.googleapis.com) + # 4. [Setup Authentication.](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud/master/guides/authentication) + # + # ### Next Steps + # - Read the [Google Ads API Product documentation][Product Documentation] + # to learn more about the product and see How-to Guides. + # - View this [repository's main README](https://github.com/GoogleCloudPlatform/google-cloud-ruby/blob/master/README.md) + # to see the full list of Cloud APIs that we cover. + # + # [Product Documentation]: https://cloud.google.com/googleads + # + # ## Enabling Logging + # + # To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library. + # The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html) as shown below, + # or a [`Google::Cloud::Logging::Logger`](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-logging/latest/google/cloud/logging/logger) + # that will write logs to [Stackdriver Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb) + # and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information. + # + # Configuring a Ruby stdlib logger: + # + # ```ruby + # require "logger" + # + # module MyLogger + # LOGGER = Logger.new $stderr, level: Logger::WARN + # def logger + # LOGGER + # end + # end + # + # # Define a gRPC module-level logger method before grpc/logconfig.rb loads. + # module GRPC + # extend MyLogger + # end + # ``` + # + module V0 + module Services + # rubocop:enable LineLength + + module AdGroupAd + ## + # Service to manage ads in an ad group. + # + # @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc] + # Provides the means for authenticating requests made by the client. This parameter can + # be many types. + # A `Google::Auth::Credentials` uses a the properties of its represented keyfile for + # authenticating requests made by this client. + # A `String` will be treated as the path to the keyfile to be used for the construction of + # credentials for this client. + # A `Hash` will be treated as the contents of a keyfile to be used for the construction of + # credentials for this client. + # A `GRPC::Core::Channel` will be used to make calls through. + # A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials + # should already be composed with a `GRPC::Core::CallCredentials` object. + # A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the + # metadata for requests, generally, to give OAuth credentials. + # @param scopes [Array] + # The OAuth scopes for this service. This parameter is ignored if + # an updater_proc is supplied. + # @param client_config [Hash] + # A Hash for call options for each method. See + # Google::Gax#construct_settings for the structure of + # this data. Falls back to the default config if not specified + # or the specified config is missing data points. + # @param timeout [Numeric] + # The default timeout, in seconds, for calls made through this client. + # @param metadata [Hash] + # Default metadata to be sent with each request. This can be overridden on a per call basis. + # @param exception_transformer [Proc] + # An optional proc that intercepts any exceptions raised during an API call to inject + # custom error handling. + def self.new \ + credentials: nil, + scopes: nil, + client_config: nil, + timeout: nil, + metadata: nil, + exception_transformer: nil, + lib_name: nil, + lib_version: nil + kwargs = { + credentials: credentials, + scopes: scopes, + client_config: client_config, + timeout: timeout, + metadata: metadata, + exception_transformer: exception_transformer, + lib_name: lib_name, + lib_version: lib_version + }.select { |_, v| v != nil } + Google::Ads::Googleads::V0::Services::AdGroupAdServiceClient.new(**kwargs) + end + end + + module AdGroupBidModifier + ## + # Service to manage ad group bid modifiers. + # + # @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc] + # Provides the means for authenticating requests made by the client. This parameter can + # be many types. + # A `Google::Auth::Credentials` uses a the properties of its represented keyfile for + # authenticating requests made by this client. + # A `String` will be treated as the path to the keyfile to be used for the construction of + # credentials for this client. + # A `Hash` will be treated as the contents of a keyfile to be used for the construction of + # credentials for this client. + # A `GRPC::Core::Channel` will be used to make calls through. + # A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials + # should already be composed with a `GRPC::Core::CallCredentials` object. + # A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the + # metadata for requests, generally, to give OAuth credentials. + # @param scopes [Array] + # The OAuth scopes for this service. This parameter is ignored if + # an updater_proc is supplied. + # @param client_config [Hash] + # A Hash for call options for each method. See + # Google::Gax#construct_settings for the structure of + # this data. Falls back to the default config if not specified + # or the specified config is missing data points. + # @param timeout [Numeric] + # The default timeout, in seconds, for calls made through this client. + # @param metadata [Hash] + # Default metadata to be sent with each request. This can be overridden on a per call basis. + # @param exception_transformer [Proc] + # An optional proc that intercepts any exceptions raised during an API call to inject + # custom error handling. + def self.new \ + credentials: nil, + scopes: nil, + client_config: nil, + timeout: nil, + metadata: nil, + exception_transformer: nil, + lib_name: nil, + lib_version: nil + kwargs = { + credentials: credentials, + scopes: scopes, + client_config: client_config, + timeout: timeout, + metadata: metadata, + exception_transformer: exception_transformer, + lib_name: lib_name, + lib_version: lib_version + }.select { |_, v| v != nil } + Google::Ads::Googleads::V0::Services::AdGroupBidModifierServiceClient.new(**kwargs) + end + end + + module AdGroupCriterion + ## + # Service to manage ad group criteria. + # + # @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc] + # Provides the means for authenticating requests made by the client. This parameter can + # be many types. + # A `Google::Auth::Credentials` uses a the properties of its represented keyfile for + # authenticating requests made by this client. + # A `String` will be treated as the path to the keyfile to be used for the construction of + # credentials for this client. + # A `Hash` will be treated as the contents of a keyfile to be used for the construction of + # credentials for this client. + # A `GRPC::Core::Channel` will be used to make calls through. + # A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials + # should already be composed with a `GRPC::Core::CallCredentials` object. + # A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the + # metadata for requests, generally, to give OAuth credentials. + # @param scopes [Array] + # The OAuth scopes for this service. This parameter is ignored if + # an updater_proc is supplied. + # @param client_config [Hash] + # A Hash for call options for each method. See + # Google::Gax#construct_settings for the structure of + # this data. Falls back to the default config if not specified + # or the specified config is missing data points. + # @param timeout [Numeric] + # The default timeout, in seconds, for calls made through this client. + # @param metadata [Hash] + # Default metadata to be sent with each request. This can be overridden on a per call basis. + # @param exception_transformer [Proc] + # An optional proc that intercepts any exceptions raised during an API call to inject + # custom error handling. + def self.new \ + credentials: nil, + scopes: nil, + client_config: nil, + timeout: nil, + metadata: nil, + exception_transformer: nil, + lib_name: nil, + lib_version: nil + kwargs = { + credentials: credentials, + scopes: scopes, + client_config: client_config, + timeout: timeout, + metadata: metadata, + exception_transformer: exception_transformer, + lib_name: lib_name, + lib_version: lib_version + }.select { |_, v| v != nil } + Google::Ads::Googleads::V0::Services::AdGroupCriterionServiceClient.new(**kwargs) + end + end + + module AdGroup + ## + # Service to manage ad groups. + # + # @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc] + # Provides the means for authenticating requests made by the client. This parameter can + # be many types. + # A `Google::Auth::Credentials` uses a the properties of its represented keyfile for + # authenticating requests made by this client. + # A `String` will be treated as the path to the keyfile to be used for the construction of + # credentials for this client. + # A `Hash` will be treated as the contents of a keyfile to be used for the construction of + # credentials for this client. + # A `GRPC::Core::Channel` will be used to make calls through. + # A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials + # should already be composed with a `GRPC::Core::CallCredentials` object. + # A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the + # metadata for requests, generally, to give OAuth credentials. + # @param scopes [Array] + # The OAuth scopes for this service. This parameter is ignored if + # an updater_proc is supplied. + # @param client_config [Hash] + # A Hash for call options for each method. See + # Google::Gax#construct_settings for the structure of + # this data. Falls back to the default config if not specified + # or the specified config is missing data points. + # @param timeout [Numeric] + # The default timeout, in seconds, for calls made through this client. + # @param metadata [Hash] + # Default metadata to be sent with each request. This can be overridden on a per call basis. + # @param exception_transformer [Proc] + # An optional proc that intercepts any exceptions raised during an API call to inject + # custom error handling. + def self.new \ + credentials: nil, + scopes: nil, + client_config: nil, + timeout: nil, + metadata: nil, + exception_transformer: nil, + lib_name: nil, + lib_version: nil + kwargs = { + credentials: credentials, + scopes: scopes, + client_config: client_config, + timeout: timeout, + metadata: metadata, + exception_transformer: exception_transformer, + lib_name: lib_name, + lib_version: lib_version + }.select { |_, v| v != nil } + Google::Ads::Googleads::V0::Services::AdGroupServiceClient.new(**kwargs) + end + end + + module BiddingStrategy + ## + # Service to manage bidding strategies. + # + # @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc] + # Provides the means for authenticating requests made by the client. This parameter can + # be many types. + # A `Google::Auth::Credentials` uses a the properties of its represented keyfile for + # authenticating requests made by this client. + # A `String` will be treated as the path to the keyfile to be used for the construction of + # credentials for this client. + # A `Hash` will be treated as the contents of a keyfile to be used for the construction of + # credentials for this client. + # A `GRPC::Core::Channel` will be used to make calls through. + # A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials + # should already be composed with a `GRPC::Core::CallCredentials` object. + # A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the + # metadata for requests, generally, to give OAuth credentials. + # @param scopes [Array] + # The OAuth scopes for this service. This parameter is ignored if + # an updater_proc is supplied. + # @param client_config [Hash] + # A Hash for call options for each method. See + # Google::Gax#construct_settings for the structure of + # this data. Falls back to the default config if not specified + # or the specified config is missing data points. + # @param timeout [Numeric] + # The default timeout, in seconds, for calls made through this client. + # @param metadata [Hash] + # Default metadata to be sent with each request. This can be overridden on a per call basis. + # @param exception_transformer [Proc] + # An optional proc that intercepts any exceptions raised during an API call to inject + # custom error handling. + def self.new \ + credentials: nil, + scopes: nil, + client_config: nil, + timeout: nil, + metadata: nil, + exception_transformer: nil, + lib_name: nil, + lib_version: nil + kwargs = { + credentials: credentials, + scopes: scopes, + client_config: client_config, + timeout: timeout, + metadata: metadata, + exception_transformer: exception_transformer, + lib_name: lib_name, + lib_version: lib_version + }.select { |_, v| v != nil } + Google::Ads::Googleads::V0::Services::BiddingStrategyServiceClient.new(**kwargs) + end + end + + module CampaignBidModifier + ## + # Service to manage campaign bid modifiers. + # + # @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc] + # Provides the means for authenticating requests made by the client. This parameter can + # be many types. + # A `Google::Auth::Credentials` uses a the properties of its represented keyfile for + # authenticating requests made by this client. + # A `String` will be treated as the path to the keyfile to be used for the construction of + # credentials for this client. + # A `Hash` will be treated as the contents of a keyfile to be used for the construction of + # credentials for this client. + # A `GRPC::Core::Channel` will be used to make calls through. + # A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials + # should already be composed with a `GRPC::Core::CallCredentials` object. + # A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the + # metadata for requests, generally, to give OAuth credentials. + # @param scopes [Array] + # The OAuth scopes for this service. This parameter is ignored if + # an updater_proc is supplied. + # @param client_config [Hash] + # A Hash for call options for each method. See + # Google::Gax#construct_settings for the structure of + # this data. Falls back to the default config if not specified + # or the specified config is missing data points. + # @param timeout [Numeric] + # The default timeout, in seconds, for calls made through this client. + # @param metadata [Hash] + # Default metadata to be sent with each request. This can be overridden on a per call basis. + # @param exception_transformer [Proc] + # An optional proc that intercepts any exceptions raised during an API call to inject + # custom error handling. + def self.new \ + credentials: nil, + scopes: nil, + client_config: nil, + timeout: nil, + metadata: nil, + exception_transformer: nil, + lib_name: nil, + lib_version: nil + kwargs = { + credentials: credentials, + scopes: scopes, + client_config: client_config, + timeout: timeout, + metadata: metadata, + exception_transformer: exception_transformer, + lib_name: lib_name, + lib_version: lib_version + }.select { |_, v| v != nil } + Google::Ads::Googleads::V0::Services::CampaignBidModifierServiceClient.new(**kwargs) + end + end + + module CampaignBudget + ## + # Service to manage campaign budgets. + # + # @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc] + # Provides the means for authenticating requests made by the client. This parameter can + # be many types. + # A `Google::Auth::Credentials` uses a the properties of its represented keyfile for + # authenticating requests made by this client. + # A `String` will be treated as the path to the keyfile to be used for the construction of + # credentials for this client. + # A `Hash` will be treated as the contents of a keyfile to be used for the construction of + # credentials for this client. + # A `GRPC::Core::Channel` will be used to make calls through. + # A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials + # should already be composed with a `GRPC::Core::CallCredentials` object. + # A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the + # metadata for requests, generally, to give OAuth credentials. + # @param scopes [Array] + # The OAuth scopes for this service. This parameter is ignored if + # an updater_proc is supplied. + # @param client_config [Hash] + # A Hash for call options for each method. See + # Google::Gax#construct_settings for the structure of + # this data. Falls back to the default config if not specified + # or the specified config is missing data points. + # @param timeout [Numeric] + # The default timeout, in seconds, for calls made through this client. + # @param metadata [Hash] + # Default metadata to be sent with each request. This can be overridden on a per call basis. + # @param exception_transformer [Proc] + # An optional proc that intercepts any exceptions raised during an API call to inject + # custom error handling. + def self.new \ + credentials: nil, + scopes: nil, + client_config: nil, + timeout: nil, + metadata: nil, + exception_transformer: nil, + lib_name: nil, + lib_version: nil + kwargs = { + credentials: credentials, + scopes: scopes, + client_config: client_config, + timeout: timeout, + metadata: metadata, + exception_transformer: exception_transformer, + lib_name: lib_name, + lib_version: lib_version + }.select { |_, v| v != nil } + Google::Ads::Googleads::V0::Services::CampaignBudgetServiceClient.new(**kwargs) + end + end + + module CampaignCriterion + ## + # Service to manage campaign criteria. + # + # @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc] + # Provides the means for authenticating requests made by the client. This parameter can + # be many types. + # A `Google::Auth::Credentials` uses a the properties of its represented keyfile for + # authenticating requests made by this client. + # A `String` will be treated as the path to the keyfile to be used for the construction of + # credentials for this client. + # A `Hash` will be treated as the contents of a keyfile to be used for the construction of + # credentials for this client. + # A `GRPC::Core::Channel` will be used to make calls through. + # A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials + # should already be composed with a `GRPC::Core::CallCredentials` object. + # A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the + # metadata for requests, generally, to give OAuth credentials. + # @param scopes [Array] + # The OAuth scopes for this service. This parameter is ignored if + # an updater_proc is supplied. + # @param client_config [Hash] + # A Hash for call options for each method. See + # Google::Gax#construct_settings for the structure of + # this data. Falls back to the default config if not specified + # or the specified config is missing data points. + # @param timeout [Numeric] + # The default timeout, in seconds, for calls made through this client. + # @param metadata [Hash] + # Default metadata to be sent with each request. This can be overridden on a per call basis. + # @param exception_transformer [Proc] + # An optional proc that intercepts any exceptions raised during an API call to inject + # custom error handling. + def self.new \ + credentials: nil, + scopes: nil, + client_config: nil, + timeout: nil, + metadata: nil, + exception_transformer: nil, + lib_name: nil, + lib_version: nil + kwargs = { + credentials: credentials, + scopes: scopes, + client_config: client_config, + timeout: timeout, + metadata: metadata, + exception_transformer: exception_transformer, + lib_name: lib_name, + lib_version: lib_version + }.select { |_, v| v != nil } + Google::Ads::Googleads::V0::Services::CampaignCriterionServiceClient.new(**kwargs) + end + end + + module CampaignGroup + ## + # Service to manage campaign groups. + # + # @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc] + # Provides the means for authenticating requests made by the client. This parameter can + # be many types. + # A `Google::Auth::Credentials` uses a the properties of its represented keyfile for + # authenticating requests made by this client. + # A `String` will be treated as the path to the keyfile to be used for the construction of + # credentials for this client. + # A `Hash` will be treated as the contents of a keyfile to be used for the construction of + # credentials for this client. + # A `GRPC::Core::Channel` will be used to make calls through. + # A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials + # should already be composed with a `GRPC::Core::CallCredentials` object. + # A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the + # metadata for requests, generally, to give OAuth credentials. + # @param scopes [Array] + # The OAuth scopes for this service. This parameter is ignored if + # an updater_proc is supplied. + # @param client_config [Hash] + # A Hash for call options for each method. See + # Google::Gax#construct_settings for the structure of + # this data. Falls back to the default config if not specified + # or the specified config is missing data points. + # @param timeout [Numeric] + # The default timeout, in seconds, for calls made through this client. + # @param metadata [Hash] + # Default metadata to be sent with each request. This can be overridden on a per call basis. + # @param exception_transformer [Proc] + # An optional proc that intercepts any exceptions raised during an API call to inject + # custom error handling. + def self.new \ + credentials: nil, + scopes: nil, + client_config: nil, + timeout: nil, + metadata: nil, + exception_transformer: nil, + lib_name: nil, + lib_version: nil + kwargs = { + credentials: credentials, + scopes: scopes, + client_config: client_config, + timeout: timeout, + metadata: metadata, + exception_transformer: exception_transformer, + lib_name: lib_name, + lib_version: lib_version + }.select { |_, v| v != nil } + Google::Ads::Googleads::V0::Services::CampaignGroupServiceClient.new(**kwargs) + end + end + + module Campaign + ## + # Service to manage campaigns. + # + # @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc] + # Provides the means for authenticating requests made by the client. This parameter can + # be many types. + # A `Google::Auth::Credentials` uses a the properties of its represented keyfile for + # authenticating requests made by this client. + # A `String` will be treated as the path to the keyfile to be used for the construction of + # credentials for this client. + # A `Hash` will be treated as the contents of a keyfile to be used for the construction of + # credentials for this client. + # A `GRPC::Core::Channel` will be used to make calls through. + # A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials + # should already be composed with a `GRPC::Core::CallCredentials` object. + # A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the + # metadata for requests, generally, to give OAuth credentials. + # @param scopes [Array] + # The OAuth scopes for this service. This parameter is ignored if + # an updater_proc is supplied. + # @param client_config [Hash] + # A Hash for call options for each method. See + # Google::Gax#construct_settings for the structure of + # this data. Falls back to the default config if not specified + # or the specified config is missing data points. + # @param timeout [Numeric] + # The default timeout, in seconds, for calls made through this client. + # @param metadata [Hash] + # Default metadata to be sent with each request. This can be overridden on a per call basis. + # @param exception_transformer [Proc] + # An optional proc that intercepts any exceptions raised during an API call to inject + # custom error handling. + def self.new \ + credentials: nil, + scopes: nil, + client_config: nil, + timeout: nil, + metadata: nil, + exception_transformer: nil, + lib_name: nil, + lib_version: nil + kwargs = { + credentials: credentials, + scopes: scopes, + client_config: client_config, + timeout: timeout, + metadata: metadata, + exception_transformer: exception_transformer, + lib_name: lib_name, + lib_version: lib_version + }.select { |_, v| v != nil } + Google::Ads::Googleads::V0::Services::CampaignServiceClient.new(**kwargs) + end + end + + module CampaignSharedSet + ## + # Service to manage campaign shared sets. + # + # @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc] + # Provides the means for authenticating requests made by the client. This parameter can + # be many types. + # A `Google::Auth::Credentials` uses a the properties of its represented keyfile for + # authenticating requests made by this client. + # A `String` will be treated as the path to the keyfile to be used for the construction of + # credentials for this client. + # A `Hash` will be treated as the contents of a keyfile to be used for the construction of + # credentials for this client. + # A `GRPC::Core::Channel` will be used to make calls through. + # A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials + # should already be composed with a `GRPC::Core::CallCredentials` object. + # A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the + # metadata for requests, generally, to give OAuth credentials. + # @param scopes [Array] + # The OAuth scopes for this service. This parameter is ignored if + # an updater_proc is supplied. + # @param client_config [Hash] + # A Hash for call options for each method. See + # Google::Gax#construct_settings for the structure of + # this data. Falls back to the default config if not specified + # or the specified config is missing data points. + # @param timeout [Numeric] + # The default timeout, in seconds, for calls made through this client. + # @param metadata [Hash] + # Default metadata to be sent with each request. This can be overridden on a per call basis. + # @param exception_transformer [Proc] + # An optional proc that intercepts any exceptions raised during an API call to inject + # custom error handling. + def self.new \ + credentials: nil, + scopes: nil, + client_config: nil, + timeout: nil, + metadata: nil, + exception_transformer: nil, + lib_name: nil, + lib_version: nil + kwargs = { + credentials: credentials, + scopes: scopes, + client_config: client_config, + timeout: timeout, + metadata: metadata, + exception_transformer: exception_transformer, + lib_name: lib_name, + lib_version: lib_version + }.select { |_, v| v != nil } + Google::Ads::Googleads::V0::Services::CampaignSharedSetServiceClient.new(**kwargs) + end + end + + module Customer + ## + # Service to manage customers. + # + # @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc] + # Provides the means for authenticating requests made by the client. This parameter can + # be many types. + # A `Google::Auth::Credentials` uses a the properties of its represented keyfile for + # authenticating requests made by this client. + # A `String` will be treated as the path to the keyfile to be used for the construction of + # credentials for this client. + # A `Hash` will be treated as the contents of a keyfile to be used for the construction of + # credentials for this client. + # A `GRPC::Core::Channel` will be used to make calls through. + # A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials + # should already be composed with a `GRPC::Core::CallCredentials` object. + # A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the + # metadata for requests, generally, to give OAuth credentials. + # @param scopes [Array] + # The OAuth scopes for this service. This parameter is ignored if + # an updater_proc is supplied. + # @param client_config [Hash] + # A Hash for call options for each method. See + # Google::Gax#construct_settings for the structure of + # this data. Falls back to the default config if not specified + # or the specified config is missing data points. + # @param timeout [Numeric] + # The default timeout, in seconds, for calls made through this client. + # @param metadata [Hash] + # Default metadata to be sent with each request. This can be overridden on a per call basis. + # @param exception_transformer [Proc] + # An optional proc that intercepts any exceptions raised during an API call to inject + # custom error handling. + def self.new \ + credentials: nil, + scopes: nil, + client_config: nil, + timeout: nil, + metadata: nil, + exception_transformer: nil, + lib_name: nil, + lib_version: nil + kwargs = { + credentials: credentials, + scopes: scopes, + client_config: client_config, + timeout: timeout, + metadata: metadata, + exception_transformer: exception_transformer, + lib_name: lib_name, + lib_version: lib_version + }.select { |_, v| v != nil } + Google::Ads::Googleads::V0::Services::CustomerServiceClient.new(**kwargs) + end + end + + module GeoTargetConstant + ## + # Service to fetch geo target constants. + # + # @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc] + # Provides the means for authenticating requests made by the client. This parameter can + # be many types. + # A `Google::Auth::Credentials` uses a the properties of its represented keyfile for + # authenticating requests made by this client. + # A `String` will be treated as the path to the keyfile to be used for the construction of + # credentials for this client. + # A `Hash` will be treated as the contents of a keyfile to be used for the construction of + # credentials for this client. + # A `GRPC::Core::Channel` will be used to make calls through. + # A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials + # should already be composed with a `GRPC::Core::CallCredentials` object. + # A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the + # metadata for requests, generally, to give OAuth credentials. + # @param scopes [Array] + # The OAuth scopes for this service. This parameter is ignored if + # an updater_proc is supplied. + # @param client_config [Hash] + # A Hash for call options for each method. See + # Google::Gax#construct_settings for the structure of + # this data. Falls back to the default config if not specified + # or the specified config is missing data points. + # @param timeout [Numeric] + # The default timeout, in seconds, for calls made through this client. + # @param metadata [Hash] + # Default metadata to be sent with each request. This can be overridden on a per call basis. + # @param exception_transformer [Proc] + # An optional proc that intercepts any exceptions raised during an API call to inject + # custom error handling. + def self.new \ + credentials: nil, + scopes: nil, + client_config: nil, + timeout: nil, + metadata: nil, + exception_transformer: nil, + lib_name: nil, + lib_version: nil + kwargs = { + credentials: credentials, + scopes: scopes, + client_config: client_config, + timeout: timeout, + metadata: metadata, + exception_transformer: exception_transformer, + lib_name: lib_name, + lib_version: lib_version + }.select { |_, v| v != nil } + Google::Ads::Googleads::V0::Services::GeoTargetConstantServiceClient.new(**kwargs) + end + end + + module GoogleAdsField + ## + # Service to fetch Google Ads API fields. + # + # @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc] + # Provides the means for authenticating requests made by the client. This parameter can + # be many types. + # A `Google::Auth::Credentials` uses a the properties of its represented keyfile for + # authenticating requests made by this client. + # A `String` will be treated as the path to the keyfile to be used for the construction of + # credentials for this client. + # A `Hash` will be treated as the contents of a keyfile to be used for the construction of + # credentials for this client. + # A `GRPC::Core::Channel` will be used to make calls through. + # A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials + # should already be composed with a `GRPC::Core::CallCredentials` object. + # A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the + # metadata for requests, generally, to give OAuth credentials. + # @param scopes [Array] + # The OAuth scopes for this service. This parameter is ignored if + # an updater_proc is supplied. + # @param client_config [Hash] + # A Hash for call options for each method. See + # Google::Gax#construct_settings for the structure of + # this data. Falls back to the default config if not specified + # or the specified config is missing data points. + # @param timeout [Numeric] + # The default timeout, in seconds, for calls made through this client. + # @param metadata [Hash] + # Default metadata to be sent with each request. This can be overridden on a per call basis. + # @param exception_transformer [Proc] + # An optional proc that intercepts any exceptions raised during an API call to inject + # custom error handling. + def self.new \ + credentials: nil, + scopes: nil, + client_config: nil, + timeout: nil, + metadata: nil, + exception_transformer: nil, + lib_name: nil, + lib_version: nil + kwargs = { + credentials: credentials, + scopes: scopes, + client_config: client_config, + timeout: timeout, + metadata: metadata, + exception_transformer: exception_transformer, + lib_name: lib_name, + lib_version: lib_version + }.select { |_, v| v != nil } + Google::Ads::Googleads::V0::Services::GoogleAdsFieldServiceClient.new(**kwargs) + end + end + + module GoogleAds + ## + # Service to fetch data and metrics across resources. + # + # @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc] + # Provides the means for authenticating requests made by the client. This parameter can + # be many types. + # A `Google::Auth::Credentials` uses a the properties of its represented keyfile for + # authenticating requests made by this client. + # A `String` will be treated as the path to the keyfile to be used for the construction of + # credentials for this client. + # A `Hash` will be treated as the contents of a keyfile to be used for the construction of + # credentials for this client. + # A `GRPC::Core::Channel` will be used to make calls through. + # A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials + # should already be composed with a `GRPC::Core::CallCredentials` object. + # A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the + # metadata for requests, generally, to give OAuth credentials. + # @param scopes [Array] + # The OAuth scopes for this service. This parameter is ignored if + # an updater_proc is supplied. + # @param client_config [Hash] + # A Hash for call options for each method. See + # Google::Gax#construct_settings for the structure of + # this data. Falls back to the default config if not specified + # or the specified config is missing data points. + # @param timeout [Numeric] + # The default timeout, in seconds, for calls made through this client. + # @param metadata [Hash] + # Default metadata to be sent with each request. This can be overridden on a per call basis. + # @param exception_transformer [Proc] + # An optional proc that intercepts any exceptions raised during an API call to inject + # custom error handling. + def self.new \ + credentials: nil, + scopes: nil, + client_config: nil, + timeout: nil, + metadata: nil, + exception_transformer: nil, + lib_name: nil, + lib_version: nil + kwargs = { + credentials: credentials, + scopes: scopes, + client_config: client_config, + timeout: timeout, + metadata: metadata, + exception_transformer: exception_transformer, + lib_name: lib_name, + lib_version: lib_version + }.select { |_, v| v != nil } + Google::Ads::Googleads::V0::Services::GoogleAdsServiceClient.new(**kwargs) + end + end + + module KeywordView + ## + # Service to manage keyword views. + # + # @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc] + # Provides the means for authenticating requests made by the client. This parameter can + # be many types. + # A `Google::Auth::Credentials` uses a the properties of its represented keyfile for + # authenticating requests made by this client. + # A `String` will be treated as the path to the keyfile to be used for the construction of + # credentials for this client. + # A `Hash` will be treated as the contents of a keyfile to be used for the construction of + # credentials for this client. + # A `GRPC::Core::Channel` will be used to make calls through. + # A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials + # should already be composed with a `GRPC::Core::CallCredentials` object. + # A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the + # metadata for requests, generally, to give OAuth credentials. + # @param scopes [Array] + # The OAuth scopes for this service. This parameter is ignored if + # an updater_proc is supplied. + # @param client_config [Hash] + # A Hash for call options for each method. See + # Google::Gax#construct_settings for the structure of + # this data. Falls back to the default config if not specified + # or the specified config is missing data points. + # @param timeout [Numeric] + # The default timeout, in seconds, for calls made through this client. + # @param metadata [Hash] + # Default metadata to be sent with each request. This can be overridden on a per call basis. + # @param exception_transformer [Proc] + # An optional proc that intercepts any exceptions raised during an API call to inject + # custom error handling. + def self.new \ + credentials: nil, + scopes: nil, + client_config: nil, + timeout: nil, + metadata: nil, + exception_transformer: nil, + lib_name: nil, + lib_version: nil + kwargs = { + credentials: credentials, + scopes: scopes, + client_config: client_config, + timeout: timeout, + metadata: metadata, + exception_transformer: exception_transformer, + lib_name: lib_name, + lib_version: lib_version + }.select { |_, v| v != nil } + Google::Ads::Googleads::V0::Services::KeywordViewServiceClient.new(**kwargs) + end + end + + module Recommendation + ## + # Service to manage recommendations. + # + # @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc] + # Provides the means for authenticating requests made by the client. This parameter can + # be many types. + # A `Google::Auth::Credentials` uses a the properties of its represented keyfile for + # authenticating requests made by this client. + # A `String` will be treated as the path to the keyfile to be used for the construction of + # credentials for this client. + # A `Hash` will be treated as the contents of a keyfile to be used for the construction of + # credentials for this client. + # A `GRPC::Core::Channel` will be used to make calls through. + # A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials + # should already be composed with a `GRPC::Core::CallCredentials` object. + # A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the + # metadata for requests, generally, to give OAuth credentials. + # @param scopes [Array] + # The OAuth scopes for this service. This parameter is ignored if + # an updater_proc is supplied. + # @param client_config [Hash] + # A Hash for call options for each method. See + # Google::Gax#construct_settings for the structure of + # this data. Falls back to the default config if not specified + # or the specified config is missing data points. + # @param timeout [Numeric] + # The default timeout, in seconds, for calls made through this client. + # @param metadata [Hash] + # Default metadata to be sent with each request. This can be overridden on a per call basis. + # @param exception_transformer [Proc] + # An optional proc that intercepts any exceptions raised during an API call to inject + # custom error handling. + def self.new \ + credentials: nil, + scopes: nil, + client_config: nil, + timeout: nil, + metadata: nil, + exception_transformer: nil, + lib_name: nil, + lib_version: nil + kwargs = { + credentials: credentials, + scopes: scopes, + client_config: client_config, + timeout: timeout, + metadata: metadata, + exception_transformer: exception_transformer, + lib_name: lib_name, + lib_version: lib_version + }.select { |_, v| v != nil } + Google::Ads::Googleads::V0::Services::RecommendationServiceClient.new(**kwargs) + end + end + + module SharedCriterion + ## + # Service to manage shared criteria. + # + # @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc] + # Provides the means for authenticating requests made by the client. This parameter can + # be many types. + # A `Google::Auth::Credentials` uses a the properties of its represented keyfile for + # authenticating requests made by this client. + # A `String` will be treated as the path to the keyfile to be used for the construction of + # credentials for this client. + # A `Hash` will be treated as the contents of a keyfile to be used for the construction of + # credentials for this client. + # A `GRPC::Core::Channel` will be used to make calls through. + # A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials + # should already be composed with a `GRPC::Core::CallCredentials` object. + # A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the + # metadata for requests, generally, to give OAuth credentials. + # @param scopes [Array] + # The OAuth scopes for this service. This parameter is ignored if + # an updater_proc is supplied. + # @param client_config [Hash] + # A Hash for call options for each method. See + # Google::Gax#construct_settings for the structure of + # this data. Falls back to the default config if not specified + # or the specified config is missing data points. + # @param timeout [Numeric] + # The default timeout, in seconds, for calls made through this client. + # @param metadata [Hash] + # Default metadata to be sent with each request. This can be overridden on a per call basis. + # @param exception_transformer [Proc] + # An optional proc that intercepts any exceptions raised during an API call to inject + # custom error handling. + def self.new \ + credentials: nil, + scopes: nil, + client_config: nil, + timeout: nil, + metadata: nil, + exception_transformer: nil, + lib_name: nil, + lib_version: nil + kwargs = { + credentials: credentials, + scopes: scopes, + client_config: client_config, + timeout: timeout, + metadata: metadata, + exception_transformer: exception_transformer, + lib_name: lib_name, + lib_version: lib_version + }.select { |_, v| v != nil } + Google::Ads::Googleads::V0::Services::SharedCriterionServiceClient.new(**kwargs) + end + end + + module SharedSet + ## + # Service to manage shared sets. + # + # @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc] + # Provides the means for authenticating requests made by the client. This parameter can + # be many types. + # A `Google::Auth::Credentials` uses a the properties of its represented keyfile for + # authenticating requests made by this client. + # A `String` will be treated as the path to the keyfile to be used for the construction of + # credentials for this client. + # A `Hash` will be treated as the contents of a keyfile to be used for the construction of + # credentials for this client. + # A `GRPC::Core::Channel` will be used to make calls through. + # A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials + # should already be composed with a `GRPC::Core::CallCredentials` object. + # A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the + # metadata for requests, generally, to give OAuth credentials. + # @param scopes [Array] + # The OAuth scopes for this service. This parameter is ignored if + # an updater_proc is supplied. + # @param client_config [Hash] + # A Hash for call options for each method. See + # Google::Gax#construct_settings for the structure of + # this data. Falls back to the default config if not specified + # or the specified config is missing data points. + # @param timeout [Numeric] + # The default timeout, in seconds, for calls made through this client. + # @param metadata [Hash] + # Default metadata to be sent with each request. This can be overridden on a per call basis. + # @param exception_transformer [Proc] + # An optional proc that intercepts any exceptions raised during an API call to inject + # custom error handling. + def self.new \ + credentials: nil, + scopes: nil, + client_config: nil, + timeout: nil, + metadata: nil, + exception_transformer: nil, + lib_name: nil, + lib_version: nil + kwargs = { + credentials: credentials, + scopes: scopes, + client_config: client_config, + timeout: timeout, + metadata: metadata, + exception_transformer: exception_transformer, + lib_name: lib_name, + lib_version: lib_version + }.select { |_, v| v != nil } + Google::Ads::Googleads::V0::Services::SharedSetServiceClient.new(**kwargs) + end + end + end + end + end + end +end diff --git a/lib/google/ads/googleads/v0/services/ad_group_ad_service_client.rb b/lib/google/ads/googleads/v0/services/ad_group_ad_service_client.rb index 0a0ddbd4d..101e1ef99 100644 --- a/lib/google/ads/googleads/v0/services/ad_group_ad_service_client.rb +++ b/lib/google/ads/googleads/v0/services/ad_group_ad_service_client.rb @@ -202,9 +202,9 @@ def initialize \ # @return [Google::Ads::Googleads::V0::Resources::AdGroupAd] # @raise [Google::Gax::GaxError] if the RPC is aborted. # @example - # require "google/ads/googleads/v0/services" + # require "google/ads/googleads" # - # ad_group_ad_service_client = Google::Ads::Googleads::V0::Services::AdGroupAd.new + # ad_group_ad_service_client = Google::Ads::Googleads::AdGroupAd.new(version: :v0) # formatted_resource_name = Google::Ads::Googleads::V0::Services::AdGroupAdServiceClient.ad_group_ad_path("[CUSTOMER]", "[AD_GROUP_AD]") # response = ad_group_ad_service_client.get_ad_group_ad(formatted_resource_name) @@ -236,9 +236,9 @@ def get_ad_group_ad \ # @return [Google::Ads::Googleads::V0::Services::MutateAdGroupAdsResponse] # @raise [Google::Gax::GaxError] if the RPC is aborted. # @example - # require "google/ads/googleads/v0/services" + # require "google/ads/googleads" # - # ad_group_ad_service_client = Google::Ads::Googleads::V0::Services::AdGroupAd.new + # ad_group_ad_service_client = Google::Ads::Googleads::AdGroupAd.new(version: :v0) # # # TODO: Initialize +customer_id+: # customer_id = '' diff --git a/lib/google/ads/googleads/v0/services/ad_group_ad_service_services_pb.rb b/lib/google/ads/googleads/v0/services/ad_group_ad_service_services_pb.rb index f01ac25bd..cfdc02897 100644 --- a/lib/google/ads/googleads/v0/services/ad_group_ad_service_services_pb.rb +++ b/lib/google/ads/googleads/v0/services/ad_group_ad_service_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/ads/googleads/v0/services/ad_group_ad_service.proto for package 'google.ads.googleads.v0.services' # Original file comments: -# Copyright 2018 Google Inc. +# Copyright 2018 Google LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,6 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# require 'grpc' require 'google/ads/googleads/v0/services/ad_group_ad_service_pb' @@ -25,8 +26,6 @@ module Googleads module V0 module Services module AdGroupAdService - # Proto file describing the Ad Group Ad service. - # # Service to manage ads in an ad group. class Service diff --git a/lib/google/ads/googleads/v0/services/ad_group_bid_modifier_service_client.rb b/lib/google/ads/googleads/v0/services/ad_group_bid_modifier_service_client.rb index 08c963fc4..3093f14fb 100644 --- a/lib/google/ads/googleads/v0/services/ad_group_bid_modifier_service_client.rb +++ b/lib/google/ads/googleads/v0/services/ad_group_bid_modifier_service_client.rb @@ -202,9 +202,9 @@ def initialize \ # @return [Google::Ads::Googleads::V0::Resources::AdGroupBidModifier] # @raise [Google::Gax::GaxError] if the RPC is aborted. # @example - # require "google/ads/googleads/v0/services" + # require "google/ads/googleads" # - # ad_group_bid_modifier_service_client = Google::Ads::Googleads::V0::Services::AdGroupBidModifier.new + # ad_group_bid_modifier_service_client = Google::Ads::Googleads::AdGroupBidModifier.new(version: :v0) # formatted_resource_name = Google::Ads::Googleads::V0::Services::AdGroupBidModifierServiceClient.ad_group_bid_modifier_path("[CUSTOMER]", "[AD_GROUP_BID_MODIFIER]") # response = ad_group_bid_modifier_service_client.get_ad_group_bid_modifier(formatted_resource_name) @@ -237,9 +237,9 @@ def get_ad_group_bid_modifier \ # @return [Google::Ads::Googleads::V0::Services::MutateAdGroupBidModifiersResponse] # @raise [Google::Gax::GaxError] if the RPC is aborted. # @example - # require "google/ads/googleads/v0/services" + # require "google/ads/googleads" # - # ad_group_bid_modifier_service_client = Google::Ads::Googleads::V0::Services::AdGroupBidModifier.new + # ad_group_bid_modifier_service_client = Google::Ads::Googleads::AdGroupBidModifier.new(version: :v0) # # # TODO: Initialize +customer_id+: # customer_id = '' diff --git a/lib/google/ads/googleads/v0/services/ad_group_bid_modifier_service_services_pb.rb b/lib/google/ads/googleads/v0/services/ad_group_bid_modifier_service_services_pb.rb index 5847390b4..4f162af25 100644 --- a/lib/google/ads/googleads/v0/services/ad_group_bid_modifier_service_services_pb.rb +++ b/lib/google/ads/googleads/v0/services/ad_group_bid_modifier_service_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/ads/googleads/v0/services/ad_group_bid_modifier_service.proto for package 'google.ads.googleads.v0.services' # Original file comments: -# Copyright 2018 Google Inc. +# Copyright 2018 Google LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,6 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# require 'grpc' require 'google/ads/googleads/v0/services/ad_group_bid_modifier_service_pb' @@ -25,8 +26,6 @@ module Googleads module V0 module Services module AdGroupBidModifierService - # Proto file describing the Ad Group Bid Modifier service. - # # Service to manage ad group bid modifiers. class Service diff --git a/lib/google/ads/googleads/v0/services/ad_group_criterion_service_client.rb b/lib/google/ads/googleads/v0/services/ad_group_criterion_service_client.rb index 545ecdb04..d9754d767 100644 --- a/lib/google/ads/googleads/v0/services/ad_group_criterion_service_client.rb +++ b/lib/google/ads/googleads/v0/services/ad_group_criterion_service_client.rb @@ -202,9 +202,9 @@ def initialize \ # @return [Google::Ads::Googleads::V0::Resources::AdGroupCriterion] # @raise [Google::Gax::GaxError] if the RPC is aborted. # @example - # require "google/ads/googleads/v0/services" + # require "google/ads/googleads" # - # ad_group_criterion_service_client = Google::Ads::Googleads::V0::Services::AdGroupCriterion.new + # ad_group_criterion_service_client = Google::Ads::Googleads::AdGroupCriterion.new(version: :v0) # formatted_resource_name = Google::Ads::Googleads::V0::Services::AdGroupCriterionServiceClient.ad_group_criteria_path("[CUSTOMER]", "[AD_GROUP_CRITERIA]") # response = ad_group_criterion_service_client.get_ad_group_criterion(formatted_resource_name) @@ -236,9 +236,9 @@ def get_ad_group_criterion \ # @return [Google::Ads::Googleads::V0::Services::MutateAdGroupCriteriaResponse] # @raise [Google::Gax::GaxError] if the RPC is aborted. # @example - # require "google/ads/googleads/v0/services" + # require "google/ads/googleads" # - # ad_group_criterion_service_client = Google::Ads::Googleads::V0::Services::AdGroupCriterion.new + # ad_group_criterion_service_client = Google::Ads::Googleads::AdGroupCriterion.new(version: :v0) # # # TODO: Initialize +customer_id+: # customer_id = '' diff --git a/lib/google/ads/googleads/v0/services/ad_group_criterion_service_services_pb.rb b/lib/google/ads/googleads/v0/services/ad_group_criterion_service_services_pb.rb index 036db2642..e4938fcf3 100644 --- a/lib/google/ads/googleads/v0/services/ad_group_criterion_service_services_pb.rb +++ b/lib/google/ads/googleads/v0/services/ad_group_criterion_service_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/ads/googleads/v0/services/ad_group_criterion_service.proto for package 'google.ads.googleads.v0.services' # Original file comments: -# Copyright 2018 Google Inc. +# Copyright 2018 Google LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,6 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# require 'grpc' require 'google/ads/googleads/v0/services/ad_group_criterion_service_pb' @@ -25,8 +26,6 @@ module Googleads module V0 module Services module AdGroupCriterionService - # Proto file describing the Ad Group Criterion service. - # # Service to manage ad group criteria. class Service diff --git a/lib/google/ads/googleads/v0/services/ad_group_service_client.rb b/lib/google/ads/googleads/v0/services/ad_group_service_client.rb index 2dc525ba9..9d243ac82 100644 --- a/lib/google/ads/googleads/v0/services/ad_group_service_client.rb +++ b/lib/google/ads/googleads/v0/services/ad_group_service_client.rb @@ -202,9 +202,9 @@ def initialize \ # @return [Google::Ads::Googleads::V0::Resources::AdGroup] # @raise [Google::Gax::GaxError] if the RPC is aborted. # @example - # require "google/ads/googleads/v0/services" + # require "google/ads/googleads" # - # ad_group_service_client = Google::Ads::Googleads::V0::Services::AdGroup.new + # ad_group_service_client = Google::Ads::Googleads::AdGroup.new(version: :v0) # formatted_resource_name = Google::Ads::Googleads::V0::Services::AdGroupServiceClient.ad_group_path("[CUSTOMER]", "[AD_GROUP]") # response = ad_group_service_client.get_ad_group(formatted_resource_name) @@ -236,9 +236,9 @@ def get_ad_group \ # @return [Google::Ads::Googleads::V0::Services::MutateAdGroupsResponse] # @raise [Google::Gax::GaxError] if the RPC is aborted. # @example - # require "google/ads/googleads/v0/services" + # require "google/ads/googleads" # - # ad_group_service_client = Google::Ads::Googleads::V0::Services::AdGroup.new + # ad_group_service_client = Google::Ads::Googleads::AdGroup.new(version: :v0) # # # TODO: Initialize +customer_id+: # customer_id = '' diff --git a/lib/google/ads/googleads/v0/services/ad_group_service_services_pb.rb b/lib/google/ads/googleads/v0/services/ad_group_service_services_pb.rb index 28ade72f2..1f71f58d9 100644 --- a/lib/google/ads/googleads/v0/services/ad_group_service_services_pb.rb +++ b/lib/google/ads/googleads/v0/services/ad_group_service_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/ads/googleads/v0/services/ad_group_service.proto for package 'google.ads.googleads.v0.services' # Original file comments: -# Copyright 2018 Google Inc. +# Copyright 2018 Google LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,6 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# require 'grpc' require 'google/ads/googleads/v0/services/ad_group_service_pb' @@ -25,8 +26,6 @@ module Googleads module V0 module Services module AdGroupService - # Proto file describing the Ad Group service. - # # Service to manage ad groups. class Service diff --git a/lib/google/ads/googleads/v0/services/bidding_strategy_service_client.rb b/lib/google/ads/googleads/v0/services/bidding_strategy_service_client.rb index 68be38236..a57abce75 100644 --- a/lib/google/ads/googleads/v0/services/bidding_strategy_service_client.rb +++ b/lib/google/ads/googleads/v0/services/bidding_strategy_service_client.rb @@ -202,9 +202,9 @@ def initialize \ # @return [Google::Ads::Googleads::V0::Resources::BiddingStrategy] # @raise [Google::Gax::GaxError] if the RPC is aborted. # @example - # require "google/ads/googleads/v0/services" + # require "google/ads/googleads" # - # bidding_strategy_service_client = Google::Ads::Googleads::V0::Services::BiddingStrategy.new + # bidding_strategy_service_client = Google::Ads::Googleads::BiddingStrategy.new(version: :v0) # formatted_resource_name = Google::Ads::Googleads::V0::Services::BiddingStrategyServiceClient.bidding_strategy_path("[CUSTOMER]", "[BIDDING_STRATEGY]") # response = bidding_strategy_service_client.get_bidding_strategy(formatted_resource_name) @@ -237,9 +237,9 @@ def get_bidding_strategy \ # @return [Google::Ads::Googleads::V0::Services::MutateBiddingStrategiesResponse] # @raise [Google::Gax::GaxError] if the RPC is aborted. # @example - # require "google/ads/googleads/v0/services" + # require "google/ads/googleads" # - # bidding_strategy_service_client = Google::Ads::Googleads::V0::Services::BiddingStrategy.new + # bidding_strategy_service_client = Google::Ads::Googleads::BiddingStrategy.new(version: :v0) # # # TODO: Initialize +customer_id+: # customer_id = '' diff --git a/lib/google/ads/googleads/v0/services/bidding_strategy_service_services_pb.rb b/lib/google/ads/googleads/v0/services/bidding_strategy_service_services_pb.rb index 451e56e80..3e12adea1 100644 --- a/lib/google/ads/googleads/v0/services/bidding_strategy_service_services_pb.rb +++ b/lib/google/ads/googleads/v0/services/bidding_strategy_service_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/ads/googleads/v0/services/bidding_strategy_service.proto for package 'google.ads.googleads.v0.services' # Original file comments: -# Copyright 2018 Google Inc. +# Copyright 2018 Google LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,6 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# require 'grpc' require 'google/ads/googleads/v0/services/bidding_strategy_service_pb' @@ -25,8 +26,6 @@ module Googleads module V0 module Services module BiddingStrategyService - # Proto file describing the Bidding Strategy service. - # # Service to manage bidding strategies. class Service diff --git a/lib/google/ads/googleads/v0/services/campaign_bid_modifier_service_client.rb b/lib/google/ads/googleads/v0/services/campaign_bid_modifier_service_client.rb new file mode 100644 index 000000000..c04b341c1 --- /dev/null +++ b/lib/google/ads/googleads/v0/services/campaign_bid_modifier_service_client.rb @@ -0,0 +1,268 @@ +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# EDITING INSTRUCTIONS +# This file was generated from the file +# https://github.com/googleapis/googleapis/blob/master/google/ads/googleads/v0/services/campaign_bid_modifier_service.proto, +# and updates to that file get reflected here through a refresh process. +# For the short term, the refresh process will only be runnable by Google +# engineers. + +require "json" +require "pathname" + +require "google/gax" + +require "google/ads/googleads/v0/services/campaign_bid_modifier_service_pb" +require "google/ads/googleads/v0/services/credentials" + +module Google + module Ads + module Googleads + module V0 + module Services + # Service to manage campaign bid modifiers. + # + # @!attribute [r] campaign_bid_modifier_service_stub + # @return [Google::Ads::Googleads::V0::Services::CampaignBidModifierService::Stub] + class CampaignBidModifierServiceClient + attr_reader :campaign_bid_modifier_service_stub + + # The default address of the service. + SERVICE_ADDRESS = "googleads.googleapis.com".freeze + + # The default port of the service. + DEFAULT_SERVICE_PORT = 443 + + # The default set of gRPC interceptors. + GRPC_INTERCEPTORS = [] + + DEFAULT_TIMEOUT = 30 + + # The scopes needed to make gRPC calls to all of the methods defined in + # this service. + ALL_SCOPES = [ + ].freeze + + + CAMPAIGN_BID_MODIFIER_PATH_TEMPLATE = Google::Gax::PathTemplate.new( + "customers/{customer}/campaignBidModifiers/{campaign_bid_modifier}" + ) + + private_constant :CAMPAIGN_BID_MODIFIER_PATH_TEMPLATE + + # Returns a fully-qualified campaign_bid_modifier resource name string. + # @param customer [String] + # @param campaign_bid_modifier [String] + # @return [String] + def self.campaign_bid_modifier_path customer, campaign_bid_modifier + CAMPAIGN_BID_MODIFIER_PATH_TEMPLATE.render( + :"customer" => customer, + :"campaign_bid_modifier" => campaign_bid_modifier + ) + end + + # @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc] + # Provides the means for authenticating requests made by the client. This parameter can + # be many types. + # A `Google::Auth::Credentials` uses a the properties of its represented keyfile for + # authenticating requests made by this client. + # A `String` will be treated as the path to the keyfile to be used for the construction of + # credentials for this client. + # A `Hash` will be treated as the contents of a keyfile to be used for the construction of + # credentials for this client. + # A `GRPC::Core::Channel` will be used to make calls through. + # A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials + # should already be composed with a `GRPC::Core::CallCredentials` object. + # A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the + # metadata for requests, generally, to give OAuth credentials. + # @param scopes [Array] + # The OAuth scopes for this service. This parameter is ignored if + # an updater_proc is supplied. + # @param client_config [Hash] + # A Hash for call options for each method. See + # Google::Gax#construct_settings for the structure of + # this data. Falls back to the default config if not specified + # or the specified config is missing data points. + # @param timeout [Numeric] + # The default timeout, in seconds, for calls made through this client. + # @param metadata [Hash] + # Default metadata to be sent with each request. This can be overridden on a per call basis. + # @param exception_transformer [Proc] + # An optional proc that intercepts any exceptions raised during an API call to inject + # custom error handling. + def initialize \ + credentials: nil, + scopes: ALL_SCOPES, + client_config: {}, + timeout: DEFAULT_TIMEOUT, + metadata: nil, + exception_transformer: nil, + lib_name: nil, + lib_version: "" + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "google/gax/grpc" + require "google/ads/googleads/v0/services/campaign_bid_modifier_service_services_pb" + + credentials ||= Google::Ads::Googleads::V0::Services::Credentials.default + + if credentials.is_a?(String) || credentials.is_a?(Hash) + updater_proc = Google::Ads::Googleads::V0::Services::Credentials.new(credentials).updater_proc + end + if credentials.is_a?(GRPC::Core::Channel) + channel = credentials + end + if credentials.is_a?(GRPC::Core::ChannelCredentials) + chan_creds = credentials + end + if credentials.is_a?(Proc) + updater_proc = credentials + end + if credentials.is_a?(Google::Auth::Credentials) + updater_proc = credentials.updater_proc + end + + package_version = Gem.loaded_specs['google-ads-googleads'].version.version + + google_api_client = "gl-ruby/#{RUBY_VERSION}" + google_api_client << " #{lib_name}/#{lib_version}" if lib_name + google_api_client << " gapic/#{package_version} gax/#{Google::Gax::VERSION}" + google_api_client << " grpc/#{GRPC::VERSION}" + google_api_client.freeze + + headers = { :"x-goog-api-client" => google_api_client } + headers.merge!(metadata) unless metadata.nil? + client_config_file = Pathname.new(__dir__).join( + "campaign_bid_modifier_service_client_config.json" + ) + defaults = client_config_file.open do |f| + Google::Gax.construct_settings( + "google.ads.googleads.v0.services.CampaignBidModifierService", + JSON.parse(f.read), + client_config, + Google::Gax::Grpc::STATUS_CODE_NAMES, + timeout, + errors: Google::Gax::Grpc::API_ERRORS, + metadata: headers + ) + end + + # Allow overriding the service path/port in subclasses. + service_path = self.class::SERVICE_ADDRESS + port = self.class::DEFAULT_SERVICE_PORT + interceptors = self.class::GRPC_INTERCEPTORS + @campaign_bid_modifier_service_stub = Google::Gax::Grpc.create_stub( + service_path, + port, + chan_creds: chan_creds, + channel: channel, + updater_proc: updater_proc, + scopes: scopes, + interceptors: interceptors, + &Google::Ads::Googleads::V0::Services::CampaignBidModifierService::Stub.method(:new) + ) + + @get_campaign_bid_modifier = Google::Gax.create_api_call( + @campaign_bid_modifier_service_stub.method(:get_campaign_bid_modifier), + defaults["get_campaign_bid_modifier"], + exception_transformer: exception_transformer + ) + @mutate_campaign_bid_modifiers = Google::Gax.create_api_call( + @campaign_bid_modifier_service_stub.method(:mutate_campaign_bid_modifiers), + defaults["mutate_campaign_bid_modifiers"], + exception_transformer: exception_transformer + ) + end + + # Service calls + + # Returns the requested campaign bid modifier in full detail. + # + # @param resource_name [String] + # The resource name of the campaign bid modifier to fetch. + # @param options [Google::Gax::CallOptions] + # Overrides the default settings for this call, e.g, timeout, + # retries, etc. + # @yield [result, operation] Access the result along with the RPC operation + # @yieldparam result [Google::Ads::Googleads::V0::Resources::CampaignBidModifier] + # @yieldparam operation [GRPC::ActiveCall::Operation] + # @return [Google::Ads::Googleads::V0::Resources::CampaignBidModifier] + # @raise [Google::Gax::GaxError] if the RPC is aborted. + # @example + # require "google/ads/googleads" + # + # campaign_bid_modifier_service_client = Google::Ads::Googleads::CampaignBidModifier.new(version: :v0) + # formatted_resource_name = Google::Ads::Googleads::V0::Services::CampaignBidModifierServiceClient.campaign_bid_modifier_path("[CUSTOMER]", "[CAMPAIGN_BID_MODIFIER]") + # response = campaign_bid_modifier_service_client.get_campaign_bid_modifier(formatted_resource_name) + + def get_campaign_bid_modifier \ + resource_name, + options: nil, + &block + req = { + resource_name: resource_name + }.delete_if { |_, v| v.nil? } + req = Google::Gax::to_proto(req, Google::Ads::Googleads::V0::Services::GetCampaignBidModifierRequest) + @get_campaign_bid_modifier.call(req, options, &block) + end + + # Creates, updates, or removes campaign bid modifiers. + # Operation statuses are returned. + # + # @param customer_id [String] + # ID of the customer whose campaign bid modifiers are being modified. + # @param operations [Array] + # The list of operations to perform on individual campaign bid modifiers. + # A hash of the same form as `Google::Ads::Googleads::V0::Services::CampaignBidModifierOperation` + # can also be provided. + # @param options [Google::Gax::CallOptions] + # Overrides the default settings for this call, e.g, timeout, + # retries, etc. + # @yield [result, operation] Access the result along with the RPC operation + # @yieldparam result [Google::Ads::Googleads::V0::Services::MutateCampaignBidModifiersResponse] + # @yieldparam operation [GRPC::ActiveCall::Operation] + # @return [Google::Ads::Googleads::V0::Services::MutateCampaignBidModifiersResponse] + # @raise [Google::Gax::GaxError] if the RPC is aborted. + # @example + # require "google/ads/googleads" + # + # campaign_bid_modifier_service_client = Google::Ads::Googleads::CampaignBidModifier.new(version: :v0) + # + # # TODO: Initialize +customer_id+: + # customer_id = '' + # + # # TODO: Initialize +operations+: + # operations = [] + # response = campaign_bid_modifier_service_client.mutate_campaign_bid_modifiers(customer_id, operations) + + def mutate_campaign_bid_modifiers \ + customer_id, + operations, + options: nil, + &block + req = { + customer_id: customer_id, + operations: operations + }.delete_if { |_, v| v.nil? } + req = Google::Gax::to_proto(req, Google::Ads::Googleads::V0::Services::MutateCampaignBidModifiersRequest) + @mutate_campaign_bid_modifiers.call(req, options, &block) + end + end + end + end + end + end +end diff --git a/lib/google/ads/googleads/v0/services/campaign_bid_modifier_service_client_config.json b/lib/google/ads/googleads/v0/services/campaign_bid_modifier_service_client_config.json new file mode 100644 index 000000000..e90a6b784 --- /dev/null +++ b/lib/google/ads/googleads/v0/services/campaign_bid_modifier_service_client_config.json @@ -0,0 +1,36 @@ +{ + "interfaces": { + "google.ads.googleads.v0.services.CampaignBidModifierService": { + "retry_codes": { + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "non_idempotent": [] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 20000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 20000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "GetCampaignBidModifier": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "MutateCampaignBidModifiers": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/lib/google/ads/googleads/v0/services/campaign_bid_modifier_service_pb.rb b/lib/google/ads/googleads/v0/services/campaign_bid_modifier_service_pb.rb new file mode 100644 index 000000000..c586ac24f --- /dev/null +++ b/lib/google/ads/googleads/v0/services/campaign_bid_modifier_service_pb.rb @@ -0,0 +1,47 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v0/services/campaign_bid_modifier_service.proto + +require 'google/protobuf' + +require 'google/ads/googleads/v0/resources/campaign_bid_modifier_pb' +require 'google/api/annotations_pb' +require 'google/protobuf/field_mask_pb' +Google::Protobuf::DescriptorPool.generated_pool.build do + add_message "google.ads.googleads.v0.services.GetCampaignBidModifierRequest" do + optional :resource_name, :string, 1 + end + add_message "google.ads.googleads.v0.services.MutateCampaignBidModifiersRequest" do + optional :customer_id, :string, 1 + repeated :operations, :message, 2, "google.ads.googleads.v0.services.CampaignBidModifierOperation" + end + add_message "google.ads.googleads.v0.services.CampaignBidModifierOperation" do + optional :update_mask, :message, 4, "google.protobuf.FieldMask" + oneof :operation do + optional :create, :message, 1, "google.ads.googleads.v0.resources.CampaignBidModifier" + optional :update, :message, 2, "google.ads.googleads.v0.resources.CampaignBidModifier" + optional :remove, :string, 3 + end + end + add_message "google.ads.googleads.v0.services.MutateCampaignBidModifiersResponse" do + repeated :results, :message, 2, "google.ads.googleads.v0.services.MutateCampaignBidModifierResult" + end + add_message "google.ads.googleads.v0.services.MutateCampaignBidModifierResult" do + optional :resource_name, :string, 1 + end +end + +module Google + module Ads + module Googleads + module V0 + module Services + GetCampaignBidModifierRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.services.GetCampaignBidModifierRequest").msgclass + MutateCampaignBidModifiersRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.services.MutateCampaignBidModifiersRequest").msgclass + CampaignBidModifierOperation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.services.CampaignBidModifierOperation").msgclass + MutateCampaignBidModifiersResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.services.MutateCampaignBidModifiersResponse").msgclass + MutateCampaignBidModifierResult = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.services.MutateCampaignBidModifierResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/googleads/v0/services/campaign_bid_modifier_service_services_pb.rb b/lib/google/ads/googleads/v0/services/campaign_bid_modifier_service_services_pb.rb new file mode 100644 index 000000000..d1c5a048f --- /dev/null +++ b/lib/google/ads/googleads/v0/services/campaign_bid_modifier_service_services_pb.rb @@ -0,0 +1,51 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v0/services/campaign_bid_modifier_service.proto for package 'google.ads.googleads.v0.services' +# Original file comments: +# Copyright 2018 Google LLC. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# + +require 'grpc' +require 'google/ads/googleads/v0/services/campaign_bid_modifier_service_pb' + +module Google + module Ads + module Googleads + module V0 + module Services + module CampaignBidModifierService + # Service to manage campaign bid modifiers. + class Service + + include GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v0.services.CampaignBidModifierService' + + # Returns the requested campaign bid modifier in full detail. + rpc :GetCampaignBidModifier, GetCampaignBidModifierRequest, Google::Ads::Googleads::V0::Resources::CampaignBidModifier + # Creates, updates, or removes campaign bid modifiers. + # Operation statuses are returned. + rpc :MutateCampaignBidModifiers, MutateCampaignBidModifiersRequest, MutateCampaignBidModifiersResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/googleads/v0/services/campaign_budget_service_client.rb b/lib/google/ads/googleads/v0/services/campaign_budget_service_client.rb index 019d674ed..50183573c 100644 --- a/lib/google/ads/googleads/v0/services/campaign_budget_service_client.rb +++ b/lib/google/ads/googleads/v0/services/campaign_budget_service_client.rb @@ -202,9 +202,9 @@ def initialize \ # @return [Google::Ads::Googleads::V0::Resources::CampaignBudget] # @raise [Google::Gax::GaxError] if the RPC is aborted. # @example - # require "google/ads/googleads/v0/services" + # require "google/ads/googleads" # - # campaign_budget_service_client = Google::Ads::Googleads::V0::Services::CampaignBudget.new + # campaign_budget_service_client = Google::Ads::Googleads::CampaignBudget.new(version: :v0) # formatted_resource_name = Google::Ads::Googleads::V0::Services::CampaignBudgetServiceClient.campaign_budget_path("[CUSTOMER]", "[CAMPAIGN_BUDGET]") # response = campaign_budget_service_client.get_campaign_budget(formatted_resource_name) @@ -237,9 +237,9 @@ def get_campaign_budget \ # @return [Google::Ads::Googleads::V0::Services::MutateCampaignBudgetsResponse] # @raise [Google::Gax::GaxError] if the RPC is aborted. # @example - # require "google/ads/googleads/v0/services" + # require "google/ads/googleads" # - # campaign_budget_service_client = Google::Ads::Googleads::V0::Services::CampaignBudget.new + # campaign_budget_service_client = Google::Ads::Googleads::CampaignBudget.new(version: :v0) # # # TODO: Initialize +customer_id+: # customer_id = '' diff --git a/lib/google/ads/googleads/v0/services/campaign_budget_service_services_pb.rb b/lib/google/ads/googleads/v0/services/campaign_budget_service_services_pb.rb index ab9616d60..7ca7e387f 100644 --- a/lib/google/ads/googleads/v0/services/campaign_budget_service_services_pb.rb +++ b/lib/google/ads/googleads/v0/services/campaign_budget_service_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/ads/googleads/v0/services/campaign_budget_service.proto for package 'google.ads.googleads.v0.services' # Original file comments: -# Copyright 2018 Google Inc. +# Copyright 2018 Google LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,6 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# require 'grpc' require 'google/ads/googleads/v0/services/campaign_budget_service_pb' @@ -25,8 +26,6 @@ module Googleads module V0 module Services module CampaignBudgetService - # Proto file describing the Campaign Budget service. - # # Service to manage campaign budgets. class Service diff --git a/lib/google/ads/googleads/v0/services/campaign_criterion_service_client.rb b/lib/google/ads/googleads/v0/services/campaign_criterion_service_client.rb index 97ae90379..466aadc02 100644 --- a/lib/google/ads/googleads/v0/services/campaign_criterion_service_client.rb +++ b/lib/google/ads/googleads/v0/services/campaign_criterion_service_client.rb @@ -202,9 +202,9 @@ def initialize \ # @return [Google::Ads::Googleads::V0::Resources::CampaignCriterion] # @raise [Google::Gax::GaxError] if the RPC is aborted. # @example - # require "google/ads/googleads/v0/services" + # require "google/ads/googleads" # - # campaign_criterion_service_client = Google::Ads::Googleads::V0::Services::CampaignCriterion.new + # campaign_criterion_service_client = Google::Ads::Googleads::CampaignCriterion.new(version: :v0) # formatted_resource_name = Google::Ads::Googleads::V0::Services::CampaignCriterionServiceClient.campaign_criteria_path("[CUSTOMER]", "[CAMPAIGN_CRITERIA]") # response = campaign_criterion_service_client.get_campaign_criterion(formatted_resource_name) @@ -236,9 +236,9 @@ def get_campaign_criterion \ # @return [Google::Ads::Googleads::V0::Services::MutateCampaignCriteriaResponse] # @raise [Google::Gax::GaxError] if the RPC is aborted. # @example - # require "google/ads/googleads/v0/services" + # require "google/ads/googleads" # - # campaign_criterion_service_client = Google::Ads::Googleads::V0::Services::CampaignCriterion.new + # campaign_criterion_service_client = Google::Ads::Googleads::CampaignCriterion.new(version: :v0) # # # TODO: Initialize +customer_id+: # customer_id = '' diff --git a/lib/google/ads/googleads/v0/services/campaign_criterion_service_services_pb.rb b/lib/google/ads/googleads/v0/services/campaign_criterion_service_services_pb.rb index a35c02a40..3a6d4c63b 100644 --- a/lib/google/ads/googleads/v0/services/campaign_criterion_service_services_pb.rb +++ b/lib/google/ads/googleads/v0/services/campaign_criterion_service_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/ads/googleads/v0/services/campaign_criterion_service.proto for package 'google.ads.googleads.v0.services' # Original file comments: -# Copyright 2018 Google Inc. +# Copyright 2018 Google LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,6 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# require 'grpc' require 'google/ads/googleads/v0/services/campaign_criterion_service_pb' @@ -25,8 +26,6 @@ module Googleads module V0 module Services module CampaignCriterionService - # Proto file describing the Campaign Criterion service. - # # Service to manage campaign criteria. class Service diff --git a/lib/google/ads/googleads/v0/services/campaign_group_service_client.rb b/lib/google/ads/googleads/v0/services/campaign_group_service_client.rb new file mode 100644 index 000000000..35e48ee11 --- /dev/null +++ b/lib/google/ads/googleads/v0/services/campaign_group_service_client.rb @@ -0,0 +1,268 @@ +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# EDITING INSTRUCTIONS +# This file was generated from the file +# https://github.com/googleapis/googleapis/blob/master/google/ads/googleads/v0/services/campaign_group_service.proto, +# and updates to that file get reflected here through a refresh process. +# For the short term, the refresh process will only be runnable by Google +# engineers. + +require "json" +require "pathname" + +require "google/gax" + +require "google/ads/googleads/v0/services/campaign_group_service_pb" +require "google/ads/googleads/v0/services/credentials" + +module Google + module Ads + module Googleads + module V0 + module Services + # Service to manage campaign groups. + # + # @!attribute [r] campaign_group_service_stub + # @return [Google::Ads::Googleads::V0::Services::CampaignGroupService::Stub] + class CampaignGroupServiceClient + attr_reader :campaign_group_service_stub + + # The default address of the service. + SERVICE_ADDRESS = "googleads.googleapis.com".freeze + + # The default port of the service. + DEFAULT_SERVICE_PORT = 443 + + # The default set of gRPC interceptors. + GRPC_INTERCEPTORS = [] + + DEFAULT_TIMEOUT = 30 + + # The scopes needed to make gRPC calls to all of the methods defined in + # this service. + ALL_SCOPES = [ + ].freeze + + + CAMPAIGN_GROUP_PATH_TEMPLATE = Google::Gax::PathTemplate.new( + "customers/{customer}/campaignGroups/{campaign_group}" + ) + + private_constant :CAMPAIGN_GROUP_PATH_TEMPLATE + + # Returns a fully-qualified campaign_group resource name string. + # @param customer [String] + # @param campaign_group [String] + # @return [String] + def self.campaign_group_path customer, campaign_group + CAMPAIGN_GROUP_PATH_TEMPLATE.render( + :"customer" => customer, + :"campaign_group" => campaign_group + ) + end + + # @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc] + # Provides the means for authenticating requests made by the client. This parameter can + # be many types. + # A `Google::Auth::Credentials` uses a the properties of its represented keyfile for + # authenticating requests made by this client. + # A `String` will be treated as the path to the keyfile to be used for the construction of + # credentials for this client. + # A `Hash` will be treated as the contents of a keyfile to be used for the construction of + # credentials for this client. + # A `GRPC::Core::Channel` will be used to make calls through. + # A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials + # should already be composed with a `GRPC::Core::CallCredentials` object. + # A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the + # metadata for requests, generally, to give OAuth credentials. + # @param scopes [Array] + # The OAuth scopes for this service. This parameter is ignored if + # an updater_proc is supplied. + # @param client_config [Hash] + # A Hash for call options for each method. See + # Google::Gax#construct_settings for the structure of + # this data. Falls back to the default config if not specified + # or the specified config is missing data points. + # @param timeout [Numeric] + # The default timeout, in seconds, for calls made through this client. + # @param metadata [Hash] + # Default metadata to be sent with each request. This can be overridden on a per call basis. + # @param exception_transformer [Proc] + # An optional proc that intercepts any exceptions raised during an API call to inject + # custom error handling. + def initialize \ + credentials: nil, + scopes: ALL_SCOPES, + client_config: {}, + timeout: DEFAULT_TIMEOUT, + metadata: nil, + exception_transformer: nil, + lib_name: nil, + lib_version: "" + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "google/gax/grpc" + require "google/ads/googleads/v0/services/campaign_group_service_services_pb" + + credentials ||= Google::Ads::Googleads::V0::Services::Credentials.default + + if credentials.is_a?(String) || credentials.is_a?(Hash) + updater_proc = Google::Ads::Googleads::V0::Services::Credentials.new(credentials).updater_proc + end + if credentials.is_a?(GRPC::Core::Channel) + channel = credentials + end + if credentials.is_a?(GRPC::Core::ChannelCredentials) + chan_creds = credentials + end + if credentials.is_a?(Proc) + updater_proc = credentials + end + if credentials.is_a?(Google::Auth::Credentials) + updater_proc = credentials.updater_proc + end + + package_version = Gem.loaded_specs['google-ads-googleads'].version.version + + google_api_client = "gl-ruby/#{RUBY_VERSION}" + google_api_client << " #{lib_name}/#{lib_version}" if lib_name + google_api_client << " gapic/#{package_version} gax/#{Google::Gax::VERSION}" + google_api_client << " grpc/#{GRPC::VERSION}" + google_api_client.freeze + + headers = { :"x-goog-api-client" => google_api_client } + headers.merge!(metadata) unless metadata.nil? + client_config_file = Pathname.new(__dir__).join( + "campaign_group_service_client_config.json" + ) + defaults = client_config_file.open do |f| + Google::Gax.construct_settings( + "google.ads.googleads.v0.services.CampaignGroupService", + JSON.parse(f.read), + client_config, + Google::Gax::Grpc::STATUS_CODE_NAMES, + timeout, + errors: Google::Gax::Grpc::API_ERRORS, + metadata: headers + ) + end + + # Allow overriding the service path/port in subclasses. + service_path = self.class::SERVICE_ADDRESS + port = self.class::DEFAULT_SERVICE_PORT + interceptors = self.class::GRPC_INTERCEPTORS + @campaign_group_service_stub = Google::Gax::Grpc.create_stub( + service_path, + port, + chan_creds: chan_creds, + channel: channel, + updater_proc: updater_proc, + scopes: scopes, + interceptors: interceptors, + &Google::Ads::Googleads::V0::Services::CampaignGroupService::Stub.method(:new) + ) + + @get_campaign_group = Google::Gax.create_api_call( + @campaign_group_service_stub.method(:get_campaign_group), + defaults["get_campaign_group"], + exception_transformer: exception_transformer + ) + @mutate_campaign_groups = Google::Gax.create_api_call( + @campaign_group_service_stub.method(:mutate_campaign_groups), + defaults["mutate_campaign_groups"], + exception_transformer: exception_transformer + ) + end + + # Service calls + + # Returns the requested campaign group in full detail. + # + # @param resource_name [String] + # The resource name of the campaign group to fetch. + # @param options [Google::Gax::CallOptions] + # Overrides the default settings for this call, e.g, timeout, + # retries, etc. + # @yield [result, operation] Access the result along with the RPC operation + # @yieldparam result [Google::Ads::Googleads::V0::Resources::CampaignGroup] + # @yieldparam operation [GRPC::ActiveCall::Operation] + # @return [Google::Ads::Googleads::V0::Resources::CampaignGroup] + # @raise [Google::Gax::GaxError] if the RPC is aborted. + # @example + # require "google/ads/googleads" + # + # campaign_group_service_client = Google::Ads::Googleads::CampaignGroup.new(version: :v0) + # formatted_resource_name = Google::Ads::Googleads::V0::Services::CampaignGroupServiceClient.campaign_group_path("[CUSTOMER]", "[CAMPAIGN_GROUP]") + # response = campaign_group_service_client.get_campaign_group(formatted_resource_name) + + def get_campaign_group \ + resource_name, + options: nil, + &block + req = { + resource_name: resource_name + }.delete_if { |_, v| v.nil? } + req = Google::Gax::to_proto(req, Google::Ads::Googleads::V0::Services::GetCampaignGroupRequest) + @get_campaign_group.call(req, options, &block) + end + + # Creates, updates, or removes campaign groups. Operation statuses are + # returned. + # + # @param customer_id [String] + # The ID of the customer whose campaign groups are being modified. + # @param operations [Array] + # The list of operations to perform on individual campaign groups. + # A hash of the same form as `Google::Ads::Googleads::V0::Services::CampaignGroupOperation` + # can also be provided. + # @param options [Google::Gax::CallOptions] + # Overrides the default settings for this call, e.g, timeout, + # retries, etc. + # @yield [result, operation] Access the result along with the RPC operation + # @yieldparam result [Google::Ads::Googleads::V0::Services::MutateCampaignGroupsResponse] + # @yieldparam operation [GRPC::ActiveCall::Operation] + # @return [Google::Ads::Googleads::V0::Services::MutateCampaignGroupsResponse] + # @raise [Google::Gax::GaxError] if the RPC is aborted. + # @example + # require "google/ads/googleads" + # + # campaign_group_service_client = Google::Ads::Googleads::CampaignGroup.new(version: :v0) + # + # # TODO: Initialize +customer_id+: + # customer_id = '' + # + # # TODO: Initialize +operations+: + # operations = [] + # response = campaign_group_service_client.mutate_campaign_groups(customer_id, operations) + + def mutate_campaign_groups \ + customer_id, + operations, + options: nil, + &block + req = { + customer_id: customer_id, + operations: operations + }.delete_if { |_, v| v.nil? } + req = Google::Gax::to_proto(req, Google::Ads::Googleads::V0::Services::MutateCampaignGroupsRequest) + @mutate_campaign_groups.call(req, options, &block) + end + end + end + end + end + end +end diff --git a/lib/google/ads/googleads/v0/services/campaign_group_service_client_config.json b/lib/google/ads/googleads/v0/services/campaign_group_service_client_config.json new file mode 100644 index 000000000..a57a9a7be --- /dev/null +++ b/lib/google/ads/googleads/v0/services/campaign_group_service_client_config.json @@ -0,0 +1,36 @@ +{ + "interfaces": { + "google.ads.googleads.v0.services.CampaignGroupService": { + "retry_codes": { + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "non_idempotent": [] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 20000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 20000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "GetCampaignGroup": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "MutateCampaignGroups": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/lib/google/ads/googleads/v0/services/campaign_group_service_pb.rb b/lib/google/ads/googleads/v0/services/campaign_group_service_pb.rb new file mode 100644 index 000000000..ae19af666 --- /dev/null +++ b/lib/google/ads/googleads/v0/services/campaign_group_service_pb.rb @@ -0,0 +1,47 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v0/services/campaign_group_service.proto + +require 'google/protobuf' + +require 'google/ads/googleads/v0/resources/campaign_group_pb' +require 'google/api/annotations_pb' +require 'google/protobuf/field_mask_pb' +Google::Protobuf::DescriptorPool.generated_pool.build do + add_message "google.ads.googleads.v0.services.GetCampaignGroupRequest" do + optional :resource_name, :string, 1 + end + add_message "google.ads.googleads.v0.services.MutateCampaignGroupsRequest" do + optional :customer_id, :string, 1 + repeated :operations, :message, 2, "google.ads.googleads.v0.services.CampaignGroupOperation" + end + add_message "google.ads.googleads.v0.services.CampaignGroupOperation" do + optional :update_mask, :message, 4, "google.protobuf.FieldMask" + oneof :operation do + optional :create, :message, 1, "google.ads.googleads.v0.resources.CampaignGroup" + optional :update, :message, 2, "google.ads.googleads.v0.resources.CampaignGroup" + optional :remove, :string, 3 + end + end + add_message "google.ads.googleads.v0.services.MutateCampaignGroupsResponse" do + repeated :results, :message, 2, "google.ads.googleads.v0.services.MutateCampaignGroupResult" + end + add_message "google.ads.googleads.v0.services.MutateCampaignGroupResult" do + optional :resource_name, :string, 1 + end +end + +module Google + module Ads + module Googleads + module V0 + module Services + GetCampaignGroupRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.services.GetCampaignGroupRequest").msgclass + MutateCampaignGroupsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.services.MutateCampaignGroupsRequest").msgclass + CampaignGroupOperation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.services.CampaignGroupOperation").msgclass + MutateCampaignGroupsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.services.MutateCampaignGroupsResponse").msgclass + MutateCampaignGroupResult = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.services.MutateCampaignGroupResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/googleads/v0/services/campaign_group_service_services_pb.rb b/lib/google/ads/googleads/v0/services/campaign_group_service_services_pb.rb new file mode 100644 index 000000000..b045d11a6 --- /dev/null +++ b/lib/google/ads/googleads/v0/services/campaign_group_service_services_pb.rb @@ -0,0 +1,51 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v0/services/campaign_group_service.proto for package 'google.ads.googleads.v0.services' +# Original file comments: +# Copyright 2018 Google LLC. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# + +require 'grpc' +require 'google/ads/googleads/v0/services/campaign_group_service_pb' + +module Google + module Ads + module Googleads + module V0 + module Services + module CampaignGroupService + # Service to manage campaign groups. + class Service + + include GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v0.services.CampaignGroupService' + + # Returns the requested campaign group in full detail. + rpc :GetCampaignGroup, GetCampaignGroupRequest, Google::Ads::Googleads::V0::Resources::CampaignGroup + # Creates, updates, or removes campaign groups. Operation statuses are + # returned. + rpc :MutateCampaignGroups, MutateCampaignGroupsRequest, MutateCampaignGroupsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/googleads/v0/services/campaign_service_client.rb b/lib/google/ads/googleads/v0/services/campaign_service_client.rb index 512646330..2b70c0457 100644 --- a/lib/google/ads/googleads/v0/services/campaign_service_client.rb +++ b/lib/google/ads/googleads/v0/services/campaign_service_client.rb @@ -202,9 +202,9 @@ def initialize \ # @return [Google::Ads::Googleads::V0::Resources::Campaign] # @raise [Google::Gax::GaxError] if the RPC is aborted. # @example - # require "google/ads/googleads/v0/services" + # require "google/ads/googleads" # - # campaign_service_client = Google::Ads::Googleads::V0::Services::Campaign.new + # campaign_service_client = Google::Ads::Googleads::Campaign.new(version: :v0) # formatted_resource_name = Google::Ads::Googleads::V0::Services::CampaignServiceClient.campaign_path("[CUSTOMER]", "[CAMPAIGN]") # response = campaign_service_client.get_campaign(formatted_resource_name) @@ -236,9 +236,9 @@ def get_campaign \ # @return [Google::Ads::Googleads::V0::Services::MutateCampaignsResponse] # @raise [Google::Gax::GaxError] if the RPC is aborted. # @example - # require "google/ads/googleads/v0/services" + # require "google/ads/googleads" # - # campaign_service_client = Google::Ads::Googleads::V0::Services::Campaign.new + # campaign_service_client = Google::Ads::Googleads::Campaign.new(version: :v0) # # # TODO: Initialize +customer_id+: # customer_id = '' diff --git a/lib/google/ads/googleads/v0/services/campaign_service_services_pb.rb b/lib/google/ads/googleads/v0/services/campaign_service_services_pb.rb index e000d3bf9..8fcb9baec 100644 --- a/lib/google/ads/googleads/v0/services/campaign_service_services_pb.rb +++ b/lib/google/ads/googleads/v0/services/campaign_service_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/ads/googleads/v0/services/campaign_service.proto for package 'google.ads.googleads.v0.services' # Original file comments: -# Copyright 2018 Google Inc. +# Copyright 2018 Google LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,6 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# require 'grpc' require 'google/ads/googleads/v0/services/campaign_service_pb' @@ -25,8 +26,6 @@ module Googleads module V0 module Services module CampaignService - # Proto file describing the Campaign service. - # # Service to manage campaigns. class Service diff --git a/lib/google/ads/googleads/v0/services/campaign_shared_set_service_client.rb b/lib/google/ads/googleads/v0/services/campaign_shared_set_service_client.rb new file mode 100644 index 000000000..8bd0fbcda --- /dev/null +++ b/lib/google/ads/googleads/v0/services/campaign_shared_set_service_client.rb @@ -0,0 +1,267 @@ +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# EDITING INSTRUCTIONS +# This file was generated from the file +# https://github.com/googleapis/googleapis/blob/master/google/ads/googleads/v0/services/campaign_shared_set_service.proto, +# and updates to that file get reflected here through a refresh process. +# For the short term, the refresh process will only be runnable by Google +# engineers. + +require "json" +require "pathname" + +require "google/gax" + +require "google/ads/googleads/v0/services/campaign_shared_set_service_pb" +require "google/ads/googleads/v0/services/credentials" + +module Google + module Ads + module Googleads + module V0 + module Services + # Service to manage campaign shared sets. + # + # @!attribute [r] campaign_shared_set_service_stub + # @return [Google::Ads::Googleads::V0::Services::CampaignSharedSetService::Stub] + class CampaignSharedSetServiceClient + attr_reader :campaign_shared_set_service_stub + + # The default address of the service. + SERVICE_ADDRESS = "googleads.googleapis.com".freeze + + # The default port of the service. + DEFAULT_SERVICE_PORT = 443 + + # The default set of gRPC interceptors. + GRPC_INTERCEPTORS = [] + + DEFAULT_TIMEOUT = 30 + + # The scopes needed to make gRPC calls to all of the methods defined in + # this service. + ALL_SCOPES = [ + ].freeze + + + CAMPAIGN_SHARED_SET_PATH_TEMPLATE = Google::Gax::PathTemplate.new( + "customers/{customer}/campaignSharedSets/{campaign_shared_set}" + ) + + private_constant :CAMPAIGN_SHARED_SET_PATH_TEMPLATE + + # Returns a fully-qualified campaign_shared_set resource name string. + # @param customer [String] + # @param campaign_shared_set [String] + # @return [String] + def self.campaign_shared_set_path customer, campaign_shared_set + CAMPAIGN_SHARED_SET_PATH_TEMPLATE.render( + :"customer" => customer, + :"campaign_shared_set" => campaign_shared_set + ) + end + + # @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc] + # Provides the means for authenticating requests made by the client. This parameter can + # be many types. + # A `Google::Auth::Credentials` uses a the properties of its represented keyfile for + # authenticating requests made by this client. + # A `String` will be treated as the path to the keyfile to be used for the construction of + # credentials for this client. + # A `Hash` will be treated as the contents of a keyfile to be used for the construction of + # credentials for this client. + # A `GRPC::Core::Channel` will be used to make calls through. + # A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials + # should already be composed with a `GRPC::Core::CallCredentials` object. + # A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the + # metadata for requests, generally, to give OAuth credentials. + # @param scopes [Array] + # The OAuth scopes for this service. This parameter is ignored if + # an updater_proc is supplied. + # @param client_config [Hash] + # A Hash for call options for each method. See + # Google::Gax#construct_settings for the structure of + # this data. Falls back to the default config if not specified + # or the specified config is missing data points. + # @param timeout [Numeric] + # The default timeout, in seconds, for calls made through this client. + # @param metadata [Hash] + # Default metadata to be sent with each request. This can be overridden on a per call basis. + # @param exception_transformer [Proc] + # An optional proc that intercepts any exceptions raised during an API call to inject + # custom error handling. + def initialize \ + credentials: nil, + scopes: ALL_SCOPES, + client_config: {}, + timeout: DEFAULT_TIMEOUT, + metadata: nil, + exception_transformer: nil, + lib_name: nil, + lib_version: "" + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "google/gax/grpc" + require "google/ads/googleads/v0/services/campaign_shared_set_service_services_pb" + + credentials ||= Google::Ads::Googleads::V0::Services::Credentials.default + + if credentials.is_a?(String) || credentials.is_a?(Hash) + updater_proc = Google::Ads::Googleads::V0::Services::Credentials.new(credentials).updater_proc + end + if credentials.is_a?(GRPC::Core::Channel) + channel = credentials + end + if credentials.is_a?(GRPC::Core::ChannelCredentials) + chan_creds = credentials + end + if credentials.is_a?(Proc) + updater_proc = credentials + end + if credentials.is_a?(Google::Auth::Credentials) + updater_proc = credentials.updater_proc + end + + package_version = Gem.loaded_specs['google-ads-googleads'].version.version + + google_api_client = "gl-ruby/#{RUBY_VERSION}" + google_api_client << " #{lib_name}/#{lib_version}" if lib_name + google_api_client << " gapic/#{package_version} gax/#{Google::Gax::VERSION}" + google_api_client << " grpc/#{GRPC::VERSION}" + google_api_client.freeze + + headers = { :"x-goog-api-client" => google_api_client } + headers.merge!(metadata) unless metadata.nil? + client_config_file = Pathname.new(__dir__).join( + "campaign_shared_set_service_client_config.json" + ) + defaults = client_config_file.open do |f| + Google::Gax.construct_settings( + "google.ads.googleads.v0.services.CampaignSharedSetService", + JSON.parse(f.read), + client_config, + Google::Gax::Grpc::STATUS_CODE_NAMES, + timeout, + errors: Google::Gax::Grpc::API_ERRORS, + metadata: headers + ) + end + + # Allow overriding the service path/port in subclasses. + service_path = self.class::SERVICE_ADDRESS + port = self.class::DEFAULT_SERVICE_PORT + interceptors = self.class::GRPC_INTERCEPTORS + @campaign_shared_set_service_stub = Google::Gax::Grpc.create_stub( + service_path, + port, + chan_creds: chan_creds, + channel: channel, + updater_proc: updater_proc, + scopes: scopes, + interceptors: interceptors, + &Google::Ads::Googleads::V0::Services::CampaignSharedSetService::Stub.method(:new) + ) + + @get_campaign_shared_set = Google::Gax.create_api_call( + @campaign_shared_set_service_stub.method(:get_campaign_shared_set), + defaults["get_campaign_shared_set"], + exception_transformer: exception_transformer + ) + @mutate_campaign_shared_sets = Google::Gax.create_api_call( + @campaign_shared_set_service_stub.method(:mutate_campaign_shared_sets), + defaults["mutate_campaign_shared_sets"], + exception_transformer: exception_transformer + ) + end + + # Service calls + + # Returns the requested campaign shared set in full detail. + # + # @param resource_name [String] + # The resource name of the campaign shared set to fetch. + # @param options [Google::Gax::CallOptions] + # Overrides the default settings for this call, e.g, timeout, + # retries, etc. + # @yield [result, operation] Access the result along with the RPC operation + # @yieldparam result [Google::Ads::Googleads::V0::Resources::CampaignSharedSet] + # @yieldparam operation [GRPC::ActiveCall::Operation] + # @return [Google::Ads::Googleads::V0::Resources::CampaignSharedSet] + # @raise [Google::Gax::GaxError] if the RPC is aborted. + # @example + # require "google/ads/googleads" + # + # campaign_shared_set_service_client = Google::Ads::Googleads::CampaignSharedSet.new(version: :v0) + # formatted_resource_name = Google::Ads::Googleads::V0::Services::CampaignSharedSetServiceClient.campaign_shared_set_path("[CUSTOMER]", "[CAMPAIGN_SHARED_SET]") + # response = campaign_shared_set_service_client.get_campaign_shared_set(formatted_resource_name) + + def get_campaign_shared_set \ + resource_name, + options: nil, + &block + req = { + resource_name: resource_name + }.delete_if { |_, v| v.nil? } + req = Google::Gax::to_proto(req, Google::Ads::Googleads::V0::Services::GetCampaignSharedSetRequest) + @get_campaign_shared_set.call(req, options, &block) + end + + # Creates or removes campaign shared sets. Operation statuses are returned. + # + # @param customer_id [String] + # The ID of the customer whose campaign shared sets are being modified. + # @param operations [Array] + # The list of operations to perform on individual campaign shared sets. + # A hash of the same form as `Google::Ads::Googleads::V0::Services::CampaignSharedSetOperation` + # can also be provided. + # @param options [Google::Gax::CallOptions] + # Overrides the default settings for this call, e.g, timeout, + # retries, etc. + # @yield [result, operation] Access the result along with the RPC operation + # @yieldparam result [Google::Ads::Googleads::V0::Services::MutateCampaignSharedSetsResponse] + # @yieldparam operation [GRPC::ActiveCall::Operation] + # @return [Google::Ads::Googleads::V0::Services::MutateCampaignSharedSetsResponse] + # @raise [Google::Gax::GaxError] if the RPC is aborted. + # @example + # require "google/ads/googleads" + # + # campaign_shared_set_service_client = Google::Ads::Googleads::CampaignSharedSet.new(version: :v0) + # + # # TODO: Initialize +customer_id+: + # customer_id = '' + # + # # TODO: Initialize +operations+: + # operations = [] + # response = campaign_shared_set_service_client.mutate_campaign_shared_sets(customer_id, operations) + + def mutate_campaign_shared_sets \ + customer_id, + operations, + options: nil, + &block + req = { + customer_id: customer_id, + operations: operations + }.delete_if { |_, v| v.nil? } + req = Google::Gax::to_proto(req, Google::Ads::Googleads::V0::Services::MutateCampaignSharedSetsRequest) + @mutate_campaign_shared_sets.call(req, options, &block) + end + end + end + end + end + end +end diff --git a/lib/google/ads/googleads/v0/services/campaign_shared_set_service_client_config.json b/lib/google/ads/googleads/v0/services/campaign_shared_set_service_client_config.json new file mode 100644 index 000000000..692c1f715 --- /dev/null +++ b/lib/google/ads/googleads/v0/services/campaign_shared_set_service_client_config.json @@ -0,0 +1,36 @@ +{ + "interfaces": { + "google.ads.googleads.v0.services.CampaignSharedSetService": { + "retry_codes": { + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "non_idempotent": [] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 20000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 20000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "GetCampaignSharedSet": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "MutateCampaignSharedSets": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/lib/google/ads/googleads/v0/services/campaign_shared_set_service_pb.rb b/lib/google/ads/googleads/v0/services/campaign_shared_set_service_pb.rb new file mode 100644 index 000000000..cf5ed3620 --- /dev/null +++ b/lib/google/ads/googleads/v0/services/campaign_shared_set_service_pb.rb @@ -0,0 +1,44 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v0/services/campaign_shared_set_service.proto + +require 'google/protobuf' + +require 'google/ads/googleads/v0/resources/campaign_shared_set_pb' +require 'google/api/annotations_pb' +Google::Protobuf::DescriptorPool.generated_pool.build do + add_message "google.ads.googleads.v0.services.GetCampaignSharedSetRequest" do + optional :resource_name, :string, 1 + end + add_message "google.ads.googleads.v0.services.MutateCampaignSharedSetsRequest" do + optional :customer_id, :string, 1 + repeated :operations, :message, 2, "google.ads.googleads.v0.services.CampaignSharedSetOperation" + end + add_message "google.ads.googleads.v0.services.CampaignSharedSetOperation" do + oneof :operation do + optional :create, :message, 1, "google.ads.googleads.v0.resources.CampaignSharedSet" + optional :remove, :string, 3 + end + end + add_message "google.ads.googleads.v0.services.MutateCampaignSharedSetsResponse" do + repeated :results, :message, 2, "google.ads.googleads.v0.services.MutateCampaignSharedSetResult" + end + add_message "google.ads.googleads.v0.services.MutateCampaignSharedSetResult" do + optional :resource_name, :string, 1 + end +end + +module Google + module Ads + module Googleads + module V0 + module Services + GetCampaignSharedSetRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.services.GetCampaignSharedSetRequest").msgclass + MutateCampaignSharedSetsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.services.MutateCampaignSharedSetsRequest").msgclass + CampaignSharedSetOperation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.services.CampaignSharedSetOperation").msgclass + MutateCampaignSharedSetsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.services.MutateCampaignSharedSetsResponse").msgclass + MutateCampaignSharedSetResult = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.services.MutateCampaignSharedSetResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/googleads/v0/services/campaign_shared_set_service_services_pb.rb b/lib/google/ads/googleads/v0/services/campaign_shared_set_service_services_pb.rb new file mode 100644 index 000000000..61c863251 --- /dev/null +++ b/lib/google/ads/googleads/v0/services/campaign_shared_set_service_services_pb.rb @@ -0,0 +1,50 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v0/services/campaign_shared_set_service.proto for package 'google.ads.googleads.v0.services' +# Original file comments: +# Copyright 2018 Google LLC. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# + +require 'grpc' +require 'google/ads/googleads/v0/services/campaign_shared_set_service_pb' + +module Google + module Ads + module Googleads + module V0 + module Services + module CampaignSharedSetService + # Service to manage campaign shared sets. + class Service + + include GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v0.services.CampaignSharedSetService' + + # Returns the requested campaign shared set in full detail. + rpc :GetCampaignSharedSet, GetCampaignSharedSetRequest, Google::Ads::Googleads::V0::Resources::CampaignSharedSet + # Creates or removes campaign shared sets. Operation statuses are returned. + rpc :MutateCampaignSharedSets, MutateCampaignSharedSetsRequest, MutateCampaignSharedSetsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/googleads/v0/services/credentials.rb b/lib/google/ads/googleads/v0/services/credentials.rb index dd445af16..743df3e0a 100644 --- a/lib/google/ads/googleads/v0/services/credentials.rb +++ b/lib/google/ads/googleads/v0/services/credentials.rb @@ -22,8 +22,16 @@ module Services class Credentials < Google::Auth::Credentials SCOPE = [ ].freeze - PATH_ENV_VARS = %w(GOOGLEADS_KEYFILE GOOGLE_CLOUD_KEYFILE GCLOUD_KEYFILE) - JSON_ENV_VARS = %w(GOOGLEADS_KEYFILE_JSON GOOGLE_CLOUD_KEYFILE_JSON GCLOUD_KEYFILE_JSON) + PATH_ENV_VARS = %w(GOOGLEADS_CREDENTIALS + GOOGLEADS_KEYFILE + GOOGLE_CLOUD_CREDENTIALS + GOOGLE_CLOUD_KEYFILE + GCLOUD_KEYFILE) + JSON_ENV_VARS = %w(GOOGLEADS_CREDENTIALS_JSON + GOOGLEADS_KEYFILE_JSON + GOOGLE_CLOUD_CREDENTIALS_JSON + GOOGLE_CLOUD_KEYFILE_JSON + GCLOUD_KEYFILE_JSON) DEFAULT_PATHS = ["~/.config/gcloud/application_default_credentials.json"] end end diff --git a/lib/google/ads/googleads/v0/services/customer_service_client.rb b/lib/google/ads/googleads/v0/services/customer_service_client.rb index b64da5a33..342fd21ba 100644 --- a/lib/google/ads/googleads/v0/services/customer_service_client.rb +++ b/lib/google/ads/googleads/v0/services/customer_service_client.rb @@ -195,9 +195,9 @@ def initialize \ # @return [Google::Ads::Googleads::V0::Resources::Customer] # @raise [Google::Gax::GaxError] if the RPC is aborted. # @example - # require "google/ads/googleads/v0/services" + # require "google/ads/googleads" # - # customer_service_client = Google::Ads::Googleads::V0::Services::Customer.new + # customer_service_client = Google::Ads::Googleads::Customer.new(version: :v0) # formatted_resource_name = Google::Ads::Googleads::V0::Services::CustomerServiceClient.customer_path("[CUSTOMER]") # response = customer_service_client.get_customer(formatted_resource_name) diff --git a/lib/google/ads/googleads/v0/services/customer_service_services_pb.rb b/lib/google/ads/googleads/v0/services/customer_service_services_pb.rb index 40f078105..335c4a91d 100644 --- a/lib/google/ads/googleads/v0/services/customer_service_services_pb.rb +++ b/lib/google/ads/googleads/v0/services/customer_service_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/ads/googleads/v0/services/customer_service.proto for package 'google.ads.googleads.v0.services' # Original file comments: -# Copyright 2018 Google Inc. +# Copyright 2018 Google LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,6 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# require 'grpc' require 'google/ads/googleads/v0/services/customer_service_pb' @@ -25,8 +26,6 @@ module Googleads module V0 module Services module CustomerService - # Proto file describing the Customer service. - # # Service to manage customers. class Service diff --git a/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/common/ad_type_infos.rb b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/common/ad_type_infos.rb new file mode 100644 index 000000000..0f9250910 --- /dev/null +++ b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/common/ad_type_infos.rb @@ -0,0 +1,120 @@ +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +module Google + module Ads + module Googleads + module V0 + module Common + # A text ad. + # @!attribute [rw] headline + # @return [Google::Protobuf::StringValue] + # The headline of the ad. + # @!attribute [rw] description1 + # @return [Google::Protobuf::StringValue] + # The first line of the ad's description. + # @!attribute [rw] description2 + # @return [Google::Protobuf::StringValue] + # The second line of the ad's description. + class TextAdInfo; end + + # An expanded text ad. + # @!attribute [rw] headline_part1 + # @return [Google::Protobuf::StringValue] + # The first part of the ad's headline. + # @!attribute [rw] headline_part2 + # @return [Google::Protobuf::StringValue] + # The second part of the ad's headline. + # @!attribute [rw] description + # @return [Google::Protobuf::StringValue] + # The description of the ad. + # @!attribute [rw] path1 + # @return [Google::Protobuf::StringValue] + # The text that can appear alongside the ad's displayed URL. + # @!attribute [rw] path2 + # @return [Google::Protobuf::StringValue] + # Additional text that can appear alongside the ad's displayed URL. + class ExpandedTextAdInfo; end + + # A dynamic search ad. + # @!attribute [rw] description1 + # @return [Google::Protobuf::StringValue] + # The first line of the ad's description. + # @!attribute [rw] description2 + # @return [Google::Protobuf::StringValue] + # The second line of the ad's description. + class DynamicSearchAdInfo; end + + # A responsive display ad. + # @!attribute [rw] short_headline + # @return [Google::Protobuf::StringValue] + # The short version of the ad's headline. + # @!attribute [rw] long_headline + # @return [Google::Protobuf::StringValue] + # The long version of the ad's headline. + # @!attribute [rw] description + # @return [Google::Protobuf::StringValue] + # The description of the ad. + # @!attribute [rw] business_name + # @return [Google::Protobuf::StringValue] + # The business name in the ad. + class ResponsiveDisplayAdInfo; end + + # A call-only ad. + # @!attribute [rw] country_code + # @return [Google::Protobuf::StringValue] + # The country code in the ad. + # @!attribute [rw] phone_number + # @return [Google::Protobuf::StringValue] + # The phone number in the ad. + # @!attribute [rw] business_name + # @return [Google::Protobuf::StringValue] + # The business name in the ad. + # @!attribute [rw] description1 + # @return [Google::Protobuf::StringValue] + # The first line of the ad's description. + # @!attribute [rw] description2 + # @return [Google::Protobuf::StringValue] + # The second line of the ad's description. + # @!attribute [rw] call_tracked + # @return [Google::Protobuf::BoolValue] + # Whether to enable call tracking for the creative. Enabling call + # tracking also enables call conversions. + # @!attribute [rw] disable_call_conversion + # @return [Google::Protobuf::BoolValue] + # Whether to disable call conversion for the creative. + # If set to +true+, disables call conversions even when +call_tracked+ is + # +true+. + # If +call_tracked+ is +false+, this field is ignored. + # @!attribute [rw] phone_number_verification_url + # @return [Google::Protobuf::StringValue] + # The URL to be used for phone number verification. + class CallOnlyAdInfo; end + + # An expanded dynamic search ad. + # @!attribute [rw] description + # @return [Google::Protobuf::StringValue] + # The description of the ad. + class ExpandedDynamicSearchAdInfo; end + + # A hotel ad. + class HotelAdInfo; end + + # A Smart Shopping ad. + class ShoppingSmartAdInfo; end + end + end + end + end +end \ No newline at end of file diff --git a/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/common/bidding.rb b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/common/bidding.rb new file mode 100644 index 000000000..a4eecb07c --- /dev/null +++ b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/common/bidding.rb @@ -0,0 +1,176 @@ +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +module Google + module Ads + module Googleads + module V0 + module Common + # An automated bidding strategy that raises bids for clicks + # that seem more likely to lead to a conversion and lowers + # them for clicks where they seem less likely. + class EnhancedCpc; end + + # Manual click-based bidding where user pays per click. + # @!attribute [rw] enhanced_cpc_enabled + # @return [Google::Protobuf::BoolValue] + # Whether bids are to be enhanced based on conversion optimizer data. + class ManualCpc; end + + # Manual impression-based bidding where user pays per thousand impressions. + class ManualCpm; end + + # An automated bidding strategy that sets bids to help get the most conversions + # for your campaign while spending your budget. + class MaximizeConversions; end + + # An automated bidding strategy which tries to maximize conversion value + # given a daily budget. + # @!attribute [rw] target_roas + # @return [Google::Protobuf::DoubleValue] + # The target return on ad spend (ROAS) option. If set, the bid strategy will + # maximize revenue while averaging the target return on ad spend. If the + # target ROAS is high, the bid strategy may not be able to spend the full + # budget. If the target ROAS is not set, the bid strategy will aim to + # achieve the highest possible ROAS for the budget. + class MaximizeConversionValue; end + + # An automated bidding strategy which sets CPC bids to target impressions on + # page one, or page one promoted slots on google.com. + # @!attribute [rw] strategy_goal + # @return [Google::Ads::Googleads::V0::Enums::PageOnePromotedStrategyGoalEnum::PageOnePromotedStrategyGoal] + # The strategy goal of where impressions are desired to be shown on + # search result pages. + # @!attribute [rw] cpc_bid_ceiling_micros + # @return [Google::Protobuf::Int64Value] + # Maximum bid limit that can be set by the bid strategy. + # The limit applies to all keywords managed by the strategy. + # @!attribute [rw] bid_modifier + # @return [Google::Protobuf::DoubleValue] + # Bid multiplier to be applied to the relevant bid estimate (depending on + # the +strategy_goal+) in determining a keyword's new CPC bid. + # @!attribute [rw] only_raise_cpc_bids + # @return [Google::Protobuf::BoolValue] + # Whether the strategy should always follow bid estimate changes, or only + # increase. + # If false, always sets a keyword's new bid to the current bid estimate. + # If true, only updates a keyword's bid if the current bid estimate is + # greater than the current bid. + # @!attribute [rw] raise_cpc_bid_when_budget_constrained + # @return [Google::Protobuf::BoolValue] + # Whether the strategy is allowed to raise bids when the throttling + # rate of the budget it is serving out of rises above a threshold. + # @!attribute [rw] raise_cpc_bid_when_quality_score_is_low + # @return [Google::Protobuf::BoolValue] + # Whether the strategy is allowed to raise bids on keywords with + # lower-range quality scores. + class PageOnePromoted; end + + # An automated bid strategy that sets bids to help get as many conversions as + # possible at the target cost-per-acquisition (CPA) you set. + # @!attribute [rw] target_cpa_micros + # @return [Google::Protobuf::Int64Value] + # Average CPA target. + # This target should be greater than or equal to minimum billable unit based + # on the currency for the account. + # @!attribute [rw] cpc_bid_ceiling_micros + # @return [Google::Protobuf::Int64Value] + # Maximum bid limit that can be set by the bid strategy. + # The limit applies to all keywords managed by the strategy. + # @!attribute [rw] cpc_bid_floor_micros + # @return [Google::Protobuf::Int64Value] + # Minimum bid limit that can be set by the bid strategy. + # The limit applies to all keywords managed by the strategy. + class TargetCpa; end + + # An automated bidding strategy that sets bids based on the target fraction of + # auctions where the advertiser should outrank a specific competitor. + # @!attribute [rw] target_outrank_share_micros + # @return [Google::Protobuf::Int32Value] + # The target fraction of auctions where the advertiser should outrank the + # competitor. + # The advertiser outranks the competitor in an auction if either the + # advertiser appears above the competitor in the search results, or appears + # in the search results when the competitor does not. + # Value must be between 1 and 1000000, inclusive. + # @!attribute [rw] competitor_domain + # @return [Google::Protobuf::StringValue] + # Competitor's visible domain URL. + # @!attribute [rw] cpc_bid_ceiling_micros + # @return [Google::Protobuf::Int64Value] + # Maximum bid limit that can be set by the bid strategy. + # The limit applies to all keywords managed by the strategy. + # @!attribute [rw] only_raise_cpc_bids + # @return [Google::Protobuf::BoolValue] + # Whether the strategy should always follow bid estimate changes, + # or only increase. + # If false, always set a keyword's new bid to the current bid estimate. + # If true, only updates a keyword's bid if the current bid estimate is + # greater than the current bid. + # @!attribute [rw] raise_cpc_bid_when_quality_score_is_low + # @return [Google::Protobuf::BoolValue] + # Whether the strategy is allowed to raise bids on keywords with + # lower-range quality scores. + class TargetOutrankShare; end + + # An automated bidding strategy that helps you maximize revenue while + # averaging a specific target return on ad spend (ROAS). + # @!attribute [rw] target_roas + # @return [Google::Protobuf::DoubleValue] + # Required. The desired revenue (based on conversion data) per unit of spend. + # Value must be between 0.01 and 1000.0, inclusive. + # @!attribute [rw] cpc_bid_ceiling_micros + # @return [Google::Protobuf::Int64Value] + # Maximum bid limit that can be set by the bid strategy. + # The limit applies to all keywords managed by the strategy. + # @!attribute [rw] cpc_bid_floor_micros + # @return [Google::Protobuf::Int64Value] + # Minimum bid limit that can be set by the bid strategy. + # The limit applies to all keywords managed by the strategy. + class TargetRoas; end + + # An automated bid strategy that sets your bids to help get as many clicks + # as possible within your budget. + # @!attribute [rw] target_spend_micros + # @return [Google::Protobuf::Int64Value] + # The spend target under which to maximize clicks. + # A TargetSpend bidder will attempt to spend the smaller of this value + # or the natural throttling spend amount. + # If not specified, the budget is used as the spend target. + # @!attribute [rw] cpc_bid_ceiling_micros + # @return [Google::Protobuf::Int64Value] + # Maximum bid limit that can be set by the bid strategy. + # The limit applies to all keywords managed by the strategy. + class TargetSpend; end + + # A bidding strategy where bids are a fraction of the advertised price for + # some good or service. + # @!attribute [rw] cpc_bid_ceiling_micros + # @return [Google::Protobuf::Int64Value] + # Maximum bid limit that can be set by the bid strategy. This is + # an optional field entered by the advertiser and specified in local micros. + # Note: A zero value is interpreted in the same way as having bid_ceiling + # undefined. + # @!attribute [rw] enhanced_cpc_enabled + # @return [Google::Protobuf::BoolValue] + # Adjusts the bid for each auction upward or downward, depending on the + # likelihood of a conversion. Individual bids may exceed + # cpc_bid_ceiling_micros, but the average bid amount for a campaign should + # not. + class PercentCpc; end + end + end + end + end +end \ No newline at end of file diff --git a/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/common/criteria.rb b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/common/criteria.rb new file mode 100644 index 000000000..d43d070fe --- /dev/null +++ b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/common/criteria.rb @@ -0,0 +1,225 @@ +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +module Google + module Ads + module Googleads + module V0 + module Common + # A keyword criterion. + # @!attribute [rw] text + # @return [Google::Protobuf::StringValue] + # The text of the keyword (at most 80 characters and 10 words). + # @!attribute [rw] match_type + # @return [Google::Ads::Googleads::V0::Enums::KeywordMatchTypeEnum::KeywordMatchType] + # The match type of the keyword. + class KeywordInfo; end + + # A location criterion. + # @!attribute [rw] geo_target_constant + # @return [Google::Protobuf::StringValue] + # The geo target constant resource name. + class LocationInfo; end + + # A device criterion. + # @!attribute [rw] type + # @return [Google::Ads::Googleads::V0::Enums::DeviceEnum::Device] + # Type of the device. + class DeviceInfo; end + + # A listing group criterion. + # @!attribute [rw] type + # @return [Google::Ads::Googleads::V0::Enums::ListingGroupTypeEnum::ListingGroupType] + # Type of the listing group. + # @!attribute [rw] case_value + # @return [Google::Ads::Googleads::V0::Common::ListingDimensionInfo] + # Dimension value with which this listing group is refining its parent. + # Undefined for the root group. + # @!attribute [rw] parent_ad_group_criterion + # @return [Google::Protobuf::StringValue] + # Resource name of ad group criterion which is the parent listing group + # subdivision. Null for the root group. + class ListingGroupInfo; end + + # Listing dimensions for listing group criterion. + # @!attribute [rw] listing_brand + # @return [Google::Ads::Googleads::V0::Common::ListingBrandInfo] + # Brand of the listing. + # @!attribute [rw] hotel_id + # @return [Google::Ads::Googleads::V0::Common::HotelIdInfo] + # Advertiser-specific hotel ID. + # @!attribute [rw] hotel_class + # @return [Google::Ads::Googleads::V0::Common::HotelClassInfo] + # Class of the hotel as a number of stars 1 to 5. + # @!attribute [rw] hotel_country_region + # @return [Google::Ads::Googleads::V0::Common::HotelCountryRegionInfo] + # Country or Region the hotel is located in. + # @!attribute [rw] hotel_state + # @return [Google::Ads::Googleads::V0::Common::HotelStateInfo] + # State the hotel is located in. + # @!attribute [rw] hotel_city + # @return [Google::Ads::Googleads::V0::Common::HotelCityInfo] + # City the hotel is located in. + # @!attribute [rw] listing_custom_attribute + # @return [Google::Ads::Googleads::V0::Common::ListingCustomAttributeInfo] + # Listing custom attribute. + # @!attribute [rw] product_condition + # @return [Google::Ads::Googleads::V0::Common::ProductConditionInfo] + # Condition of a product offer. + # @!attribute [rw] product_type + # @return [Google::Ads::Googleads::V0::Common::ProductTypeInfo] + # Type of a product offer. + class ListingDimensionInfo; end + + # Brand of the listing. + # @!attribute [rw] value + # @return [Google::Protobuf::StringValue] + # String value of the listing brand. + class ListingBrandInfo; end + + # Advertiser-specific hotel ID. + # @!attribute [rw] value + # @return [Google::Protobuf::StringValue] + # String value of the hotel ID. + class HotelIdInfo; end + + # Class of the hotel as a number of stars 1 to 5. + # @!attribute [rw] value + # @return [Google::Protobuf::Int64Value] + # Long value of the hotel class. + class HotelClassInfo; end + + # Country or Region the hotel is located in. + # @!attribute [rw] country_region_criterion + # @return [Google::Protobuf::StringValue] + # The Geo Target Constant resource name. + class HotelCountryRegionInfo; end + + # State the hotel is located in. + # @!attribute [rw] state_criterion + # @return [Google::Protobuf::StringValue] + # The Geo Target Constant resource name. + class HotelStateInfo; end + + # City the hotel is located in. + # @!attribute [rw] city_criterion + # @return [Google::Protobuf::StringValue] + # The Geo Target Constant resource name. + class HotelCityInfo; end + + # Listing custom attribute. + # @!attribute [rw] value + # @return [Google::Protobuf::StringValue] + # String value of the listing custom attribute. + # @!attribute [rw] index + # @return [Google::Ads::Googleads::V0::Enums::ListingCustomAttributeIndexEnum::ListingCustomAttributeIndex] + # Indicates the index of the custom attribute. + class ListingCustomAttributeInfo; end + + # Condition of a product offer. + # @!attribute [rw] condition + # @return [Google::Ads::Googleads::V0::Enums::ProductConditionEnum::ProductCondition] + # Value of the condition. + class ProductConditionInfo; end + + # Type of a product offer. + # @!attribute [rw] value + # @return [Google::Protobuf::StringValue] + # Value of the type. + # @!attribute [rw] level + # @return [Google::Ads::Googleads::V0::Enums::ProductTypeLevelEnum::ProductTypeLevel] + # Level of the type. + class ProductTypeInfo; end + + # Criterion for hotel date selection (default dates vs. user selected). + # @!attribute [rw] type + # @return [Google::Ads::Googleads::V0::Enums::HotelDateSelectionTypeEnum::HotelDateSelectionType] + # Type of the hotel date selection + class HotelDateSelectionTypeInfo; end + + # Criterion for number of days prior to the stay the booking is being made. + # @!attribute [rw] min_days + # @return [Google::Protobuf::Int64Value] + # Low end of the number of days prior to the stay. + # @!attribute [rw] max_days + # @return [Google::Protobuf::Int64Value] + # High end of the number of days prior to the stay. + class HotelAdvanceBookingWindowInfo; end + + # Criterion for length of hotel stay in nights. + # @!attribute [rw] min_nights + # @return [Google::Protobuf::Int64Value] + # Low end of the number of nights in the stay. + # @!attribute [rw] max_nights + # @return [Google::Protobuf::Int64Value] + # High end of the number of nights in the stay. + class HotelLengthOfStayInfo; end + + # Criterion for day of the week the booking is for. + # @!attribute [rw] day_of_week + # @return [Google::Ads::Googleads::V0::Enums::DayOfWeekEnum::DayOfWeek] + # The day of the week. + class HotelCheckInDayInfo; end + + # Criterion for Interaction Type. + # @!attribute [rw] type + # @return [Google::Ads::Googleads::V0::Enums::InteractionTypeEnum::InteractionType] + # The interaction type. + class InteractionTypeInfo; end + + # Represents an AdSchedule criterion. + # + # AdSchedule is specified as the day of the week and a time interval + # within which ads will be shown. + # + # No more than six AdSchedules can be added for the same day. + # @!attribute [rw] start_minute + # @return [Google::Ads::Googleads::V0::Enums::MinuteOfHourEnum::MinuteOfHour] + # Minutes after the start hour at which this schedule starts. + # + # This field is required for CREATE operations and is prohibited on UPDATE + # operations. + # @!attribute [rw] end_minute + # @return [Google::Ads::Googleads::V0::Enums::MinuteOfHourEnum::MinuteOfHour] + # Minutes after the end hour at which this schedule ends. The schedule is + # exclusive of the end minute. + # + # This field is required for CREATE operations and is prohibited on UPDATE + # operations. + # @!attribute [rw] start_hour + # @return [Google::Protobuf::Int32Value] + # Starting hour in 24 hour time. + # This field must be between 0 and 23, inclusive. + # + # This field is required for CREATE operations and is prohibited on UPDATE + # operations. + # @!attribute [rw] end_hour + # @return [Google::Protobuf::Int32Value] + # Ending hour in 24 hour time; 24 signifies end of the day. + # This field must be between 0 and 24, inclusive. + # + # This field is required for CREATE operations and is prohibited on UPDATE + # operations. + # @!attribute [rw] day_of_week + # @return [Google::Ads::Googleads::V0::Enums::DayOfWeekEnum::DayOfWeek] + # Day of the week the schedule applies to. + # + # This field is required for CREATE operations and is prohibited on UPDATE + # operations. + class AdScheduleInfo; end + end + end + end + end +end \ No newline at end of file diff --git a/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/common/custom_parameter.rb b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/common/custom_parameter.rb new file mode 100644 index 000000000..098bbcf54 --- /dev/null +++ b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/common/custom_parameter.rb @@ -0,0 +1,33 @@ +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +module Google + module Ads + module Googleads + module V0 + module Common + # A mapping that can be used by custom parameter tags in a + # +tracking_url_template+, +final_urls+, or +mobile_final_urls+. + # @!attribute [rw] key + # @return [Google::Protobuf::StringValue] + # The key matching the parameter tag name. + # @!attribute [rw] value + # @return [Google::Protobuf::StringValue] + # The value to be substituted. + class CustomParameter; end + end + end + end + end +end \ No newline at end of file diff --git a/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/common/metrics.rb b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/common/metrics.rb new file mode 100644 index 000000000..e22acb91f --- /dev/null +++ b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/common/metrics.rb @@ -0,0 +1,208 @@ +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +module Google + module Ads + module Googleads + module V0 + module Common + # Metrics data. + # @!attribute [rw] all_conversions_from_interactions_rate + # @return [Google::Protobuf::DoubleValue] + # All conversions from interactions (as oppose to view through conversions) + # divided by the number of ad interactions. + # @!attribute [rw] all_conversions_value + # @return [Google::Protobuf::DoubleValue] + # The total value of all conversions. + # @!attribute [rw] all_conversions + # @return [Google::Protobuf::DoubleValue] + # The total number of conversions. This includes "Conversions" plus + # conversions that have their "Include in Conversions" setting unchecked. + # @!attribute [rw] all_conversions_value_per_cost + # @return [Google::Protobuf::DoubleValue] + # The value of all conversions divided by the total cost of ad interactions + # (such as clicks for text ads or views for video ads). + # @!attribute [rw] all_conversions_from_interactions_value_per_interaction + # @return [Google::Protobuf::DoubleValue] + # The value of all conversions from interactions divided by the total number + # of interactions. + # @!attribute [rw] average_cost + # @return [Google::Protobuf::DoubleValue] + # The average amount you pay per interaction. This amount is the total cost + # of your ads divided by the total number of interactions. + # @!attribute [rw] average_cpc + # @return [Google::Protobuf::DoubleValue] + # The total cost of all clicks divided by the total number of clicks + # received. + # @!attribute [rw] average_cpm + # @return [Google::Protobuf::DoubleValue] + # Average cost-per-thousand impressions (CPM). + # @!attribute [rw] average_position + # @return [Google::Protobuf::DoubleValue] + # Your ad's position relative to those of other advertisers. + # @!attribute [rw] bounce_rate + # @return [Google::Protobuf::DoubleValue] + # Percentage of clicks where the user only visited a single page on your + # site. Imported from Google Analytics. + # @!attribute [rw] clicks + # @return [Google::Protobuf::Int64Value] + # The number of clicks. + # @!attribute [rw] content_budget_lost_impression_share + # @return [Google::Protobuf::DoubleValue] + # The estimated percent of times that your ad was eligible to show + # on the Display Network but didn't because your budget was too low. + # Note: Content budget lost impression share is reported in the range of 0 + # to 0.9. Any value above 0.9 is reported as 0.9001. + # @!attribute [rw] content_impression_share + # @return [Google::Protobuf::DoubleValue] + # The impressions you've received on the Display Network divided + # by the estimated number of impressions you were eligible to receive. + # Note: Content impression share is reported in the range of 0.1 to 1. Any + # value below 0.1 is reported as 0.0999. + # @!attribute [rw] content_rank_lost_impression_share + # @return [Google::Protobuf::DoubleValue] + # The estimated percentage of impressions on the Display Network + # that your ads didn't receive due to poor Ad Rank. + # Note: Content rank lost impression share is reported in the range of 0 + # to 0.9. Any value above 0.9 is reported as 0.9001. + # @!attribute [rw] conversions_from_interactions_rate + # @return [Google::Protobuf::DoubleValue] + # Conversions from interactions divided by the number of ad interactions + # (such as clicks for text ads or views for video ads). + # @!attribute [rw] conversions_value + # @return [Google::Protobuf::DoubleValue] + # The total value of conversions. + # @!attribute [rw] conversions_value_per_cost + # @return [Google::Protobuf::DoubleValue] + # The value of conversions divided by the cost of ad interactions. + # @!attribute [rw] conversions_from_interactions_value_per_interaction + # @return [Google::Protobuf::DoubleValue] + # The value of conversions from interactions divided by the number of ad + # interactions. + # @!attribute [rw] conversions + # @return [Google::Protobuf::DoubleValue] + # The number of conversions. This only includes conversion actions which have + # "Include in Conversions" checked. + # @!attribute [rw] cost_micros + # @return [Google::Protobuf::Int64Value] + # The sum of your cost-per-click (CPC) and cost-per-thousand impressions + # (CPM) costs during this period. + # @!attribute [rw] cost_per_all_conversions + # @return [Google::Protobuf::DoubleValue] + # The cost of ad interactions divided by all conversions. + # @!attribute [rw] cost_per_conversion + # @return [Google::Protobuf::DoubleValue] + # The cost of ad interactions divided by conversions. + # @!attribute [rw] cross_device_conversions + # @return [Google::Protobuf::DoubleValue] + # Conversions from when a customer clicks on a Google Ads ad on one device, + # then converts on a different device or browser. + # Cross-device conversions are already included in all_conversions. + # @!attribute [rw] ctr + # @return [Google::Protobuf::DoubleValue] + # The number of clicks your ad receives (Clicks) divided by the number + # of times your ad is shown (Impressions). + # @!attribute [rw] engagement_rate + # @return [Google::Protobuf::DoubleValue] + # How often people engage with your ad after it's shown to them. This is the + # number of ad expansions divided by the number of times your ad is shown. + # @!attribute [rw] engagements + # @return [Google::Protobuf::Int64Value] + # The number of engagements. + # An engagement occurs when a viewer expands your Lightbox ad. Also, in the + # future, other ad types may support engagement metrics. + # @!attribute [rw] impressions + # @return [Google::Protobuf::Int64Value] + # Count of how often your ad has appeared on a search results page or + # website on the Google Network. + # @!attribute [rw] interaction_rate + # @return [Google::Protobuf::DoubleValue] + # How often people interact with your ad after it is shown to them. + # This is the number of interactions divided by the number of times your ad + # is shown. + # @!attribute [rw] interactions + # @return [Google::Protobuf::Int64Value] + # The number of interactions. + # An interaction is the main user action associated with an ad format-clicks + # for text and shopping ads, views for video ads, and so on. + # @!attribute [rw] invalid_click_rate + # @return [Google::Protobuf::DoubleValue] + # The percentage of clicks filtered out of your total number of clicks + # (filtered + non-filtered clicks) during the reporting period. + # @!attribute [rw] invalid_clicks + # @return [Google::Protobuf::Int64Value] + # Number of clicks Google considers illegitimate and doesn't charge you for. + # @!attribute [rw] percent_new_visitors + # @return [Google::Protobuf::DoubleValue] + # Percentage of first-time sessions (from people who had never visited your + # site before). Imported from Google Analytics. + # @!attribute [rw] phone_calls + # @return [Google::Protobuf::Int64Value] + # Number of offline phone calls. + # @!attribute [rw] phone_impressions + # @return [Google::Protobuf::Int64Value] + # Number of offline phone impressions. + # @!attribute [rw] phone_through_rate + # @return [Google::Protobuf::DoubleValue] + # Number of phone calls received (phone_calls) divided by the number of + # times your phone number is shown (phone_impressions). + # @!attribute [rw] relative_ctr + # @return [Google::Protobuf::DoubleValue] + # Your clickthrough rate (Ctr) divided by the average clickthrough rate of + # all advertisers on the websites that show your ads. Measures how your ads + # perform on Display Network sites compared to other ads on the same sites. + # @!attribute [rw] search_budget_lost_impression_share + # @return [Google::Protobuf::DoubleValue] + # The estimated percent of times that your ad was eligible to show on the + # Search Network but didn't because your budget was too low. Note: Search + # budget lost impression share is reported in the range of 0 to 0.9. Any + # value above 0.9 is reported as 0.9001. + # @!attribute [rw] search_exact_match_impression_share + # @return [Google::Protobuf::DoubleValue] + # The impressions you've received divided by the estimated number of + # impressions you were eligible to receive on the Search Network for search + # terms that matched your keywords exactly (or were close variants of your + # keyword), regardless of your keyword match types. Note: Search exact match + # impression share is reported in the range of 0.1 to 1. Any value below 0.1 + # is reported as 0.0999. + # @!attribute [rw] search_impression_share + # @return [Google::Protobuf::DoubleValue] + # The impressions you've received on the Search Network divided + # by the estimated number of impressions you were eligible to receive. + # Note: Search impression share is reported in the range of 0.1 to 1. Any + # value below 0.1 is reported as 0.0999. + # @!attribute [rw] search_rank_lost_impression_share + # @return [Google::Protobuf::DoubleValue] + # The estimated percentage of impressions on the Search Network + # that your ads didn't receive due to poor Ad Rank. + # Note: Search rank lost impression share is reported in the range of 0 to + # 0.9. Any value above 0.9 is reported as 0.9001. + # @!attribute [rw] value_per_all_conversions + # @return [Google::Protobuf::DoubleValue] + # The value of all conversions divided by the number of all conversions. + # @!attribute [rw] value_per_conversion + # @return [Google::Protobuf::DoubleValue] + # The value of conversions divided by the number of conversions. + # @!attribute [rw] view_through_conversions + # @return [Google::Protobuf::Int64Value] + # The total number of view-through conversions. + # These happen when a customer sees an image or rich media ad, then later + # completes a conversion on your site without interacting with (e.g., + # clicking on) another ad. + class Metrics; end + end + end + end + end +end \ No newline at end of file diff --git a/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/ad.rb b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/ad.rb new file mode 100644 index 000000000..841ed6abb --- /dev/null +++ b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/ad.rb @@ -0,0 +1,79 @@ +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +module Google + module Ads + module Googleads + module V0 + module Resources + # An ad. + # @!attribute [rw] id + # @return [Google::Protobuf::Int64Value] + # The ID of the ad. + # @!attribute [rw] final_urls + # @return [Array] + # The list of possible final URLs after all cross-domain redirects for the + # ad. + # @!attribute [rw] final_mobile_urls + # @return [Array] + # The list of possible final mobile URLs after all cross-domain redirects + # for the ad. + # @!attribute [rw] tracking_url_template + # @return [Google::Protobuf::StringValue] + # The URL template for constructing a tracking URL. + # @!attribute [rw] url_custom_parameters + # @return [Array] + # The list of mappings that can be used to substitute custom parameter tags + # in a + # +tracking_url_template+, +final_urls+, or +mobile_final_urls+. + # @!attribute [rw] display_url + # @return [Google::Protobuf::StringValue] + # The URL that appears in the ad description for some ad formats. + # @!attribute [rw] type + # @return [Google::Ads::Googleads::V0::Enums::AdTypeEnum::AdType] + # The type of ad. + # @!attribute [rw] text_ad + # @return [Google::Ads::Googleads::V0::Common::TextAdInfo] + # Details pertaining to a text ad. + # @!attribute [rw] expanded_text_ad + # @return [Google::Ads::Googleads::V0::Common::ExpandedTextAdInfo] + # Details pertaining to an expanded text ad. + # @!attribute [rw] dynamic_search_ad + # @return [Google::Ads::Googleads::V0::Common::DynamicSearchAdInfo] + # Details pertaining to a Dynamic Search Ad. + # @!attribute [rw] responsive_display_ad + # @return [Google::Ads::Googleads::V0::Common::ResponsiveDisplayAdInfo] + # Details pertaining to a responsive display ad. + # @!attribute [rw] call_only_ad + # @return [Google::Ads::Googleads::V0::Common::CallOnlyAdInfo] + # Details pertaining to a call-only ad. + # @!attribute [rw] expanded_dynamic_search_ad + # @return [Google::Ads::Googleads::V0::Common::ExpandedDynamicSearchAdInfo] + # Details pertaining to an Expanded Dynamic Search Ad. + # This type of ad has its headline, final URLs, and display URL + # auto-generated at serving time according to domain name specific + # information provided by +dynamic_search_ads_setting+ linked at the + # campaign level. + # @!attribute [rw] hotel_ad + # @return [Google::Ads::Googleads::V0::Common::HotelAdInfo] + # Details pertaining to a hotel ad. + # @!attribute [rw] shopping_smart_ad + # @return [Google::Ads::Googleads::V0::Common::ShoppingSmartAdInfo] + # Details pertaining to a Smart Shopping ad. + class Ad; end + end + end + end + end +end \ No newline at end of file diff --git a/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/ad_group.rb b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/ad_group.rb new file mode 100644 index 000000000..5eb915b06 --- /dev/null +++ b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/ad_group.rb @@ -0,0 +1,87 @@ +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +module Google + module Ads + module Googleads + module V0 + module Resources + # An ad group. + # @!attribute [rw] resource_name + # @return [String] + # The resource name of the ad group. + # Ad group resource names have the form: + # + # +customers/{customer_id}/adGroups/{ad_group_id}+ + # @!attribute [rw] id + # @return [Google::Protobuf::Int64Value] + # The ID of the ad group. + # @!attribute [rw] name + # @return [Google::Protobuf::StringValue] + # The name of the ad group. + # + # This field is required and should not be empty when creating new ad + # groups. + # + # It must contain fewer than 255 UTF-8 full-width characters. + # + # It must not contain any null (code point 0x0), NL line feed + # (code point 0xA) or carriage return (code point 0xD) characters. + # @!attribute [rw] status + # @return [Google::Ads::Googleads::V0::Enums::AdGroupStatusEnum::AdGroupStatus] + # The status of the ad group. + # @!attribute [rw] type + # @return [Google::Ads::Googleads::V0::Enums::AdGroupTypeEnum::AdGroupType] + # The type of the ad group. + # @!attribute [rw] tracking_url_template + # @return [Google::Protobuf::StringValue] + # The URL template for constructing a tracking URL. + # @!attribute [rw] url_custom_parameters + # @return [Array] + # The list of mappings used to substitute custom parameter tags in a + # +tracking_url_template+, +final_urls+, or +mobile_final_urls+. + # @!attribute [rw] campaign + # @return [Google::Protobuf::StringValue] + # The campaign to which the ad group belongs. + # + # This field must not be used in WHERE clauses. + # @!attribute [rw] cpc_bid_micros + # @return [Google::Protobuf::Int64Value] + # The maximum CPC (cost-per-click) bid. + # @!attribute [rw] cpm_bid_micros + # @return [Google::Protobuf::Int64Value] + # The maximum CPM (cost-per-thousand viewable impressions) bid. + # @!attribute [rw] cpa_bid_micros + # @return [Google::Protobuf::Int64Value] + # The target cost-per-acquisition (conversion) bid. + # @!attribute [rw] cpv_bid_micros + # @return [Google::Protobuf::Int64Value] + # The CPV (cost-per-view) bid. + # @!attribute [rw] target_roas_override + # @return [Google::Protobuf::DoubleValue] + # The target return on ad spend (ROAS) override. If the ad group's campaign + # bidding strategy is a standard Target ROAS strategy, then this field + # overrides the target ROAS specified in the campaign's bidding strategy. + # Otherwise, this value is ignored. + # @!attribute [rw] percent_cpc_bid_micros + # @return [Google::Protobuf::Int64Value] + # The percent cpc bid amount, expressed as a fraction of the advertised price + # for some good or service. The valid range for the fraction is [0,1) and the + # value stored here is 1,000,000 * [fraction]. + class AdGroup; end + end + end + end + end +end \ No newline at end of file diff --git a/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/ad_group_ad.rb b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/ad_group_ad.rb new file mode 100644 index 000000000..69cc8a9ea --- /dev/null +++ b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/ad_group_ad.rb @@ -0,0 +1,43 @@ +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +module Google + module Ads + module Googleads + module V0 + module Resources + # An ad group ad. + # @!attribute [rw] resource_name + # @return [String] + # The resource name of the ad. + # Ad group ad resource names have the form: + # + # +customers/{customer_id}/adGroupAds/{ad_group_id}_{ad_id}+ + # @!attribute [rw] status + # @return [Google::Ads::Googleads::V0::Enums::AdGroupAdStatusEnum::AdGroupAdStatus] + # The status of the ad. + # @!attribute [rw] ad_group + # @return [Google::Protobuf::StringValue] + # The ad group to which the ad belongs. + # + # This field must not be used in WHERE clauses. + # @!attribute [rw] ad + # @return [Google::Ads::Googleads::V0::Resources::Ad] + # The ad. + class AdGroupAd; end + end + end + end + end +end \ No newline at end of file diff --git a/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/ad_group_bid_modifier.rb b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/ad_group_bid_modifier.rb new file mode 100644 index 000000000..ad08bf47f --- /dev/null +++ b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/ad_group_bid_modifier.rb @@ -0,0 +1,70 @@ +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +module Google + module Ads + module Googleads + module V0 + module Resources + # Represents an ad group bid modifier. + # @!attribute [rw] resource_name + # @return [String] + # The resource name of the ad group bid modifier. + # Ad group bid modifier resource names have the form: + # + # +customers/{customer_id}/adGroupBidModifiers/{ad_group_id}_{criterion_id}+ + # @!attribute [rw] ad_group + # @return [Google::Protobuf::StringValue] + # The ad group to which this criterion belongs. + # + # This field must not be used in WHERE clauses. + # @!attribute [rw] criterion_id + # @return [Google::Protobuf::Int64Value] + # The ID of the criterion to bid modify. + # + # This field is ignored for mutates. + # @!attribute [rw] bid_modifier + # @return [Google::Protobuf::DoubleValue] + # The modifier for the bid when the criterion matches. + # @!attribute [rw] base_ad_group + # @return [Google::Protobuf::StringValue] + # The base ad group from which this draft/trial adgroup bid modifier was + # created. If ad_group is a base ad group then this field will be equal to + # ad_group. If the ad group was created in the draft or trial and has no + # corresponding base ad group, then this field will be null. + # This field is readonly. + # @!attribute [rw] bid_modifier_source + # @return [Google::Ads::Googleads::V0::Enums::BidModifierSourceEnum::BidModifierSource] + # Bid modifier source. + # @!attribute [rw] hotel_date_selection_type + # @return [Google::Ads::Googleads::V0::Common::HotelDateSelectionTypeInfo] + # Criterion for hotel date selection (default dates vs. user selected). + # @!attribute [rw] hotel_advance_booking_window + # @return [Google::Ads::Googleads::V0::Common::HotelAdvanceBookingWindowInfo] + # Criterion for number of days prior to the stay the booking is being made. + # @!attribute [rw] hotel_length_of_stay + # @return [Google::Ads::Googleads::V0::Common::HotelLengthOfStayInfo] + # Criterion for length of hotel stay in nights. + # @!attribute [rw] hotel_check_in_day + # @return [Google::Ads::Googleads::V0::Common::HotelCheckInDayInfo] + # Criterion for day of the week the booking is for. + # @!attribute [rw] device + # @return [Google::Ads::Googleads::V0::Common::DeviceInfo] + # A device criterion. + class AdGroupBidModifier; end + end + end + end + end +end \ No newline at end of file diff --git a/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/ad_group_criterion.rb b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/ad_group_criterion.rb new file mode 100644 index 000000000..ba254e2f2 --- /dev/null +++ b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/ad_group_criterion.rb @@ -0,0 +1,148 @@ +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +module Google + module Ads + module Googleads + module V0 + module Resources + # An ad group criterion. + # @!attribute [rw] resource_name + # @return [String] + # The resource name of the ad group criterion. + # Ad group criterion resource names have the form: + # + # +customers/{customer_id}/adGroupCriteria/{ad_group_id}_{criterion_id}+ + # @!attribute [rw] criterion_id + # @return [Google::Protobuf::Int64Value] + # The ID of the criterion. + # + # This field is ignored for mutates. + # @!attribute [rw] status + # @return [Google::Ads::Googleads::V0::Enums::AdGroupCriterionStatusEnum::AdGroupCriterionStatus] + # The status of the criterion. + # @!attribute [rw] quality_info + # @return [Google::Ads::Googleads::V0::Resources::AdGroupCriterion::QualityInfo] + # Information regarding the quality of the criterion. + # @!attribute [rw] ad_group + # @return [Google::Protobuf::StringValue] + # The ad group to which the criterion belongs. + # + # This field must not be used in WHERE clauses. + # @!attribute [rw] type + # @return [Google::Ads::Googleads::V0::Enums::CriterionTypeEnum::CriterionType] + # The type of the criterion. + # @!attribute [rw] negative + # @return [Google::Protobuf::BoolValue] + # Whether to target (+false+) or exclude (+true+) the criterion. + # + # This field is immutable. To switch a criterion from positive to negative, + # remove then re-add it. + # @!attribute [rw] cpc_bid_micros + # @return [Google::Protobuf::Int64Value] + # The CPC (cost-per-click) bid. + # @!attribute [rw] cpm_bid_micros + # @return [Google::Protobuf::Int64Value] + # The CPM (cost-per-thousand viewable impressions) bid. + # @!attribute [rw] cpv_bid_micros + # @return [Google::Protobuf::Int64Value] + # The CPV (cost-per-view) bid. + # @!attribute [rw] percent_cpc_bid_micros + # @return [Google::Protobuf::Int64Value] + # The CPC bid amount, expressed as a fraction of the advertised price + # for some good or service. The valid range for the fraction is [0,1) and the + # value stored here is 1,000,000 * [fraction]. + # @!attribute [rw] effective_cpc_bid_micros + # @return [Google::Protobuf::Int64Value] + # The effective CPC (cost-per-click) bid. + # @!attribute [rw] effective_cpm_bid_micros + # @return [Google::Protobuf::Int64Value] + # The effective CPM (cost-per-thousand viewable impressions) bid. + # @!attribute [rw] effective_cpv_bid_micros + # @return [Google::Protobuf::Int64Value] + # The effective CPV (cost-per-view) bid. + # @!attribute [rw] effective_percent_cpc_bid_micros + # @return [Google::Protobuf::Int64Value] + # The effective Percent CPC bid amount. + # @!attribute [rw] effective_cpc_bid_source + # @return [Google::Ads::Googleads::V0::Enums::BiddingSourceEnum::BiddingSource] + # Source of the effective CPC bid. + # @!attribute [rw] effective_cpm_bid_source + # @return [Google::Ads::Googleads::V0::Enums::BiddingSourceEnum::BiddingSource] + # Source of the effective CPM bid. + # @!attribute [rw] effective_cpv_bid_source + # @return [Google::Ads::Googleads::V0::Enums::BiddingSourceEnum::BiddingSource] + # Source of the effective CPV bid. + # @!attribute [rw] effective_percent_cpc_bid_source + # @return [Google::Ads::Googleads::V0::Enums::BiddingSourceEnum::BiddingSource] + # Source of the effective Percent CPC bid. + # @!attribute [rw] position_estimates + # @return [Google::Ads::Googleads::V0::Resources::AdGroupCriterion::PositionEstimates] + # Estimates for criterion bids at various positions. + # @!attribute [rw] final_urls + # @return [Array] + # The list of possible final URLs after all cross-domain redirects for the + # ad. + # @!attribute [rw] tracking_url_template + # @return [Google::Protobuf::StringValue] + # The URL template for constructing a tracking URL. + # @!attribute [rw] url_custom_parameters + # @return [Array] + # The list of mappings used to substitute custom parameter tags in a + # +tracking_url_template+, +final_urls+, or +mobile_final_urls+. + # @!attribute [rw] keyword + # @return [Google::Ads::Googleads::V0::Common::KeywordInfo] + # Keyword. + # @!attribute [rw] listing_group + # @return [Google::Ads::Googleads::V0::Common::ListingGroupInfo] + # Listing group. + class AdGroupCriterion + # A container for ad group criterion quality information. + # @!attribute [rw] quality_score + # @return [Google::Protobuf::Int32Value] + # The quality score. + # + # This field may not be populated if Google does not have enough + # information to determine a value. + # @!attribute [rw] creative_quality_score + # @return [Google::Ads::Googleads::V0::Enums::QualityScoreBucketEnum::QualityScoreBucket] + # The performance of the ad compared to other advertisers. + # @!attribute [rw] post_click_quality_score + # @return [Google::Ads::Googleads::V0::Enums::QualityScoreBucketEnum::QualityScoreBucket] + # The quality score of the landing page. + # @!attribute [rw] search_predicted_ctr + # @return [Google::Ads::Googleads::V0::Enums::QualityScoreBucketEnum::QualityScoreBucket] + # The click-through rate compared to that of other advertisers. + class QualityInfo; end + + # Estimates for criterion bids at various positions. + # @!attribute [rw] first_page_cpc_micros + # @return [Google::Protobuf::Int64Value] + # The estimate of the CPC bid required for ad to be shown on first + # page of search results. + # @!attribute [rw] first_position_cpc_micros + # @return [Google::Protobuf::Int64Value] + # The estimate of the CPC bid required for ad to be displayed in first + # position, at the top of the first page of search results. + # @!attribute [rw] top_of_page_cpc_micros + # @return [Google::Protobuf::Int64Value] + # The estimate of the CPC bid required for ad to be displayed at the top + # of the first page of search results. + class PositionEstimates; end + end + end + end + end + end +end \ No newline at end of file diff --git a/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/bidding_strategy.rb b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/bidding_strategy.rb new file mode 100644 index 000000000..e0c32c37d --- /dev/null +++ b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/bidding_strategy.rb @@ -0,0 +1,73 @@ +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +module Google + module Ads + module Googleads + module V0 + module Resources + # A bidding strategy. + # @!attribute [rw] resource_name + # @return [String] + # The resource name of the bidding strategy. + # Bidding strategy resource names have the form: + # + # +customers/{customer_id}/biddingStrategies/{bidding_strategy_id}+ + # @!attribute [rw] id + # @return [Google::Protobuf::Int64Value] + # The ID of the bidding strategy. + # @!attribute [rw] name + # @return [Google::Protobuf::StringValue] + # The name of the bidding strategy. + # All bidding strategies within an account must be named distinctly. + # + # The length of this string should be between 1 and 255, inclusive, + # in UTF-8 bytes, (trimmed). + # @!attribute [rw] type + # @return [Google::Ads::Googleads::V0::Enums::BiddingStrategyTypeEnum::BiddingStrategyType] + # The type of the bidding strategy. + # Create a bidding strategy by setting the bidding scheme. + # + # This field is read-only. + # @!attribute [rw] enhanced_cpc + # @return [Google::Ads::Googleads::V0::Common::EnhancedCpc] + # A bidding strategy that raises bids for clicks that seem more likely to + # lead to a conversion and lowers them for clicks where they seem less + # likely. + # @!attribute [rw] page_one_promoted + # @return [Google::Ads::Googleads::V0::Common::PageOnePromoted] + # A bidding strategy that sets max CPC bids to target impressions on + # page one or page one promoted slots on google.com. + # @!attribute [rw] target_cpa + # @return [Google::Ads::Googleads::V0::Common::TargetCpa] + # A bidding strategy that sets bids to help get as many conversions as + # possible at the target cost-per-acquisition (CPA) you set. + # @!attribute [rw] target_outrank_share + # @return [Google::Ads::Googleads::V0::Common::TargetOutrankShare] + # A bidding strategy that sets bids based on the target fraction of + # auctions where the advertiser should outrank a specific competitor. + # @!attribute [rw] target_roas + # @return [Google::Ads::Googleads::V0::Common::TargetRoas] + # A bidding strategy that helps you maximize revenue while averaging a + # specific target Return On Ad Spend (ROAS). + # @!attribute [rw] target_spend + # @return [Google::Ads::Googleads::V0::Common::TargetSpend] + # A bid strategy that sets your bids to help get as many clicks as + # possible within your budget. + class BiddingStrategy; end + end + end + end + end +end \ No newline at end of file diff --git a/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/campaign.rb b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/campaign.rb new file mode 100644 index 000000000..9a195441b --- /dev/null +++ b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/campaign.rb @@ -0,0 +1,223 @@ +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +module Google + module Ads + module Googleads + module V0 + module Resources + # A campaign. + # @!attribute [rw] resource_name + # @return [String] + # The resource name of the campaign. + # Campaign resource names have the form: + # + # +customers/{customer_id}/campaigns/{campaign_id}+ + # @!attribute [rw] id + # @return [Google::Protobuf::Int64Value] + # The ID of the campaign. + # @!attribute [rw] name + # @return [Google::Protobuf::StringValue] + # The name of the campaign. + # + # This field is required and should not be empty when creating new + # campaigns. + # + # It must not contain any null (code point 0x0), NL line feed + # (code point 0xA) or carriage return (code point 0xD) characters. + # @!attribute [rw] status + # @return [Google::Ads::Googleads::V0::Enums::CampaignStatusEnum::CampaignStatus] + # The status of the campaign. + # + # When a new campaign is added, the status defaults to ENABLED. + # @!attribute [rw] serving_status + # @return [Google::Ads::Googleads::V0::Enums::CampaignServingStatusEnum::CampaignServingStatus] + # The ad serving status of the campaign. + # @!attribute [rw] ad_serving_optimization_status + # @return [Google::Ads::Googleads::V0::Enums::AdServingOptimizationStatusEnum::AdServingOptimizationStatus] + # The ad serving optimization status of the campaign. + # @!attribute [rw] advertising_channel_type + # @return [Google::Ads::Googleads::V0::Enums::AdvertisingChannelTypeEnum::AdvertisingChannelType] + # The primary serving target for ads within the campaign. + # The targeting options can be refined in +network_settings+. + # + # This field is required and should not be empty when creating new + # campaigns. + # + # Can be set only when creating campaigns. + # After the campaign is created, the field can not be changed. + # @!attribute [rw] advertising_channel_sub_type + # @return [Google::Ads::Googleads::V0::Enums::AdvertisingChannelSubTypeEnum::AdvertisingChannelSubType] + # Optional refinement to +advertising_channel_type+. + # Must be a valid sub-type of the parent channel type. + # + # Can be set only when creating campaigns. + # After campaign is created, the field can not be changed. + # @!attribute [rw] tracking_url_template + # @return [Google::Protobuf::StringValue] + # The URL template for constructing a tracking URL. + # @!attribute [rw] url_custom_parameters + # @return [Array] + # The list of mappings used to substitute custom parameter tags in a + # +tracking_url_template+, +final_urls+, or +mobile_final_urls+. + # @!attribute [rw] network_settings + # @return [Google::Ads::Googleads::V0::Resources::Campaign::NetworkSettings] + # The network settings for the campaign. + # @!attribute [rw] hotel_setting + # @return [Google::Ads::Googleads::V0::Resources::Campaign::HotelSettingInfo] + # The hotel setting for the campaign. + # @!attribute [rw] dynamic_search_ads_setting + # @return [Google::Ads::Googleads::V0::Resources::Campaign::DynamicSearchAdsSetting] + # The setting for controlling Dynamic Search Ads (DSA). + # @!attribute [rw] shopping_setting + # @return [Google::Ads::Googleads::V0::Resources::Campaign::ShoppingSetting] + # The setting for controlling Shopping campaigns. + # @!attribute [rw] campaign_budget + # @return [Google::Protobuf::StringValue] + # The budget of the campaign. + # + # This field must not be used in WHERE clauses. + # @!attribute [rw] bidding_strategy_type + # @return [Google::Ads::Googleads::V0::Enums::BiddingStrategyTypeEnum::BiddingStrategyType] + # The type of bidding strategy. + # + # A bidding strategy can be created by setting either the bidding scheme to + # create a standard bidding strategy or the +bidding_strategy+ field to + # create a portfolio bidding strategy. + # + # This field is read-only. + # @!attribute [rw] start_date + # @return [Google::Protobuf::StringValue] + # The date when campaign started. + # + # This field must not be used in WHERE clauses. + # @!attribute [rw] campaign_group + # @return [Google::Protobuf::StringValue] + # The campaign group this campaign belongs to. + # @!attribute [rw] end_date + # @return [Google::Protobuf::StringValue] + # The date when campaign ended. + # + # This field must not be used in WHERE clauses. + # @!attribute [rw] bidding_strategy + # @return [Google::Protobuf::StringValue] + # Portfolio bidding strategy used by campaign. + # + # This field must not be used in WHERE clauses. + # @!attribute [rw] manual_cpc + # @return [Google::Ads::Googleads::V0::Common::ManualCpc] + # Standard Manual CPC bidding strategy. + # Manual click-based bidding where user pays per click. + # @!attribute [rw] manual_cpm + # @return [Google::Ads::Googleads::V0::Common::ManualCpm] + # Standard Manual CPM bidding strategy. + # Manual impression-based bidding where user pays per thousand + # impressions. + # @!attribute [rw] maximize_conversions + # @return [Google::Ads::Googleads::V0::Common::MaximizeConversions] + # Standard Maximize Conversions bidding strategy that automatically + # maximizes number of conversions given a daily budget. + # @!attribute [rw] maximize_conversion_value + # @return [Google::Ads::Googleads::V0::Common::MaximizeConversionValue] + # Standard Maximize Conversion Value bidding strategy that automatically + # sets bids to maximize revenue while spending your budget. + # @!attribute [rw] target_cpa + # @return [Google::Ads::Googleads::V0::Common::TargetCpa] + # Standard Target CPA bidding strategy that automatically sets bids to + # help get as many conversions as possible at the target + # cost-per-acquisition (CPA) you set. + # @!attribute [rw] target_roas + # @return [Google::Ads::Googleads::V0::Common::TargetRoas] + # Standard Target ROAS bidding strategy that automatically maximizes + # revenue while averaging a specific target return on ad spend (ROAS). + # @!attribute [rw] target_spend + # @return [Google::Ads::Googleads::V0::Common::TargetSpend] + # Standard Target Spend bidding strategy that automatically sets your bids + # to help get as many clicks as possible within your budget. + # @!attribute [rw] percent_cpc + # @return [Google::Ads::Googleads::V0::Common::PercentCpc] + # Standard Percent Cpc bidding strategy where bids are a fraction of the + # advertised price for some good or service. + class Campaign + # The network settings for the campaign. + # @!attribute [rw] target_google_search + # @return [Google::Protobuf::BoolValue] + # Whether ads will be served with google.com search results. + # @!attribute [rw] target_search_network + # @return [Google::Protobuf::BoolValue] + # Whether ads will be served on partner sites in the Google Search Network + # (requires +target_google_search+ to also be +true+). + # @!attribute [rw] target_content_network + # @return [Google::Protobuf::BoolValue] + # Whether ads will be served on specified placements in the Google Display + # Network. Placements are specified using the Placement criterion. + # @!attribute [rw] target_partner_search_network + # @return [Google::Protobuf::BoolValue] + # Whether ads will be served on the Google Partner Network. + # This is available only to some select Google partner accounts. + class NetworkSettings; end + + # Campaign-level settings for hotel ads. + # @!attribute [rw] hotel_center_id + # @return [Google::Protobuf::Int64Value] + # The linked Hotel Center account. + class HotelSettingInfo; end + + # The setting for controlling Dynamic Search Ads (DSA). + # @!attribute [rw] domain_name + # @return [Google::Protobuf::StringValue] + # The Internet domain name that this setting represents, e.g., "google.com" + # or "www.google.com". + # @!attribute [rw] language_code + # @return [Google::Protobuf::StringValue] + # The language code specifying the language of the domain, e.g., "en". + # @!attribute [rw] use_supplied_urls_only + # @return [Google::Protobuf::BoolValue] + # Whether the campaign uses advertiser supplied URLs exclusively. + # @!attribute [rw] feed_ids + # @return [Array] + # The list of page feeds associated with the campaign. + class DynamicSearchAdsSetting; end + + # The setting for Shopping campaigns. Defines the universe of products that + # can be advertised by the campaign, and how this campaign interacts with + # other Shopping campaigns. + # @!attribute [rw] merchant_id + # @return [Google::Protobuf::Int64Value] + # ID of the Merchant Center account. + # This field is required for create operations. This field is immutable for + # campaigns of type AdvertisingChannelType.SHOPPING. + # @!attribute [rw] sales_country + # @return [Google::Protobuf::StringValue] + # Sales country of products to include in the campaign. + # This field is required for create operations. This field is immutable. + # This field must be set to 'ZZ' for campaigns of types other than + # AdvertisingChannelType.SHOPPING. + # @!attribute [rw] campaign_priority + # @return [Google::Protobuf::Int32Value] + # Priority of the campaign. Campaigns with numerically higher priorities + # take precedence over those with lower priorities. + # This field is required for create operations. Allowed values are between + # 0 and 2, inclusive. This field must be set to 3 for campaigns of type + # AdvertisingChannelSubType.SHOPPING_SMART_ADS. + # @!attribute [rw] enable_local + # @return [Google::Protobuf::BoolValue] + # Enable local inventory ads. + class ShoppingSetting; end + end + end + end + end + end +end \ No newline at end of file diff --git a/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/campaign_bid_modifier.rb b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/campaign_bid_modifier.rb new file mode 100644 index 000000000..c075ba92b --- /dev/null +++ b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/campaign_bid_modifier.rb @@ -0,0 +1,46 @@ +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +module Google + module Ads + module Googleads + module V0 + module Resources + # Represents a bid-modifiable only criterion at the campaign level. + # @!attribute [rw] resource_name + # @return [String] + # The resource name of the campaign bid modifier. + # Campaign bid modifier resource names have the form: + # + # +customers/{customer_id}/campaignBidModifiers/{campaign_id}_{criterion_id}+ + # @!attribute [rw] campaign + # @return [Google::Protobuf::StringValue] + # The campaign to which this criterion belongs. + # @!attribute [rw] criterion_id + # @return [Google::Protobuf::Int64Value] + # The ID of the criterion to bid modify. + # + # This field is ignored for mutates. + # @!attribute [rw] bid_modifier + # @return [Google::Protobuf::DoubleValue] + # The modifier for the bid when the criterion matches. + # @!attribute [rw] interaction_type + # @return [Google::Ads::Googleads::V0::Common::InteractionTypeInfo] + # Criterion for interaction type. Only supported for search campaigns. + class CampaignBidModifier; end + end + end + end + end +end \ No newline at end of file diff --git a/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/campaign_budget.rb b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/campaign_budget.rb new file mode 100644 index 000000000..60ccd302d --- /dev/null +++ b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/campaign_budget.rb @@ -0,0 +1,88 @@ +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +module Google + module Ads + module Googleads + module V0 + module Resources + # A campaign budget. + # @!attribute [rw] resource_name + # @return [String] + # The resource name of the campaign budget. + # Campaign budget resource names have the form: + # + # +customers/{customer_id}/campaignBudgets/{budget_id}+ + # @!attribute [rw] id + # @return [Google::Protobuf::Int64Value] + # The ID of the campaign budget. + # + # A campaign budget is created using the CampaignBudgetService create + # operation and is assigned a budget ID. A budget ID can be shared across + # different campaigns; the system will then allocate the campaign budget + # among different campaigns to get optimum results. + # @!attribute [rw] name + # @return [Google::Protobuf::StringValue] + # The name of the campaign budget. + # + # When creating a campaign budget through CampaignBudgetService, every + # explicitly shared campaign budget must have a non-null, non-empty name. + # Campaign budgets that are not explicitly shared derive their name from the + # attached campaign's name. + # + # The length of this string must be between 1 and 255, inclusive, + # in UTF-8 bytes, (trimmed). + # @!attribute [rw] amount_micros + # @return [Google::Protobuf::Int64Value] + # The amount of the budget, in the local currency for the account. + # Amount is specified in micros, where one million is equivalent to one + # currency unit. + # @!attribute [rw] status + # @return [Google::Ads::Googleads::V0::Enums::BudgetStatusEnum::BudgetStatus] + # The status of this campaign budget. This field is read-only. + # @!attribute [rw] delivery_method + # @return [Google::Ads::Googleads::V0::Enums::BudgetDeliveryMethodEnum::BudgetDeliveryMethod] + # The delivery method that determines the rate at which the campaign budget + # is spent. + # + # Defaults to STANDARD if unspecified in a create operation. + # @!attribute [rw] explicitly_shared + # @return [Google::Protobuf::BoolValue] + # Whether the budget is explicitly shared. This field is set to false by + # default. + # + # If true, the budget was created with the purpose of sharing + # across one or more campaigns. + # + # If false, the budget was created with the intention of only being used + # with a single campaign. The budget's name and status will stay in sync + # with the campaign's name and status. Attempting to share the budget with a + # second campaign will result in an error. + # + # A non-shared budget can become an explicitly shared. The same operation + # must + # also assign the budget a name. + # + # A shared campaign budget can never become non-shared. + # @!attribute [rw] reference_count + # @return [Google::Protobuf::Int64Value] + # The number of campaigns actively using the budget. + # + # This field is read-only. + class CampaignBudget; end + end + end + end + end +end \ No newline at end of file diff --git a/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/campaign_criterion.rb b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/campaign_criterion.rb new file mode 100644 index 000000000..6cb883bf1 --- /dev/null +++ b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/campaign_criterion.rb @@ -0,0 +1,66 @@ +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +module Google + module Ads + module Googleads + module V0 + module Resources + # A campaign criterion. + # @!attribute [rw] resource_name + # @return [String] + # The resource name of the campaign criterion. + # Campaign criterion resource names have the form: + # + # +customers/{customer_id}/campaignCriteria/{campaign_id}_{criterion_id}+ + # @!attribute [rw] campaign + # @return [Google::Protobuf::StringValue] + # The campaign to which the criterion belongs. + # + # This field must not be used in WHERE clauses. + # @!attribute [rw] criterion_id + # @return [Google::Protobuf::Int64Value] + # The ID of the criterion. + # + # This field is ignored during mutate. + # @!attribute [rw] bid_modifier + # @return [Google::Protobuf::FloatValue] + # The modifier for the bids when the criterion matches. + # Allowable modifier values depend on the criterion: + # * 0.1 - 10.0: Location + # * 0.1 - 4.0: Device (mobile). Use 0 to opt out of mobile. + # @!attribute [rw] negative + # @return [Google::Protobuf::BoolValue] + # Whether to target (+false+) or exclude (+true+) the criterion. + # @!attribute [rw] type + # @return [Google::Ads::Googleads::V0::Enums::CriterionTypeEnum::CriterionType] + # The type of the criterion. + # @!attribute [rw] keyword + # @return [Google::Ads::Googleads::V0::Common::KeywordInfo] + # Keyword. + # @!attribute [rw] location + # @return [Google::Ads::Googleads::V0::Common::LocationInfo] + # Location. + # @!attribute [rw] device + # @return [Google::Ads::Googleads::V0::Common::DeviceInfo] + # Device. + # @!attribute [rw] ad_schedule + # @return [Google::Ads::Googleads::V0::Common::AdScheduleInfo] + # Ad Schedule. + class CampaignCriterion; end + end + end + end + end +end \ No newline at end of file diff --git a/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/campaign_group.rb b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/campaign_group.rb new file mode 100644 index 000000000..fb8321fb0 --- /dev/null +++ b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/campaign_group.rb @@ -0,0 +1,49 @@ +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +module Google + module Ads + module Googleads + module V0 + module Resources + # A campaign group. + # @!attribute [rw] resource_name + # @return [String] + # The resource name of the campaign group. + # Campaign group resource names have the form: + # + # +customers/{customer_id}/campaignGroups/{campaign_group_id}+ + # @!attribute [rw] id + # @return [Google::Protobuf::Int64Value] + # The ID of the campaign group. + # @!attribute [rw] name + # @return [Google::Protobuf::StringValue] + # The name of the campaign group. + # + # This field is required and should not be empty when creating new campaign + # groups. + # + # It must not contain any null (code point 0x0), NL line feed + # (code point 0xA) or carriage return (code point 0xD) characters. + # @!attribute [rw] status + # @return [Google::Ads::Googleads::V0::Enums::CampaignGroupStatusEnum::CampaignGroupStatus] + # The status of the campaign group. + # + # When a new campaign group is added, the status defaults to ENABLED. + class CampaignGroup; end + end + end + end + end +end \ No newline at end of file diff --git a/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/campaign_shared_set.rb b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/campaign_shared_set.rb new file mode 100644 index 000000000..7d985912c --- /dev/null +++ b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/campaign_shared_set.rb @@ -0,0 +1,47 @@ +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +module Google + module Ads + module Googleads + module V0 + module Resources + # CampaignSharedSets are used for managing the shared sets associated with a + # campaign. + # @!attribute [rw] resource_name + # @return [String] + # The resource name of the campaign shared set. + # Campaign shared set resource names have the form: + # + # +customers/{customer_id}/campaignSharedSets/{campaign_id}_{shared_set_id}+ + # @!attribute [rw] campaign + # @return [Google::Protobuf::StringValue] + # The campaign to which the campaign shared set belongs. + # @!attribute [rw] shared_set + # @return [Google::Protobuf::StringValue] + # The shared set associated with the campaign. This may be a negative keyword + # shared set of another customer. This customer should be a manager of the + # other customer, otherwise the campaign shared set will exist but have no + # serving effect. Only negative keyword shared sets can be associated with + # Shopping campaigns. Only negative placement shared sets can be associated + # with Display mobile app campaigns. + # @!attribute [rw] status + # @return [Google::Ads::Googleads::V0::Enums::CampaignSharedSetStatusEnum::CampaignSharedSetStatus] + # The status of this campaign shared set. Read only. + class CampaignSharedSet; end + end + end + end + end +end \ No newline at end of file diff --git a/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/customer.rb b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/customer.rb new file mode 100644 index 000000000..4c5cb4b61 --- /dev/null +++ b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/customer.rb @@ -0,0 +1,57 @@ +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +module Google + module Ads + module Googleads + module V0 + module Resources + # A customer. + # @!attribute [rw] resource_name + # @return [String] + # The resource name of the customer. + # Customer resource names have the form: + # + # +customers/{customer_id}+ + # @!attribute [rw] id + # @return [Google::Protobuf::Int64Value] + # The ID of the customer. + # @!attribute [rw] descriptive_name + # @return [Google::Protobuf::StringValue] + # Optional, non-unique descriptive name of the customer. + # @!attribute [rw] currency_code + # @return [Google::Protobuf::StringValue] + # The currency in which the account operates. + # A subset of the currency codes from the ISO 4217 standard is + # supported. + # @!attribute [rw] time_zone + # @return [Google::Protobuf::StringValue] + # The local timezone ID of the customer. + # @!attribute [rw] tracking_url_template + # @return [Google::Protobuf::StringValue] + # The URL template for constructing a tracking URL out of parameters. + # @!attribute [rw] auto_tagging_enabled + # @return [Google::Protobuf::BoolValue] + # Whether auto-tagging is enabled for the customer. + # @!attribute [rw] has_partners_badge + # @return [Google::Protobuf::BoolValue] + # Whether the Customer has a Partners program badge. If the Customer is not + # associated with the Partners program, this will be false. For more + # information, see https://support.google.com/partners/answer/3125774 + class Customer; end + end + end + end + end +end \ No newline at end of file diff --git a/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/geo_target_constant.rb b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/geo_target_constant.rb new file mode 100644 index 000000000..76a1cc315 --- /dev/null +++ b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/geo_target_constant.rb @@ -0,0 +1,44 @@ +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +module Google + module Ads + module Googleads + module V0 + module Resources + # A geo target constant. + # @!attribute [rw] resource_name + # @return [String] + # The resource name of the geo target constant. + # Geo target constant resource names have the form: + # + # +geoTargetConstants/{geo_target_constant_id}+ + # @!attribute [rw] id + # @return [Google::Protobuf::Int64Value] + # The ID of the geo target constant. + # @!attribute [rw] name + # @return [Google::Protobuf::StringValue] + # Geo target constant English name. + # @!attribute [rw] country_code + # @return [Google::Protobuf::StringValue] + # The ISO-3166-1 alpha-2 country code that is associated with the target. + # @!attribute [rw] target_type + # @return [Google::Protobuf::StringValue] + # Geo target constant target type. + class GeoTargetConstant; end + end + end + end + end +end \ No newline at end of file diff --git a/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/google_ads_field.rb b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/google_ads_field.rb new file mode 100644 index 000000000..77cfde4c9 --- /dev/null +++ b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/google_ads_field.rb @@ -0,0 +1,89 @@ +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +module Google + module Ads + module Googleads + module V0 + module Resources + # A field or resource (artifact) used by GoogleAdsService. + # @!attribute [rw] resource_name + # @return [String] + # The resource name of the artifact. + # Artifact resource names have the form: + # + # +googleAdsFields/{name}+ + # @!attribute [rw] name + # @return [Google::Protobuf::StringValue] + # The name of the artifact. + # @!attribute [rw] category + # @return [Google::Ads::Googleads::V0::Enums::GoogleAdsFieldCategoryEnum::GoogleAdsFieldCategory] + # The category of the artifact. + # @!attribute [rw] selectable + # @return [Google::Protobuf::BoolValue] + # Whether the artifact can be used in a SELECT clause in search + # queries. + # @!attribute [rw] filterable + # @return [Google::Protobuf::BoolValue] + # Whether the artifact can be used in a WHERE clause in search + # queries. + # @!attribute [rw] sortable + # @return [Google::Protobuf::BoolValue] + # Whether the artifact can be used in a ORDER BY clause in search + # queries. + # @!attribute [rw] selectable_with + # @return [Array] + # The names of all resources, segments, and metrics that are selectable with + # the described artifact. + # @!attribute [rw] attribute_resources + # @return [Array] + # The names of all resources that are selectable with the described + # artifact. Fields from these resources do not segment metrics when included + # in search queries. + # + # This field is only set for artifacts whose category is RESOURCE. + # @!attribute [rw] metrics + # @return [Array] + # The names of all metrics that are selectable with the described artifact. + # + # This field is only set for artifacts whose category is either RESOURCE or + # SEGMENT. + # @!attribute [rw] segments + # @return [Array] + # The names of all artifacts, whether a segment or another resource, that + # segment metrics when included in search queries. + # + # This field is only set for artifacts of category RESOURCE, SEGMENT or + # METRIC. + # @!attribute [rw] enum_values + # @return [Array] + # Values the artifact can assume if it is a field of type ENUM. + # + # This field is only set for artifacts of category SEGMENT or ATTRIBUTE. + # @!attribute [rw] data_type + # @return [Google::Ads::Googleads::V0::Enums::GoogleAdsFieldDataTypeEnum::GoogleAdsFieldDataType] + # This field determines the operators that can be used with the artifact + # in WHERE clauses. + # @!attribute [rw] type_url + # @return [Google::Protobuf::StringValue] + # The URL of proto describing the artifact's data type. + # @!attribute [rw] is_repeated + # @return [Google::Protobuf::BoolValue] + # Whether the field artifact is repeated. + class GoogleAdsField; end + end + end + end + end +end \ No newline at end of file diff --git a/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/keyword_view.rb b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/keyword_view.rb new file mode 100644 index 000000000..430c39b64 --- /dev/null +++ b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/keyword_view.rb @@ -0,0 +1,32 @@ +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +module Google + module Ads + module Googleads + module V0 + module Resources + # A keyword view. + # @!attribute [rw] resource_name + # @return [String] + # The resource name of the keyword view. + # Keyword view resource names have the form: + # + # +customers/{customer_id}/keywordViews/{ad_group_id}_{criterion_id}+ + class KeywordView; end + end + end + end + end +end \ No newline at end of file diff --git a/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/recommendation.rb b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/recommendation.rb new file mode 100644 index 000000000..730f8a7d1 --- /dev/null +++ b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/recommendation.rb @@ -0,0 +1,223 @@ +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +module Google + module Ads + module Googleads + module V0 + module Resources + # A recommendation. + # @!attribute [rw] resource_name + # @return [String] + # The resource name of the recommendation. + # + # +customers/{customer_id}/recommendations/{recommendation_id}+ + # @!attribute [rw] type + # @return [Google::Ads::Googleads::V0::Enums::RecommendationTypeEnum::RecommendationType] + # The type of recommendation. + # @!attribute [rw] impact + # @return [Google::Ads::Googleads::V0::Resources::Recommendation::RecommendationImpact] + # The impact on account performance as a result of applying the + # recommendation. + # @!attribute [rw] campaign_budget + # @return [Google::Protobuf::StringValue] + # The budget targeted by this recommendation. This will be set only when + # the recommendation affects a single campaign budget. + # + # This field must not be used in WHERE clauses. + # + # This field will be set for the following recommendation types: + # CAMPAIGN_BUDGET + # @!attribute [rw] campaign + # @return [Google::Protobuf::StringValue] + # The campaign targeted by this recommendation. This will be set only when + # the recommendation affects a single campaign. + # + # This field must not be used in WHERE clauses. + # + # This field will be set for the following recommendation types: + # ENHANCED_CPC_OPT_IN, KEYWORD, MAXIMIZE_CLICKS_OPT_IN, + # MAXIMIZE_CONVERSIONS_OPT_IN, OPTIMIZE_AD_ROTATION, SEARCH_PARTNERS_OPT_IN, + # TARGET_CPA_OPT_IN, TEXT_AD + # @!attribute [rw] ad_group + # @return [Google::Protobuf::StringValue] + # The ad group targeted by this recommendation. This will be set only when + # the recommendation affects a single ad group. + # + # This field must not be used in WHERE clauses. + # + # This field will be set for the following recommendation types: + # KEYWORD, OPTIMIZE_AD_ROTATION, TEXT_AD + # @!attribute [rw] dismissed + # @return [Google::Protobuf::BoolValue] + # Whether the recommendation is dismissed or not. + # @!attribute [rw] campaign_budget_recommendation + # @return [Google::Ads::Googleads::V0::Resources::Recommendation::CampaignBudgetRecommendation] + # The campaign budget recommendation. + # @!attribute [rw] keyword_recommendation + # @return [Google::Ads::Googleads::V0::Resources::Recommendation::KeywordRecommendation] + # The keyword recommendation. + # @!attribute [rw] text_ad_recommendation + # @return [Google::Ads::Googleads::V0::Resources::Recommendation::TextAdRecommendation] + # Add expanded text ad recommendation. + # @!attribute [rw] target_cpa_opt_in_recommendation + # @return [Google::Ads::Googleads::V0::Resources::Recommendation::TargetCpaOptInRecommendation] + # The TargetCPA opt-in recommendation. + # @!attribute [rw] maximize_conversions_opt_in_recommendation + # @return [Google::Ads::Googleads::V0::Resources::Recommendation::MaximizeConversionsOptInRecommendation] + # The MaximizeConversions Opt-In recommendation. + # @!attribute [rw] enhanced_cpc_opt_in_recommendation + # @return [Google::Ads::Googleads::V0::Resources::Recommendation::EnhancedCpcOptInRecommendation] + # The Enhanced Cost-Per-Click Opt-In recommendation. + # @!attribute [rw] search_partners_opt_in_recommendation + # @return [Google::Ads::Googleads::V0::Resources::Recommendation::SearchPartnersOptInRecommendation] + # The Search Partners Opt-In recommendation. + # @!attribute [rw] maximize_clicks_opt_in_recommendation + # @return [Google::Ads::Googleads::V0::Resources::Recommendation::MaximizeClicksOptInRecommendation] + # The MaximizeClicks Opt-In recommendation. + # @!attribute [rw] optimize_ad_rotation_recommendation + # @return [Google::Ads::Googleads::V0::Resources::Recommendation::OptimizeAdRotationRecommendation] + # The Optimize Ad Rotation recommendation. + class Recommendation + # The impact of making the change as described in the recommendation. + # Some types of recommendations may not have impact information. + # @!attribute [rw] base_metrics + # @return [Google::Ads::Googleads::V0::Resources::Recommendation::RecommendationMetrics] + # Base metrics at the time the recommendation was generated. + # @!attribute [rw] potential_metrics + # @return [Google::Ads::Googleads::V0::Resources::Recommendation::RecommendationMetrics] + # Estimated metrics if the recommendation is applied. + class RecommendationImpact; end + + # Weekly account performance metrics. For some recommendation types, these + # are averaged over the past 90-day period and hence can be fractional. + # @!attribute [rw] impressions + # @return [Google::Protobuf::DoubleValue] + # Number of ad impressions. + # @!attribute [rw] clicks + # @return [Google::Protobuf::DoubleValue] + # Number of ad clicks. + # @!attribute [rw] cost_micros + # @return [Google::Protobuf::Int64Value] + # Cost (in micros) for advertising, in the local currency for the account. + # @!attribute [rw] conversions + # @return [Google::Protobuf::DoubleValue] + # Number of conversions. + # @!attribute [rw] video_views + # @return [Google::Protobuf::DoubleValue] + # Number of video views for a video ad campaign. + class RecommendationMetrics; end + + # The budget recommendation for budget constrained campaigns. + # @!attribute [rw] current_budget_amount_micros + # @return [Google::Protobuf::Int64Value] + # The current budget amount in micros. + # @!attribute [rw] recommended_budget_amount_micros + # @return [Google::Protobuf::Int64Value] + # The recommended budget amount in micros. + # @!attribute [rw] budget_options + # @return [Array] + # The budget amounts and associated impact estimates for some values of + # possible budget amounts. + class CampaignBudgetRecommendation + # The impact estimates for a given budget amount. + # @!attribute [rw] budget_amount_micros + # @return [Google::Protobuf::Int64Value] + # The budget amount for this option. + # @!attribute [rw] impact + # @return [Google::Ads::Googleads::V0::Resources::Recommendation::RecommendationImpact] + # The impact estimate if budget is changed to amount specified in this + # option. + class CampaignBudgetRecommendationOption; end + end + + # The keyword recommendation. + # @!attribute [rw] keyword + # @return [Google::Ads::Googleads::V0::Common::KeywordInfo] + # The recommended keyword. + # @!attribute [rw] recommended_cpc_bid_micros + # @return [Google::Protobuf::Int64Value] + # The recommended CPC (cost-per-click) bid. + class KeywordRecommendation; end + + # The text ad recommendation. + # @!attribute [rw] ad + # @return [Google::Ads::Googleads::V0::Resources::Ad] + # Recommended ad. + # @!attribute [rw] creation_date + # @return [Google::Protobuf::StringValue] + # Creation date of the recommended ad. + # YYYY-MM-DD format, e.g., 2018-04-17. + # @!attribute [rw] auto_apply_date + # @return [Google::Protobuf::StringValue] + # Date, if present, is the earliest when the recommendation will be auto + # applied. + # YYYY-MM-DD format, e.g., 2018-04-17. + class TextAdRecommendation; end + + # The Target CPA opt-in recommendation. + # @!attribute [rw] options + # @return [Array] + # The available goals and corresponding options for Target CPA strategy. + # @!attribute [rw] recommended_target_cpa_micros + # @return [Google::Protobuf::Int64Value] + # The recommended average CPA target. See required budget amount and impact + # of using this recommendation in options list. + class TargetCpaOptInRecommendation + # The Target CPA opt-in option with impact estimate. + # @!attribute [rw] goal + # @return [Google::Ads::Googleads::V0::Enums::TargetCpaOptInRecommendationGoalEnum::TargetCpaOptInRecommendationGoal] + # The goal achieved by this option. + # @!attribute [rw] target_cpa_micros + # @return [Google::Protobuf::Int64Value] + # Average CPA target. + # @!attribute [rw] required_campaign_budget_amount_micros + # @return [Google::Protobuf::Int64Value] + # The minimum campaign budget, in local currency for the account, + # required to achieve the target CPA. + # Amount is specified in micros, where one million is equivalent to one + # currency unit. + # @!attribute [rw] impact + # @return [Google::Ads::Googleads::V0::Resources::Recommendation::RecommendationImpact] + # The impact estimate if this option is selected. + class TargetCpaOptInRecommendationOption; end + end + + # The Maximize Conversions Opt-In recommendation. + # @!attribute [rw] recommended_budget_amount_micros + # @return [Google::Protobuf::Int64Value] + # The recommended new budget amount. + class MaximizeConversionsOptInRecommendation; end + + # The Enhanced Cost-Per-Click Opt-In recommendation. + class EnhancedCpcOptInRecommendation; end + + # The Search Partners Opt-In recommendation. + class SearchPartnersOptInRecommendation; end + + # The Maximize Clicks opt-in recommendation. + # @!attribute [rw] recommended_budget_amount_micros + # @return [Google::Protobuf::Int64Value] + # The recommended new budget amount. + # Only set if the current budget is too high. + class MaximizeClicksOptInRecommendation; end + + # The Optimize Ad Rotation recommendation. + class OptimizeAdRotationRecommendation; end + end + end + end + end + end +end \ No newline at end of file diff --git a/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/shared_criterion.rb b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/shared_criterion.rb new file mode 100644 index 000000000..a7cfb4955 --- /dev/null +++ b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/shared_criterion.rb @@ -0,0 +1,46 @@ +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +module Google + module Ads + module Googleads + module V0 + module Resources + # A criterion belonging to a shared set. + # @!attribute [rw] resource_name + # @return [String] + # The resource name of the shared criterion. + # Shared set resource names have the form: + # + # +customers/{customer_id}/sharedCriteria/{shared_set_id}_{criterion_id}+ + # @!attribute [rw] shared_set + # @return [Google::Protobuf::StringValue] + # The shared set to which the shared criterion belongs. + # @!attribute [rw] criterion_id + # @return [Google::Protobuf::Int64Value] + # The ID of the criterion. + # + # This field is ignored for mutates. + # @!attribute [rw] type + # @return [Google::Ads::Googleads::V0::Enums::CriterionTypeEnum::CriterionType] + # The type of the criterion. + # @!attribute [rw] keyword + # @return [Google::Ads::Googleads::V0::Common::KeywordInfo] + # Keyword. + class SharedCriterion; end + end + end + end + end +end \ No newline at end of file diff --git a/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/shared_set.rb b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/shared_set.rb new file mode 100644 index 000000000..c4b237242 --- /dev/null +++ b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/shared_set.rb @@ -0,0 +1,56 @@ +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +module Google + module Ads + module Googleads + module V0 + module Resources + # SharedSets are used for sharing criterion exclusions across multiple + # campaigns. + # @!attribute [rw] resource_name + # @return [String] + # The resource name of the shared set. + # Shared set resource names have the form: + # + # +customers/{customer_id}/sharedSets/{shared_set_id}+ + # @!attribute [rw] id + # @return [Google::Protobuf::Int64Value] + # The ID of this shared set. Read only. + # @!attribute [rw] type + # @return [Google::Ads::Googleads::V0::Enums::SharedSetTypeEnum::SharedSetType] + # The type of this shared set: each shared set holds only a single kind + # of entity. Required. Immutable. + # @!attribute [rw] name + # @return [Google::Protobuf::StringValue] + # The name of this shared set. Required. + # Shared Sets must have names that are unique among active shared sets of + # the same type. + # The length of this string should be between 1 and 255 UTF-8 bytes, + # inclusive. + # @!attribute [rw] status + # @return [Google::Ads::Googleads::V0::Enums::SharedSetStatusEnum::SharedSetStatus] + # The status of this shared set. Read only. + # @!attribute [rw] member_count + # @return [Google::Protobuf::Int64Value] + # The number of shared criteria within this shared set. Read only. + # @!attribute [rw] reference_count + # @return [Google::Protobuf::Int64Value] + # The number of campaigns associated with this shared set. Read only. + class SharedSet; end + end + end + end + end +end \ No newline at end of file diff --git a/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/ad_group_ad_service.rb b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/ad_group_ad_service.rb new file mode 100644 index 000000000..135e9d682 --- /dev/null +++ b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/ad_group_ad_service.rb @@ -0,0 +1,68 @@ +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +module Google + module Ads + module Googleads + module V0 + module Services + # Request message for {Google::Ads::Googleads::V0::Services::AdGroupAdService::GetAdGroupAd AdGroupAdService::GetAdGroupAd}. + # @!attribute [rw] resource_name + # @return [String] + # The resource name of the ad to fetch. + class GetAdGroupAdRequest; end + + # Request message for {Google::Ads::Googleads::V0::Services::AdGroupAdService::MutateAdGroupAds AdGroupAdService::MutateAdGroupAds}. + # @!attribute [rw] customer_id + # @return [String] + # The ID of the customer whose ads are being modified. + # @!attribute [rw] operations + # @return [Array] + # The list of operations to perform on individual ads. + class MutateAdGroupAdsRequest; end + + # A single operation (create, update, remove) on an ad group ad. + # @!attribute [rw] update_mask + # @return [Google::Protobuf::FieldMask] + # FieldMask that determines which resource fields are modified in an update. + # @!attribute [rw] create + # @return [Google::Ads::Googleads::V0::Resources::AdGroupAd] + # Create operation: No resource name is expected for the new ad. + # @!attribute [rw] update + # @return [Google::Ads::Googleads::V0::Resources::AdGroupAd] + # Update operation: The ad is expected to have a valid resource name. + # @!attribute [rw] remove + # @return [String] + # Remove operation: A resource name for the removed ad is expected, + # in this format: + # + # +customers/{customer_id}/adGroupAds/{ad_group_id}_{ad_id}+ + class AdGroupAdOperation; end + + # Response message for an ad group ad mutate. + # @!attribute [rw] results + # @return [Array] + # All results for the mutate. + class MutateAdGroupAdsResponse; end + + # The result for the ad mutate. + # @!attribute [rw] resource_name + # @return [String] + # The resource name returned for successful operations. + class MutateAdGroupAdResult; end + end + end + end + end +end \ No newline at end of file diff --git a/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/ad_group_bid_modifier_service.rb b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/ad_group_bid_modifier_service.rb new file mode 100644 index 000000000..340140192 --- /dev/null +++ b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/ad_group_bid_modifier_service.rb @@ -0,0 +1,71 @@ +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +module Google + module Ads + module Googleads + module V0 + module Services + # Request message for {Google::Ads::Googleads::V0::Services::AdGroupBidModifierService::GetAdGroupBidModifier AdGroupBidModifierService::GetAdGroupBidModifier}. + # @!attribute [rw] resource_name + # @return [String] + # The resource name of the ad group bid modifier to fetch. + class GetAdGroupBidModifierRequest; end + + # Request message for {Google::Ads::Googleads::V0::Services::AdGroupBidModifierService::MutateAdGroupBidModifiers AdGroupBidModifierService::MutateAdGroupBidModifiers}. + # @!attribute [rw] customer_id + # @return [String] + # ID of the customer whose ad group bid modifiers are being modified. + # @!attribute [rw] operations + # @return [Array] + # The list of operations to perform on individual ad group bid modifiers. + class MutateAdGroupBidModifiersRequest; end + + # A single operation (create, remove, update) on an ad group bid modifier. + # @!attribute [rw] update_mask + # @return [Google::Protobuf::FieldMask] + # FieldMask that determines which resource fields are modified in an update. + # @!attribute [rw] create + # @return [Google::Ads::Googleads::V0::Resources::AdGroupBidModifier] + # Create operation: No resource name is expected for the new ad group bid + # modifier. + # @!attribute [rw] update + # @return [Google::Ads::Googleads::V0::Resources::AdGroupBidModifier] + # Update operation: The ad group bid modifier is expected to have a valid + # resource name. + # @!attribute [rw] remove + # @return [String] + # Remove operation: A resource name for the removed ad group bid modifier + # is expected, in this format: + # + # + # +customers/{customer_id}/adGroupBidModifiers/{ad_group_id}_{criterion_id}+ + class AdGroupBidModifierOperation; end + + # Response message for ad group bid modifiers mutate. + # @!attribute [rw] results + # @return [Array] + # All results for the mutate. + class MutateAdGroupBidModifiersResponse; end + + # The result for the criterion mutate. + # @!attribute [rw] resource_name + # @return [String] + # Returned for successful operations. + class MutateAdGroupBidModifierResult; end + end + end + end + end +end \ No newline at end of file diff --git a/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/ad_group_criterion_service.rb b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/ad_group_criterion_service.rb new file mode 100644 index 000000000..26941150f --- /dev/null +++ b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/ad_group_criterion_service.rb @@ -0,0 +1,69 @@ +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +module Google + module Ads + module Googleads + module V0 + module Services + # Request message for {Google::Ads::Googleads::V0::Services::AdGroupCriterionService::GetAdGroupCriterion AdGroupCriterionService::GetAdGroupCriterion}. + # @!attribute [rw] resource_name + # @return [String] + # The resource name of the criterion to fetch. + class GetAdGroupCriterionRequest; end + + # Request message for {Google::Ads::Googleads::V0::Services::AdGroupCriterionService::MutateAdGroupCriteria AdGroupCriterionService::MutateAdGroupCriteria}. + # @!attribute [rw] customer_id + # @return [String] + # ID of the customer whose criteria are being modified. + # @!attribute [rw] operations + # @return [Array] + # The list of operations to perform on individual criteria. + class MutateAdGroupCriteriaRequest; end + + # A single operation (create, remove, update) on an ad group criterion. + # @!attribute [rw] update_mask + # @return [Google::Protobuf::FieldMask] + # FieldMask that determines which resource fields are modified in an update. + # @!attribute [rw] create + # @return [Google::Ads::Googleads::V0::Resources::AdGroupCriterion] + # Create operation: No resource name is expected for the new criterion. + # @!attribute [rw] update + # @return [Google::Ads::Googleads::V0::Resources::AdGroupCriterion] + # Update operation: The criterion is expected to have a valid resource + # name. + # @!attribute [rw] remove + # @return [String] + # Remove operation: A resource name for the removed criterion is expected, + # in this format: + # + # +customers/{customer_id}/adGroupCriteria/{ad_group_id}_{criterion_id}+ + class AdGroupCriterionOperation; end + + # Response message for an ad group criterion mutate. + # @!attribute [rw] results + # @return [Array] + # All results for the mutate. + class MutateAdGroupCriteriaResponse; end + + # The result for the criterion mutate. + # @!attribute [rw] resource_name + # @return [String] + # Returned for successful operations. + class MutateAdGroupCriterionResult; end + end + end + end + end +end \ No newline at end of file diff --git a/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/ad_group_service.rb b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/ad_group_service.rb new file mode 100644 index 000000000..3443f48f3 --- /dev/null +++ b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/ad_group_service.rb @@ -0,0 +1,68 @@ +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +module Google + module Ads + module Googleads + module V0 + module Services + # Request message for {Google::Ads::Googleads::V0::Services::AdGroupService::GetAdGroup AdGroupService::GetAdGroup}. + # @!attribute [rw] resource_name + # @return [String] + # The resource name of the ad group to fetch. + class GetAdGroupRequest; end + + # Request message for {Google::Ads::Googleads::V0::Services::AdGroupService::MutateAdGroups AdGroupService::MutateAdGroups}. + # @!attribute [rw] customer_id + # @return [String] + # The ID of the customer whose ad groups are being modified. + # @!attribute [rw] operations + # @return [Array] + # The list of operations to perform on individual ad groups. + class MutateAdGroupsRequest; end + + # A single operation (create, update, remove) on an ad group. + # @!attribute [rw] update_mask + # @return [Google::Protobuf::FieldMask] + # FieldMask that determines which resource fields are modified in an update. + # @!attribute [rw] create + # @return [Google::Ads::Googleads::V0::Resources::AdGroup] + # Create operation: No resource name is expected for the new ad group. + # @!attribute [rw] update + # @return [Google::Ads::Googleads::V0::Resources::AdGroup] + # Update operation: The ad group is expected to have a valid resource name. + # @!attribute [rw] remove + # @return [String] + # Remove operation: A resource name for the removed ad group is expected, + # in this format: + # + # +customers/{customer_id}/adGroups/{ad_group_id}+ + class AdGroupOperation; end + + # Response message for an ad group mutate. + # @!attribute [rw] results + # @return [Array] + # All results for the mutate. + class MutateAdGroupsResponse; end + + # The result for the ad group mutate. + # @!attribute [rw] resource_name + # @return [String] + # Returned for successful operations. + class MutateAdGroupResult; end + end + end + end + end +end \ No newline at end of file diff --git a/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/bidding_strategy_service.rb b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/bidding_strategy_service.rb new file mode 100644 index 000000000..6240d7af5 --- /dev/null +++ b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/bidding_strategy_service.rb @@ -0,0 +1,70 @@ +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +module Google + module Ads + module Googleads + module V0 + module Services + # Request message for {Google::Ads::Googleads::V0::Services::BiddingStrategyService::GetBiddingStrategy BiddingStrategyService::GetBiddingStrategy}. + # @!attribute [rw] resource_name + # @return [String] + # The resource name of the bidding strategy to fetch. + class GetBiddingStrategyRequest; end + + # Request message for {Google::Ads::Googleads::V0::Services::BiddingStrategyService::MutateBiddingStrategies BiddingStrategyService::MutateBiddingStrategies}. + # @!attribute [rw] customer_id + # @return [String] + # The ID of the customer whose bidding strategies are being modified. + # @!attribute [rw] operations + # @return [Array] + # The list of operations to perform on individual bidding strategies. + class MutateBiddingStrategiesRequest; end + + # A single operation (create, update, remove) on a bidding strategy. + # @!attribute [rw] update_mask + # @return [Google::Protobuf::FieldMask] + # FieldMask that determines which resource fields are modified in an update. + # @!attribute [rw] create + # @return [Google::Ads::Googleads::V0::Resources::BiddingStrategy] + # Create operation: No resource name is expected for the new bidding + # strategy. + # @!attribute [rw] update + # @return [Google::Ads::Googleads::V0::Resources::BiddingStrategy] + # Update operation: The bidding strategy is expected to have a valid + # resource name. + # @!attribute [rw] remove + # @return [String] + # Remove operation: A resource name for the removed bidding strategy is + # expected, in this format: + # + # +customers/{customer_id}/biddingStrategies/{bidding_strategy_id}+ + class BiddingStrategyOperation; end + + # Response message for bidding strategy mutate. + # @!attribute [rw] results + # @return [Array] + # All results for the mutate. + class MutateBiddingStrategiesResponse; end + + # The result for the bidding strategy mutate. + # @!attribute [rw] resource_name + # @return [String] + # Returned for successful operations. + class MutateBiddingStrategyResult; end + end + end + end + end +end \ No newline at end of file diff --git a/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/campaign_bid_modifier_service.rb b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/campaign_bid_modifier_service.rb new file mode 100644 index 000000000..5af988dc0 --- /dev/null +++ b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/campaign_bid_modifier_service.rb @@ -0,0 +1,71 @@ +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +module Google + module Ads + module Googleads + module V0 + module Services + # Request message for {Google::Ads::Googleads::V0::Services::CampaignBidModifierService::GetCampaignBidModifier CampaignBidModifierService::GetCampaignBidModifier}. + # @!attribute [rw] resource_name + # @return [String] + # The resource name of the campaign bid modifier to fetch. + class GetCampaignBidModifierRequest; end + + # Request message for {CampaignBidModifierService::MutateCampaignBidModifier}. + # @!attribute [rw] customer_id + # @return [String] + # ID of the customer whose campaign bid modifiers are being modified. + # @!attribute [rw] operations + # @return [Array] + # The list of operations to perform on individual campaign bid modifiers. + class MutateCampaignBidModifiersRequest; end + + # A single operation (create, remove, update) on a campaign bid modifier. + # @!attribute [rw] update_mask + # @return [Google::Protobuf::FieldMask] + # FieldMask that determines which resource fields are modified in an update. + # @!attribute [rw] create + # @return [Google::Ads::Googleads::V0::Resources::CampaignBidModifier] + # Create operation: No resource name is expected for the new campaign bid + # modifier. + # @!attribute [rw] update + # @return [Google::Ads::Googleads::V0::Resources::CampaignBidModifier] + # Update operation: The campaign bid modifier is expected to have a valid + # resource name. + # @!attribute [rw] remove + # @return [String] + # Remove operation: A resource name for the removed campaign bid modifier + # is expected, in this format: + # + # + # +customers/{customer_id}/CampaignBidModifiers/{campaign_id}_{criterion_id}+ + class CampaignBidModifierOperation; end + + # Response message for campaign bid modifiers mutate. + # @!attribute [rw] results + # @return [Array] + # All results for the mutate. + class MutateCampaignBidModifiersResponse; end + + # The result for the criterion mutate. + # @!attribute [rw] resource_name + # @return [String] + # Returned for successful operations. + class MutateCampaignBidModifierResult; end + end + end + end + end +end \ No newline at end of file diff --git a/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/campaign_budget_service.rb b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/campaign_budget_service.rb new file mode 100644 index 000000000..bfa5c746c --- /dev/null +++ b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/campaign_budget_service.rb @@ -0,0 +1,69 @@ +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +module Google + module Ads + module Googleads + module V0 + module Services + # Request message for {Google::Ads::Googleads::V0::Services::CampaignBudgetService::GetCampaignBudget CampaignBudgetService::GetCampaignBudget}. + # @!attribute [rw] resource_name + # @return [String] + # The resource name of the campaign budget to fetch. + class GetCampaignBudgetRequest; end + + # Request message for {Google::Ads::Googleads::V0::Services::CampaignBudgetService::MutateCampaignBudgets CampaignBudgetService::MutateCampaignBudgets}. + # @!attribute [rw] customer_id + # @return [String] + # The ID of the customer whose campaign budgets are being modified. + # @!attribute [rw] operations + # @return [Array] + # The list of operations to perform on individual campaign budgets. + class MutateCampaignBudgetsRequest; end + + # A single operation (create, update, remove) on a campaign budget. + # @!attribute [rw] update_mask + # @return [Google::Protobuf::FieldMask] + # FieldMask that determines which resource fields are modified in an update. + # @!attribute [rw] create + # @return [Google::Ads::Googleads::V0::Resources::CampaignBudget] + # Create operation: No resource name is expected for the new budget. + # @!attribute [rw] update + # @return [Google::Ads::Googleads::V0::Resources::CampaignBudget] + # Update operation: The campaign budget is expected to have a valid + # resource name. + # @!attribute [rw] remove + # @return [String] + # Remove operation: A resource name for the removed budget is expected, in + # this format: + # + # +customers/{customer_id}/campaignBudgets/{budget_id}+ + class CampaignBudgetOperation; end + + # Response message for campaign budget mutate. + # @!attribute [rw] results + # @return [Array] + # All results for the mutate. + class MutateCampaignBudgetsResponse; end + + # The result for the campaign budget mutate. + # @!attribute [rw] resource_name + # @return [String] + # Returned for successful operations. + class MutateCampaignBudgetResult; end + end + end + end + end +end \ No newline at end of file diff --git a/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/campaign_criterion_service.rb b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/campaign_criterion_service.rb new file mode 100644 index 000000000..097af5044 --- /dev/null +++ b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/campaign_criterion_service.rb @@ -0,0 +1,69 @@ +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +module Google + module Ads + module Googleads + module V0 + module Services + # Request message for {Google::Ads::Googleads::V0::Services::CampaignCriterionService::GetCampaignCriterion CampaignCriterionService::GetCampaignCriterion}. + # @!attribute [rw] resource_name + # @return [String] + # The resource name of the criterion to fetch. + class GetCampaignCriterionRequest; end + + # Request message for {Google::Ads::Googleads::V0::Services::CampaignCriterionService::MutateCampaignCriteria CampaignCriterionService::MutateCampaignCriteria}. + # @!attribute [rw] customer_id + # @return [String] + # The ID of the customer whose criteria are being modified. + # @!attribute [rw] operations + # @return [Array] + # The list of operations to perform on individual criteria. + class MutateCampaignCriteriaRequest; end + + # A single operation (create, update, remove) on a campaign criterion. + # @!attribute [rw] update_mask + # @return [Google::Protobuf::FieldMask] + # FieldMask that determines which resource fields are modified in an update. + # @!attribute [rw] create + # @return [Google::Ads::Googleads::V0::Resources::CampaignCriterion] + # Create operation: No resource name is expected for the new criterion. + # @!attribute [rw] update + # @return [Google::Ads::Googleads::V0::Resources::CampaignCriterion] + # Update operation: The criterion is expected to have a valid resource + # name. + # @!attribute [rw] remove + # @return [String] + # Remove operation: A resource name for the removed criterion is expected, + # in this format: + # + # +customers/{customer_id}/campaignCriteria/{campaign_id}_{criterion_id}+ + class CampaignCriterionOperation; end + + # Response message for campaign criterion mutate. + # @!attribute [rw] results + # @return [Array] + # All results for the mutate. + class MutateCampaignCriteriaResponse; end + + # The result for the criterion mutate. + # @!attribute [rw] resource_name + # @return [String] + # Returned for successful operations. + class MutateCampaignCriterionResult; end + end + end + end + end +end \ No newline at end of file diff --git a/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/campaign_group_service.rb b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/campaign_group_service.rb new file mode 100644 index 000000000..a25c280a6 --- /dev/null +++ b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/campaign_group_service.rb @@ -0,0 +1,70 @@ +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +module Google + module Ads + module Googleads + module V0 + module Services + # Request message for {Google::Ads::Googleads::V0::Services::CampaignGroupService::GetCampaignGroup CampaignGroupService::GetCampaignGroup}. + # @!attribute [rw] resource_name + # @return [String] + # The resource name of the campaign group to fetch. + class GetCampaignGroupRequest; end + + # Request message for {Google::Ads::Googleads::V0::Services::CampaignGroupService::MutateCampaignGroups CampaignGroupService::MutateCampaignGroups}. + # @!attribute [rw] customer_id + # @return [String] + # The ID of the customer whose campaign groups are being modified. + # @!attribute [rw] operations + # @return [Array] + # The list of operations to perform on individual campaign groups. + class MutateCampaignGroupsRequest; end + + # A single operation (create, update, remove) on a campaign group. + # @!attribute [rw] update_mask + # @return [Google::Protobuf::FieldMask] + # FieldMask that determines which resource fields are modified in an update. + # @!attribute [rw] create + # @return [Google::Ads::Googleads::V0::Resources::CampaignGroup] + # Create operation: No resource name is expected for the new campaign + # group. + # @!attribute [rw] update + # @return [Google::Ads::Googleads::V0::Resources::CampaignGroup] + # Update operation: The campaign group is expected to have a valid + # resource name. + # @!attribute [rw] remove + # @return [String] + # Remove operation: A resource name for the removed campaign group is + # expected, in this format: + # + # +customers/{customer_id}/campaignGroups/{campaign_group_id}+ + class CampaignGroupOperation; end + + # Response message for campaign group mutate. + # @!attribute [rw] results + # @return [Array] + # All results for the mutate. + class MutateCampaignGroupsResponse; end + + # The result for the campaign group mutate. + # @!attribute [rw] resource_name + # @return [String] + # Returned for successful operations. + class MutateCampaignGroupResult; end + end + end + end + end +end \ No newline at end of file diff --git a/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/campaign_service.rb b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/campaign_service.rb new file mode 100644 index 000000000..186134757 --- /dev/null +++ b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/campaign_service.rb @@ -0,0 +1,69 @@ +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +module Google + module Ads + module Googleads + module V0 + module Services + # Request message for {Google::Ads::Googleads::V0::Services::CampaignService::GetCampaign CampaignService::GetCampaign}. + # @!attribute [rw] resource_name + # @return [String] + # The resource name of the campaign to fetch. + class GetCampaignRequest; end + + # Request message for {Google::Ads::Googleads::V0::Services::CampaignService::MutateCampaigns CampaignService::MutateCampaigns}. + # @!attribute [rw] customer_id + # @return [String] + # The ID of the customer whose campaigns are being modified. + # @!attribute [rw] operations + # @return [Array] + # The list of operations to perform on individual campaigns. + class MutateCampaignsRequest; end + + # A single operation (create, update, remove) on a campaign. + # @!attribute [rw] update_mask + # @return [Google::Protobuf::FieldMask] + # FieldMask that determines which resource fields are modified in an update. + # @!attribute [rw] create + # @return [Google::Ads::Googleads::V0::Resources::Campaign] + # Create operation: No resource name is expected for the new campaign. + # @!attribute [rw] update + # @return [Google::Ads::Googleads::V0::Resources::Campaign] + # Update operation: The campaign is expected to have a valid + # resource name. + # @!attribute [rw] remove + # @return [String] + # Remove operation: A resource name for the removed campaign is + # expected, in this format: + # + # +customers/{customer_id}/campaigns/{campaign_id}+ + class CampaignOperation; end + + # Response message for campaign mutate. + # @!attribute [rw] results + # @return [Array] + # All results for the mutate. + class MutateCampaignsResponse; end + + # The result for the campaign mutate. + # @!attribute [rw] resource_name + # @return [String] + # Returned for successful operations. + class MutateCampaignResult; end + end + end + end + end +end \ No newline at end of file diff --git a/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/campaign_shared_set_service.rb b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/campaign_shared_set_service.rb new file mode 100644 index 000000000..5f56a25ec --- /dev/null +++ b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/campaign_shared_set_service.rb @@ -0,0 +1,64 @@ +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +module Google + module Ads + module Googleads + module V0 + module Services + # Request message for {Google::Ads::Googleads::V0::Services::CampaignSharedSetService::GetCampaignSharedSet CampaignSharedSetService::GetCampaignSharedSet}. + # @!attribute [rw] resource_name + # @return [String] + # The resource name of the campaign shared set to fetch. + class GetCampaignSharedSetRequest; end + + # Request message for {Google::Ads::Googleads::V0::Services::CampaignSharedSetService::MutateCampaignSharedSets CampaignSharedSetService::MutateCampaignSharedSets}. + # @!attribute [rw] customer_id + # @return [String] + # The ID of the customer whose campaign shared sets are being modified. + # @!attribute [rw] operations + # @return [Array] + # The list of operations to perform on individual campaign shared sets. + class MutateCampaignSharedSetsRequest; end + + # A single operation (create, remove) on an campaign shared set. + # @!attribute [rw] create + # @return [Google::Ads::Googleads::V0::Resources::CampaignSharedSet] + # Create operation: No resource name is expected for the new campaign + # shared set. + # @!attribute [rw] remove + # @return [String] + # Remove operation: A resource name for the removed campaign shared set is + # expected, in this format: + # + # + # +customers/{customer_id}/campaignSharedSets/{campaign_id}_{shared_set_id}+ + class CampaignSharedSetOperation; end + + # Response message for a campaign shared set mutate. + # @!attribute [rw] results + # @return [Array] + # All results for the mutate. + class MutateCampaignSharedSetsResponse; end + + # The result for the campaign shared set mutate. + # @!attribute [rw] resource_name + # @return [String] + # Returned for successful operations. + class MutateCampaignSharedSetResult; end + end + end + end + end +end \ No newline at end of file diff --git a/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/customer_service.rb b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/customer_service.rb new file mode 100644 index 000000000..5c0c9506c --- /dev/null +++ b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/customer_service.rb @@ -0,0 +1,29 @@ +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +module Google + module Ads + module Googleads + module V0 + module Services + # Request message for {Google::Ads::Googleads::V0::Services::CustomerService::GetCustomer CustomerService::GetCustomer}. + # @!attribute [rw] resource_name + # @return [String] + # The resource name of the customer to fetch. + class GetCustomerRequest; end + end + end + end + end +end \ No newline at end of file diff --git a/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/geo_target_constant_service.rb b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/geo_target_constant_service.rb new file mode 100644 index 000000000..e68e3c3af --- /dev/null +++ b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/geo_target_constant_service.rb @@ -0,0 +1,29 @@ +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +module Google + module Ads + module Googleads + module V0 + module Services + # Request message for {Google::Ads::Googleads::V0::Services::GeoTargetConstantService::GetGeoTargetConstant GeoTargetConstantService::GetGeoTargetConstant}. + # @!attribute [rw] resource_name + # @return [String] + # The resource name of the geo target constant to fetch. + class GetGeoTargetConstantRequest; end + end + end + end + end +end \ No newline at end of file diff --git a/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/google_ads_field_service.rb b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/google_ads_field_service.rb new file mode 100644 index 000000000..fae33181a --- /dev/null +++ b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/google_ads_field_service.rb @@ -0,0 +1,59 @@ +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +module Google + module Ads + module Googleads + module V0 + module Services + # Request message for {Google::Ads::Googleads::V0::Services::GoogleAdsFieldService::GetGoogleAdsField GoogleAdsFieldService::GetGoogleAdsField}. + # @!attribute [rw] resource_name + # @return [String] + # The resource name of the field to get. + class GetGoogleAdsFieldRequest; end + + # Request message for {Google::Ads::Googleads::V0::Services::GoogleAdsFieldService::SearchGoogleAdsFields GoogleAdsFieldService::SearchGoogleAdsFields}. + # @!attribute [rw] query + # @return [String] + # The query string. + # @!attribute [rw] page_token + # @return [String] + # Token of the page to retrieve. If not specified, the first page of + # results will be returned. Use the value obtained from +next_page_token+ + # in the previous response in order to request the next page of results. + # @!attribute [rw] page_size + # @return [Integer] + # Number of elements to retrieve in a single page. + # When too large a page is requested, the server may decide to further + # limit the number of returned resources. + class SearchGoogleAdsFieldsRequest; end + + # Response message for {Google::Ads::Googleads::V0::Services::GoogleAdsFieldService::SearchGoogleAdsFields GoogleAdsFieldService::SearchGoogleAdsFields}. + # @!attribute [rw] results + # @return [Array] + # The list of fields that matched the query. + # @!attribute [rw] next_page_token + # @return [String] + # Pagination token used to retrieve the next page of results. Pass the + # content of this string as the +page_token+ attribute of the next request. + # +next_page_token+ is not returned for the last page. + # @!attribute [rw] total_results_count + # @return [Integer] + # Total number of results that match the query ignoring the LIMIT clause. + class SearchGoogleAdsFieldsResponse; end + end + end + end + end +end \ No newline at end of file diff --git a/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/google_ads_service.rb b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/google_ads_service.rb new file mode 100644 index 000000000..add0475c2 --- /dev/null +++ b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/google_ads_service.rb @@ -0,0 +1,156 @@ +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +module Google + module Ads + module Googleads + module V0 + module Services + # Request message for {Google::Ads::Googleads::V0::Services::GoogleAdsService::Search GoogleAdsService::Search}. + # @!attribute [rw] customer_id + # @return [String] + # The ID of the customer being queried. + # @!attribute [rw] query + # @return [String] + # The query string. + # @!attribute [rw] page_token + # @return [String] + # Token of the page to retrieve. If not specified, the first + # page of results will be returned. Use the value obtained from + # +next_page_token+ in the previous response in order to request + # the next page of results. + # @!attribute [rw] page_size + # @return [Integer] + # Number of elements to retrieve in a single page. + # When too large a page is requested, the server may decide to + # further limit the number of returned resources. + class SearchGoogleAdsRequest; end + + # Response message for {Google::Ads::Googleads::V0::Services::GoogleAdsService::Search GoogleAdsService::Search}. + # @!attribute [rw] results + # @return [Array] + # The list of rows that matched the query. + # @!attribute [rw] next_page_token + # @return [String] + # Pagination token used to retrieve the next page of results. + # Pass the content of this string as the +page_token+ attribute of + # the next request. +next_page_token+ is not returned for the last + # page. + # @!attribute [rw] total_results_count + # @return [Integer] + # Total number of results that match the query ignoring the LIMIT + # clause. + # @!attribute [rw] field_mask + # @return [Google::Protobuf::FieldMask] + # FieldMask that represents what fields were requested by the user. + class SearchGoogleAdsResponse; end + + # A returned row from the query. + # @!attribute [rw] ad_group + # @return [Google::Ads::Googleads::V0::Resources::AdGroup] + # The ad group referenced in the query. + # @!attribute [rw] ad_group_ad + # @return [Google::Ads::Googleads::V0::Resources::AdGroupAd] + # The ad referenced in the query. + # @!attribute [rw] ad_group_bid_modifier + # @return [Google::Ads::Googleads::V0::Resources::AdGroupBidModifier] + # The bid modifier referenced in the query. + # @!attribute [rw] ad_group_criterion + # @return [Google::Ads::Googleads::V0::Resources::AdGroupCriterion] + # The criterion referenced in the query. + # @!attribute [rw] bidding_strategy + # @return [Google::Ads::Googleads::V0::Resources::BiddingStrategy] + # The bidding strategy referenced in the query. + # @!attribute [rw] campaign_budget + # @return [Google::Ads::Googleads::V0::Resources::CampaignBudget] + # The campaign budget referenced in the query. + # @!attribute [rw] campaign + # @return [Google::Ads::Googleads::V0::Resources::Campaign] + # The campaign referenced in the query. + # @!attribute [rw] campaign_bid_modifier + # @return [Google::Ads::Googleads::V0::Resources::CampaignBidModifier] + # The campaign bid modifier referenced in the query. + # @!attribute [rw] campaign_criterion + # @return [Google::Ads::Googleads::V0::Resources::CampaignCriterion] + # The campaign criterion referenced in the query. + # @!attribute [rw] campaign_group + # @return [Google::Ads::Googleads::V0::Resources::CampaignGroup] + # Campaign Group referenced in AWQL query. + # @!attribute [rw] campaign_shared_set + # @return [Google::Ads::Googleads::V0::Resources::CampaignSharedSet] + # Campaign Shared Set referenced in AWQL query. + # @!attribute [rw] customer + # @return [Google::Ads::Googleads::V0::Resources::Customer] + # The customer referenced in the query. + # @!attribute [rw] geo_target_constant + # @return [Google::Ads::Googleads::V0::Resources::GeoTargetConstant] + # The geo target constant referenced in the query. + # @!attribute [rw] keyword_view + # @return [Google::Ads::Googleads::V0::Resources::KeywordView] + # The keyword view referenced in the query. + # @!attribute [rw] recommendation + # @return [Google::Ads::Googleads::V0::Resources::Recommendation] + # The recommendation referenced in the query. + # @!attribute [rw] shared_criterion + # @return [Google::Ads::Googleads::V0::Resources::SharedCriterion] + # The shared set referenced in the query. + # @!attribute [rw] shared_set + # @return [Google::Ads::Googleads::V0::Resources::SharedSet] + # The shared set referenced in the query. + # @!attribute [rw] metrics + # @return [Google::Ads::Googleads::V0::Common::Metrics] + # The metrics. + # @!attribute [rw] ad_network_type + # @return [Google::Ads::Googleads::V0::Enums::AdNetworkTypeEnum::AdNetworkType] + # Ad network type. + # @!attribute [rw] date + # @return [Google::Protobuf::StringValue] + # Date to which metrics apply. + # YYYY-MM-DD format, e.g., 2018-04-17. + # @!attribute [rw] day_of_week + # @return [Google::Ads::Googleads::V0::Enums::DayOfWeekEnum::DayOfWeek] + # Day of the week, e.g., MONDAY. + # @!attribute [rw] device + # @return [Google::Ads::Googleads::V0::Enums::DeviceEnum::Device] + # Device to which metrics apply. + # @!attribute [rw] hour + # @return [Google::Protobuf::Int32Value] + # Hour of day as a number between 0 and 23, inclusive. + # @!attribute [rw] month + # @return [Google::Protobuf::StringValue] + # Month as represented by the date of the first day of a month. + # @!attribute [rw] month_of_year + # @return [Google::Ads::Googleads::V0::Enums::MonthOfYearEnum::MonthOfYear] + # Month of the year, e.g., January. + # @!attribute [rw] quarter + # @return [Google::Protobuf::StringValue] + # Quarter as represented by the date of the first day of a quarter. + # Uses the calendar year for quarters, + # e.g., the second quarter of 2018 starts on 2018-04-01. + # @!attribute [rw] slot + # @return [Google::Ads::Googleads::V0::Enums::SlotEnum::Slot] + # Position of the ad. + # @!attribute [rw] week + # @return [Google::Protobuf::StringValue] + # Week as defined as Monday through Sunday, and represented by the date of + # Monday. + # @!attribute [rw] year + # @return [Google::Protobuf::Int32Value] + # Year, formatted as yyyy. + class GoogleAdsRow; end + end + end + end + end +end \ No newline at end of file diff --git a/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/keyword_view_service.rb b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/keyword_view_service.rb new file mode 100644 index 000000000..124265038 --- /dev/null +++ b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/keyword_view_service.rb @@ -0,0 +1,29 @@ +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +module Google + module Ads + module Googleads + module V0 + module Services + # Request message for {Google::Ads::Googleads::V0::Services::KeywordViewService::GetKeywordView KeywordViewService::GetKeywordView}. + # @!attribute [rw] resource_name + # @return [String] + # The resource name of the keyword view to fetch. + class GetKeywordViewRequest; end + end + end + end + end +end \ No newline at end of file diff --git a/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/recommendation_service.rb b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/recommendation_service.rb new file mode 100644 index 000000000..6fb704355 --- /dev/null +++ b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/recommendation_service.rb @@ -0,0 +1,112 @@ +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +module Google + module Ads + module Googleads + module V0 + module Services + # Request message for {Google::Ads::Googleads::V0::Services::RecommendationService::GetRecommendation RecommendationService::GetRecommendation}. + # @!attribute [rw] resource_name + # @return [String] + # The resource name of the recommendation to fetch. + class GetRecommendationRequest; end + + # Request message for {Google::Ads::Googleads::V0::Services::RecommendationService::ApplyRecommendation RecommendationService::ApplyRecommendation}. + # @!attribute [rw] customer_id + # @return [String] + # The ID of the customer with the recommendation. + # @!attribute [rw] operations + # @return [Array] + # The list of operations to apply recommendations. + class ApplyRecommendationRequest; end + + # Information about the operation to apply a recommendation and any parameters + # to + # customize it. + # @!attribute [rw] resource_name + # @return [String] + # The resource name of the recommendation to apply. + # @!attribute [rw] campaign_budget + # @return [Google::Ads::Googleads::V0::Services::ApplyRecommendationOperation::CampaignBudgetParameters] + # Optional parameters to use when applying a campaign budget + # recommendation. + # @!attribute [rw] text_ad + # @return [Google::Ads::Googleads::V0::Services::ApplyRecommendationOperation::TextAdParameters] + # Optional parameters to use when applying a text ad recommendation. + # @!attribute [rw] keyword + # @return [Google::Ads::Googleads::V0::Services::ApplyRecommendationOperation::KeywordParameters] + # Optional parameters to use when applying keyword recommendation. + # @!attribute [rw] target_cpa_opt_in + # @return [Google::Ads::Googleads::V0::Services::ApplyRecommendationOperation::TargetCpaOptInParameters] + # Optional parameters to use when applying target CPA opt-in + # recommendation. + class ApplyRecommendationOperation + # Parameters to use when applying a campaign budget recommendation. + # @!attribute [rw] new_budget_amount_micros + # @return [Google::Protobuf::Int64Value] + # New budget amount to set for target budget resource. This is a required + # field. + class CampaignBudgetParameters; end + + # Parameters to use when applying a text ad recommendation. + # @!attribute [rw] ad + # @return [Google::Ads::Googleads::V0::Resources::Ad] + # New ad to add to recommended ad group. All necessary fields need to be + # set in this message. This is a required field. + class TextAdParameters; end + + # Parameters to use when applying keyword recommendation. + # @!attribute [rw] ad_group + # @return [Google::Protobuf::StringValue] + # The ad group resource to add keyword to. This is a required field. + # @!attribute [rw] match_type + # @return [Google::Ads::Googleads::V0::Enums::KeywordMatchTypeEnum::KeywordMatchType] + # The match type of the keyword. This is a required field. + # @!attribute [rw] cpc_bid_micros + # @return [Google::Protobuf::Int64Value] + # Optional, CPC bid to set for the keyword. If not set, keyword will use + # bid based on bidding strategy used by target ad group. + class KeywordParameters; end + + # Parameters to use when applying Target CPA recommendation. + # @!attribute [rw] target_cpa_micros + # @return [Google::Protobuf::Int64Value] + # Average CPA to use for Target CPA bidding strategy. This is a required + # field. + # @!attribute [rw] new_campaign_budget_amount_micros + # @return [Google::Protobuf::Int64Value] + # Optional, budget amount to set for the campaign. + class TargetCpaOptInParameters; end + end + + # Response message for {Google::Ads::Googleads::V0::Services::RecommendationService::ApplyRecommendation RecommendationService::ApplyRecommendation}. + # @!attribute [rw] results + # @return [Array] + # Results of operations to apply recommendations. + class ApplyRecommendationResponse; end + + # The result of applying a recommendation. + # @!attribute [rw] resource_name + # @return [String] + # Returned for successful applies. + # @!attribute [rw] status + # @return [Google::Rpc::Status] + # Returned for failed operations. + class ApplyRecommendationResult; end + end + end + end + end +end \ No newline at end of file diff --git a/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/shared_criterion_service.rb b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/shared_criterion_service.rb new file mode 100644 index 000000000..59c6b803b --- /dev/null +++ b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/shared_criterion_service.rb @@ -0,0 +1,64 @@ +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +module Google + module Ads + module Googleads + module V0 + module Services + # Request message for {Google::Ads::Googleads::V0::Services::SharedCriterionService::GetSharedCriterion SharedCriterionService::GetSharedCriterion}. + # @!attribute [rw] resource_name + # @return [String] + # The resource name of the shared criterion to fetch. + class GetSharedCriterionRequest; end + + # Request message for {Google::Ads::Googleads::V0::Services::SharedCriterionService::MutateSharedCriteria SharedCriterionService::MutateSharedCriteria}. + # @!attribute [rw] customer_id + # @return [String] + # The ID of the customer whose shared criteria are being modified. + # @!attribute [rw] operations + # @return [Array] + # The list of operations to perform on individual shared criteria. + class MutateSharedCriteriaRequest; end + + # A single operation (create, remove) on an shared criterion. + # @!attribute [rw] create + # @return [Google::Ads::Googleads::V0::Resources::SharedCriterion] + # Create operation: No resource name is expected for the new shared + # criterion. + # @!attribute [rw] remove + # @return [String] + # Remove operation: A resource name for the removed shared criterion is + # expected, + # in this format: + # + # +customers/{customer_id}/sharedCriteria/{shared_set_id}_{criterion_id}+ + class SharedCriterionOperation; end + + # Response message for a shared criterion mutate. + # @!attribute [rw] results + # @return [Array] + # All results for the mutate. + class MutateSharedCriteriaResponse; end + + # The result for the shared criterion mutate. + # @!attribute [rw] resource_name + # @return [String] + # Returned for successful operations. + class MutateSharedCriterionResult; end + end + end + end + end +end \ No newline at end of file diff --git a/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/shared_set_service.rb b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/shared_set_service.rb new file mode 100644 index 000000000..11ee3019f --- /dev/null +++ b/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/shared_set_service.rb @@ -0,0 +1,69 @@ +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +module Google + module Ads + module Googleads + module V0 + module Services + # Request message for {Google::Ads::Googleads::V0::Services::SharedSetService::GetSharedSet SharedSetService::GetSharedSet}. + # @!attribute [rw] resource_name + # @return [String] + # The resource name of the shared set to fetch. + class GetSharedSetRequest; end + + # Request message for {Google::Ads::Googleads::V0::Services::SharedSetService::MutateSharedSets SharedSetService::MutateSharedSets}. + # @!attribute [rw] customer_id + # @return [String] + # The ID of the customer whose shared sets are being modified. + # @!attribute [rw] operations + # @return [Array] + # The list of operations to perform on individual shared sets. + class MutateSharedSetsRequest; end + + # A single operation (create, update, remove) on an shared set. + # @!attribute [rw] update_mask + # @return [Google::Protobuf::FieldMask] + # FieldMask that determines which resource fields are modified in an update. + # @!attribute [rw] create + # @return [Google::Ads::Googleads::V0::Resources::SharedSet] + # Create operation: No resource name is expected for the new shared set. + # @!attribute [rw] update + # @return [Google::Ads::Googleads::V0::Resources::SharedSet] + # Update operation: The shared set is expected to have a valid resource + # name. + # @!attribute [rw] remove + # @return [String] + # Remove operation: A resource name for the removed shared set is expected, + # in this format: + # + # +customers/{customer_id}/sharedSets/{shared_set_id}+ + class SharedSetOperation; end + + # Response message for a shared set mutate. + # @!attribute [rw] results + # @return [Array] + # All results for the mutate. + class MutateSharedSetsResponse; end + + # The result for the shared set mutate. + # @!attribute [rw] resource_name + # @return [String] + # Returned for successful operations. + class MutateSharedSetResult; end + end + end + end + end +end \ No newline at end of file diff --git a/lib/google/ads/googleads/v0/services/doc/google/protobuf/any.rb b/lib/google/ads/googleads/v0/services/doc/google/protobuf/any.rb new file mode 100644 index 000000000..4e8451612 --- /dev/null +++ b/lib/google/ads/googleads/v0/services/doc/google/protobuf/any.rb @@ -0,0 +1,124 @@ +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +module Google + module Protobuf + # +Any+ contains an arbitrary serialized protocol buffer message along with a + # URL that describes the type of the serialized message. + # + # Protobuf library provides support to pack/unpack Any values in the form + # of utility functions or additional generated methods of the Any type. + # + # Example 1: Pack and unpack a message in C++. + # + # Foo foo = ...; + # Any any; + # any.PackFrom(foo); + # ... + # if (any.UnpackTo(&foo)) { + # ... + # } + # + # Example 2: Pack and unpack a message in Java. + # + # Foo foo = ...; + # Any any = Any.pack(foo); + # ... + # if (any.is(Foo.class)) { + # foo = any.unpack(Foo.class); + # } + # + # Example 3: Pack and unpack a message in Python. + # + # foo = Foo(...) + # any = Any() + # any.Pack(foo) + # ... + # if any.Is(Foo.DESCRIPTOR): + # any.Unpack(foo) + # ... + # + # Example 4: Pack and unpack a message in Go + # + # foo := &pb.Foo{...} + # any, err := ptypes.MarshalAny(foo) + # ... + # foo := &pb.Foo{} + # if err := ptypes.UnmarshalAny(any, foo); err != nil { + # ... + # } + # + # The pack methods provided by protobuf library will by default use + # 'type.googleapis.com/full.type.name' as the type URL and the unpack + # methods only use the fully qualified type name after the last '/' + # in the type URL, for example "foo.bar.com/x/y.z" will yield type + # name "y.z". + # + # + # = JSON + # + # The JSON representation of an +Any+ value uses the regular + # representation of the deserialized, embedded message, with an + # additional field +@type+ which contains the type URL. Example: + # + # package google.profile; + # message Person { + # string first_name = 1; + # string last_name = 2; + # } + # + # { + # "@type": "type.googleapis.com/google.profile.Person", + # "firstName": , + # "lastName": + # } + # + # If the embedded message type is well-known and has a custom JSON + # representation, that representation will be embedded adding a field + # +value+ which holds the custom JSON in addition to the +@type+ + # field. Example (for message {Google::Protobuf::Duration}): + # + # { + # "@type": "type.googleapis.com/google.protobuf.Duration", + # "value": "1.212s" + # } + # @!attribute [rw] type_url + # @return [String] + # A URL/resource name whose content describes the type of the + # serialized protocol buffer message. + # + # For URLs which use the scheme +http+, +https+, or no scheme, the + # following restrictions and interpretations apply: + # + # * If no scheme is provided, +https+ is assumed. + # * The last segment of the URL's path must represent the fully + # qualified name of the type (as in +path/google.protobuf.Duration+). + # The name should be in a canonical form (e.g., leading "." is + # not accepted). + # * An HTTP GET on the URL must yield a {Google::Protobuf::Type} + # value in binary format, or produce an error. + # * Applications are allowed to cache lookup results based on the + # URL, or have them precompiled into a binary to avoid any + # lookup. Therefore, binary compatibility needs to be preserved + # on changes to types. (Use versioned type names to manage + # breaking changes.) + # + # Schemes other than +http+, +https+ (or the empty scheme) might be + # used with implementation specific semantics. + # @!attribute [rw] value + # @return [String] + # Must be a valid serialized protocol buffer of the above specified type. + class Any; end + end +end \ No newline at end of file diff --git a/lib/google/ads/googleads/v0/services/doc/google/protobuf/field_mask.rb b/lib/google/ads/googleads/v0/services/doc/google/protobuf/field_mask.rb new file mode 100644 index 000000000..1f9fcca63 --- /dev/null +++ b/lib/google/ads/googleads/v0/services/doc/google/protobuf/field_mask.rb @@ -0,0 +1,223 @@ +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +module Google + module Protobuf + # +FieldMask+ represents a set of symbolic field paths, for example: + # + # paths: "f.a" + # paths: "f.b.d" + # + # Here +f+ represents a field in some root message, +a+ and +b+ + # fields in the message found in +f+, and +d+ a field found in the + # message in +f.b+. + # + # Field masks are used to specify a subset of fields that should be + # returned by a get operation or modified by an update operation. + # Field masks also have a custom JSON encoding (see below). + # + # = Field Masks in Projections + # + # When used in the context of a projection, a response message or + # sub-message is filtered by the API to only contain those fields as + # specified in the mask. For example, if the mask in the previous + # example is applied to a response message as follows: + # + # f { + # a : 22 + # b { + # d : 1 + # x : 2 + # } + # y : 13 + # } + # z: 8 + # + # The result will not contain specific values for fields x,y and z + # (their value will be set to the default, and omitted in proto text + # output): + # + # + # f { + # a : 22 + # b { + # d : 1 + # } + # } + # + # A repeated field is not allowed except at the last position of a + # paths string. + # + # If a FieldMask object is not present in a get operation, the + # operation applies to all fields (as if a FieldMask of all fields + # had been specified). + # + # Note that a field mask does not necessarily apply to the + # top-level response message. In case of a REST get operation, the + # field mask applies directly to the response, but in case of a REST + # list operation, the mask instead applies to each individual message + # in the returned resource list. In case of a REST custom method, + # other definitions may be used. Where the mask applies will be + # clearly documented together with its declaration in the API. In + # any case, the effect on the returned resource/resources is required + # behavior for APIs. + # + # = Field Masks in Update Operations + # + # A field mask in update operations specifies which fields of the + # targeted resource are going to be updated. The API is required + # to only change the values of the fields as specified in the mask + # and leave the others untouched. If a resource is passed in to + # describe the updated values, the API ignores the values of all + # fields not covered by the mask. + # + # If a repeated field is specified for an update operation, the existing + # repeated values in the target resource will be overwritten by the new values. + # Note that a repeated field is only allowed in the last position of a +paths+ + # string. + # + # If a sub-message is specified in the last position of the field mask for an + # update operation, then the existing sub-message in the target resource is + # overwritten. Given the target message: + # + # f { + # b { + # d : 1 + # x : 2 + # } + # c : 1 + # } + # + # And an update message: + # + # f { + # b { + # d : 10 + # } + # } + # + # then if the field mask is: + # + # paths: "f.b" + # + # then the result will be: + # + # f { + # b { + # d : 10 + # } + # c : 1 + # } + # + # However, if the update mask was: + # + # paths: "f.b.d" + # + # then the result would be: + # + # f { + # b { + # d : 10 + # x : 2 + # } + # c : 1 + # } + # + # In order to reset a field's value to the default, the field must + # be in the mask and set to the default value in the provided resource. + # Hence, in order to reset all fields of a resource, provide a default + # instance of the resource and set all fields in the mask, or do + # not provide a mask as described below. + # + # If a field mask is not present on update, the operation applies to + # all fields (as if a field mask of all fields has been specified). + # Note that in the presence of schema evolution, this may mean that + # fields the client does not know and has therefore not filled into + # the request will be reset to their default. If this is unwanted + # behavior, a specific service may require a client to always specify + # a field mask, producing an error if not. + # + # As with get operations, the location of the resource which + # describes the updated values in the request message depends on the + # operation kind. In any case, the effect of the field mask is + # required to be honored by the API. + # + # == Considerations for HTTP REST + # + # The HTTP kind of an update operation which uses a field mask must + # be set to PATCH instead of PUT in order to satisfy HTTP semantics + # (PUT must only be used for full updates). + # + # = JSON Encoding of Field Masks + # + # In JSON, a field mask is encoded as a single string where paths are + # separated by a comma. Fields name in each path are converted + # to/from lower-camel naming conventions. + # + # As an example, consider the following message declarations: + # + # message Profile { + # User user = 1; + # Photo photo = 2; + # } + # message User { + # string display_name = 1; + # string address = 2; + # } + # + # In proto a field mask for +Profile+ may look as such: + # + # mask { + # paths: "user.display_name" + # paths: "photo" + # } + # + # In JSON, the same mask is represented as below: + # + # { + # mask: "user.displayName,photo" + # } + # + # = Field Masks and Oneof Fields + # + # Field masks treat fields in oneofs just as regular fields. Consider the + # following message: + # + # message SampleMessage { + # oneof test_oneof { + # string name = 4; + # SubMessage sub_message = 9; + # } + # } + # + # The field mask can be: + # + # mask { + # paths: "name" + # } + # + # Or: + # + # mask { + # paths: "sub_message" + # } + # + # Note that oneof type names ("test_oneof" in this case) cannot be used in + # paths. + # @!attribute [rw] paths + # @return [Array] + # The set of field mask paths. + class FieldMask; end + end +end \ No newline at end of file diff --git a/lib/google/ads/googleads/v0/services/doc/google/protobuf/wrappers.rb b/lib/google/ads/googleads/v0/services/doc/google/protobuf/wrappers.rb new file mode 100644 index 000000000..55c686c61 --- /dev/null +++ b/lib/google/ads/googleads/v0/services/doc/google/protobuf/wrappers.rb @@ -0,0 +1,89 @@ +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +module Google + module Protobuf + # Wrapper message for +double+. + # + # The JSON representation for +DoubleValue+ is JSON number. + # @!attribute [rw] value + # @return [Float] + # The double value. + class DoubleValue; end + + # Wrapper message for +float+. + # + # The JSON representation for +FloatValue+ is JSON number. + # @!attribute [rw] value + # @return [Float] + # The float value. + class FloatValue; end + + # Wrapper message for +int64+. + # + # The JSON representation for +Int64Value+ is JSON string. + # @!attribute [rw] value + # @return [Integer] + # The int64 value. + class Int64Value; end + + # Wrapper message for +uint64+. + # + # The JSON representation for +UInt64Value+ is JSON string. + # @!attribute [rw] value + # @return [Integer] + # The uint64 value. + class UInt64Value; end + + # Wrapper message for +int32+. + # + # The JSON representation for +Int32Value+ is JSON number. + # @!attribute [rw] value + # @return [Integer] + # The int32 value. + class Int32Value; end + + # Wrapper message for +uint32+. + # + # The JSON representation for +UInt32Value+ is JSON number. + # @!attribute [rw] value + # @return [Integer] + # The uint32 value. + class UInt32Value; end + + # Wrapper message for +bool+. + # + # The JSON representation for +BoolValue+ is JSON +true+ and +false+. + # @!attribute [rw] value + # @return [true, false] + # The bool value. + class BoolValue; end + + # Wrapper message for +string+. + # + # The JSON representation for +StringValue+ is JSON string. + # @!attribute [rw] value + # @return [String] + # The string value. + class StringValue; end + + # Wrapper message for +bytes+. + # + # The JSON representation for +BytesValue+ is JSON string. + # @!attribute [rw] value + # @return [String] + # The bytes value. + class BytesValue; end + end +end \ No newline at end of file diff --git a/lib/google/ads/googleads/v0/services/doc/google/rpc/status.rb b/lib/google/ads/googleads/v0/services/doc/google/rpc/status.rb new file mode 100644 index 000000000..7fcba2932 --- /dev/null +++ b/lib/google/ads/googleads/v0/services/doc/google/rpc/status.rb @@ -0,0 +1,83 @@ +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +module Google + module Rpc + # The +Status+ type defines a logical error model that is suitable for different + # programming environments, including REST APIs and RPC APIs. It is used by + # [gRPC](https://github.com/grpc). The error model is designed to be: + # + # * Simple to use and understand for most users + # * Flexible enough to meet unexpected needs + # + # = Overview + # + # The +Status+ message contains three pieces of data: error code, error message, + # and error details. The error code should be an enum value of + # {Google::Rpc::Code}, but it may accept additional error codes if needed. The + # error message should be a developer-facing English message that helps + # developers *understand* and *resolve* the error. If a localized user-facing + # error message is needed, put the localized message in the error details or + # localize it in the client. The optional error details may contain arbitrary + # information about the error. There is a predefined set of error detail types + # in the package +google.rpc+ that can be used for common error conditions. + # + # = Language mapping + # + # The +Status+ message is the logical representation of the error model, but it + # is not necessarily the actual wire format. When the +Status+ message is + # exposed in different client libraries and different wire protocols, it can be + # mapped differently. For example, it will likely be mapped to some exceptions + # in Java, but more likely mapped to some error codes in C. + # + # = Other uses + # + # The error model and the +Status+ message can be used in a variety of + # environments, either with or without APIs, to provide a + # consistent developer experience across different environments. + # + # Example uses of this error model include: + # + # * Partial errors. If a service needs to return partial errors to the client, + # it may embed the +Status+ in the normal response to indicate the partial + # errors. + # + # * Workflow errors. A typical workflow has multiple steps. Each step may + # have a +Status+ message for error reporting. + # + # * Batch operations. If a client uses batch request and batch response, the + # +Status+ message should be used directly inside batch response, one for + # each error sub-response. + # + # * Asynchronous operations. If an API call embeds asynchronous operation + # results in its response, the status of those operations should be + # represented directly using the +Status+ message. + # + # * Logging. If some API errors are stored in logs, the message +Status+ could + # be used directly after any stripping needed for security/privacy reasons. + # @!attribute [rw] code + # @return [Integer] + # The status code, which should be an enum value of {Google::Rpc::Code}. + # @!attribute [rw] message + # @return [String] + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # {Google::Rpc::Status#details} field, or localized by the client. + # @!attribute [rw] details + # @return [Array] + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + class Status; end + end +end \ No newline at end of file diff --git a/lib/google/ads/googleads/v0/services/doc/overview.rb b/lib/google/ads/googleads/v0/services/doc/overview.rb new file mode 100644 index 000000000..9bb90190b --- /dev/null +++ b/lib/google/ads/googleads/v0/services/doc/overview.rb @@ -0,0 +1,82 @@ +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +module Google + module Ads + # rubocop:disable LineLength + + ## + # # Ruby Client for Google Ads API ([Alpha](https://github.com/GoogleCloudPlatform/google-cloud-ruby#versioning)) + # + # [Google Ads API][Product Documentation]: + # Manage your AdWords accounts, campaigns, and reports with this REST-based + # API. + # - [Product Documentation][] + # + # ## Quick Start + # In order to use this library, you first need to go through the following + # steps: + # + # 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) + # 2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) + # 3. [Enable the Google Ads API.](https://console.cloud.google.com/apis/library/googleads.googleapis.com) + # 4. [Setup Authentication.](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud/master/guides/authentication) + # + # ### Installation + # ``` + # $ gem install google-ads-googleads + # ``` + # + # ### Next Steps + # - Read the [Google Ads API Product documentation][Product Documentation] + # to learn more about the product and see How-to Guides. + # - View this [repository's main README](https://github.com/GoogleCloudPlatform/google-cloud-ruby/blob/master/README.md) + # to see the full list of Cloud APIs that we cover. + # + # [Product Documentation]: https://cloud.google.com/googleads + # + # ## Enabling Logging + # + # To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library. + # The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html) as shown below, + # or a [`Google::Cloud::Logging::Logger`](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-logging/latest/google/cloud/logging/logger) + # that will write logs to [Stackdriver Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb) + # and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information. + # + # Configuring a Ruby stdlib logger: + # + # ```ruby + # require "logger" + # + # module MyLogger + # LOGGER = Logger.new $stderr, level: Logger::WARN + # def logger + # LOGGER + # end + # end + # + # # Define a gRPC module-level logger method before grpc/logconfig.rb loads. + # module GRPC + # extend MyLogger + # end + # ``` + # + module Googleads + module V0 + module Services + end + end + end + end +end \ No newline at end of file diff --git a/lib/google/ads/googleads/v0/services/geo_target_constant_service_client.rb b/lib/google/ads/googleads/v0/services/geo_target_constant_service_client.rb index a767c4ff5..8bbd5c765 100644 --- a/lib/google/ads/googleads/v0/services/geo_target_constant_service_client.rb +++ b/lib/google/ads/googleads/v0/services/geo_target_constant_service_client.rb @@ -195,9 +195,9 @@ def initialize \ # @return [Google::Ads::Googleads::V0::Resources::GeoTargetConstant] # @raise [Google::Gax::GaxError] if the RPC is aborted. # @example - # require "google/ads/googleads/v0/services" + # require "google/ads/googleads" # - # geo_target_constant_service_client = Google::Ads::Googleads::V0::Services::GeoTargetConstant.new + # geo_target_constant_service_client = Google::Ads::Googleads::GeoTargetConstant.new(version: :v0) # formatted_resource_name = Google::Ads::Googleads::V0::Services::GeoTargetConstantServiceClient.geo_target_constant_path("[GEO_TARGET_CONSTANT]") # response = geo_target_constant_service_client.get_geo_target_constant(formatted_resource_name) diff --git a/lib/google/ads/googleads/v0/services/geo_target_constant_service_services_pb.rb b/lib/google/ads/googleads/v0/services/geo_target_constant_service_services_pb.rb index 65877fc6c..827a90076 100644 --- a/lib/google/ads/googleads/v0/services/geo_target_constant_service_services_pb.rb +++ b/lib/google/ads/googleads/v0/services/geo_target_constant_service_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/ads/googleads/v0/services/geo_target_constant_service.proto for package 'google.ads.googleads.v0.services' # Original file comments: -# Copyright 2018 Google Inc. +# Copyright 2018 Google LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,6 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# require 'grpc' require 'google/ads/googleads/v0/services/geo_target_constant_service_pb' @@ -25,8 +26,6 @@ module Googleads module V0 module Services module GeoTargetConstantService - # Proto file describing the Geo target constant service. - # # Service to fetch geo target constants. class Service diff --git a/lib/google/ads/googleads/v0/services/google_ads_field_service_client.rb b/lib/google/ads/googleads/v0/services/google_ads_field_service_client.rb index bb7d0c613..7a9b944d3 100644 --- a/lib/google/ads/googleads/v0/services/google_ads_field_service_client.rb +++ b/lib/google/ads/googleads/v0/services/google_ads_field_service_client.rb @@ -210,9 +210,9 @@ def initialize \ # @return [Google::Ads::Googleads::V0::Resources::GoogleAdsField] # @raise [Google::Gax::GaxError] if the RPC is aborted. # @example - # require "google/ads/googleads/v0/services" + # require "google/ads/googleads" # - # google_ads_field_service_client = Google::Ads::Googleads::V0::Services::GoogleAdsField.new + # google_ads_field_service_client = Google::Ads::Googleads::GoogleAdsField.new(version: :v0) # formatted_resource_name = Google::Ads::Googleads::V0::Services::GoogleAdsFieldServiceClient.google_ads_field_path("[GOOGLE_ADS_FIELD]") # response = google_ads_field_service_client.get_google_ads_field(formatted_resource_name) @@ -250,9 +250,9 @@ def get_google_ads_field \ # object. # @raise [Google::Gax::GaxError] if the RPC is aborted. # @example - # require "google/ads/googleads/v0/services" + # require "google/ads/googleads" # - # google_ads_field_service_client = Google::Ads::Googleads::V0::Services::GoogleAdsField.new + # google_ads_field_service_client = Google::Ads::Googleads::GoogleAdsField.new(version: :v0) # # # TODO: Initialize +query+: # query = '' diff --git a/lib/google/ads/googleads/v0/services/google_ads_field_service_services_pb.rb b/lib/google/ads/googleads/v0/services/google_ads_field_service_services_pb.rb index 0ba19ff72..5f2c3d99b 100644 --- a/lib/google/ads/googleads/v0/services/google_ads_field_service_services_pb.rb +++ b/lib/google/ads/googleads/v0/services/google_ads_field_service_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/ads/googleads/v0/services/google_ads_field_service.proto for package 'google.ads.googleads.v0.services' # Original file comments: -# Copyright 2018 Google Inc. +# Copyright 2018 Google LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,6 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# require 'grpc' require 'google/ads/googleads/v0/services/google_ads_field_service_pb' @@ -25,8 +26,6 @@ module Googleads module V0 module Services module GoogleAdsFieldService - # Proto file describing the GoogleAdsFieldService - # # Service to fetch Google Ads API fields. class Service diff --git a/lib/google/ads/googleads/v0/services/google_ads_service_client.rb b/lib/google/ads/googleads/v0/services/google_ads_service_client.rb index 538f5d91c..0ce047686 100644 --- a/lib/google/ads/googleads/v0/services/google_ads_service_client.rb +++ b/lib/google/ads/googleads/v0/services/google_ads_service_client.rb @@ -202,9 +202,9 @@ def initialize \ # object. # @raise [Google::Gax::GaxError] if the RPC is aborted. # @example - # require "google/ads/googleads/v0/services" + # require "google/ads/googleads" # - # google_ads_service_client = Google::Ads::Googleads::V0::Services::GoogleAds.new + # google_ads_service_client = Google::Ads::Googleads::GoogleAds.new(version: :v0) # # # TODO: Initialize +customer_id+: # customer_id = '' diff --git a/lib/google/ads/googleads/v0/services/google_ads_service_pb.rb b/lib/google/ads/googleads/v0/services/google_ads_service_pb.rb index 976a9480c..fe4c6cb7b 100644 --- a/lib/google/ads/googleads/v0/services/google_ads_service_pb.rb +++ b/lib/google/ads/googleads/v0/services/google_ads_service_pb.rb @@ -7,6 +7,7 @@ require 'google/ads/googleads/v0/enums/ad_network_type_pb' require 'google/ads/googleads/v0/enums/day_of_week_pb' require 'google/ads/googleads/v0/enums/device_pb' +require 'google/ads/googleads/v0/enums/month_of_year_pb' require 'google/ads/googleads/v0/enums/slot_pb' require 'google/ads/googleads/v0/resources/ad_group_pb' require 'google/ads/googleads/v0/resources/ad_group_ad_pb' @@ -14,12 +15,17 @@ require 'google/ads/googleads/v0/resources/ad_group_criterion_pb' require 'google/ads/googleads/v0/resources/bidding_strategy_pb' require 'google/ads/googleads/v0/resources/campaign_pb' +require 'google/ads/googleads/v0/resources/campaign_bid_modifier_pb' require 'google/ads/googleads/v0/resources/campaign_budget_pb' require 'google/ads/googleads/v0/resources/campaign_criterion_pb' +require 'google/ads/googleads/v0/resources/campaign_group_pb' +require 'google/ads/googleads/v0/resources/campaign_shared_set_pb' require 'google/ads/googleads/v0/resources/customer_pb' require 'google/ads/googleads/v0/resources/geo_target_constant_pb' require 'google/ads/googleads/v0/resources/keyword_view_pb' require 'google/ads/googleads/v0/resources/recommendation_pb' +require 'google/ads/googleads/v0/resources/shared_criterion_pb' +require 'google/ads/googleads/v0/resources/shared_set_pb' require 'google/api/annotations_pb' require 'google/protobuf/field_mask_pb' require 'google/protobuf/wrappers_pb' @@ -44,11 +50,16 @@ optional :bidding_strategy, :message, 18, "google.ads.googleads.v0.resources.BiddingStrategy" optional :campaign_budget, :message, 19, "google.ads.googleads.v0.resources.CampaignBudget" optional :campaign, :message, 2, "google.ads.googleads.v0.resources.Campaign" + optional :campaign_bid_modifier, :message, 26, "google.ads.googleads.v0.resources.CampaignBidModifier" optional :campaign_criterion, :message, 20, "google.ads.googleads.v0.resources.CampaignCriterion" + optional :campaign_group, :message, 25, "google.ads.googleads.v0.resources.CampaignGroup" + optional :campaign_shared_set, :message, 30, "google.ads.googleads.v0.resources.CampaignSharedSet" optional :customer, :message, 1, "google.ads.googleads.v0.resources.Customer" optional :geo_target_constant, :message, 23, "google.ads.googleads.v0.resources.GeoTargetConstant" optional :keyword_view, :message, 21, "google.ads.googleads.v0.resources.KeywordView" optional :recommendation, :message, 22, "google.ads.googleads.v0.resources.Recommendation" + optional :shared_criterion, :message, 29, "google.ads.googleads.v0.resources.SharedCriterion" + optional :shared_set, :message, 27, "google.ads.googleads.v0.resources.SharedSet" optional :metrics, :message, 4, "google.ads.googleads.v0.common.Metrics" optional :ad_network_type, :enum, 5, "google.ads.googleads.v0.enums.AdNetworkTypeEnum.AdNetworkType" optional :date, :message, 6, "google.protobuf.StringValue" @@ -56,6 +67,7 @@ optional :device, :enum, 8, "google.ads.googleads.v0.enums.DeviceEnum.Device" optional :hour, :message, 9, "google.protobuf.Int32Value" optional :month, :message, 10, "google.protobuf.StringValue" + optional :month_of_year, :enum, 28, "google.ads.googleads.v0.enums.MonthOfYearEnum.MonthOfYear" optional :quarter, :message, 12, "google.protobuf.StringValue" optional :slot, :enum, 13, "google.ads.googleads.v0.enums.SlotEnum.Slot" optional :week, :message, 14, "google.protobuf.StringValue" diff --git a/lib/google/ads/googleads/v0/services/google_ads_service_services_pb.rb b/lib/google/ads/googleads/v0/services/google_ads_service_services_pb.rb index 2284c480b..3c6437008 100644 --- a/lib/google/ads/googleads/v0/services/google_ads_service_services_pb.rb +++ b/lib/google/ads/googleads/v0/services/google_ads_service_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/ads/googleads/v0/services/google_ads_service.proto for package 'google.ads.googleads.v0.services' # Original file comments: -# Copyright 2018 Google Inc. +# Copyright 2018 Google LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,6 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# require 'grpc' require 'google/ads/googleads/v0/services/google_ads_service_pb' @@ -25,8 +26,6 @@ module Googleads module V0 module Services module GoogleAdsService - # Proto file describing the GoogleAdsService. - # # Service to fetch data and metrics across resources. class Service diff --git a/lib/google/ads/googleads/v0/services/keyword_view_service_client.rb b/lib/google/ads/googleads/v0/services/keyword_view_service_client.rb index fbc990910..3baca69e3 100644 --- a/lib/google/ads/googleads/v0/services/keyword_view_service_client.rb +++ b/lib/google/ads/googleads/v0/services/keyword_view_service_client.rb @@ -197,9 +197,9 @@ def initialize \ # @return [Google::Ads::Googleads::V0::Resources::KeywordView] # @raise [Google::Gax::GaxError] if the RPC is aborted. # @example - # require "google/ads/googleads/v0/services" + # require "google/ads/googleads" # - # keyword_view_service_client = Google::Ads::Googleads::V0::Services::KeywordView.new + # keyword_view_service_client = Google::Ads::Googleads::KeywordView.new(version: :v0) # formatted_resource_name = Google::Ads::Googleads::V0::Services::KeywordViewServiceClient.keyword_view_path("[CUSTOMER]", "[KEYWORD_VIEW]") # response = keyword_view_service_client.get_keyword_view(formatted_resource_name) diff --git a/lib/google/ads/googleads/v0/services/keyword_view_service_services_pb.rb b/lib/google/ads/googleads/v0/services/keyword_view_service_services_pb.rb index 48617d438..3d5a82175 100644 --- a/lib/google/ads/googleads/v0/services/keyword_view_service_services_pb.rb +++ b/lib/google/ads/googleads/v0/services/keyword_view_service_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/ads/googleads/v0/services/keyword_view_service.proto for package 'google.ads.googleads.v0.services' # Original file comments: -# Copyright 2018 Google Inc. +# Copyright 2018 Google LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,6 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# require 'grpc' require 'google/ads/googleads/v0/services/keyword_view_service_pb' @@ -25,8 +26,6 @@ module Googleads module V0 module Services module KeywordViewService - # Proto file describing the Keyword View service. - # # Service to manage keyword views. class Service diff --git a/lib/google/ads/googleads/v0/services/recommendation_service_client.rb b/lib/google/ads/googleads/v0/services/recommendation_service_client.rb index 6c8aa7c91..4dbd0a03b 100644 --- a/lib/google/ads/googleads/v0/services/recommendation_service_client.rb +++ b/lib/google/ads/googleads/v0/services/recommendation_service_client.rb @@ -202,9 +202,9 @@ def initialize \ # @return [Google::Ads::Googleads::V0::Resources::Recommendation] # @raise [Google::Gax::GaxError] if the RPC is aborted. # @example - # require "google/ads/googleads/v0/services" + # require "google/ads/googleads" # - # recommendation_service_client = Google::Ads::Googleads::V0::Services::Recommendation.new + # recommendation_service_client = Google::Ads::Googleads::Recommendation.new(version: :v0) # formatted_resource_name = Google::Ads::Googleads::V0::Services::RecommendationServiceClient.recommendation_path("[CUSTOMER]", "[RECOMMENDATION]") # response = recommendation_service_client.get_recommendation(formatted_resource_name) @@ -236,9 +236,9 @@ def get_recommendation \ # @return [Google::Ads::Googleads::V0::Services::ApplyRecommendationResponse] # @raise [Google::Gax::GaxError] if the RPC is aborted. # @example - # require "google/ads/googleads/v0/services" + # require "google/ads/googleads" # - # recommendation_service_client = Google::Ads::Googleads::V0::Services::Recommendation.new + # recommendation_service_client = Google::Ads::Googleads::Recommendation.new(version: :v0) # # # TODO: Initialize +customer_id+: # customer_id = '' diff --git a/lib/google/ads/googleads/v0/services/recommendation_service_pb.rb b/lib/google/ads/googleads/v0/services/recommendation_service_pb.rb index 394b18b9f..1ad22e9c0 100644 --- a/lib/google/ads/googleads/v0/services/recommendation_service_pb.rb +++ b/lib/google/ads/googleads/v0/services/recommendation_service_pb.rb @@ -3,8 +3,8 @@ require 'google/protobuf' -require 'google/ads/googleads/v0/common/ad_pb' require 'google/ads/googleads/v0/enums/keyword_match_type_pb' +require 'google/ads/googleads/v0/resources/ad_pb' require 'google/ads/googleads/v0/resources/recommendation_pb' require 'google/api/annotations_pb' require 'google/protobuf/wrappers_pb' @@ -30,7 +30,7 @@ optional :new_budget_amount_micros, :message, 1, "google.protobuf.Int64Value" end add_message "google.ads.googleads.v0.services.ApplyRecommendationOperation.TextAdParameters" do - optional :ad, :message, 1, "google.ads.googleads.v0.common.Ad" + optional :ad, :message, 1, "google.ads.googleads.v0.resources.Ad" end add_message "google.ads.googleads.v0.services.ApplyRecommendationOperation.KeywordParameters" do optional :ad_group, :message, 1, "google.protobuf.StringValue" diff --git a/lib/google/ads/googleads/v0/services/recommendation_service_services_pb.rb b/lib/google/ads/googleads/v0/services/recommendation_service_services_pb.rb index 2698286ca..90071a57f 100644 --- a/lib/google/ads/googleads/v0/services/recommendation_service_services_pb.rb +++ b/lib/google/ads/googleads/v0/services/recommendation_service_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/ads/googleads/v0/services/recommendation_service.proto for package 'google.ads.googleads.v0.services' # Original file comments: -# Copyright 2018 Google Inc. +# Copyright 2018 Google LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,6 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# require 'grpc' require 'google/ads/googleads/v0/services/recommendation_service_pb' @@ -25,8 +26,6 @@ module Googleads module V0 module Services module RecommendationService - # Proto file describing the Recommendation service. - # # Service to manage recommendations. class Service diff --git a/lib/google/ads/googleads/v0/services/shared_criterion_service_client.rb b/lib/google/ads/googleads/v0/services/shared_criterion_service_client.rb new file mode 100644 index 000000000..9266f4e17 --- /dev/null +++ b/lib/google/ads/googleads/v0/services/shared_criterion_service_client.rb @@ -0,0 +1,267 @@ +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# EDITING INSTRUCTIONS +# This file was generated from the file +# https://github.com/googleapis/googleapis/blob/master/google/ads/googleads/v0/services/shared_criterion_service.proto, +# and updates to that file get reflected here through a refresh process. +# For the short term, the refresh process will only be runnable by Google +# engineers. + +require "json" +require "pathname" + +require "google/gax" + +require "google/ads/googleads/v0/services/shared_criterion_service_pb" +require "google/ads/googleads/v0/services/credentials" + +module Google + module Ads + module Googleads + module V0 + module Services + # Service to manage shared criteria. + # + # @!attribute [r] shared_criterion_service_stub + # @return [Google::Ads::Googleads::V0::Services::SharedCriterionService::Stub] + class SharedCriterionServiceClient + attr_reader :shared_criterion_service_stub + + # The default address of the service. + SERVICE_ADDRESS = "googleads.googleapis.com".freeze + + # The default port of the service. + DEFAULT_SERVICE_PORT = 443 + + # The default set of gRPC interceptors. + GRPC_INTERCEPTORS = [] + + DEFAULT_TIMEOUT = 30 + + # The scopes needed to make gRPC calls to all of the methods defined in + # this service. + ALL_SCOPES = [ + ].freeze + + + SHARED_CRITERIA_PATH_TEMPLATE = Google::Gax::PathTemplate.new( + "customers/{customer}/sharedCriteria/{shared_criteria}" + ) + + private_constant :SHARED_CRITERIA_PATH_TEMPLATE + + # Returns a fully-qualified shared_criteria resource name string. + # @param customer [String] + # @param shared_criteria [String] + # @return [String] + def self.shared_criteria_path customer, shared_criteria + SHARED_CRITERIA_PATH_TEMPLATE.render( + :"customer" => customer, + :"shared_criteria" => shared_criteria + ) + end + + # @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc] + # Provides the means for authenticating requests made by the client. This parameter can + # be many types. + # A `Google::Auth::Credentials` uses a the properties of its represented keyfile for + # authenticating requests made by this client. + # A `String` will be treated as the path to the keyfile to be used for the construction of + # credentials for this client. + # A `Hash` will be treated as the contents of a keyfile to be used for the construction of + # credentials for this client. + # A `GRPC::Core::Channel` will be used to make calls through. + # A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials + # should already be composed with a `GRPC::Core::CallCredentials` object. + # A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the + # metadata for requests, generally, to give OAuth credentials. + # @param scopes [Array] + # The OAuth scopes for this service. This parameter is ignored if + # an updater_proc is supplied. + # @param client_config [Hash] + # A Hash for call options for each method. See + # Google::Gax#construct_settings for the structure of + # this data. Falls back to the default config if not specified + # or the specified config is missing data points. + # @param timeout [Numeric] + # The default timeout, in seconds, for calls made through this client. + # @param metadata [Hash] + # Default metadata to be sent with each request. This can be overridden on a per call basis. + # @param exception_transformer [Proc] + # An optional proc that intercepts any exceptions raised during an API call to inject + # custom error handling. + def initialize \ + credentials: nil, + scopes: ALL_SCOPES, + client_config: {}, + timeout: DEFAULT_TIMEOUT, + metadata: nil, + exception_transformer: nil, + lib_name: nil, + lib_version: "" + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "google/gax/grpc" + require "google/ads/googleads/v0/services/shared_criterion_service_services_pb" + + credentials ||= Google::Ads::Googleads::V0::Services::Credentials.default + + if credentials.is_a?(String) || credentials.is_a?(Hash) + updater_proc = Google::Ads::Googleads::V0::Services::Credentials.new(credentials).updater_proc + end + if credentials.is_a?(GRPC::Core::Channel) + channel = credentials + end + if credentials.is_a?(GRPC::Core::ChannelCredentials) + chan_creds = credentials + end + if credentials.is_a?(Proc) + updater_proc = credentials + end + if credentials.is_a?(Google::Auth::Credentials) + updater_proc = credentials.updater_proc + end + + package_version = Gem.loaded_specs['google-ads-googleads'].version.version + + google_api_client = "gl-ruby/#{RUBY_VERSION}" + google_api_client << " #{lib_name}/#{lib_version}" if lib_name + google_api_client << " gapic/#{package_version} gax/#{Google::Gax::VERSION}" + google_api_client << " grpc/#{GRPC::VERSION}" + google_api_client.freeze + + headers = { :"x-goog-api-client" => google_api_client } + headers.merge!(metadata) unless metadata.nil? + client_config_file = Pathname.new(__dir__).join( + "shared_criterion_service_client_config.json" + ) + defaults = client_config_file.open do |f| + Google::Gax.construct_settings( + "google.ads.googleads.v0.services.SharedCriterionService", + JSON.parse(f.read), + client_config, + Google::Gax::Grpc::STATUS_CODE_NAMES, + timeout, + errors: Google::Gax::Grpc::API_ERRORS, + metadata: headers + ) + end + + # Allow overriding the service path/port in subclasses. + service_path = self.class::SERVICE_ADDRESS + port = self.class::DEFAULT_SERVICE_PORT + interceptors = self.class::GRPC_INTERCEPTORS + @shared_criterion_service_stub = Google::Gax::Grpc.create_stub( + service_path, + port, + chan_creds: chan_creds, + channel: channel, + updater_proc: updater_proc, + scopes: scopes, + interceptors: interceptors, + &Google::Ads::Googleads::V0::Services::SharedCriterionService::Stub.method(:new) + ) + + @get_shared_criterion = Google::Gax.create_api_call( + @shared_criterion_service_stub.method(:get_shared_criterion), + defaults["get_shared_criterion"], + exception_transformer: exception_transformer + ) + @mutate_shared_criteria = Google::Gax.create_api_call( + @shared_criterion_service_stub.method(:mutate_shared_criteria), + defaults["mutate_shared_criteria"], + exception_transformer: exception_transformer + ) + end + + # Service calls + + # Returns the requested shared criterion in full detail. + # + # @param resource_name [String] + # The resource name of the shared criterion to fetch. + # @param options [Google::Gax::CallOptions] + # Overrides the default settings for this call, e.g, timeout, + # retries, etc. + # @yield [result, operation] Access the result along with the RPC operation + # @yieldparam result [Google::Ads::Googleads::V0::Resources::SharedCriterion] + # @yieldparam operation [GRPC::ActiveCall::Operation] + # @return [Google::Ads::Googleads::V0::Resources::SharedCriterion] + # @raise [Google::Gax::GaxError] if the RPC is aborted. + # @example + # require "google/ads/googleads" + # + # shared_criterion_service_client = Google::Ads::Googleads::SharedCriterion.new(version: :v0) + # formatted_resource_name = Google::Ads::Googleads::V0::Services::SharedCriterionServiceClient.shared_criteria_path("[CUSTOMER]", "[SHARED_CRITERIA]") + # response = shared_criterion_service_client.get_shared_criterion(formatted_resource_name) + + def get_shared_criterion \ + resource_name, + options: nil, + &block + req = { + resource_name: resource_name + }.delete_if { |_, v| v.nil? } + req = Google::Gax::to_proto(req, Google::Ads::Googleads::V0::Services::GetSharedCriterionRequest) + @get_shared_criterion.call(req, options, &block) + end + + # Creates or removes shared criteria. Operation statuses are returned. + # + # @param customer_id [String] + # The ID of the customer whose shared criteria are being modified. + # @param operations [Array] + # The list of operations to perform on individual shared criteria. + # A hash of the same form as `Google::Ads::Googleads::V0::Services::SharedCriterionOperation` + # can also be provided. + # @param options [Google::Gax::CallOptions] + # Overrides the default settings for this call, e.g, timeout, + # retries, etc. + # @yield [result, operation] Access the result along with the RPC operation + # @yieldparam result [Google::Ads::Googleads::V0::Services::MutateSharedCriteriaResponse] + # @yieldparam operation [GRPC::ActiveCall::Operation] + # @return [Google::Ads::Googleads::V0::Services::MutateSharedCriteriaResponse] + # @raise [Google::Gax::GaxError] if the RPC is aborted. + # @example + # require "google/ads/googleads" + # + # shared_criterion_service_client = Google::Ads::Googleads::SharedCriterion.new(version: :v0) + # + # # TODO: Initialize +customer_id+: + # customer_id = '' + # + # # TODO: Initialize +operations+: + # operations = [] + # response = shared_criterion_service_client.mutate_shared_criteria(customer_id, operations) + + def mutate_shared_criteria \ + customer_id, + operations, + options: nil, + &block + req = { + customer_id: customer_id, + operations: operations + }.delete_if { |_, v| v.nil? } + req = Google::Gax::to_proto(req, Google::Ads::Googleads::V0::Services::MutateSharedCriteriaRequest) + @mutate_shared_criteria.call(req, options, &block) + end + end + end + end + end + end +end diff --git a/lib/google/ads/googleads/v0/services/shared_criterion_service_client_config.json b/lib/google/ads/googleads/v0/services/shared_criterion_service_client_config.json new file mode 100644 index 000000000..6184f25fc --- /dev/null +++ b/lib/google/ads/googleads/v0/services/shared_criterion_service_client_config.json @@ -0,0 +1,36 @@ +{ + "interfaces": { + "google.ads.googleads.v0.services.SharedCriterionService": { + "retry_codes": { + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "non_idempotent": [] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 20000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 20000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "GetSharedCriterion": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "MutateSharedCriteria": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/lib/google/ads/googleads/v0/services/shared_criterion_service_pb.rb b/lib/google/ads/googleads/v0/services/shared_criterion_service_pb.rb new file mode 100644 index 000000000..b0b3588f9 --- /dev/null +++ b/lib/google/ads/googleads/v0/services/shared_criterion_service_pb.rb @@ -0,0 +1,44 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v0/services/shared_criterion_service.proto + +require 'google/protobuf' + +require 'google/ads/googleads/v0/resources/shared_criterion_pb' +require 'google/api/annotations_pb' +Google::Protobuf::DescriptorPool.generated_pool.build do + add_message "google.ads.googleads.v0.services.GetSharedCriterionRequest" do + optional :resource_name, :string, 1 + end + add_message "google.ads.googleads.v0.services.MutateSharedCriteriaRequest" do + optional :customer_id, :string, 1 + repeated :operations, :message, 2, "google.ads.googleads.v0.services.SharedCriterionOperation" + end + add_message "google.ads.googleads.v0.services.SharedCriterionOperation" do + oneof :operation do + optional :create, :message, 1, "google.ads.googleads.v0.resources.SharedCriterion" + optional :remove, :string, 3 + end + end + add_message "google.ads.googleads.v0.services.MutateSharedCriteriaResponse" do + repeated :results, :message, 2, "google.ads.googleads.v0.services.MutateSharedCriterionResult" + end + add_message "google.ads.googleads.v0.services.MutateSharedCriterionResult" do + optional :resource_name, :string, 1 + end +end + +module Google + module Ads + module Googleads + module V0 + module Services + GetSharedCriterionRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.services.GetSharedCriterionRequest").msgclass + MutateSharedCriteriaRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.services.MutateSharedCriteriaRequest").msgclass + SharedCriterionOperation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.services.SharedCriterionOperation").msgclass + MutateSharedCriteriaResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.services.MutateSharedCriteriaResponse").msgclass + MutateSharedCriterionResult = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.services.MutateSharedCriterionResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/googleads/v0/services/shared_criterion_service_services_pb.rb b/lib/google/ads/googleads/v0/services/shared_criterion_service_services_pb.rb new file mode 100644 index 000000000..bda4ad044 --- /dev/null +++ b/lib/google/ads/googleads/v0/services/shared_criterion_service_services_pb.rb @@ -0,0 +1,50 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v0/services/shared_criterion_service.proto for package 'google.ads.googleads.v0.services' +# Original file comments: +# Copyright 2018 Google LLC. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# + +require 'grpc' +require 'google/ads/googleads/v0/services/shared_criterion_service_pb' + +module Google + module Ads + module Googleads + module V0 + module Services + module SharedCriterionService + # Service to manage shared criteria. + class Service + + include GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v0.services.SharedCriterionService' + + # Returns the requested shared criterion in full detail. + rpc :GetSharedCriterion, GetSharedCriterionRequest, Google::Ads::Googleads::V0::Resources::SharedCriterion + # Creates or removes shared criteria. Operation statuses are returned. + rpc :MutateSharedCriteria, MutateSharedCriteriaRequest, MutateSharedCriteriaResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/googleads/v0/services/shared_set_service_client.rb b/lib/google/ads/googleads/v0/services/shared_set_service_client.rb new file mode 100644 index 000000000..a7ff6915b --- /dev/null +++ b/lib/google/ads/googleads/v0/services/shared_set_service_client.rb @@ -0,0 +1,267 @@ +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# EDITING INSTRUCTIONS +# This file was generated from the file +# https://github.com/googleapis/googleapis/blob/master/google/ads/googleads/v0/services/shared_set_service.proto, +# and updates to that file get reflected here through a refresh process. +# For the short term, the refresh process will only be runnable by Google +# engineers. + +require "json" +require "pathname" + +require "google/gax" + +require "google/ads/googleads/v0/services/shared_set_service_pb" +require "google/ads/googleads/v0/services/credentials" + +module Google + module Ads + module Googleads + module V0 + module Services + # Service to manage shared sets. + # + # @!attribute [r] shared_set_service_stub + # @return [Google::Ads::Googleads::V0::Services::SharedSetService::Stub] + class SharedSetServiceClient + attr_reader :shared_set_service_stub + + # The default address of the service. + SERVICE_ADDRESS = "googleads.googleapis.com".freeze + + # The default port of the service. + DEFAULT_SERVICE_PORT = 443 + + # The default set of gRPC interceptors. + GRPC_INTERCEPTORS = [] + + DEFAULT_TIMEOUT = 30 + + # The scopes needed to make gRPC calls to all of the methods defined in + # this service. + ALL_SCOPES = [ + ].freeze + + + SHARED_SET_PATH_TEMPLATE = Google::Gax::PathTemplate.new( + "customers/{customer}/sharedSets/{shared_set}" + ) + + private_constant :SHARED_SET_PATH_TEMPLATE + + # Returns a fully-qualified shared_set resource name string. + # @param customer [String] + # @param shared_set [String] + # @return [String] + def self.shared_set_path customer, shared_set + SHARED_SET_PATH_TEMPLATE.render( + :"customer" => customer, + :"shared_set" => shared_set + ) + end + + # @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc] + # Provides the means for authenticating requests made by the client. This parameter can + # be many types. + # A `Google::Auth::Credentials` uses a the properties of its represented keyfile for + # authenticating requests made by this client. + # A `String` will be treated as the path to the keyfile to be used for the construction of + # credentials for this client. + # A `Hash` will be treated as the contents of a keyfile to be used for the construction of + # credentials for this client. + # A `GRPC::Core::Channel` will be used to make calls through. + # A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials + # should already be composed with a `GRPC::Core::CallCredentials` object. + # A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the + # metadata for requests, generally, to give OAuth credentials. + # @param scopes [Array] + # The OAuth scopes for this service. This parameter is ignored if + # an updater_proc is supplied. + # @param client_config [Hash] + # A Hash for call options for each method. See + # Google::Gax#construct_settings for the structure of + # this data. Falls back to the default config if not specified + # or the specified config is missing data points. + # @param timeout [Numeric] + # The default timeout, in seconds, for calls made through this client. + # @param metadata [Hash] + # Default metadata to be sent with each request. This can be overridden on a per call basis. + # @param exception_transformer [Proc] + # An optional proc that intercepts any exceptions raised during an API call to inject + # custom error handling. + def initialize \ + credentials: nil, + scopes: ALL_SCOPES, + client_config: {}, + timeout: DEFAULT_TIMEOUT, + metadata: nil, + exception_transformer: nil, + lib_name: nil, + lib_version: "" + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "google/gax/grpc" + require "google/ads/googleads/v0/services/shared_set_service_services_pb" + + credentials ||= Google::Ads::Googleads::V0::Services::Credentials.default + + if credentials.is_a?(String) || credentials.is_a?(Hash) + updater_proc = Google::Ads::Googleads::V0::Services::Credentials.new(credentials).updater_proc + end + if credentials.is_a?(GRPC::Core::Channel) + channel = credentials + end + if credentials.is_a?(GRPC::Core::ChannelCredentials) + chan_creds = credentials + end + if credentials.is_a?(Proc) + updater_proc = credentials + end + if credentials.is_a?(Google::Auth::Credentials) + updater_proc = credentials.updater_proc + end + + package_version = Gem.loaded_specs['google-ads-googleads'].version.version + + google_api_client = "gl-ruby/#{RUBY_VERSION}" + google_api_client << " #{lib_name}/#{lib_version}" if lib_name + google_api_client << " gapic/#{package_version} gax/#{Google::Gax::VERSION}" + google_api_client << " grpc/#{GRPC::VERSION}" + google_api_client.freeze + + headers = { :"x-goog-api-client" => google_api_client } + headers.merge!(metadata) unless metadata.nil? + client_config_file = Pathname.new(__dir__).join( + "shared_set_service_client_config.json" + ) + defaults = client_config_file.open do |f| + Google::Gax.construct_settings( + "google.ads.googleads.v0.services.SharedSetService", + JSON.parse(f.read), + client_config, + Google::Gax::Grpc::STATUS_CODE_NAMES, + timeout, + errors: Google::Gax::Grpc::API_ERRORS, + metadata: headers + ) + end + + # Allow overriding the service path/port in subclasses. + service_path = self.class::SERVICE_ADDRESS + port = self.class::DEFAULT_SERVICE_PORT + interceptors = self.class::GRPC_INTERCEPTORS + @shared_set_service_stub = Google::Gax::Grpc.create_stub( + service_path, + port, + chan_creds: chan_creds, + channel: channel, + updater_proc: updater_proc, + scopes: scopes, + interceptors: interceptors, + &Google::Ads::Googleads::V0::Services::SharedSetService::Stub.method(:new) + ) + + @get_shared_set = Google::Gax.create_api_call( + @shared_set_service_stub.method(:get_shared_set), + defaults["get_shared_set"], + exception_transformer: exception_transformer + ) + @mutate_shared_sets = Google::Gax.create_api_call( + @shared_set_service_stub.method(:mutate_shared_sets), + defaults["mutate_shared_sets"], + exception_transformer: exception_transformer + ) + end + + # Service calls + + # Returns the requested shared set in full detail. + # + # @param resource_name [String] + # The resource name of the shared set to fetch. + # @param options [Google::Gax::CallOptions] + # Overrides the default settings for this call, e.g, timeout, + # retries, etc. + # @yield [result, operation] Access the result along with the RPC operation + # @yieldparam result [Google::Ads::Googleads::V0::Resources::SharedSet] + # @yieldparam operation [GRPC::ActiveCall::Operation] + # @return [Google::Ads::Googleads::V0::Resources::SharedSet] + # @raise [Google::Gax::GaxError] if the RPC is aborted. + # @example + # require "google/ads/googleads" + # + # shared_set_service_client = Google::Ads::Googleads::SharedSet.new(version: :v0) + # formatted_resource_name = Google::Ads::Googleads::V0::Services::SharedSetServiceClient.shared_set_path("[CUSTOMER]", "[SHARED_SET]") + # response = shared_set_service_client.get_shared_set(formatted_resource_name) + + def get_shared_set \ + resource_name, + options: nil, + &block + req = { + resource_name: resource_name + }.delete_if { |_, v| v.nil? } + req = Google::Gax::to_proto(req, Google::Ads::Googleads::V0::Services::GetSharedSetRequest) + @get_shared_set.call(req, options, &block) + end + + # Creates, updates, or removes shared sets. Operation statuses are returned. + # + # @param customer_id [String] + # The ID of the customer whose shared sets are being modified. + # @param operations [Array] + # The list of operations to perform on individual shared sets. + # A hash of the same form as `Google::Ads::Googleads::V0::Services::SharedSetOperation` + # can also be provided. + # @param options [Google::Gax::CallOptions] + # Overrides the default settings for this call, e.g, timeout, + # retries, etc. + # @yield [result, operation] Access the result along with the RPC operation + # @yieldparam result [Google::Ads::Googleads::V0::Services::MutateSharedSetsResponse] + # @yieldparam operation [GRPC::ActiveCall::Operation] + # @return [Google::Ads::Googleads::V0::Services::MutateSharedSetsResponse] + # @raise [Google::Gax::GaxError] if the RPC is aborted. + # @example + # require "google/ads/googleads" + # + # shared_set_service_client = Google::Ads::Googleads::SharedSet.new(version: :v0) + # + # # TODO: Initialize +customer_id+: + # customer_id = '' + # + # # TODO: Initialize +operations+: + # operations = [] + # response = shared_set_service_client.mutate_shared_sets(customer_id, operations) + + def mutate_shared_sets \ + customer_id, + operations, + options: nil, + &block + req = { + customer_id: customer_id, + operations: operations + }.delete_if { |_, v| v.nil? } + req = Google::Gax::to_proto(req, Google::Ads::Googleads::V0::Services::MutateSharedSetsRequest) + @mutate_shared_sets.call(req, options, &block) + end + end + end + end + end + end +end diff --git a/lib/google/ads/googleads/v0/services/shared_set_service_client_config.json b/lib/google/ads/googleads/v0/services/shared_set_service_client_config.json new file mode 100644 index 000000000..2c7b8af04 --- /dev/null +++ b/lib/google/ads/googleads/v0/services/shared_set_service_client_config.json @@ -0,0 +1,36 @@ +{ + "interfaces": { + "google.ads.googleads.v0.services.SharedSetService": { + "retry_codes": { + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "non_idempotent": [] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 20000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 20000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "GetSharedSet": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "MutateSharedSets": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/lib/google/ads/googleads/v0/services/shared_set_service_pb.rb b/lib/google/ads/googleads/v0/services/shared_set_service_pb.rb new file mode 100644 index 000000000..b9284c2d4 --- /dev/null +++ b/lib/google/ads/googleads/v0/services/shared_set_service_pb.rb @@ -0,0 +1,47 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v0/services/shared_set_service.proto + +require 'google/protobuf' + +require 'google/ads/googleads/v0/resources/shared_set_pb' +require 'google/api/annotations_pb' +require 'google/protobuf/field_mask_pb' +Google::Protobuf::DescriptorPool.generated_pool.build do + add_message "google.ads.googleads.v0.services.GetSharedSetRequest" do + optional :resource_name, :string, 1 + end + add_message "google.ads.googleads.v0.services.MutateSharedSetsRequest" do + optional :customer_id, :string, 1 + repeated :operations, :message, 2, "google.ads.googleads.v0.services.SharedSetOperation" + end + add_message "google.ads.googleads.v0.services.SharedSetOperation" do + optional :update_mask, :message, 4, "google.protobuf.FieldMask" + oneof :operation do + optional :create, :message, 1, "google.ads.googleads.v0.resources.SharedSet" + optional :update, :message, 2, "google.ads.googleads.v0.resources.SharedSet" + optional :remove, :string, 3 + end + end + add_message "google.ads.googleads.v0.services.MutateSharedSetsResponse" do + repeated :results, :message, 2, "google.ads.googleads.v0.services.MutateSharedSetResult" + end + add_message "google.ads.googleads.v0.services.MutateSharedSetResult" do + optional :resource_name, :string, 1 + end +end + +module Google + module Ads + module Googleads + module V0 + module Services + GetSharedSetRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.services.GetSharedSetRequest").msgclass + MutateSharedSetsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.services.MutateSharedSetsRequest").msgclass + SharedSetOperation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.services.SharedSetOperation").msgclass + MutateSharedSetsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.services.MutateSharedSetsResponse").msgclass + MutateSharedSetResult = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.services.MutateSharedSetResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/googleads/v0/services/shared_set_service_services_pb.rb b/lib/google/ads/googleads/v0/services/shared_set_service_services_pb.rb new file mode 100644 index 000000000..b6df5a05a --- /dev/null +++ b/lib/google/ads/googleads/v0/services/shared_set_service_services_pb.rb @@ -0,0 +1,50 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v0/services/shared_set_service.proto for package 'google.ads.googleads.v0.services' +# Original file comments: +# Copyright 2018 Google LLC. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# + +require 'grpc' +require 'google/ads/googleads/v0/services/shared_set_service_pb' + +module Google + module Ads + module Googleads + module V0 + module Services + module SharedSetService + # Service to manage shared sets. + class Service + + include GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v0.services.SharedSetService' + + # Returns the requested shared set in full detail. + rpc :GetSharedSet, GetSharedSetRequest, Google::Ads::Googleads::V0::Resources::SharedSet + # Creates, updates, or removes shared sets. Operation statuses are returned. + rpc :MutateSharedSets, MutateSharedSetsRequest, MutateSharedSetsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/googleads/version.rb b/lib/google/ads/googleads/version.rb index 31ae37893..2bb66a70b 100644 --- a/lib/google/ads/googleads/version.rb +++ b/lib/google/ads/googleads/version.rb @@ -19,7 +19,7 @@ module Google module Ads module Googleads - CLIENT_LIB_VERSION = '0.3.0'.freeze + CLIENT_LIB_VERSION = '0.4.0'.freeze end end end diff --git a/test/test_field_mask_util.rb b/test/test_field_mask_util.rb index 99e0db706..b62c7077c 100644 --- a/test/test_field_mask_util.rb +++ b/test/test_field_mask_util.rb @@ -23,7 +23,7 @@ require 'google/ads/googleads' require 'google/ads/googleads/field_mask_util' require 'google/ads/googleads/v0/resources/campaign_pb' -require 'google/ads/googleads/v0/common/ad_pb' +require 'google/ads/googleads/v0/resources/ad_pb' class TestFieldMaskUtil < Minitest::Test def test_change_from_previous_value() @@ -96,7 +96,7 @@ def test_no_change_to_value() end def test_repeated_field_addition() - test_object = Google::Ads::Googleads::V0::Common::Ad.new + test_object = Google::Ads::Googleads::V0::Resources::Ad.new test_object.final_urls << Google::Protobuf::StringValue.new(value: 'url 1') @@ -109,7 +109,7 @@ def test_repeated_field_addition() end def test_repeated_field_removal() - test_object = Google::Ads::Googleads::V0::Common::Ad.new + test_object = Google::Ads::Googleads::V0::Resources::Ad.new test_object.final_urls << Google::Protobuf::StringValue.new(value: 'url 1') @@ -121,7 +121,7 @@ def test_repeated_field_removal() end def test_nested_field_changed() - test_object = Google::Ads::Googleads::V0::Common::Ad.new + test_object = Google::Ads::Googleads::V0::Resources::Ad.new text_ad = Google::Ads::Googleads::V0::Common::TextAdInfo.new text_ad.headline = Google::Protobuf::StringValue.new(value: 'headline') @@ -138,7 +138,7 @@ def test_nested_field_changed() end def test_nested_field_unchanged() - test_object = Google::Ads::Googleads::V0::Common::Ad.new + test_object = Google::Ads::Googleads::V0::Resources::Ad.new text_ad = Google::Ads::Googleads::V0::Common::TextAdInfo.new text_ad.headline = Google::Protobuf::StringValue.new(value: 'headline') diff --git a/test/test_path_lookup_util.rb b/test/test_path_lookup_util.rb index 6120d5e0a..e3d0ab63f 100644 --- a/test/test_path_lookup_util.rb +++ b/test/test_path_lookup_util.rb @@ -43,15 +43,24 @@ def test_path_generation() expected = 'customers/1234/biddingStrategies/5678' assert_equal(expected, util.bidding_strategy(1234, 5678)) + expected = 'customers/1234/campaignBidModifiers/5678' + assert_equal(expected, util.campaign_bid_modifier(1234, 5678)) + expected = 'customers/1234/campaignBudgets/5678' assert_equal(expected, util.campaign_budget(1234, 5678)) expected = 'customers/1234/campaignCriteria/567_890' assert_equal(expected, util.campaign_criterion(1234, 567, 890)) + expected = 'customers/1234/campaignGroups/5678' + assert_equal(expected, util.campaign_group(1234, 5678)) + expected = 'customers/1234/campaigns/5678' assert_equal(expected, util.campaign(1234, 5678)) + expected = 'customers/1234/campaignSharedSets/5678' + assert_equal(expected, util.campaign_shared_set(1234, 5678)) + expected = 'customers/123456' assert_equal(expected, util.customer(123456)) @@ -66,6 +75,12 @@ def test_path_generation() expected = 'customers/1234/recommendations/5678' assert_equal(expected, util.recommendation(1234, 5678)) + + expected = 'customers/1234/sharedCriteria/567_890' + assert_equal(expected, util.shared_criterion(1234, 567, 890)) + + expected = 'customers/1234/sharedSets/5678' + assert_equal(expected, util.shared_set(1234, 5678)) end def test_malformed_path_input() diff --git a/test/test_proto_lookup_util.rb b/test/test_proto_lookup_util.rb index 78760b550..957ac70fa 100644 --- a/test/test_proto_lookup_util.rb +++ b/test/test_proto_lookup_util.rb @@ -57,7 +57,7 @@ def test_resource_instances() ad = util.resource(:Ad).new assert_instance_of( - Google::Ads::Googleads::V0::Common::Ad, ad) + Google::Ads::Googleads::V0::Resources::Ad, ad) text_ad_info = util.resource(:TextAdInfo).new assert_instance_of(