google-ads-googleads 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +4 -1
- data/README.md +1 -1
- data/lib/google/ads/googleads/{v0/services/credentials.rb → credentials.rb} +6 -10
- data/lib/google/ads/googleads/path_lookup_util.rb +18 -0
- data/lib/google/ads/googleads/proto_lookup_util.rb +79 -8
- data/lib/google/ads/googleads/v0/common/ad_pb.rb +4 -0
- data/lib/google/ads/googleads/v0/common/criteria_pb.rb +71 -0
- data/lib/google/ads/googleads/v0/enums/ad_group_type_pb.rb +1 -0
- data/lib/google/ads/googleads/v0/enums/ad_type_pb.rb +1 -0
- data/lib/google/ads/googleads/v0/enums/advertising_channel_type_pb.rb +1 -0
- data/lib/google/ads/googleads/v0/enums/bidding_source_pb.rb +29 -0
- data/lib/google/ads/googleads/v0/enums/criterion_type_pb.rb +3 -0
- data/lib/google/ads/googleads/v0/enums/listing_custom_attribute_index_pb.rb +31 -0
- data/lib/google/ads/googleads/v0/enums/listing_group_type_pb.rb +28 -0
- data/lib/google/ads/googleads/v0/enums/recommendation_type_pb.rb +30 -0
- data/lib/google/ads/googleads/v0/enums/target_cpa_opt_in_recommendation_goal_pb.rb +30 -0
- data/lib/google/ads/googleads/v0/errors/ad_error_pb.rb +1 -0
- data/lib/google/ads/googleads/v0/errors/ad_group_bid_modifier_error_pb.rb +28 -0
- data/lib/google/ads/googleads/v0/errors/ad_group_criterion_error_pb.rb +9 -9
- data/lib/google/ads/googleads/v0/errors/authentication_error_pb.rb +0 -4
- data/lib/google/ads/googleads/v0/errors/authorization_error_pb.rb +1 -0
- data/lib/google/ads/googleads/v0/errors/campaign_error_pb.rb +3 -0
- data/lib/google/ads/googleads/v0/errors/context_error_pb.rb +27 -0
- data/lib/google/ads/googleads/v0/errors/criterion_error_pb.rb +2 -0
- data/lib/google/ads/googleads/v0/errors/errors_pb.rb +8 -0
- data/lib/google/ads/googleads/v0/errors/field_error_pb.rb +31 -0
- data/lib/google/ads/googleads/v0/errors/internal_error_pb.rb +1 -0
- data/lib/google/ads/googleads/v0/errors/mutate_error_pb.rb +0 -3
- data/lib/google/ads/googleads/v0/errors/query_error_pb.rb +2 -0
- data/lib/google/ads/googleads/v0/errors/recommendation_error_pb.rb +32 -0
- data/lib/google/ads/googleads/v0/resources/ad_group_bid_modifier_pb.rb +33 -0
- data/lib/google/ads/googleads/v0/resources/ad_group_criterion_pb.rb +5 -4
- data/lib/google/ads/googleads/v0/resources/campaign_criterion_pb.rb +3 -0
- data/lib/google/ads/googleads/v0/resources/campaign_pb.rb +5 -0
- data/lib/google/ads/googleads/v0/resources/customer_pb.rb +1 -0
- data/lib/google/ads/googleads/v0/resources/geo_target_constant_pb.rb +27 -0
- data/lib/google/ads/googleads/v0/resources/recommendation_pb.rb +85 -0
- data/lib/google/ads/googleads/v0/services/ad_group_ad_service_client.rb +3 -3
- data/lib/google/ads/googleads/v0/services/ad_group_bid_modifier_service_client.rb +263 -0
- data/lib/google/ads/googleads/v0/services/ad_group_bid_modifier_service_client_config.json +36 -0
- data/lib/google/ads/googleads/v0/services/ad_group_bid_modifier_service_pb.rb +47 -0
- data/lib/google/ads/googleads/v0/services/ad_group_bid_modifier_service_services_pb.rb +52 -0
- data/lib/google/ads/googleads/v0/services/ad_group_criterion_service_client.rb +3 -3
- data/lib/google/ads/googleads/v0/services/ad_group_service_client.rb +3 -3
- data/lib/google/ads/googleads/v0/services/bidding_strategy_service_client.rb +3 -3
- data/lib/google/ads/googleads/v0/services/campaign_budget_service_client.rb +3 -3
- data/lib/google/ads/googleads/v0/services/campaign_criterion_service_client.rb +3 -3
- data/lib/google/ads/googleads/v0/services/campaign_service_client.rb +3 -3
- data/lib/google/ads/googleads/v0/services/customer_service_client.rb +3 -3
- data/lib/google/ads/googleads/v0/services/geo_target_constant_service_client.rb +214 -0
- data/lib/google/ads/googleads/v0/services/geo_target_constant_service_client_config.json +31 -0
- data/lib/google/ads/googleads/v0/services/geo_target_constant_service_pb.rb +24 -0
- data/lib/google/ads/googleads/v0/services/geo_target_constant_service_services_pb.rb +49 -0
- data/lib/google/ads/googleads/v0/services/google_ads_field_service_client.rb +3 -3
- data/lib/google/ads/googleads/v0/services/google_ads_field_service_client_config.json +2 -2
- data/lib/google/ads/googleads/v0/services/google_ads_service_client.rb +3 -3
- data/lib/google/ads/googleads/v0/services/google_ads_service_client_config.json +1 -1
- data/lib/google/ads/googleads/v0/services/google_ads_service_pb.rb +6 -0
- data/lib/google/ads/googleads/v0/services/keyword_view_service_client.rb +3 -3
- data/lib/google/ads/googleads/v0/services/recommendation_service_client.rb +262 -0
- data/lib/google/ads/googleads/v0/services/recommendation_service_client_config.json +36 -0
- data/lib/google/ads/googleads/v0/services/recommendation_service_pb.rb +73 -0
- data/lib/google/ads/googleads/v0/services/recommendation_service_services_pb.rb +51 -0
- data/lib/google/ads/googleads/version.rb +1 -1
- metadata +27 -4
- data/lib/google/ads/googleads/v0/enums/bid_source_pb.rb +0 -29
@@ -0,0 +1,262 @@
|
|
1
|
+
# Copyright 2018 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
#
|
15
|
+
# EDITING INSTRUCTIONS
|
16
|
+
# This file was generated from the file
|
17
|
+
# https://github.com/googleapis/googleapis/blob/master/google/ads/googleads/v0/services/recommendation_service.proto,
|
18
|
+
# and updates to that file get reflected here through a refresh process.
|
19
|
+
# For the short term, the refresh process will only be runnable by Google
|
20
|
+
# engineers.
|
21
|
+
|
22
|
+
require "json"
|
23
|
+
require "pathname"
|
24
|
+
|
25
|
+
require "google/gax"
|
26
|
+
|
27
|
+
require "google/ads/googleads/v0/services/recommendation_service_pb"
|
28
|
+
require "google/ads/googleads/credentials"
|
29
|
+
|
30
|
+
module Google
|
31
|
+
module Ads
|
32
|
+
module Googleads
|
33
|
+
module V0
|
34
|
+
module Services
|
35
|
+
# Service to manage recommendations.
|
36
|
+
#
|
37
|
+
# @!attribute [r] recommendation_service_stub
|
38
|
+
# @return [Google::Ads::Googleads::V0::Services::RecommendationService::Stub]
|
39
|
+
class RecommendationServiceClient
|
40
|
+
attr_reader :recommendation_service_stub
|
41
|
+
|
42
|
+
# The default address of the service.
|
43
|
+
SERVICE_ADDRESS = "googleads.googleapis.com".freeze
|
44
|
+
|
45
|
+
# The default port of the service.
|
46
|
+
DEFAULT_SERVICE_PORT = 443
|
47
|
+
|
48
|
+
DEFAULT_TIMEOUT = 30
|
49
|
+
|
50
|
+
# The scopes needed to make gRPC calls to all of the methods defined in
|
51
|
+
# this service.
|
52
|
+
ALL_SCOPES = [
|
53
|
+
].freeze
|
54
|
+
|
55
|
+
|
56
|
+
RECOMMENDATION_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
|
57
|
+
"customers/{customer}/recommendations/{recommendation}"
|
58
|
+
)
|
59
|
+
|
60
|
+
private_constant :RECOMMENDATION_PATH_TEMPLATE
|
61
|
+
|
62
|
+
# Returns a fully-qualified recommendation resource name string.
|
63
|
+
# @param customer [String]
|
64
|
+
# @param recommendation [String]
|
65
|
+
# @return [String]
|
66
|
+
def self.recommendation_path customer, recommendation
|
67
|
+
RECOMMENDATION_PATH_TEMPLATE.render(
|
68
|
+
:"customer" => customer,
|
69
|
+
:"recommendation" => recommendation
|
70
|
+
)
|
71
|
+
end
|
72
|
+
|
73
|
+
# @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
|
74
|
+
# Provides the means for authenticating requests made by the client. This parameter can
|
75
|
+
# be many types.
|
76
|
+
# A `Google::Auth::Credentials` uses a the properties of its represented keyfile for
|
77
|
+
# authenticating requests made by this client.
|
78
|
+
# A `String` will be treated as the path to the keyfile to be used for the construction of
|
79
|
+
# credentials for this client.
|
80
|
+
# A `Hash` will be treated as the contents of a keyfile to be used for the construction of
|
81
|
+
# credentials for this client.
|
82
|
+
# A `GRPC::Core::Channel` will be used to make calls through.
|
83
|
+
# A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials
|
84
|
+
# should already be composed with a `GRPC::Core::CallCredentials` object.
|
85
|
+
# A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the
|
86
|
+
# metadata for requests, generally, to give OAuth credentials.
|
87
|
+
# @param scopes [Array<String>]
|
88
|
+
# The OAuth scopes for this service. This parameter is ignored if
|
89
|
+
# an updater_proc is supplied.
|
90
|
+
# @param client_config [Hash]
|
91
|
+
# A Hash for call options for each method. See
|
92
|
+
# Google::Gax#construct_settings for the structure of
|
93
|
+
# this data. Falls back to the default config if not specified
|
94
|
+
# or the specified config is missing data points.
|
95
|
+
# @param timeout [Numeric]
|
96
|
+
# The default timeout, in seconds, for calls made through this client.
|
97
|
+
# @param metadata [Hash]
|
98
|
+
# Default metadata to be sent with each request. This can be overridden on a per call basis.
|
99
|
+
# @param exception_transformer [Proc]
|
100
|
+
# An optional proc that intercepts any exceptions raised during an API call to inject
|
101
|
+
# custom error handling.
|
102
|
+
def initialize \
|
103
|
+
credentials: nil,
|
104
|
+
scopes: ALL_SCOPES,
|
105
|
+
client_config: {},
|
106
|
+
timeout: DEFAULT_TIMEOUT,
|
107
|
+
metadata: nil,
|
108
|
+
exception_transformer: nil,
|
109
|
+
lib_name: nil,
|
110
|
+
lib_version: ""
|
111
|
+
# These require statements are intentionally placed here to initialize
|
112
|
+
# the gRPC module only when it's required.
|
113
|
+
# See https://github.com/googleapis/toolkit/issues/446
|
114
|
+
require "google/gax/grpc"
|
115
|
+
require "google/ads/googleads/v0/services/recommendation_service_services_pb"
|
116
|
+
|
117
|
+
credentials ||= Google::Ads::Googleads::Credentials.default
|
118
|
+
|
119
|
+
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
120
|
+
updater_proc = Google::Ads::Googleads::Credentials.new(credentials).updater_proc
|
121
|
+
end
|
122
|
+
if credentials.is_a?(GRPC::Core::Channel)
|
123
|
+
channel = credentials
|
124
|
+
end
|
125
|
+
if credentials.is_a?(GRPC::Core::ChannelCredentials)
|
126
|
+
chan_creds = credentials
|
127
|
+
end
|
128
|
+
if credentials.is_a?(Proc)
|
129
|
+
updater_proc = credentials
|
130
|
+
end
|
131
|
+
if credentials.is_a?(Google::Auth::Credentials)
|
132
|
+
updater_proc = credentials.updater_proc
|
133
|
+
end
|
134
|
+
|
135
|
+
package_version = Gem.loaded_specs['google-ads-googleads'].version.version
|
136
|
+
|
137
|
+
google_api_client = "gl-ruby/#{RUBY_VERSION}"
|
138
|
+
google_api_client << " #{lib_name}/#{lib_version}" if lib_name
|
139
|
+
google_api_client << " gapic/#{package_version} gax/#{Google::Gax::VERSION}"
|
140
|
+
google_api_client << " grpc/#{GRPC::VERSION}"
|
141
|
+
google_api_client.freeze
|
142
|
+
|
143
|
+
headers = { :"x-goog-api-client" => google_api_client }
|
144
|
+
headers.merge!(metadata) unless metadata.nil?
|
145
|
+
client_config_file = Pathname.new(__dir__).join(
|
146
|
+
"recommendation_service_client_config.json"
|
147
|
+
)
|
148
|
+
defaults = client_config_file.open do |f|
|
149
|
+
Google::Gax.construct_settings(
|
150
|
+
"google.ads.googleads.v0.services.RecommendationService",
|
151
|
+
JSON.parse(f.read),
|
152
|
+
client_config,
|
153
|
+
Google::Gax::Grpc::STATUS_CODE_NAMES,
|
154
|
+
timeout,
|
155
|
+
errors: Google::Gax::Grpc::API_ERRORS,
|
156
|
+
metadata: headers
|
157
|
+
)
|
158
|
+
end
|
159
|
+
|
160
|
+
# Allow overriding the service path/port in subclasses.
|
161
|
+
service_path = self.class::SERVICE_ADDRESS
|
162
|
+
port = self.class::DEFAULT_SERVICE_PORT
|
163
|
+
@recommendation_service_stub = Google::Gax::Grpc.create_stub(
|
164
|
+
service_path,
|
165
|
+
port,
|
166
|
+
chan_creds: chan_creds,
|
167
|
+
channel: channel,
|
168
|
+
updater_proc: updater_proc,
|
169
|
+
scopes: scopes,
|
170
|
+
&Google::Ads::Googleads::V0::Services::RecommendationService::Stub.method(:new)
|
171
|
+
)
|
172
|
+
|
173
|
+
@get_recommendation = Google::Gax.create_api_call(
|
174
|
+
@recommendation_service_stub.method(:get_recommendation),
|
175
|
+
defaults["get_recommendation"],
|
176
|
+
exception_transformer: exception_transformer
|
177
|
+
)
|
178
|
+
@apply_recommendation = Google::Gax.create_api_call(
|
179
|
+
@recommendation_service_stub.method(:apply_recommendation),
|
180
|
+
defaults["apply_recommendation"],
|
181
|
+
exception_transformer: exception_transformer
|
182
|
+
)
|
183
|
+
end
|
184
|
+
|
185
|
+
# Service calls
|
186
|
+
|
187
|
+
# Returns the requested recommendation in full detail.
|
188
|
+
#
|
189
|
+
# @param resource_name [String]
|
190
|
+
# The resource name of the recommendation to fetch.
|
191
|
+
# @param options [Google::Gax::CallOptions]
|
192
|
+
# Overrides the default settings for this call, e.g, timeout,
|
193
|
+
# retries, etc.
|
194
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
195
|
+
# @yieldparam result [Google::Ads::Googleads::V0::Resources::Recommendation]
|
196
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
197
|
+
# @return [Google::Ads::Googleads::V0::Resources::Recommendation]
|
198
|
+
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
199
|
+
# @example
|
200
|
+
# require "google/ads/googleads/v0/services"
|
201
|
+
#
|
202
|
+
# recommendation_service_client = Google::Ads::Googleads::V0::Services::Recommendation.new
|
203
|
+
# formatted_resource_name = Google::Ads::Googleads::V0::Services::RecommendationServiceClient.recommendation_path("[CUSTOMER]", "[RECOMMENDATION]")
|
204
|
+
# response = recommendation_service_client.get_recommendation(formatted_resource_name)
|
205
|
+
|
206
|
+
def get_recommendation \
|
207
|
+
resource_name,
|
208
|
+
options: nil,
|
209
|
+
&block
|
210
|
+
req = {
|
211
|
+
resource_name: resource_name
|
212
|
+
}.delete_if { |_, v| v.nil? }
|
213
|
+
req = Google::Gax::to_proto(req, Google::Ads::Googleads::V0::Services::GetRecommendationRequest)
|
214
|
+
@get_recommendation.call(req, options, &block)
|
215
|
+
end
|
216
|
+
|
217
|
+
# Applies given recommendations with corresponding apply parameters.
|
218
|
+
#
|
219
|
+
# @param customer_id [String]
|
220
|
+
# The ID of the customer with the recommendation.
|
221
|
+
# @param operations [Array<Google::Ads::Googleads::V0::Services::ApplyRecommendationOperation | Hash>]
|
222
|
+
# The list of operations to apply recommendations.
|
223
|
+
# A hash of the same form as `Google::Ads::Googleads::V0::Services::ApplyRecommendationOperation`
|
224
|
+
# can also be provided.
|
225
|
+
# @param options [Google::Gax::CallOptions]
|
226
|
+
# Overrides the default settings for this call, e.g, timeout,
|
227
|
+
# retries, etc.
|
228
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
229
|
+
# @yieldparam result [Google::Ads::Googleads::V0::Services::ApplyRecommendationResponse]
|
230
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
231
|
+
# @return [Google::Ads::Googleads::V0::Services::ApplyRecommendationResponse]
|
232
|
+
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
233
|
+
# @example
|
234
|
+
# require "google/ads/googleads/v0/services"
|
235
|
+
#
|
236
|
+
# recommendation_service_client = Google::Ads::Googleads::V0::Services::Recommendation.new
|
237
|
+
#
|
238
|
+
# # TODO: Initialize +customer_id+:
|
239
|
+
# customer_id = ''
|
240
|
+
#
|
241
|
+
# # TODO: Initialize +operations+:
|
242
|
+
# operations = []
|
243
|
+
# response = recommendation_service_client.apply_recommendation(customer_id, operations)
|
244
|
+
|
245
|
+
def apply_recommendation \
|
246
|
+
customer_id,
|
247
|
+
operations,
|
248
|
+
options: nil,
|
249
|
+
&block
|
250
|
+
req = {
|
251
|
+
customer_id: customer_id,
|
252
|
+
operations: operations
|
253
|
+
}.delete_if { |_, v| v.nil? }
|
254
|
+
req = Google::Gax::to_proto(req, Google::Ads::Googleads::V0::Services::ApplyRecommendationRequest)
|
255
|
+
@apply_recommendation.call(req, options, &block)
|
256
|
+
end
|
257
|
+
end
|
258
|
+
end
|
259
|
+
end
|
260
|
+
end
|
261
|
+
end
|
262
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
{
|
2
|
+
"interfaces": {
|
3
|
+
"google.ads.googleads.v0.services.RecommendationService": {
|
4
|
+
"retry_codes": {
|
5
|
+
"idempotent": [
|
6
|
+
"DEADLINE_EXCEEDED",
|
7
|
+
"UNAVAILABLE"
|
8
|
+
],
|
9
|
+
"non_idempotent": []
|
10
|
+
},
|
11
|
+
"retry_params": {
|
12
|
+
"default": {
|
13
|
+
"initial_retry_delay_millis": 100,
|
14
|
+
"retry_delay_multiplier": 1.3,
|
15
|
+
"max_retry_delay_millis": 60000,
|
16
|
+
"initial_rpc_timeout_millis": 20000,
|
17
|
+
"rpc_timeout_multiplier": 1.0,
|
18
|
+
"max_rpc_timeout_millis": 20000,
|
19
|
+
"total_timeout_millis": 600000
|
20
|
+
}
|
21
|
+
},
|
22
|
+
"methods": {
|
23
|
+
"GetRecommendation": {
|
24
|
+
"timeout_millis": 600000,
|
25
|
+
"retry_codes_name": "idempotent",
|
26
|
+
"retry_params_name": "default"
|
27
|
+
},
|
28
|
+
"ApplyRecommendation": {
|
29
|
+
"timeout_millis": 600000,
|
30
|
+
"retry_codes_name": "non_idempotent",
|
31
|
+
"retry_params_name": "default"
|
32
|
+
}
|
33
|
+
}
|
34
|
+
}
|
35
|
+
}
|
36
|
+
}
|
@@ -0,0 +1,73 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/ads/googleads/v0/services/recommendation_service.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/ads/googleads/v0/common/ad_pb'
|
7
|
+
require 'google/ads/googleads/v0/enums/keyword_match_type_pb'
|
8
|
+
require 'google/ads/googleads/v0/resources/recommendation_pb'
|
9
|
+
require 'google/api/annotations_pb'
|
10
|
+
require 'google/protobuf/wrappers_pb'
|
11
|
+
require 'google/rpc/status_pb'
|
12
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
13
|
+
add_message "google.ads.googleads.v0.services.GetRecommendationRequest" do
|
14
|
+
optional :resource_name, :string, 1
|
15
|
+
end
|
16
|
+
add_message "google.ads.googleads.v0.services.ApplyRecommendationRequest" do
|
17
|
+
optional :customer_id, :string, 1
|
18
|
+
repeated :operations, :message, 2, "google.ads.googleads.v0.services.ApplyRecommendationOperation"
|
19
|
+
end
|
20
|
+
add_message "google.ads.googleads.v0.services.ApplyRecommendationOperation" do
|
21
|
+
optional :resource_name, :string, 1
|
22
|
+
oneof :apply_parameters do
|
23
|
+
optional :campaign_budget, :message, 2, "google.ads.googleads.v0.services.ApplyRecommendationOperation.CampaignBudgetParameters"
|
24
|
+
optional :text_ad, :message, 3, "google.ads.googleads.v0.services.ApplyRecommendationOperation.TextAdParameters"
|
25
|
+
optional :keyword, :message, 4, "google.ads.googleads.v0.services.ApplyRecommendationOperation.KeywordParameters"
|
26
|
+
optional :target_cpa_opt_in, :message, 5, "google.ads.googleads.v0.services.ApplyRecommendationOperation.TargetCpaOptInParameters"
|
27
|
+
end
|
28
|
+
end
|
29
|
+
add_message "google.ads.googleads.v0.services.ApplyRecommendationOperation.CampaignBudgetParameters" do
|
30
|
+
optional :new_budget_amount_micros, :message, 1, "google.protobuf.Int64Value"
|
31
|
+
end
|
32
|
+
add_message "google.ads.googleads.v0.services.ApplyRecommendationOperation.TextAdParameters" do
|
33
|
+
optional :ad, :message, 1, "google.ads.googleads.v0.common.Ad"
|
34
|
+
end
|
35
|
+
add_message "google.ads.googleads.v0.services.ApplyRecommendationOperation.KeywordParameters" do
|
36
|
+
optional :ad_group, :message, 1, "google.protobuf.StringValue"
|
37
|
+
optional :match_type, :enum, 2, "google.ads.googleads.v0.enums.KeywordMatchTypeEnum.KeywordMatchType"
|
38
|
+
optional :cpc_bid_micros, :message, 3, "google.protobuf.Int64Value"
|
39
|
+
end
|
40
|
+
add_message "google.ads.googleads.v0.services.ApplyRecommendationOperation.TargetCpaOptInParameters" do
|
41
|
+
optional :target_cpa_micros, :message, 1, "google.protobuf.Int64Value"
|
42
|
+
optional :new_campaign_budget_amount_micros, :message, 2, "google.protobuf.Int64Value"
|
43
|
+
end
|
44
|
+
add_message "google.ads.googleads.v0.services.ApplyRecommendationResponse" do
|
45
|
+
repeated :results, :message, 1, "google.ads.googleads.v0.services.ApplyRecommendationResult"
|
46
|
+
end
|
47
|
+
add_message "google.ads.googleads.v0.services.ApplyRecommendationResult" do
|
48
|
+
oneof :result do
|
49
|
+
optional :resource_name, :string, 1
|
50
|
+
optional :status, :message, 2, "google.rpc.Status"
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
module Google
|
56
|
+
module Ads
|
57
|
+
module Googleads
|
58
|
+
module V0
|
59
|
+
module Services
|
60
|
+
GetRecommendationRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.services.GetRecommendationRequest").msgclass
|
61
|
+
ApplyRecommendationRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.services.ApplyRecommendationRequest").msgclass
|
62
|
+
ApplyRecommendationOperation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.services.ApplyRecommendationOperation").msgclass
|
63
|
+
ApplyRecommendationOperation::CampaignBudgetParameters = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.services.ApplyRecommendationOperation.CampaignBudgetParameters").msgclass
|
64
|
+
ApplyRecommendationOperation::TextAdParameters = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.services.ApplyRecommendationOperation.TextAdParameters").msgclass
|
65
|
+
ApplyRecommendationOperation::KeywordParameters = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.services.ApplyRecommendationOperation.KeywordParameters").msgclass
|
66
|
+
ApplyRecommendationOperation::TargetCpaOptInParameters = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.services.ApplyRecommendationOperation.TargetCpaOptInParameters").msgclass
|
67
|
+
ApplyRecommendationResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.services.ApplyRecommendationResponse").msgclass
|
68
|
+
ApplyRecommendationResult = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.services.ApplyRecommendationResult").msgclass
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# Source: google/ads/googleads/v0/services/recommendation_service.proto for package 'google.ads.googleads.v0.services'
|
3
|
+
# Original file comments:
|
4
|
+
# Copyright 2018 Google Inc.
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
18
|
+
|
19
|
+
require 'grpc'
|
20
|
+
require 'google/ads/googleads/v0/services/recommendation_service_pb'
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Ads
|
24
|
+
module Googleads
|
25
|
+
module V0
|
26
|
+
module Services
|
27
|
+
module RecommendationService
|
28
|
+
# Proto file describing the Recommendation service.
|
29
|
+
#
|
30
|
+
# Service to manage recommendations.
|
31
|
+
class Service
|
32
|
+
|
33
|
+
include GRPC::GenericService
|
34
|
+
|
35
|
+
self.marshal_class_method = :encode
|
36
|
+
self.unmarshal_class_method = :decode
|
37
|
+
self.service_name = 'google.ads.googleads.v0.services.RecommendationService'
|
38
|
+
|
39
|
+
# Returns the requested recommendation in full detail.
|
40
|
+
rpc :GetRecommendation, GetRecommendationRequest, Google::Ads::Googleads::V0::Resources::Recommendation
|
41
|
+
# Applies given recommendations with corresponding apply parameters.
|
42
|
+
rpc :ApplyRecommendation, ApplyRecommendationRequest, ApplyRecommendationResponse
|
43
|
+
end
|
44
|
+
|
45
|
+
Stub = Service.rpc_stub_class
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-ads-googleads
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google Inc
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-06-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-gax
|
@@ -79,6 +79,7 @@ files:
|
|
79
79
|
- googleads_config.rb
|
80
80
|
- lib/google/ads/googleads.rb
|
81
81
|
- lib/google/ads/googleads/config.rb
|
82
|
+
- lib/google/ads/googleads/credentials.rb
|
82
83
|
- lib/google/ads/googleads/errors.rb
|
83
84
|
- lib/google/ads/googleads/field_mask_util.rb
|
84
85
|
- lib/google/ads/googleads/googleads_client.rb
|
@@ -101,7 +102,7 @@ files:
|
|
101
102
|
- lib/google/ads/googleads/v0/enums/ad_type_pb.rb
|
102
103
|
- lib/google/ads/googleads/v0/enums/advertising_channel_sub_type_pb.rb
|
103
104
|
- lib/google/ads/googleads/v0/enums/advertising_channel_type_pb.rb
|
104
|
-
- lib/google/ads/googleads/v0/enums/
|
105
|
+
- lib/google/ads/googleads/v0/enums/bidding_source_pb.rb
|
105
106
|
- lib/google/ads/googleads/v0/enums/bidding_strategy_type_pb.rb
|
106
107
|
- lib/google/ads/googleads/v0/enums/budget_delivery_method_pb.rb
|
107
108
|
- lib/google/ads/googleads/v0/enums/budget_status_pb.rb
|
@@ -113,12 +114,17 @@ files:
|
|
113
114
|
- lib/google/ads/googleads/v0/enums/google_ads_field_category_pb.rb
|
114
115
|
- lib/google/ads/googleads/v0/enums/google_ads_field_data_type_pb.rb
|
115
116
|
- lib/google/ads/googleads/v0/enums/keyword_match_type_pb.rb
|
117
|
+
- lib/google/ads/googleads/v0/enums/listing_custom_attribute_index_pb.rb
|
118
|
+
- lib/google/ads/googleads/v0/enums/listing_group_type_pb.rb
|
116
119
|
- lib/google/ads/googleads/v0/enums/page_one_promoted_strategy_goal_pb.rb
|
117
120
|
- lib/google/ads/googleads/v0/enums/quality_score_bucket_pb.rb
|
121
|
+
- lib/google/ads/googleads/v0/enums/recommendation_type_pb.rb
|
118
122
|
- lib/google/ads/googleads/v0/enums/slot_pb.rb
|
123
|
+
- lib/google/ads/googleads/v0/enums/target_cpa_opt_in_recommendation_goal_pb.rb
|
119
124
|
- lib/google/ads/googleads/v0/errors/ad_customizer_error_pb.rb
|
120
125
|
- lib/google/ads/googleads/v0/errors/ad_error_pb.rb
|
121
126
|
- lib/google/ads/googleads/v0/errors/ad_group_ad_error_pb.rb
|
127
|
+
- lib/google/ads/googleads/v0/errors/ad_group_bid_modifier_error_pb.rb
|
122
128
|
- lib/google/ads/googleads/v0/errors/ad_group_criterion_error_pb.rb
|
123
129
|
- lib/google/ads/googleads/v0/errors/ad_group_error_pb.rb
|
124
130
|
- lib/google/ads/googleads/v0/errors/ad_sharing_error_pb.rb
|
@@ -131,12 +137,14 @@ files:
|
|
131
137
|
- lib/google/ads/googleads/v0/errors/campaign_criterion_error_pb.rb
|
132
138
|
- lib/google/ads/googleads/v0/errors/campaign_error_pb.rb
|
133
139
|
- lib/google/ads/googleads/v0/errors/collection_size_error_pb.rb
|
140
|
+
- lib/google/ads/googleads/v0/errors/context_error_pb.rb
|
134
141
|
- lib/google/ads/googleads/v0/errors/criterion_error_pb.rb
|
135
142
|
- lib/google/ads/googleads/v0/errors/date_error_pb.rb
|
136
143
|
- lib/google/ads/googleads/v0/errors/date_range_error_pb.rb
|
137
144
|
- lib/google/ads/googleads/v0/errors/distinct_error_pb.rb
|
138
145
|
- lib/google/ads/googleads/v0/errors/errors_pb.rb
|
139
146
|
- lib/google/ads/googleads/v0/errors/feed_attribute_reference_error_pb.rb
|
147
|
+
- lib/google/ads/googleads/v0/errors/field_error_pb.rb
|
140
148
|
- lib/google/ads/googleads/v0/errors/field_mask_error_pb.rb
|
141
149
|
- lib/google/ads/googleads/v0/errors/function_error_pb.rb
|
142
150
|
- lib/google/ads/googleads/v0/errors/function_parsing_error_pb.rb
|
@@ -156,6 +164,7 @@ files:
|
|
156
164
|
- lib/google/ads/googleads/v0/errors/query_error_pb.rb
|
157
165
|
- lib/google/ads/googleads/v0/errors/quota_error_pb.rb
|
158
166
|
- lib/google/ads/googleads/v0/errors/range_error_pb.rb
|
167
|
+
- lib/google/ads/googleads/v0/errors/recommendation_error_pb.rb
|
159
168
|
- lib/google/ads/googleads/v0/errors/region_code_error_pb.rb
|
160
169
|
- lib/google/ads/googleads/v0/errors/request_error_pb.rb
|
161
170
|
- lib/google/ads/googleads/v0/errors/resource_access_denied_error_pb.rb
|
@@ -165,6 +174,7 @@ files:
|
|
165
174
|
- lib/google/ads/googleads/v0/errors/string_length_error_pb.rb
|
166
175
|
- lib/google/ads/googleads/v0/errors/url_field_error_pb.rb
|
167
176
|
- lib/google/ads/googleads/v0/resources/ad_group_ad_pb.rb
|
177
|
+
- lib/google/ads/googleads/v0/resources/ad_group_bid_modifier_pb.rb
|
168
178
|
- lib/google/ads/googleads/v0/resources/ad_group_criterion_pb.rb
|
169
179
|
- lib/google/ads/googleads/v0/resources/ad_group_pb.rb
|
170
180
|
- lib/google/ads/googleads/v0/resources/bidding_strategy_pb.rb
|
@@ -172,12 +182,18 @@ files:
|
|
172
182
|
- lib/google/ads/googleads/v0/resources/campaign_criterion_pb.rb
|
173
183
|
- lib/google/ads/googleads/v0/resources/campaign_pb.rb
|
174
184
|
- lib/google/ads/googleads/v0/resources/customer_pb.rb
|
185
|
+
- lib/google/ads/googleads/v0/resources/geo_target_constant_pb.rb
|
175
186
|
- lib/google/ads/googleads/v0/resources/google_ads_field_pb.rb
|
176
187
|
- lib/google/ads/googleads/v0/resources/keyword_view_pb.rb
|
188
|
+
- lib/google/ads/googleads/v0/resources/recommendation_pb.rb
|
177
189
|
- lib/google/ads/googleads/v0/services/ad_group_ad_service_client.rb
|
178
190
|
- lib/google/ads/googleads/v0/services/ad_group_ad_service_client_config.json
|
179
191
|
- lib/google/ads/googleads/v0/services/ad_group_ad_service_pb.rb
|
180
192
|
- lib/google/ads/googleads/v0/services/ad_group_ad_service_services_pb.rb
|
193
|
+
- lib/google/ads/googleads/v0/services/ad_group_bid_modifier_service_client.rb
|
194
|
+
- lib/google/ads/googleads/v0/services/ad_group_bid_modifier_service_client_config.json
|
195
|
+
- lib/google/ads/googleads/v0/services/ad_group_bid_modifier_service_pb.rb
|
196
|
+
- lib/google/ads/googleads/v0/services/ad_group_bid_modifier_service_services_pb.rb
|
181
197
|
- lib/google/ads/googleads/v0/services/ad_group_criterion_service_client.rb
|
182
198
|
- lib/google/ads/googleads/v0/services/ad_group_criterion_service_client_config.json
|
183
199
|
- lib/google/ads/googleads/v0/services/ad_group_criterion_service_pb.rb
|
@@ -202,11 +218,14 @@ files:
|
|
202
218
|
- lib/google/ads/googleads/v0/services/campaign_service_client_config.json
|
203
219
|
- lib/google/ads/googleads/v0/services/campaign_service_pb.rb
|
204
220
|
- lib/google/ads/googleads/v0/services/campaign_service_services_pb.rb
|
205
|
-
- lib/google/ads/googleads/v0/services/credentials.rb
|
206
221
|
- lib/google/ads/googleads/v0/services/customer_service_client.rb
|
207
222
|
- lib/google/ads/googleads/v0/services/customer_service_client_config.json
|
208
223
|
- lib/google/ads/googleads/v0/services/customer_service_pb.rb
|
209
224
|
- lib/google/ads/googleads/v0/services/customer_service_services_pb.rb
|
225
|
+
- lib/google/ads/googleads/v0/services/geo_target_constant_service_client.rb
|
226
|
+
- lib/google/ads/googleads/v0/services/geo_target_constant_service_client_config.json
|
227
|
+
- lib/google/ads/googleads/v0/services/geo_target_constant_service_pb.rb
|
228
|
+
- lib/google/ads/googleads/v0/services/geo_target_constant_service_services_pb.rb
|
210
229
|
- lib/google/ads/googleads/v0/services/google_ads_field_service_client.rb
|
211
230
|
- lib/google/ads/googleads/v0/services/google_ads_field_service_client_config.json
|
212
231
|
- lib/google/ads/googleads/v0/services/google_ads_field_service_pb.rb
|
@@ -219,6 +238,10 @@ files:
|
|
219
238
|
- lib/google/ads/googleads/v0/services/keyword_view_service_client_config.json
|
220
239
|
- lib/google/ads/googleads/v0/services/keyword_view_service_pb.rb
|
221
240
|
- lib/google/ads/googleads/v0/services/keyword_view_service_services_pb.rb
|
241
|
+
- lib/google/ads/googleads/v0/services/recommendation_service_client.rb
|
242
|
+
- lib/google/ads/googleads/v0/services/recommendation_service_client_config.json
|
243
|
+
- lib/google/ads/googleads/v0/services/recommendation_service_pb.rb
|
244
|
+
- lib/google/ads/googleads/v0/services/recommendation_service_services_pb.rb
|
222
245
|
- lib/google/ads/googleads/version.rb
|
223
246
|
- lib/google/ads/googleads/wrapper_util.rb
|
224
247
|
homepage: https://github.com/googleads/google-ads-ruby
|
@@ -1,29 +0,0 @@
|
|
1
|
-
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
-
# source: google/ads/googleads/v0/enums/bid_source.proto
|
3
|
-
|
4
|
-
require 'google/protobuf'
|
5
|
-
|
6
|
-
Google::Protobuf::DescriptorPool.generated_pool.build do
|
7
|
-
add_message "google.ads.googleads.v0.enums.BidSourceEnum" do
|
8
|
-
end
|
9
|
-
add_enum "google.ads.googleads.v0.enums.BidSourceEnum.BidSource" do
|
10
|
-
value :UNSPECIFIED, 0
|
11
|
-
value :UNKNOWN, 1
|
12
|
-
value :ADGROUP, 2
|
13
|
-
value :CRITERION, 3
|
14
|
-
value :CAMPAIGN_BIDDING_STRATEGY, 5
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
module Google
|
19
|
-
module Ads
|
20
|
-
module Googleads
|
21
|
-
module V0
|
22
|
-
module Enums
|
23
|
-
BidSourceEnum = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.enums.BidSourceEnum").msgclass
|
24
|
-
BidSourceEnum::BidSource = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.enums.BidSourceEnum.BidSource").enummodule
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|