google-apis-doubleclickbidmanager_v1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,28 @@
1
+ # Copyright 2020 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
+ # http://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
+ module Google
16
+ module Apis
17
+ module DoubleclickbidmanagerV1
18
+ # Version of the google-apis-doubleclickbidmanager_v1 gem
19
+ GEM_VERSION = "0.1.0"
20
+
21
+ # Version of the code generator used to generate this client
22
+ GENERATOR_VERSION = "0.1.1"
23
+
24
+ # Revision of the discovery document this client was generated from
25
+ REVISION = "20201016"
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,370 @@
1
+ # Copyright 2020 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
+ # http://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
+ require 'date'
16
+ require 'google/apis/core/base_service'
17
+ require 'google/apis/core/json_representation'
18
+ require 'google/apis/core/hashable'
19
+ require 'google/apis/errors'
20
+
21
+ module Google
22
+ module Apis
23
+ module DoubleclickbidmanagerV1
24
+
25
+ class DownloadLineItemsRequest
26
+ class Representation < Google::Apis::Core::JsonRepresentation; end
27
+
28
+ include Google::Apis::Core::JsonObjectSupport
29
+ end
30
+
31
+ class DownloadLineItemsResponse
32
+ class Representation < Google::Apis::Core::JsonRepresentation; end
33
+
34
+ include Google::Apis::Core::JsonObjectSupport
35
+ end
36
+
37
+ class DownloadRequest
38
+ class Representation < Google::Apis::Core::JsonRepresentation; end
39
+
40
+ include Google::Apis::Core::JsonObjectSupport
41
+ end
42
+
43
+ class DownloadResponse
44
+ class Representation < Google::Apis::Core::JsonRepresentation; end
45
+
46
+ include Google::Apis::Core::JsonObjectSupport
47
+ end
48
+
49
+ class FilterPair
50
+ class Representation < Google::Apis::Core::JsonRepresentation; end
51
+
52
+ include Google::Apis::Core::JsonObjectSupport
53
+ end
54
+
55
+ class ListQueriesResponse
56
+ class Representation < Google::Apis::Core::JsonRepresentation; end
57
+
58
+ include Google::Apis::Core::JsonObjectSupport
59
+ end
60
+
61
+ class ListReportsResponse
62
+ class Representation < Google::Apis::Core::JsonRepresentation; end
63
+
64
+ include Google::Apis::Core::JsonObjectSupport
65
+ end
66
+
67
+ class Parameters
68
+ class Representation < Google::Apis::Core::JsonRepresentation; end
69
+
70
+ include Google::Apis::Core::JsonObjectSupport
71
+ end
72
+
73
+ class Query
74
+ class Representation < Google::Apis::Core::JsonRepresentation; end
75
+
76
+ include Google::Apis::Core::JsonObjectSupport
77
+ end
78
+
79
+ class QueryMetadata
80
+ class Representation < Google::Apis::Core::JsonRepresentation; end
81
+
82
+ include Google::Apis::Core::JsonObjectSupport
83
+ end
84
+
85
+ class QuerySchedule
86
+ class Representation < Google::Apis::Core::JsonRepresentation; end
87
+
88
+ include Google::Apis::Core::JsonObjectSupport
89
+ end
90
+
91
+ class Report
92
+ class Representation < Google::Apis::Core::JsonRepresentation; end
93
+
94
+ include Google::Apis::Core::JsonObjectSupport
95
+ end
96
+
97
+ class ReportFailure
98
+ class Representation < Google::Apis::Core::JsonRepresentation; end
99
+
100
+ include Google::Apis::Core::JsonObjectSupport
101
+ end
102
+
103
+ class ReportKey
104
+ class Representation < Google::Apis::Core::JsonRepresentation; end
105
+
106
+ include Google::Apis::Core::JsonObjectSupport
107
+ end
108
+
109
+ class ReportMetadata
110
+ class Representation < Google::Apis::Core::JsonRepresentation; end
111
+
112
+ include Google::Apis::Core::JsonObjectSupport
113
+ end
114
+
115
+ class ReportStatus
116
+ class Representation < Google::Apis::Core::JsonRepresentation; end
117
+
118
+ include Google::Apis::Core::JsonObjectSupport
119
+ end
120
+
121
+ class RowStatus
122
+ class Representation < Google::Apis::Core::JsonRepresentation; end
123
+
124
+ include Google::Apis::Core::JsonObjectSupport
125
+ end
126
+
127
+ class RunQueryRequest
128
+ class Representation < Google::Apis::Core::JsonRepresentation; end
129
+
130
+ include Google::Apis::Core::JsonObjectSupport
131
+ end
132
+
133
+ class UploadLineItemsRequest
134
+ class Representation < Google::Apis::Core::JsonRepresentation; end
135
+
136
+ include Google::Apis::Core::JsonObjectSupport
137
+ end
138
+
139
+ class UploadLineItemsResponse
140
+ class Representation < Google::Apis::Core::JsonRepresentation; end
141
+
142
+ include Google::Apis::Core::JsonObjectSupport
143
+ end
144
+
145
+ class UploadStatus
146
+ class Representation < Google::Apis::Core::JsonRepresentation; end
147
+
148
+ include Google::Apis::Core::JsonObjectSupport
149
+ end
150
+
151
+ class DownloadLineItemsRequest
152
+ # @private
153
+ class Representation < Google::Apis::Core::JsonRepresentation
154
+ property :file_spec, as: 'fileSpec'
155
+ collection :filter_ids, as: 'filterIds'
156
+ property :filter_type, as: 'filterType'
157
+ property :format, as: 'format'
158
+ end
159
+ end
160
+
161
+ class DownloadLineItemsResponse
162
+ # @private
163
+ class Representation < Google::Apis::Core::JsonRepresentation
164
+ property :line_items, as: 'lineItems'
165
+ end
166
+ end
167
+
168
+ class DownloadRequest
169
+ # @private
170
+ class Representation < Google::Apis::Core::JsonRepresentation
171
+ collection :file_types, as: 'fileTypes'
172
+ collection :filter_ids, as: 'filterIds'
173
+ property :filter_type, as: 'filterType'
174
+ property :version, as: 'version'
175
+ end
176
+ end
177
+
178
+ class DownloadResponse
179
+ # @private
180
+ class Representation < Google::Apis::Core::JsonRepresentation
181
+ property :ad_groups, as: 'adGroups'
182
+ property :ads, as: 'ads'
183
+ property :campaigns, as: 'campaigns'
184
+ property :insertion_orders, as: 'insertionOrders'
185
+ property :inventory_sources, as: 'inventorySources'
186
+ property :line_items, as: 'lineItems'
187
+ end
188
+ end
189
+
190
+ class FilterPair
191
+ # @private
192
+ class Representation < Google::Apis::Core::JsonRepresentation
193
+ property :type, as: 'type'
194
+ property :value, as: 'value'
195
+ end
196
+ end
197
+
198
+ class ListQueriesResponse
199
+ # @private
200
+ class Representation < Google::Apis::Core::JsonRepresentation
201
+ property :kind, as: 'kind'
202
+ collection :queries, as: 'queries', class: Google::Apis::DoubleclickbidmanagerV1::Query, decorator: Google::Apis::DoubleclickbidmanagerV1::Query::Representation
203
+
204
+ end
205
+ end
206
+
207
+ class ListReportsResponse
208
+ # @private
209
+ class Representation < Google::Apis::Core::JsonRepresentation
210
+ property :kind, as: 'kind'
211
+ collection :reports, as: 'reports', class: Google::Apis::DoubleclickbidmanagerV1::Report, decorator: Google::Apis::DoubleclickbidmanagerV1::Report::Representation
212
+
213
+ end
214
+ end
215
+
216
+ class Parameters
217
+ # @private
218
+ class Representation < Google::Apis::Core::JsonRepresentation
219
+ collection :filters, as: 'filters', class: Google::Apis::DoubleclickbidmanagerV1::FilterPair, decorator: Google::Apis::DoubleclickbidmanagerV1::FilterPair::Representation
220
+
221
+ collection :group_bys, as: 'groupBys'
222
+ property :include_invite_data, as: 'includeInviteData'
223
+ collection :metrics, as: 'metrics'
224
+ property :type, as: 'type'
225
+ end
226
+ end
227
+
228
+ class Query
229
+ # @private
230
+ class Representation < Google::Apis::Core::JsonRepresentation
231
+ property :kind, as: 'kind'
232
+ property :metadata, as: 'metadata', class: Google::Apis::DoubleclickbidmanagerV1::QueryMetadata, decorator: Google::Apis::DoubleclickbidmanagerV1::QueryMetadata::Representation
233
+
234
+ property :params, as: 'params', class: Google::Apis::DoubleclickbidmanagerV1::Parameters, decorator: Google::Apis::DoubleclickbidmanagerV1::Parameters::Representation
235
+
236
+ property :query_id, :numeric_string => true, as: 'queryId'
237
+ property :report_data_end_time_ms, :numeric_string => true, as: 'reportDataEndTimeMs'
238
+ property :report_data_start_time_ms, :numeric_string => true, as: 'reportDataStartTimeMs'
239
+ property :schedule, as: 'schedule', class: Google::Apis::DoubleclickbidmanagerV1::QuerySchedule, decorator: Google::Apis::DoubleclickbidmanagerV1::QuerySchedule::Representation
240
+
241
+ property :timezone_code, as: 'timezoneCode'
242
+ end
243
+ end
244
+
245
+ class QueryMetadata
246
+ # @private
247
+ class Representation < Google::Apis::Core::JsonRepresentation
248
+ property :data_range, as: 'dataRange'
249
+ property :format, as: 'format'
250
+ property :google_cloud_storage_path_for_latest_report, as: 'googleCloudStoragePathForLatestReport'
251
+ property :google_drive_path_for_latest_report, as: 'googleDrivePathForLatestReport'
252
+ property :latest_report_run_time_ms, :numeric_string => true, as: 'latestReportRunTimeMs'
253
+ property :locale, as: 'locale'
254
+ property :report_count, as: 'reportCount'
255
+ property :running, as: 'running'
256
+ property :send_notification, as: 'sendNotification'
257
+ collection :share_email_address, as: 'shareEmailAddress'
258
+ property :title, as: 'title'
259
+ end
260
+ end
261
+
262
+ class QuerySchedule
263
+ # @private
264
+ class Representation < Google::Apis::Core::JsonRepresentation
265
+ property :end_time_ms, :numeric_string => true, as: 'endTimeMs'
266
+ property :frequency, as: 'frequency'
267
+ property :next_run_minute_of_day, as: 'nextRunMinuteOfDay'
268
+ property :next_run_timezone_code, as: 'nextRunTimezoneCode'
269
+ end
270
+ end
271
+
272
+ class Report
273
+ # @private
274
+ class Representation < Google::Apis::Core::JsonRepresentation
275
+ property :key, as: 'key', class: Google::Apis::DoubleclickbidmanagerV1::ReportKey, decorator: Google::Apis::DoubleclickbidmanagerV1::ReportKey::Representation
276
+
277
+ property :metadata, as: 'metadata', class: Google::Apis::DoubleclickbidmanagerV1::ReportMetadata, decorator: Google::Apis::DoubleclickbidmanagerV1::ReportMetadata::Representation
278
+
279
+ property :params, as: 'params', class: Google::Apis::DoubleclickbidmanagerV1::Parameters, decorator: Google::Apis::DoubleclickbidmanagerV1::Parameters::Representation
280
+
281
+ end
282
+ end
283
+
284
+ class ReportFailure
285
+ # @private
286
+ class Representation < Google::Apis::Core::JsonRepresentation
287
+ property :error_code, as: 'errorCode'
288
+ end
289
+ end
290
+
291
+ class ReportKey
292
+ # @private
293
+ class Representation < Google::Apis::Core::JsonRepresentation
294
+ property :query_id, :numeric_string => true, as: 'queryId'
295
+ property :report_id, :numeric_string => true, as: 'reportId'
296
+ end
297
+ end
298
+
299
+ class ReportMetadata
300
+ # @private
301
+ class Representation < Google::Apis::Core::JsonRepresentation
302
+ property :google_cloud_storage_path, as: 'googleCloudStoragePath'
303
+ property :report_data_end_time_ms, :numeric_string => true, as: 'reportDataEndTimeMs'
304
+ property :report_data_start_time_ms, :numeric_string => true, as: 'reportDataStartTimeMs'
305
+ property :status, as: 'status', class: Google::Apis::DoubleclickbidmanagerV1::ReportStatus, decorator: Google::Apis::DoubleclickbidmanagerV1::ReportStatus::Representation
306
+
307
+ end
308
+ end
309
+
310
+ class ReportStatus
311
+ # @private
312
+ class Representation < Google::Apis::Core::JsonRepresentation
313
+ property :failure, as: 'failure', class: Google::Apis::DoubleclickbidmanagerV1::ReportFailure, decorator: Google::Apis::DoubleclickbidmanagerV1::ReportFailure::Representation
314
+
315
+ property :finish_time_ms, :numeric_string => true, as: 'finishTimeMs'
316
+ property :format, as: 'format'
317
+ property :state, as: 'state'
318
+ end
319
+ end
320
+
321
+ class RowStatus
322
+ # @private
323
+ class Representation < Google::Apis::Core::JsonRepresentation
324
+ property :changed, as: 'changed'
325
+ property :entity_id, :numeric_string => true, as: 'entityId'
326
+ property :entity_name, as: 'entityName'
327
+ collection :errors, as: 'errors'
328
+ property :persisted, as: 'persisted'
329
+ property :row_number, as: 'rowNumber'
330
+ end
331
+ end
332
+
333
+ class RunQueryRequest
334
+ # @private
335
+ class Representation < Google::Apis::Core::JsonRepresentation
336
+ property :data_range, as: 'dataRange'
337
+ property :report_data_end_time_ms, :numeric_string => true, as: 'reportDataEndTimeMs'
338
+ property :report_data_start_time_ms, :numeric_string => true, as: 'reportDataStartTimeMs'
339
+ property :timezone_code, as: 'timezoneCode'
340
+ end
341
+ end
342
+
343
+ class UploadLineItemsRequest
344
+ # @private
345
+ class Representation < Google::Apis::Core::JsonRepresentation
346
+ property :dry_run, as: 'dryRun'
347
+ property :format, as: 'format'
348
+ property :line_items, as: 'lineItems'
349
+ end
350
+ end
351
+
352
+ class UploadLineItemsResponse
353
+ # @private
354
+ class Representation < Google::Apis::Core::JsonRepresentation
355
+ property :upload_status, as: 'uploadStatus', class: Google::Apis::DoubleclickbidmanagerV1::UploadStatus, decorator: Google::Apis::DoubleclickbidmanagerV1::UploadStatus::Representation
356
+
357
+ end
358
+ end
359
+
360
+ class UploadStatus
361
+ # @private
362
+ class Representation < Google::Apis::Core::JsonRepresentation
363
+ collection :errors, as: 'errors'
364
+ collection :row_status, as: 'rowStatus', class: Google::Apis::DoubleclickbidmanagerV1::RowStatus, decorator: Google::Apis::DoubleclickbidmanagerV1::RowStatus::Representation
365
+
366
+ end
367
+ end
368
+ end
369
+ end
370
+ end
@@ -0,0 +1,330 @@
1
+ # Copyright 2020 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
+ # http://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
+ require 'google/apis/core/base_service'
16
+ require 'google/apis/core/json_representation'
17
+ require 'google/apis/core/hashable'
18
+ require 'google/apis/errors'
19
+
20
+ module Google
21
+ module Apis
22
+ module DoubleclickbidmanagerV1
23
+ # DoubleClick Bid Manager API
24
+ #
25
+ # DoubleClick Bid Manager API allows users to manage and create campaigns and
26
+ # reports.
27
+ #
28
+ # @example
29
+ # require 'google/apis/doubleclickbidmanager_v1'
30
+ #
31
+ # Doubleclickbidmanager = Google::Apis::DoubleclickbidmanagerV1 # Alias the module
32
+ # service = Doubleclickbidmanager::DoubleClickBidManagerService.new
33
+ #
34
+ # @see https://developers.google.com/bid-manager/
35
+ class DoubleClickBidManagerService < Google::Apis::Core::BaseService
36
+ # @return [String]
37
+ # API key. Your API key identifies your project and provides you with API access,
38
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
39
+ attr_accessor :key
40
+
41
+ # @return [String]
42
+ # Available to use for quota purposes for server-side applications. Can be any
43
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
44
+ attr_accessor :quota_user
45
+
46
+ def initialize
47
+ super('https://doubleclickbidmanager.googleapis.com/', 'doubleclickbidmanager/v1/',
48
+ client_name: 'google-apis-doubleclickbidmanager_v1',
49
+ client_version: Google::Apis::DoubleclickbidmanagerV1::GEM_VERSION)
50
+ @batch_path = 'batch'
51
+ end
52
+
53
+ # Retrieves line items in CSV format. YouTube & partners line items are not
54
+ # supported.
55
+ # @param [Google::Apis::DoubleclickbidmanagerV1::DownloadLineItemsRequest] download_line_items_request_object
56
+ # @param [String] fields
57
+ # Selector specifying which fields to include in a partial response.
58
+ # @param [String] quota_user
59
+ # Available to use for quota purposes for server-side applications. Can be any
60
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
61
+ # @param [Google::Apis::RequestOptions] options
62
+ # Request-specific options
63
+ #
64
+ # @yield [result, err] Result & error if block supplied
65
+ # @yieldparam result [Google::Apis::DoubleclickbidmanagerV1::DownloadLineItemsResponse] parsed result object
66
+ # @yieldparam err [StandardError] error object if request failed
67
+ #
68
+ # @return [Google::Apis::DoubleclickbidmanagerV1::DownloadLineItemsResponse]
69
+ #
70
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
71
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
72
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
73
+ def download_line_items(download_line_items_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
74
+ command = make_simple_command(:post, 'lineitems/downloadlineitems', options)
75
+ command.request_representation = Google::Apis::DoubleclickbidmanagerV1::DownloadLineItemsRequest::Representation
76
+ command.request_object = download_line_items_request_object
77
+ command.response_representation = Google::Apis::DoubleclickbidmanagerV1::DownloadLineItemsResponse::Representation
78
+ command.response_class = Google::Apis::DoubleclickbidmanagerV1::DownloadLineItemsResponse
79
+ command.query['fields'] = fields unless fields.nil?
80
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
81
+ execute_or_queue_command(command, &block)
82
+ end
83
+
84
+ # Uploads line items in CSV format. YouTube & partners line items are not
85
+ # supported.
86
+ # @param [Google::Apis::DoubleclickbidmanagerV1::UploadLineItemsRequest] upload_line_items_request_object
87
+ # @param [String] fields
88
+ # Selector specifying which fields to include in a partial response.
89
+ # @param [String] quota_user
90
+ # Available to use for quota purposes for server-side applications. Can be any
91
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
92
+ # @param [Google::Apis::RequestOptions] options
93
+ # Request-specific options
94
+ #
95
+ # @yield [result, err] Result & error if block supplied
96
+ # @yieldparam result [Google::Apis::DoubleclickbidmanagerV1::UploadLineItemsResponse] parsed result object
97
+ # @yieldparam err [StandardError] error object if request failed
98
+ #
99
+ # @return [Google::Apis::DoubleclickbidmanagerV1::UploadLineItemsResponse]
100
+ #
101
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
102
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
103
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
104
+ def upload_line_items(upload_line_items_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
105
+ command = make_simple_command(:post, 'lineitems/uploadlineitems', options)
106
+ command.request_representation = Google::Apis::DoubleclickbidmanagerV1::UploadLineItemsRequest::Representation
107
+ command.request_object = upload_line_items_request_object
108
+ command.response_representation = Google::Apis::DoubleclickbidmanagerV1::UploadLineItemsResponse::Representation
109
+ command.response_class = Google::Apis::DoubleclickbidmanagerV1::UploadLineItemsResponse
110
+ command.query['fields'] = fields unless fields.nil?
111
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
112
+ execute_or_queue_command(command, &block)
113
+ end
114
+
115
+ # Creates a query.
116
+ # @param [Google::Apis::DoubleclickbidmanagerV1::Query] query_object
117
+ # @param [String] fields
118
+ # Selector specifying which fields to include in a partial response.
119
+ # @param [String] quota_user
120
+ # Available to use for quota purposes for server-side applications. Can be any
121
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
122
+ # @param [Google::Apis::RequestOptions] options
123
+ # Request-specific options
124
+ #
125
+ # @yield [result, err] Result & error if block supplied
126
+ # @yieldparam result [Google::Apis::DoubleclickbidmanagerV1::Query] parsed result object
127
+ # @yieldparam err [StandardError] error object if request failed
128
+ #
129
+ # @return [Google::Apis::DoubleclickbidmanagerV1::Query]
130
+ #
131
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
132
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
133
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
134
+ def create_query(query_object = nil, fields: nil, quota_user: nil, options: nil, &block)
135
+ command = make_simple_command(:post, 'query', options)
136
+ command.request_representation = Google::Apis::DoubleclickbidmanagerV1::Query::Representation
137
+ command.request_object = query_object
138
+ command.response_representation = Google::Apis::DoubleclickbidmanagerV1::Query::Representation
139
+ command.response_class = Google::Apis::DoubleclickbidmanagerV1::Query
140
+ command.query['fields'] = fields unless fields.nil?
141
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
142
+ execute_or_queue_command(command, &block)
143
+ end
144
+
145
+ # Deletes a stored query as well as the associated stored reports.
146
+ # @param [Fixnum] query_id
147
+ # Query ID to delete.
148
+ # @param [String] fields
149
+ # Selector specifying which fields to include in a partial response.
150
+ # @param [String] quota_user
151
+ # Available to use for quota purposes for server-side applications. Can be any
152
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
153
+ # @param [Google::Apis::RequestOptions] options
154
+ # Request-specific options
155
+ #
156
+ # @yield [result, err] Result & error if block supplied
157
+ # @yieldparam result [NilClass] No result returned for this method
158
+ # @yieldparam err [StandardError] error object if request failed
159
+ #
160
+ # @return [void]
161
+ #
162
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
163
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
164
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
165
+ def deletequery(query_id, fields: nil, quota_user: nil, options: nil, &block)
166
+ command = make_simple_command(:delete, 'query/{queryId}', options)
167
+ command.params['queryId'] = query_id unless query_id.nil?
168
+ command.query['fields'] = fields unless fields.nil?
169
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
170
+ execute_or_queue_command(command, &block)
171
+ end
172
+
173
+ # Retrieves a stored query.
174
+ # @param [Fixnum] query_id
175
+ # Query ID to retrieve.
176
+ # @param [String] fields
177
+ # Selector specifying which fields to include in a partial response.
178
+ # @param [String] quota_user
179
+ # Available to use for quota purposes for server-side applications. Can be any
180
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
181
+ # @param [Google::Apis::RequestOptions] options
182
+ # Request-specific options
183
+ #
184
+ # @yield [result, err] Result & error if block supplied
185
+ # @yieldparam result [Google::Apis::DoubleclickbidmanagerV1::Query] parsed result object
186
+ # @yieldparam err [StandardError] error object if request failed
187
+ #
188
+ # @return [Google::Apis::DoubleclickbidmanagerV1::Query]
189
+ #
190
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
191
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
192
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
193
+ def get_query(query_id, fields: nil, quota_user: nil, options: nil, &block)
194
+ command = make_simple_command(:get, 'query/{queryId}', options)
195
+ command.response_representation = Google::Apis::DoubleclickbidmanagerV1::Query::Representation
196
+ command.response_class = Google::Apis::DoubleclickbidmanagerV1::Query
197
+ command.params['queryId'] = query_id unless query_id.nil?
198
+ command.query['fields'] = fields unless fields.nil?
199
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
200
+ execute_or_queue_command(command, &block)
201
+ end
202
+
203
+ # Retrieves stored queries.
204
+ # @param [String] fields
205
+ # Selector specifying which fields to include in a partial response.
206
+ # @param [String] quota_user
207
+ # Available to use for quota purposes for server-side applications. Can be any
208
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
209
+ # @param [Google::Apis::RequestOptions] options
210
+ # Request-specific options
211
+ #
212
+ # @yield [result, err] Result & error if block supplied
213
+ # @yieldparam result [Google::Apis::DoubleclickbidmanagerV1::ListQueriesResponse] parsed result object
214
+ # @yieldparam err [StandardError] error object if request failed
215
+ #
216
+ # @return [Google::Apis::DoubleclickbidmanagerV1::ListQueriesResponse]
217
+ #
218
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
219
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
220
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
221
+ def list_queries(fields: nil, quota_user: nil, options: nil, &block)
222
+ command = make_simple_command(:get, 'queries', options)
223
+ command.response_representation = Google::Apis::DoubleclickbidmanagerV1::ListQueriesResponse::Representation
224
+ command.response_class = Google::Apis::DoubleclickbidmanagerV1::ListQueriesResponse
225
+ command.query['fields'] = fields unless fields.nil?
226
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
227
+ execute_or_queue_command(command, &block)
228
+ end
229
+
230
+ # Runs a stored query to generate a report.
231
+ # @param [Fixnum] query_id
232
+ # Query ID to run.
233
+ # @param [Google::Apis::DoubleclickbidmanagerV1::RunQueryRequest] run_query_request_object
234
+ # @param [String] fields
235
+ # Selector specifying which fields to include in a partial response.
236
+ # @param [String] quota_user
237
+ # Available to use for quota purposes for server-side applications. Can be any
238
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
239
+ # @param [Google::Apis::RequestOptions] options
240
+ # Request-specific options
241
+ #
242
+ # @yield [result, err] Result & error if block supplied
243
+ # @yieldparam result [NilClass] No result returned for this method
244
+ # @yieldparam err [StandardError] error object if request failed
245
+ #
246
+ # @return [void]
247
+ #
248
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
249
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
250
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
251
+ def run_query(query_id, run_query_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
252
+ command = make_simple_command(:post, 'query/{queryId}', options)
253
+ command.request_representation = Google::Apis::DoubleclickbidmanagerV1::RunQueryRequest::Representation
254
+ command.request_object = run_query_request_object
255
+ command.params['queryId'] = query_id unless query_id.nil?
256
+ command.query['fields'] = fields unless fields.nil?
257
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
258
+ execute_or_queue_command(command, &block)
259
+ end
260
+
261
+ # Retrieves stored reports.
262
+ # @param [Fixnum] query_id
263
+ # Query ID with which the reports are associated.
264
+ # @param [String] fields
265
+ # Selector specifying which fields to include in a partial response.
266
+ # @param [String] quota_user
267
+ # Available to use for quota purposes for server-side applications. Can be any
268
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
269
+ # @param [Google::Apis::RequestOptions] options
270
+ # Request-specific options
271
+ #
272
+ # @yield [result, err] Result & error if block supplied
273
+ # @yieldparam result [Google::Apis::DoubleclickbidmanagerV1::ListReportsResponse] parsed result object
274
+ # @yieldparam err [StandardError] error object if request failed
275
+ #
276
+ # @return [Google::Apis::DoubleclickbidmanagerV1::ListReportsResponse]
277
+ #
278
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
279
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
280
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
281
+ def list_reports(query_id, fields: nil, quota_user: nil, options: nil, &block)
282
+ command = make_simple_command(:get, 'queries/{queryId}/reports', options)
283
+ command.response_representation = Google::Apis::DoubleclickbidmanagerV1::ListReportsResponse::Representation
284
+ command.response_class = Google::Apis::DoubleclickbidmanagerV1::ListReportsResponse
285
+ command.params['queryId'] = query_id unless query_id.nil?
286
+ command.query['fields'] = fields unless fields.nil?
287
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
288
+ execute_or_queue_command(command, &block)
289
+ end
290
+
291
+ # Retrieves entities in SDF format.
292
+ # @param [Google::Apis::DoubleclickbidmanagerV1::DownloadRequest] download_request_object
293
+ # @param [String] fields
294
+ # Selector specifying which fields to include in a partial response.
295
+ # @param [String] quota_user
296
+ # Available to use for quota purposes for server-side applications. Can be any
297
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
298
+ # @param [Google::Apis::RequestOptions] options
299
+ # Request-specific options
300
+ #
301
+ # @yield [result, err] Result & error if block supplied
302
+ # @yieldparam result [Google::Apis::DoubleclickbidmanagerV1::DownloadResponse] parsed result object
303
+ # @yieldparam err [StandardError] error object if request failed
304
+ #
305
+ # @return [Google::Apis::DoubleclickbidmanagerV1::DownloadResponse]
306
+ #
307
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
308
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
309
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
310
+ def download_sdf(download_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
311
+ command = make_simple_command(:post, 'sdf/download', options)
312
+ command.request_representation = Google::Apis::DoubleclickbidmanagerV1::DownloadRequest::Representation
313
+ command.request_object = download_request_object
314
+ command.response_representation = Google::Apis::DoubleclickbidmanagerV1::DownloadResponse::Representation
315
+ command.response_class = Google::Apis::DoubleclickbidmanagerV1::DownloadResponse
316
+ command.query['fields'] = fields unless fields.nil?
317
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
318
+ execute_or_queue_command(command, &block)
319
+ end
320
+
321
+ protected
322
+
323
+ def apply_command_defaults(command)
324
+ command.query['key'] = key unless key.nil?
325
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
326
+ end
327
+ end
328
+ end
329
+ end
330
+ end