google-ads-googleads 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (150) hide show
  1. checksums.yaml +7 -0
  2. data/ChangeLog +2 -0
  3. data/README.md +107 -0
  4. data/Rakefile +7 -0
  5. data/googleads_config.rb +10 -0
  6. data/lib/google/ads/googleads.rb +25 -0
  7. data/lib/google/ads/googleads/config.rb +42 -0
  8. data/lib/google/ads/googleads/errors.rb +40 -0
  9. data/lib/google/ads/googleads/field_mask_util.rb +159 -0
  10. data/lib/google/ads/googleads/googleads_client.rb +177 -0
  11. data/lib/google/ads/googleads/patches.rb +45 -0
  12. data/lib/google/ads/googleads/path_lookup_util.rb +84 -0
  13. data/lib/google/ads/googleads/proto_lookup_util.rb +249 -0
  14. data/lib/google/ads/googleads/v0/common/ad_pb.rb +80 -0
  15. data/lib/google/ads/googleads/v0/common/bidding_pb.rb +71 -0
  16. data/lib/google/ads/googleads/v0/common/criteria_pb.rb +25 -0
  17. data/lib/google/ads/googleads/v0/common/custom_parameter_pb.rb +24 -0
  18. data/lib/google/ads/googleads/v0/common/metrics_pb.rb +65 -0
  19. data/lib/google/ads/googleads/v0/common/policy_pb.rb +24 -0
  20. data/lib/google/ads/googleads/v0/common/value_pb.rb +28 -0
  21. data/lib/google/ads/googleads/v0/enums/ad_group_ad_status_pb.rb +29 -0
  22. data/lib/google/ads/googleads/v0/enums/ad_group_criterion_status_pb.rb +29 -0
  23. data/lib/google/ads/googleads/v0/enums/ad_group_status_pb.rb +29 -0
  24. data/lib/google/ads/googleads/v0/enums/ad_group_type_pb.rb +27 -0
  25. data/lib/google/ads/googleads/v0/enums/ad_network_type_pb.rb +31 -0
  26. data/lib/google/ads/googleads/v0/enums/ad_serving_optimization_status_pb.rb +31 -0
  27. data/lib/google/ads/googleads/v0/enums/ad_type_pb.rb +32 -0
  28. data/lib/google/ads/googleads/v0/enums/advertising_channel_sub_type_pb.rb +28 -0
  29. data/lib/google/ads/googleads/v0/enums/advertising_channel_type_pb.rb +27 -0
  30. data/lib/google/ads/googleads/v0/enums/bid_source_pb.rb +29 -0
  31. data/lib/google/ads/googleads/v0/enums/bidding_strategy_type_pb.rb +36 -0
  32. data/lib/google/ads/googleads/v0/enums/budget_delivery_method_pb.rb +28 -0
  33. data/lib/google/ads/googleads/v0/enums/budget_status_pb.rb +28 -0
  34. data/lib/google/ads/googleads/v0/enums/campaign_serving_status_pb.rb +31 -0
  35. data/lib/google/ads/googleads/v0/enums/campaign_status_pb.rb +29 -0
  36. data/lib/google/ads/googleads/v0/enums/criterion_type_pb.rb +27 -0
  37. data/lib/google/ads/googleads/v0/enums/day_of_week_pb.rb +33 -0
  38. data/lib/google/ads/googleads/v0/enums/device_pb.rb +29 -0
  39. data/lib/google/ads/googleads/v0/enums/google_ads_field_category_pb.rb +30 -0
  40. data/lib/google/ads/googleads/v0/enums/google_ads_field_data_type_pb.rb +36 -0
  41. data/lib/google/ads/googleads/v0/enums/keyword_match_type_pb.rb +29 -0
  42. data/lib/google/ads/googleads/v0/enums/page_one_promoted_strategy_goal_pb.rb +28 -0
  43. data/lib/google/ads/googleads/v0/enums/quality_score_bucket_pb.rb +29 -0
  44. data/lib/google/ads/googleads/v0/enums/slot_pb.rb +32 -0
  45. data/lib/google/ads/googleads/v0/errors/ad_customizer_error_pb.rb +31 -0
  46. data/lib/google/ads/googleads/v0/errors/ad_error_pb.rb +154 -0
  47. data/lib/google/ads/googleads/v0/errors/ad_group_ad_error_pb.rb +34 -0
  48. data/lib/google/ads/googleads/v0/errors/ad_group_criterion_error_pb.rb +63 -0
  49. data/lib/google/ads/googleads/v0/errors/ad_group_error_pb.rb +38 -0
  50. data/lib/google/ads/googleads/v0/errors/ad_sharing_error_pb.rb +29 -0
  51. data/lib/google/ads/googleads/v0/errors/adx_error_pb.rb +27 -0
  52. data/lib/google/ads/googleads/v0/errors/authentication_error_pb.rb +47 -0
  53. data/lib/google/ads/googleads/v0/errors/authorization_error_pb.rb +30 -0
  54. data/lib/google/ads/googleads/v0/errors/bidding_error_pb.rb +46 -0
  55. data/lib/google/ads/googleads/v0/errors/bidding_strategy_error_pb.rb +30 -0
  56. data/lib/google/ads/googleads/v0/errors/campaign_budget_error_pb.rb +40 -0
  57. data/lib/google/ads/googleads/v0/errors/campaign_criterion_error_pb.rb +36 -0
  58. data/lib/google/ads/googleads/v0/errors/campaign_error_pb.rb +60 -0
  59. data/lib/google/ads/googleads/v0/errors/collection_size_error_pb.rb +28 -0
  60. data/lib/google/ads/googleads/v0/errors/criterion_error_pb.rb +106 -0
  61. data/lib/google/ads/googleads/v0/errors/date_error_pb.rb +34 -0
  62. data/lib/google/ads/googleads/v0/errors/date_range_error_pb.rb +31 -0
  63. data/lib/google/ads/googleads/v0/errors/distinct_error_pb.rb +28 -0
  64. data/lib/google/ads/googleads/v0/errors/errors_pb.rb +154 -0
  65. data/lib/google/ads/googleads/v0/errors/feed_attribute_reference_error_pb.rb +29 -0
  66. data/lib/google/ads/googleads/v0/errors/field_mask_error_pb.rb +30 -0
  67. data/lib/google/ads/googleads/v0/errors/function_error_pb.rb +42 -0
  68. data/lib/google/ads/googleads/v0/errors/function_parsing_error_pb.rb +37 -0
  69. data/lib/google/ads/googleads/v0/errors/id_error_pb.rb +27 -0
  70. data/lib/google/ads/googleads/v0/errors/image_error_pb.rb +63 -0
  71. data/lib/google/ads/googleads/v0/errors/internal_error_pb.rb +28 -0
  72. data/lib/google/ads/googleads/v0/errors/list_operation_error_pb.rb +28 -0
  73. data/lib/google/ads/googleads/v0/errors/media_bundle_error_pb.rb +48 -0
  74. data/lib/google/ads/googleads/v0/errors/media_error_pb.rb +50 -0
  75. data/lib/google/ads/googleads/v0/errors/multiplier_error_pb.rb +38 -0
  76. data/lib/google/ads/googleads/v0/errors/mutate_error_pb.rb +31 -0
  77. data/lib/google/ads/googleads/v0/errors/new_resource_creation_error_pb.rb +29 -0
  78. data/lib/google/ads/googleads/v0/errors/not_empty_error_pb.rb +27 -0
  79. data/lib/google/ads/googleads/v0/errors/null_error_pb.rb +27 -0
  80. data/lib/google/ads/googleads/v0/errors/operation_access_denied_error_pb.rb +35 -0
  81. data/lib/google/ads/googleads/v0/errors/operator_error_pb.rb +27 -0
  82. data/lib/google/ads/googleads/v0/errors/query_error_pb.rb +72 -0
  83. data/lib/google/ads/googleads/v0/errors/quota_error_pb.rb +28 -0
  84. data/lib/google/ads/googleads/v0/errors/range_error_pb.rb +28 -0
  85. data/lib/google/ads/googleads/v0/errors/region_code_error_pb.rb +27 -0
  86. data/lib/google/ads/googleads/v0/errors/request_error_pb.rb +41 -0
  87. data/lib/google/ads/googleads/v0/errors/resource_access_denied_error_pb.rb +27 -0
  88. data/lib/google/ads/googleads/v0/errors/resource_count_limit_exceeded_error_pb.rb +33 -0
  89. data/lib/google/ads/googleads/v0/errors/setting_error_pb.rb +43 -0
  90. data/lib/google/ads/googleads/v0/errors/string_format_error_pb.rb +28 -0
  91. data/lib/google/ads/googleads/v0/errors/string_length_error_pb.rb +28 -0
  92. data/lib/google/ads/googleads/v0/errors/url_field_error_pb.rb +70 -0
  93. data/lib/google/ads/googleads/v0/resources/ad_group_ad_pb.rb +28 -0
  94. data/lib/google/ads/googleads/v0/resources/ad_group_criterion_pb.rb +64 -0
  95. data/lib/google/ads/googleads/v0/resources/ad_group_pb.rb +38 -0
  96. data/lib/google/ads/googleads/v0/resources/bidding_strategy_pb.rb +36 -0
  97. data/lib/google/ads/googleads/v0/resources/campaign_budget_pb.rb +32 -0
  98. data/lib/google/ads/googleads/v0/resources/campaign_criterion_pb.rb +32 -0
  99. data/lib/google/ads/googleads/v0/resources/campaign_pb.rb +70 -0
  100. data/lib/google/ads/googleads/v0/resources/customer_pb.rb +29 -0
  101. data/lib/google/ads/googleads/v0/resources/google_ads_field_pb.rb +38 -0
  102. data/lib/google/ads/googleads/v0/resources/keyword_view_pb.rb +22 -0
  103. data/lib/google/ads/googleads/v0/services/ad_group_ad_service_client.rb +262 -0
  104. data/lib/google/ads/googleads/v0/services/ad_group_ad_service_client_config.json +36 -0
  105. data/lib/google/ads/googleads/v0/services/ad_group_ad_service_pb.rb +47 -0
  106. data/lib/google/ads/googleads/v0/services/ad_group_ad_service_services_pb.rb +51 -0
  107. data/lib/google/ads/googleads/v0/services/ad_group_criterion_service_client.rb +262 -0
  108. data/lib/google/ads/googleads/v0/services/ad_group_criterion_service_client_config.json +36 -0
  109. data/lib/google/ads/googleads/v0/services/ad_group_criterion_service_pb.rb +47 -0
  110. data/lib/google/ads/googleads/v0/services/ad_group_criterion_service_services_pb.rb +51 -0
  111. data/lib/google/ads/googleads/v0/services/ad_group_service_client.rb +262 -0
  112. data/lib/google/ads/googleads/v0/services/ad_group_service_client_config.json +36 -0
  113. data/lib/google/ads/googleads/v0/services/ad_group_service_pb.rb +47 -0
  114. data/lib/google/ads/googleads/v0/services/ad_group_service_services_pb.rb +51 -0
  115. data/lib/google/ads/googleads/v0/services/bidding_strategy_service_client.rb +263 -0
  116. data/lib/google/ads/googleads/v0/services/bidding_strategy_service_client_config.json +36 -0
  117. data/lib/google/ads/googleads/v0/services/bidding_strategy_service_pb.rb +47 -0
  118. data/lib/google/ads/googleads/v0/services/bidding_strategy_service_services_pb.rb +52 -0
  119. data/lib/google/ads/googleads/v0/services/campaign_budget_service_client.rb +263 -0
  120. data/lib/google/ads/googleads/v0/services/campaign_budget_service_client_config.json +36 -0
  121. data/lib/google/ads/googleads/v0/services/campaign_budget_service_pb.rb +47 -0
  122. data/lib/google/ads/googleads/v0/services/campaign_budget_service_services_pb.rb +52 -0
  123. data/lib/google/ads/googleads/v0/services/campaign_criterion_service_client.rb +262 -0
  124. data/lib/google/ads/googleads/v0/services/campaign_criterion_service_client_config.json +36 -0
  125. data/lib/google/ads/googleads/v0/services/campaign_criterion_service_pb.rb +47 -0
  126. data/lib/google/ads/googleads/v0/services/campaign_criterion_service_services_pb.rb +51 -0
  127. data/lib/google/ads/googleads/v0/services/campaign_service_client.rb +262 -0
  128. data/lib/google/ads/googleads/v0/services/campaign_service_client_config.json +36 -0
  129. data/lib/google/ads/googleads/v0/services/campaign_service_pb.rb +47 -0
  130. data/lib/google/ads/googleads/v0/services/campaign_service_services_pb.rb +51 -0
  131. data/lib/google/ads/googleads/v0/services/credentials.rb +33 -0
  132. data/lib/google/ads/googleads/v0/services/customer_service_client.rb +214 -0
  133. data/lib/google/ads/googleads/v0/services/customer_service_client_config.json +31 -0
  134. data/lib/google/ads/googleads/v0/services/customer_service_pb.rb +24 -0
  135. data/lib/google/ads/googleads/v0/services/customer_service_services_pb.rb +49 -0
  136. data/lib/google/ads/googleads/v0/services/google_ads_field_service_client.rb +285 -0
  137. data/lib/google/ads/googleads/v0/services/google_ads_field_service_client_config.json +36 -0
  138. data/lib/google/ads/googleads/v0/services/google_ads_field_service_pb.rb +36 -0
  139. data/lib/google/ads/googleads/v0/services/google_ads_field_service_services_pb.rb +51 -0
  140. data/lib/google/ads/googleads/v0/services/google_ads_service_client.rb +242 -0
  141. data/lib/google/ads/googleads/v0/services/google_ads_service_client_config.json +31 -0
  142. data/lib/google/ads/googleads/v0/services/google_ads_service_pb.rb +72 -0
  143. data/lib/google/ads/googleads/v0/services/google_ads_service_services_pb.rb +49 -0
  144. data/lib/google/ads/googleads/v0/services/keyword_view_service_client.rb +216 -0
  145. data/lib/google/ads/googleads/v0/services/keyword_view_service_client_config.json +31 -0
  146. data/lib/google/ads/googleads/v0/services/keyword_view_service_pb.rb +24 -0
  147. data/lib/google/ads/googleads/v0/services/keyword_view_service_services_pb.rb +49 -0
  148. data/lib/google/ads/googleads/version.rb +25 -0
  149. data/lib/google/ads/googleads/wrapper_util.rb +48 -0
  150. metadata +248 -0
@@ -0,0 +1,49 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # Source: google/ads/googleads/v0/services/google_ads_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/google_ads_service_pb'
21
+
22
+ module Google
23
+ module Ads
24
+ module Googleads
25
+ module V0
26
+ module Services
27
+ module GoogleAdsService
28
+ # Proto file describing the GoogleAdsService.
29
+ #
30
+ # Service to fetch data and metrics across resources.
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.GoogleAdsService'
38
+
39
+ # Returns all rows that match the search query.
40
+ rpc :Search, SearchGoogleAdsRequest, SearchGoogleAdsResponse
41
+ end
42
+
43
+ Stub = Service.rpc_stub_class
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,216 @@
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/keyword_view_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/keyword_view_service_pb"
28
+ require "google/ads/googleads/v0/services/credentials"
29
+
30
+ module Google
31
+ module Ads
32
+ module Googleads
33
+ module V0
34
+ module Services
35
+ # Service to manage keyword views.
36
+ #
37
+ # @!attribute [r] keyword_view_service_stub
38
+ # @return [Google::Ads::Googleads::V0::Services::KeywordViewService::Stub]
39
+ class KeywordViewServiceClient
40
+ attr_reader :keyword_view_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
+ KEYWORD_VIEW_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
57
+ "customers/{customer}/keywordViews/{keyword_view}"
58
+ )
59
+
60
+ private_constant :KEYWORD_VIEW_PATH_TEMPLATE
61
+
62
+ # Returns a fully-qualified keyword_view resource name string.
63
+ # @param customer [String]
64
+ # @param keyword_view [String]
65
+ # @return [String]
66
+ def self.keyword_view_path customer, keyword_view
67
+ KEYWORD_VIEW_PATH_TEMPLATE.render(
68
+ :"customer" => customer,
69
+ :"keyword_view" => keyword_view
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/keyword_view_service_services_pb"
116
+
117
+ credentials ||= Google::Ads::Googleads::V0::Services::Credentials.default
118
+
119
+ if credentials.is_a?(String) || credentials.is_a?(Hash)
120
+ updater_proc = Google::Ads::Googleads::V0::Services::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
+ "keyword_view_service_client_config.json"
147
+ )
148
+ defaults = client_config_file.open do |f|
149
+ Google::Gax.construct_settings(
150
+ "google.ads.googleads.v0.services.KeywordViewService",
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
+ @keyword_view_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::KeywordViewService::Stub.method(:new)
171
+ )
172
+
173
+ @get_keyword_view = Google::Gax.create_api_call(
174
+ @keyword_view_service_stub.method(:get_keyword_view),
175
+ defaults["get_keyword_view"],
176
+ exception_transformer: exception_transformer
177
+ )
178
+ end
179
+
180
+ # Service calls
181
+
182
+ # Returns the requested keyword view in full detail.
183
+ #
184
+ # @param resource_name [String]
185
+ # The resource name of the keyword view to fetch.
186
+ # @param options [Google::Gax::CallOptions]
187
+ # Overrides the default settings for this call, e.g, timeout,
188
+ # retries, etc.
189
+ # @yield [result, operation] Access the result along with the RPC operation
190
+ # @yieldparam result [Google::Ads::Googleads::V0::Resources::KeywordView]
191
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
192
+ # @return [Google::Ads::Googleads::V0::Resources::KeywordView]
193
+ # @raise [Google::Gax::GaxError] if the RPC is aborted.
194
+ # @example
195
+ # require "google/ads/googleads/v0/services"
196
+ #
197
+ # keyword_view_service_client = Google::Ads::Googleads::V0::Services::KeywordView.new
198
+ # formatted_resource_name = Google::Ads::Googleads::V0::Services::KeywordViewServiceClient.keyword_view_path("[CUSTOMER]", "[KEYWORD_VIEW]")
199
+ # response = keyword_view_service_client.get_keyword_view(formatted_resource_name)
200
+
201
+ def get_keyword_view \
202
+ resource_name,
203
+ options: nil,
204
+ &block
205
+ req = {
206
+ resource_name: resource_name
207
+ }.delete_if { |_, v| v.nil? }
208
+ req = Google::Gax::to_proto(req, Google::Ads::Googleads::V0::Services::GetKeywordViewRequest)
209
+ @get_keyword_view.call(req, options, &block)
210
+ end
211
+ end
212
+ end
213
+ end
214
+ end
215
+ end
216
+ end
@@ -0,0 +1,31 @@
1
+ {
2
+ "interfaces": {
3
+ "google.ads.googleads.v0.services.KeywordViewService": {
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
+ "GetKeywordView": {
24
+ "timeout_millis": 60000,
25
+ "retry_codes_name": "idempotent",
26
+ "retry_params_name": "default"
27
+ }
28
+ }
29
+ }
30
+ }
31
+ }
@@ -0,0 +1,24 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/ads/googleads/v0/services/keyword_view_service.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'google/ads/googleads/v0/resources/keyword_view_pb'
7
+ require 'google/api/annotations_pb'
8
+ Google::Protobuf::DescriptorPool.generated_pool.build do
9
+ add_message "google.ads.googleads.v0.services.GetKeywordViewRequest" do
10
+ optional :resource_name, :string, 1
11
+ end
12
+ end
13
+
14
+ module Google
15
+ module Ads
16
+ module Googleads
17
+ module V0
18
+ module Services
19
+ GetKeywordViewRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.services.GetKeywordViewRequest").msgclass
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,49 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # Source: google/ads/googleads/v0/services/keyword_view_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/keyword_view_service_pb'
21
+
22
+ module Google
23
+ module Ads
24
+ module Googleads
25
+ module V0
26
+ module Services
27
+ module KeywordViewService
28
+ # Proto file describing the Keyword View service.
29
+ #
30
+ # Service to manage keyword views.
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.KeywordViewService'
38
+
39
+ # Returns the requested keyword view in full detail.
40
+ rpc :GetKeywordView, GetKeywordViewRequest, Google::Ads::Googleads::V0::Resources::KeywordView
41
+ end
42
+
43
+ Stub = Service.rpc_stub_class
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,25 @@
1
+ # Encoding: utf-8
2
+ #
3
+ # Copyright 2018 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+ #
17
+ # Module to keep the current library version.
18
+
19
+ module Google
20
+ module Ads
21
+ module Googleads
22
+ CLIENT_LIB_VERSION = '0.1.0'.freeze
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,48 @@
1
+ # Encoding: utf-8
2
+ #
3
+ # Copyright 2018 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+ #
17
+ # A utility to generate wrapped primitive values for use when assigning to
18
+ # API entities.
19
+
20
+ require 'google/protobuf/wrappers_pb'
21
+
22
+ module Google
23
+ module Ads
24
+ module Googleads
25
+ class WrapperUtil
26
+ def self.int32(v)
27
+ Google::Protobuf::Int32Value.new(value: v)
28
+ end
29
+
30
+ def self.int64(v)
31
+ Google::Protobuf::Int64Value.new(value: v)
32
+ end
33
+
34
+ def self.string(v)
35
+ Google::Protobuf::StringValue.new(value: v)
36
+ end
37
+
38
+ def self.bool(v)
39
+ Google::Protobuf::BoolValue.new(value: v)
40
+ end
41
+
42
+ def self.double(v)
43
+ Google::Protobuf::DoubleValue.new(value: v)
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end