google-apis-tagmanager_v1 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1822 @@
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 TagmanagerV1
23
+ # Tag Manager API
24
+ #
25
+ # This API allows clients to access and modify container and tag configuration.
26
+ #
27
+ # @example
28
+ # require 'google/apis/tagmanager_v1'
29
+ #
30
+ # Tagmanager = Google::Apis::TagmanagerV1 # Alias the module
31
+ # service = Tagmanager::TagManagerService.new
32
+ #
33
+ # @see https://developers.google.com/tag-manager
34
+ class TagManagerService < Google::Apis::Core::BaseService
35
+ # @return [String]
36
+ # API key. Your API key identifies your project and provides you with API access,
37
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
38
+ attr_accessor :key
39
+
40
+ # @return [String]
41
+ # Available to use for quota purposes for server-side applications. Can be any
42
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
43
+ attr_accessor :quota_user
44
+
45
+ def initialize
46
+ super('https://tagmanager.googleapis.com/', '',
47
+ client_name: 'google-apis-tagmanager_v1',
48
+ client_version: Google::Apis::TagmanagerV1::GEM_VERSION)
49
+ @batch_path = 'batch'
50
+ end
51
+
52
+ # Gets a GTM Account.
53
+ # @param [String] account_id
54
+ # The GTM Account ID.
55
+ # @param [String] fields
56
+ # Selector specifying which fields to include in a partial response.
57
+ # @param [String] quota_user
58
+ # Available to use for quota purposes for server-side applications. Can be any
59
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
60
+ # @param [Google::Apis::RequestOptions] options
61
+ # Request-specific options
62
+ #
63
+ # @yield [result, err] Result & error if block supplied
64
+ # @yieldparam result [Google::Apis::TagmanagerV1::Account] parsed result object
65
+ # @yieldparam err [StandardError] error object if request failed
66
+ #
67
+ # @return [Google::Apis::TagmanagerV1::Account]
68
+ #
69
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
70
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
71
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
72
+ def get_account(account_id, fields: nil, quota_user: nil, options: nil, &block)
73
+ command = make_simple_command(:get, 'tagmanager/v1/accounts/{accountId}', options)
74
+ command.response_representation = Google::Apis::TagmanagerV1::Account::Representation
75
+ command.response_class = Google::Apis::TagmanagerV1::Account
76
+ command.params['accountId'] = account_id unless account_id.nil?
77
+ command.query['fields'] = fields unless fields.nil?
78
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
79
+ execute_or_queue_command(command, &block)
80
+ end
81
+
82
+ # Lists all GTM Accounts that a user has access to.
83
+ # @param [String] fields
84
+ # Selector specifying which fields to include in a partial response.
85
+ # @param [String] quota_user
86
+ # Available to use for quota purposes for server-side applications. Can be any
87
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
88
+ # @param [Google::Apis::RequestOptions] options
89
+ # Request-specific options
90
+ #
91
+ # @yield [result, err] Result & error if block supplied
92
+ # @yieldparam result [Google::Apis::TagmanagerV1::ListAccountsResponse] parsed result object
93
+ # @yieldparam err [StandardError] error object if request failed
94
+ #
95
+ # @return [Google::Apis::TagmanagerV1::ListAccountsResponse]
96
+ #
97
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
98
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
99
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
100
+ def list_accounts(fields: nil, quota_user: nil, options: nil, &block)
101
+ command = make_simple_command(:get, 'tagmanager/v1/accounts', options)
102
+ command.response_representation = Google::Apis::TagmanagerV1::ListAccountsResponse::Representation
103
+ command.response_class = Google::Apis::TagmanagerV1::ListAccountsResponse
104
+ command.query['fields'] = fields unless fields.nil?
105
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
106
+ execute_or_queue_command(command, &block)
107
+ end
108
+
109
+ # Updates a GTM Account.
110
+ # @param [String] account_id
111
+ # The GTM Account ID.
112
+ # @param [Google::Apis::TagmanagerV1::Account] account_object
113
+ # @param [String] fingerprint
114
+ # When provided, this fingerprint must match the fingerprint of the account in
115
+ # storage.
116
+ # @param [String] fields
117
+ # Selector specifying which fields to include in a partial response.
118
+ # @param [String] quota_user
119
+ # Available to use for quota purposes for server-side applications. Can be any
120
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
121
+ # @param [Google::Apis::RequestOptions] options
122
+ # Request-specific options
123
+ #
124
+ # @yield [result, err] Result & error if block supplied
125
+ # @yieldparam result [Google::Apis::TagmanagerV1::Account] parsed result object
126
+ # @yieldparam err [StandardError] error object if request failed
127
+ #
128
+ # @return [Google::Apis::TagmanagerV1::Account]
129
+ #
130
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
131
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
132
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
133
+ def update_account(account_id, account_object = nil, fingerprint: nil, fields: nil, quota_user: nil, options: nil, &block)
134
+ command = make_simple_command(:put, 'tagmanager/v1/accounts/{accountId}', options)
135
+ command.request_representation = Google::Apis::TagmanagerV1::Account::Representation
136
+ command.request_object = account_object
137
+ command.response_representation = Google::Apis::TagmanagerV1::Account::Representation
138
+ command.response_class = Google::Apis::TagmanagerV1::Account
139
+ command.params['accountId'] = account_id unless account_id.nil?
140
+ command.query['fingerprint'] = fingerprint unless fingerprint.nil?
141
+ command.query['fields'] = fields unless fields.nil?
142
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
143
+ execute_or_queue_command(command, &block)
144
+ end
145
+
146
+ # Creates a Container.
147
+ # @param [String] account_id
148
+ # The GTM Account ID.
149
+ # @param [Google::Apis::TagmanagerV1::Container] container_object
150
+ # @param [String] fields
151
+ # Selector specifying which fields to include in a partial response.
152
+ # @param [String] quota_user
153
+ # Available to use for quota purposes for server-side applications. Can be any
154
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
155
+ # @param [Google::Apis::RequestOptions] options
156
+ # Request-specific options
157
+ #
158
+ # @yield [result, err] Result & error if block supplied
159
+ # @yieldparam result [Google::Apis::TagmanagerV1::Container] parsed result object
160
+ # @yieldparam err [StandardError] error object if request failed
161
+ #
162
+ # @return [Google::Apis::TagmanagerV1::Container]
163
+ #
164
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
165
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
166
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
167
+ def create_container(account_id, container_object = nil, fields: nil, quota_user: nil, options: nil, &block)
168
+ command = make_simple_command(:post, 'tagmanager/v1/accounts/{accountId}/containers', options)
169
+ command.request_representation = Google::Apis::TagmanagerV1::Container::Representation
170
+ command.request_object = container_object
171
+ command.response_representation = Google::Apis::TagmanagerV1::Container::Representation
172
+ command.response_class = Google::Apis::TagmanagerV1::Container
173
+ command.params['accountId'] = account_id unless account_id.nil?
174
+ command.query['fields'] = fields unless fields.nil?
175
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
176
+ execute_or_queue_command(command, &block)
177
+ end
178
+
179
+ # Deletes a Container.
180
+ # @param [String] account_id
181
+ # The GTM Account ID.
182
+ # @param [String] container_id
183
+ # The GTM Container ID.
184
+ # @param [String] fields
185
+ # Selector specifying which fields to include in a partial response.
186
+ # @param [String] quota_user
187
+ # Available to use for quota purposes for server-side applications. Can be any
188
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
189
+ # @param [Google::Apis::RequestOptions] options
190
+ # Request-specific options
191
+ #
192
+ # @yield [result, err] Result & error if block supplied
193
+ # @yieldparam result [NilClass] No result returned for this method
194
+ # @yieldparam err [StandardError] error object if request failed
195
+ #
196
+ # @return [void]
197
+ #
198
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
199
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
200
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
201
+ def delete_container(account_id, container_id, fields: nil, quota_user: nil, options: nil, &block)
202
+ command = make_simple_command(:delete, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}', options)
203
+ command.params['accountId'] = account_id unless account_id.nil?
204
+ command.params['containerId'] = container_id unless container_id.nil?
205
+ command.query['fields'] = fields unless fields.nil?
206
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
207
+ execute_or_queue_command(command, &block)
208
+ end
209
+
210
+ # Gets a Container.
211
+ # @param [String] account_id
212
+ # The GTM Account ID.
213
+ # @param [String] container_id
214
+ # The GTM Container ID.
215
+ # @param [String] fields
216
+ # Selector specifying which fields to include in a partial response.
217
+ # @param [String] quota_user
218
+ # Available to use for quota purposes for server-side applications. Can be any
219
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
220
+ # @param [Google::Apis::RequestOptions] options
221
+ # Request-specific options
222
+ #
223
+ # @yield [result, err] Result & error if block supplied
224
+ # @yieldparam result [Google::Apis::TagmanagerV1::Container] parsed result object
225
+ # @yieldparam err [StandardError] error object if request failed
226
+ #
227
+ # @return [Google::Apis::TagmanagerV1::Container]
228
+ #
229
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
230
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
231
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
232
+ def get_container(account_id, container_id, fields: nil, quota_user: nil, options: nil, &block)
233
+ command = make_simple_command(:get, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}', options)
234
+ command.response_representation = Google::Apis::TagmanagerV1::Container::Representation
235
+ command.response_class = Google::Apis::TagmanagerV1::Container
236
+ command.params['accountId'] = account_id unless account_id.nil?
237
+ command.params['containerId'] = container_id unless container_id.nil?
238
+ command.query['fields'] = fields unless fields.nil?
239
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
240
+ execute_or_queue_command(command, &block)
241
+ end
242
+
243
+ # Lists all Containers that belongs to a GTM Account.
244
+ # @param [String] account_id
245
+ # The GTM Account ID.
246
+ # @param [String] fields
247
+ # Selector specifying which fields to include in a partial response.
248
+ # @param [String] quota_user
249
+ # Available to use for quota purposes for server-side applications. Can be any
250
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
251
+ # @param [Google::Apis::RequestOptions] options
252
+ # Request-specific options
253
+ #
254
+ # @yield [result, err] Result & error if block supplied
255
+ # @yieldparam result [Google::Apis::TagmanagerV1::ListContainersResponse] parsed result object
256
+ # @yieldparam err [StandardError] error object if request failed
257
+ #
258
+ # @return [Google::Apis::TagmanagerV1::ListContainersResponse]
259
+ #
260
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
261
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
262
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
263
+ def list_containers(account_id, fields: nil, quota_user: nil, options: nil, &block)
264
+ command = make_simple_command(:get, 'tagmanager/v1/accounts/{accountId}/containers', options)
265
+ command.response_representation = Google::Apis::TagmanagerV1::ListContainersResponse::Representation
266
+ command.response_class = Google::Apis::TagmanagerV1::ListContainersResponse
267
+ command.params['accountId'] = account_id unless account_id.nil?
268
+ command.query['fields'] = fields unless fields.nil?
269
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
270
+ execute_or_queue_command(command, &block)
271
+ end
272
+
273
+ # Updates a Container.
274
+ # @param [String] account_id
275
+ # The GTM Account ID.
276
+ # @param [String] container_id
277
+ # The GTM Container ID.
278
+ # @param [Google::Apis::TagmanagerV1::Container] container_object
279
+ # @param [String] fingerprint
280
+ # When provided, this fingerprint must match the fingerprint of the container in
281
+ # storage.
282
+ # @param [String] fields
283
+ # Selector specifying which fields to include in a partial response.
284
+ # @param [String] quota_user
285
+ # Available to use for quota purposes for server-side applications. Can be any
286
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
287
+ # @param [Google::Apis::RequestOptions] options
288
+ # Request-specific options
289
+ #
290
+ # @yield [result, err] Result & error if block supplied
291
+ # @yieldparam result [Google::Apis::TagmanagerV1::Container] parsed result object
292
+ # @yieldparam err [StandardError] error object if request failed
293
+ #
294
+ # @return [Google::Apis::TagmanagerV1::Container]
295
+ #
296
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
297
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
298
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
299
+ def update_container(account_id, container_id, container_object = nil, fingerprint: nil, fields: nil, quota_user: nil, options: nil, &block)
300
+ command = make_simple_command(:put, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}', options)
301
+ command.request_representation = Google::Apis::TagmanagerV1::Container::Representation
302
+ command.request_object = container_object
303
+ command.response_representation = Google::Apis::TagmanagerV1::Container::Representation
304
+ command.response_class = Google::Apis::TagmanagerV1::Container
305
+ command.params['accountId'] = account_id unless account_id.nil?
306
+ command.params['containerId'] = container_id unless container_id.nil?
307
+ command.query['fingerprint'] = fingerprint unless fingerprint.nil?
308
+ command.query['fields'] = fields unless fields.nil?
309
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
310
+ execute_or_queue_command(command, &block)
311
+ end
312
+
313
+ # Creates a GTM Environment.
314
+ # @param [String] account_id
315
+ # The GTM Account ID.
316
+ # @param [String] container_id
317
+ # The GTM Container ID.
318
+ # @param [Google::Apis::TagmanagerV1::Environment] environment_object
319
+ # @param [String] fields
320
+ # Selector specifying which fields to include in a partial response.
321
+ # @param [String] quota_user
322
+ # Available to use for quota purposes for server-side applications. Can be any
323
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
324
+ # @param [Google::Apis::RequestOptions] options
325
+ # Request-specific options
326
+ #
327
+ # @yield [result, err] Result & error if block supplied
328
+ # @yieldparam result [Google::Apis::TagmanagerV1::Environment] parsed result object
329
+ # @yieldparam err [StandardError] error object if request failed
330
+ #
331
+ # @return [Google::Apis::TagmanagerV1::Environment]
332
+ #
333
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
334
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
335
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
336
+ def create_account_container_environment(account_id, container_id, environment_object = nil, fields: nil, quota_user: nil, options: nil, &block)
337
+ command = make_simple_command(:post, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/environments', options)
338
+ command.request_representation = Google::Apis::TagmanagerV1::Environment::Representation
339
+ command.request_object = environment_object
340
+ command.response_representation = Google::Apis::TagmanagerV1::Environment::Representation
341
+ command.response_class = Google::Apis::TagmanagerV1::Environment
342
+ command.params['accountId'] = account_id unless account_id.nil?
343
+ command.params['containerId'] = container_id unless container_id.nil?
344
+ command.query['fields'] = fields unless fields.nil?
345
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
346
+ execute_or_queue_command(command, &block)
347
+ end
348
+
349
+ # Deletes a GTM Environment.
350
+ # @param [String] account_id
351
+ # The GTM Account ID.
352
+ # @param [String] container_id
353
+ # The GTM Container ID.
354
+ # @param [String] environment_id
355
+ # The GTM Environment ID.
356
+ # @param [String] fields
357
+ # Selector specifying which fields to include in a partial response.
358
+ # @param [String] quota_user
359
+ # Available to use for quota purposes for server-side applications. Can be any
360
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
361
+ # @param [Google::Apis::RequestOptions] options
362
+ # Request-specific options
363
+ #
364
+ # @yield [result, err] Result & error if block supplied
365
+ # @yieldparam result [NilClass] No result returned for this method
366
+ # @yieldparam err [StandardError] error object if request failed
367
+ #
368
+ # @return [void]
369
+ #
370
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
371
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
372
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
373
+ def delete_account_container_environment(account_id, container_id, environment_id, fields: nil, quota_user: nil, options: nil, &block)
374
+ command = make_simple_command(:delete, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/environments/{environmentId}', options)
375
+ command.params['accountId'] = account_id unless account_id.nil?
376
+ command.params['containerId'] = container_id unless container_id.nil?
377
+ command.params['environmentId'] = environment_id unless environment_id.nil?
378
+ command.query['fields'] = fields unless fields.nil?
379
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
380
+ execute_or_queue_command(command, &block)
381
+ end
382
+
383
+ # Gets a GTM Environment.
384
+ # @param [String] account_id
385
+ # The GTM Account ID.
386
+ # @param [String] container_id
387
+ # The GTM Container ID.
388
+ # @param [String] environment_id
389
+ # The GTM Environment ID.
390
+ # @param [String] fields
391
+ # Selector specifying which fields to include in a partial response.
392
+ # @param [String] quota_user
393
+ # Available to use for quota purposes for server-side applications. Can be any
394
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
395
+ # @param [Google::Apis::RequestOptions] options
396
+ # Request-specific options
397
+ #
398
+ # @yield [result, err] Result & error if block supplied
399
+ # @yieldparam result [Google::Apis::TagmanagerV1::Environment] parsed result object
400
+ # @yieldparam err [StandardError] error object if request failed
401
+ #
402
+ # @return [Google::Apis::TagmanagerV1::Environment]
403
+ #
404
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
405
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
406
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
407
+ def get_account_container_environment(account_id, container_id, environment_id, fields: nil, quota_user: nil, options: nil, &block)
408
+ command = make_simple_command(:get, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/environments/{environmentId}', options)
409
+ command.response_representation = Google::Apis::TagmanagerV1::Environment::Representation
410
+ command.response_class = Google::Apis::TagmanagerV1::Environment
411
+ command.params['accountId'] = account_id unless account_id.nil?
412
+ command.params['containerId'] = container_id unless container_id.nil?
413
+ command.params['environmentId'] = environment_id unless environment_id.nil?
414
+ command.query['fields'] = fields unless fields.nil?
415
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
416
+ execute_or_queue_command(command, &block)
417
+ end
418
+
419
+ # Lists all GTM Environments of a GTM Container.
420
+ # @param [String] account_id
421
+ # The GTM Account ID.
422
+ # @param [String] container_id
423
+ # The GTM Container ID.
424
+ # @param [String] fields
425
+ # Selector specifying which fields to include in a partial response.
426
+ # @param [String] quota_user
427
+ # Available to use for quota purposes for server-side applications. Can be any
428
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
429
+ # @param [Google::Apis::RequestOptions] options
430
+ # Request-specific options
431
+ #
432
+ # @yield [result, err] Result & error if block supplied
433
+ # @yieldparam result [Google::Apis::TagmanagerV1::ListEnvironmentsResponse] parsed result object
434
+ # @yieldparam err [StandardError] error object if request failed
435
+ #
436
+ # @return [Google::Apis::TagmanagerV1::ListEnvironmentsResponse]
437
+ #
438
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
439
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
440
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
441
+ def list_account_container_environments(account_id, container_id, fields: nil, quota_user: nil, options: nil, &block)
442
+ command = make_simple_command(:get, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/environments', options)
443
+ command.response_representation = Google::Apis::TagmanagerV1::ListEnvironmentsResponse::Representation
444
+ command.response_class = Google::Apis::TagmanagerV1::ListEnvironmentsResponse
445
+ command.params['accountId'] = account_id unless account_id.nil?
446
+ command.params['containerId'] = container_id unless container_id.nil?
447
+ command.query['fields'] = fields unless fields.nil?
448
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
449
+ execute_or_queue_command(command, &block)
450
+ end
451
+
452
+ # Updates a GTM Environment.
453
+ # @param [String] account_id
454
+ # The GTM Account ID.
455
+ # @param [String] container_id
456
+ # The GTM Container ID.
457
+ # @param [String] environment_id
458
+ # The GTM Environment ID.
459
+ # @param [Google::Apis::TagmanagerV1::Environment] environment_object
460
+ # @param [String] fingerprint
461
+ # When provided, this fingerprint must match the fingerprint of the environment
462
+ # in storage.
463
+ # @param [String] fields
464
+ # Selector specifying which fields to include in a partial response.
465
+ # @param [String] quota_user
466
+ # Available to use for quota purposes for server-side applications. Can be any
467
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
468
+ # @param [Google::Apis::RequestOptions] options
469
+ # Request-specific options
470
+ #
471
+ # @yield [result, err] Result & error if block supplied
472
+ # @yieldparam result [Google::Apis::TagmanagerV1::Environment] parsed result object
473
+ # @yieldparam err [StandardError] error object if request failed
474
+ #
475
+ # @return [Google::Apis::TagmanagerV1::Environment]
476
+ #
477
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
478
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
479
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
480
+ def update_account_container_environment(account_id, container_id, environment_id, environment_object = nil, fingerprint: nil, fields: nil, quota_user: nil, options: nil, &block)
481
+ command = make_simple_command(:put, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/environments/{environmentId}', options)
482
+ command.request_representation = Google::Apis::TagmanagerV1::Environment::Representation
483
+ command.request_object = environment_object
484
+ command.response_representation = Google::Apis::TagmanagerV1::Environment::Representation
485
+ command.response_class = Google::Apis::TagmanagerV1::Environment
486
+ command.params['accountId'] = account_id unless account_id.nil?
487
+ command.params['containerId'] = container_id unless container_id.nil?
488
+ command.params['environmentId'] = environment_id unless environment_id.nil?
489
+ command.query['fingerprint'] = fingerprint unless fingerprint.nil?
490
+ command.query['fields'] = fields unless fields.nil?
491
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
492
+ execute_or_queue_command(command, &block)
493
+ end
494
+
495
+ # Creates a GTM Folder.
496
+ # @param [String] account_id
497
+ # The GTM Account ID.
498
+ # @param [String] container_id
499
+ # The GTM Container ID.
500
+ # @param [Google::Apis::TagmanagerV1::Folder] folder_object
501
+ # @param [String] fields
502
+ # Selector specifying which fields to include in a partial response.
503
+ # @param [String] quota_user
504
+ # Available to use for quota purposes for server-side applications. Can be any
505
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
506
+ # @param [Google::Apis::RequestOptions] options
507
+ # Request-specific options
508
+ #
509
+ # @yield [result, err] Result & error if block supplied
510
+ # @yieldparam result [Google::Apis::TagmanagerV1::Folder] parsed result object
511
+ # @yieldparam err [StandardError] error object if request failed
512
+ #
513
+ # @return [Google::Apis::TagmanagerV1::Folder]
514
+ #
515
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
516
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
517
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
518
+ def create_account_container_folder(account_id, container_id, folder_object = nil, fields: nil, quota_user: nil, options: nil, &block)
519
+ command = make_simple_command(:post, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/folders', options)
520
+ command.request_representation = Google::Apis::TagmanagerV1::Folder::Representation
521
+ command.request_object = folder_object
522
+ command.response_representation = Google::Apis::TagmanagerV1::Folder::Representation
523
+ command.response_class = Google::Apis::TagmanagerV1::Folder
524
+ command.params['accountId'] = account_id unless account_id.nil?
525
+ command.params['containerId'] = container_id unless container_id.nil?
526
+ command.query['fields'] = fields unless fields.nil?
527
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
528
+ execute_or_queue_command(command, &block)
529
+ end
530
+
531
+ # Deletes a GTM Folder.
532
+ # @param [String] account_id
533
+ # The GTM Account ID.
534
+ # @param [String] container_id
535
+ # The GTM Container ID.
536
+ # @param [String] folder_id
537
+ # The GTM Folder ID.
538
+ # @param [String] fields
539
+ # Selector specifying which fields to include in a partial response.
540
+ # @param [String] quota_user
541
+ # Available to use for quota purposes for server-side applications. Can be any
542
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
543
+ # @param [Google::Apis::RequestOptions] options
544
+ # Request-specific options
545
+ #
546
+ # @yield [result, err] Result & error if block supplied
547
+ # @yieldparam result [NilClass] No result returned for this method
548
+ # @yieldparam err [StandardError] error object if request failed
549
+ #
550
+ # @return [void]
551
+ #
552
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
553
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
554
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
555
+ def delete_account_container_folder(account_id, container_id, folder_id, fields: nil, quota_user: nil, options: nil, &block)
556
+ command = make_simple_command(:delete, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/folders/{folderId}', options)
557
+ command.params['accountId'] = account_id unless account_id.nil?
558
+ command.params['containerId'] = container_id unless container_id.nil?
559
+ command.params['folderId'] = folder_id unless folder_id.nil?
560
+ command.query['fields'] = fields unless fields.nil?
561
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
562
+ execute_or_queue_command(command, &block)
563
+ end
564
+
565
+ # Gets a GTM Folder.
566
+ # @param [String] account_id
567
+ # The GTM Account ID.
568
+ # @param [String] container_id
569
+ # The GTM Container ID.
570
+ # @param [String] folder_id
571
+ # The GTM Folder ID.
572
+ # @param [String] fields
573
+ # Selector specifying which fields to include in a partial response.
574
+ # @param [String] quota_user
575
+ # Available to use for quota purposes for server-side applications. Can be any
576
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
577
+ # @param [Google::Apis::RequestOptions] options
578
+ # Request-specific options
579
+ #
580
+ # @yield [result, err] Result & error if block supplied
581
+ # @yieldparam result [Google::Apis::TagmanagerV1::Folder] parsed result object
582
+ # @yieldparam err [StandardError] error object if request failed
583
+ #
584
+ # @return [Google::Apis::TagmanagerV1::Folder]
585
+ #
586
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
587
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
588
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
589
+ def get_account_container_folder(account_id, container_id, folder_id, fields: nil, quota_user: nil, options: nil, &block)
590
+ command = make_simple_command(:get, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/folders/{folderId}', options)
591
+ command.response_representation = Google::Apis::TagmanagerV1::Folder::Representation
592
+ command.response_class = Google::Apis::TagmanagerV1::Folder
593
+ command.params['accountId'] = account_id unless account_id.nil?
594
+ command.params['containerId'] = container_id unless container_id.nil?
595
+ command.params['folderId'] = folder_id unless folder_id.nil?
596
+ command.query['fields'] = fields unless fields.nil?
597
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
598
+ execute_or_queue_command(command, &block)
599
+ end
600
+
601
+ # Lists all GTM Folders of a Container.
602
+ # @param [String] account_id
603
+ # The GTM Account ID.
604
+ # @param [String] container_id
605
+ # The GTM Container ID.
606
+ # @param [String] fields
607
+ # Selector specifying which fields to include in a partial response.
608
+ # @param [String] quota_user
609
+ # Available to use for quota purposes for server-side applications. Can be any
610
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
611
+ # @param [Google::Apis::RequestOptions] options
612
+ # Request-specific options
613
+ #
614
+ # @yield [result, err] Result & error if block supplied
615
+ # @yieldparam result [Google::Apis::TagmanagerV1::ListFoldersResponse] parsed result object
616
+ # @yieldparam err [StandardError] error object if request failed
617
+ #
618
+ # @return [Google::Apis::TagmanagerV1::ListFoldersResponse]
619
+ #
620
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
621
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
622
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
623
+ def list_account_container_folders(account_id, container_id, fields: nil, quota_user: nil, options: nil, &block)
624
+ command = make_simple_command(:get, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/folders', options)
625
+ command.response_representation = Google::Apis::TagmanagerV1::ListFoldersResponse::Representation
626
+ command.response_class = Google::Apis::TagmanagerV1::ListFoldersResponse
627
+ command.params['accountId'] = account_id unless account_id.nil?
628
+ command.params['containerId'] = container_id unless container_id.nil?
629
+ command.query['fields'] = fields unless fields.nil?
630
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
631
+ execute_or_queue_command(command, &block)
632
+ end
633
+
634
+ # Updates a GTM Folder.
635
+ # @param [String] account_id
636
+ # The GTM Account ID.
637
+ # @param [String] container_id
638
+ # The GTM Container ID.
639
+ # @param [String] folder_id
640
+ # The GTM Folder ID.
641
+ # @param [Google::Apis::TagmanagerV1::Folder] folder_object
642
+ # @param [String] fingerprint
643
+ # When provided, this fingerprint must match the fingerprint of the folder in
644
+ # storage.
645
+ # @param [String] fields
646
+ # Selector specifying which fields to include in a partial response.
647
+ # @param [String] quota_user
648
+ # Available to use for quota purposes for server-side applications. Can be any
649
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
650
+ # @param [Google::Apis::RequestOptions] options
651
+ # Request-specific options
652
+ #
653
+ # @yield [result, err] Result & error if block supplied
654
+ # @yieldparam result [Google::Apis::TagmanagerV1::Folder] parsed result object
655
+ # @yieldparam err [StandardError] error object if request failed
656
+ #
657
+ # @return [Google::Apis::TagmanagerV1::Folder]
658
+ #
659
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
660
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
661
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
662
+ def update_account_container_folder(account_id, container_id, folder_id, folder_object = nil, fingerprint: nil, fields: nil, quota_user: nil, options: nil, &block)
663
+ command = make_simple_command(:put, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/folders/{folderId}', options)
664
+ command.request_representation = Google::Apis::TagmanagerV1::Folder::Representation
665
+ command.request_object = folder_object
666
+ command.response_representation = Google::Apis::TagmanagerV1::Folder::Representation
667
+ command.response_class = Google::Apis::TagmanagerV1::Folder
668
+ command.params['accountId'] = account_id unless account_id.nil?
669
+ command.params['containerId'] = container_id unless container_id.nil?
670
+ command.params['folderId'] = folder_id unless folder_id.nil?
671
+ command.query['fingerprint'] = fingerprint unless fingerprint.nil?
672
+ command.query['fields'] = fields unless fields.nil?
673
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
674
+ execute_or_queue_command(command, &block)
675
+ end
676
+
677
+ # List all entities in a GTM Folder.
678
+ # @param [String] account_id
679
+ # The GTM Account ID.
680
+ # @param [String] container_id
681
+ # The GTM Container ID.
682
+ # @param [String] folder_id
683
+ # The GTM Folder ID.
684
+ # @param [String] fields
685
+ # Selector specifying which fields to include in a partial response.
686
+ # @param [String] quota_user
687
+ # Available to use for quota purposes for server-side applications. Can be any
688
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
689
+ # @param [Google::Apis::RequestOptions] options
690
+ # Request-specific options
691
+ #
692
+ # @yield [result, err] Result & error if block supplied
693
+ # @yieldparam result [Google::Apis::TagmanagerV1::FolderEntities] parsed result object
694
+ # @yieldparam err [StandardError] error object if request failed
695
+ #
696
+ # @return [Google::Apis::TagmanagerV1::FolderEntities]
697
+ #
698
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
699
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
700
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
701
+ def list_account_container_folder_entities(account_id, container_id, folder_id, fields: nil, quota_user: nil, options: nil, &block)
702
+ command = make_simple_command(:get, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/folders/{folderId}/entities', options)
703
+ command.response_representation = Google::Apis::TagmanagerV1::FolderEntities::Representation
704
+ command.response_class = Google::Apis::TagmanagerV1::FolderEntities
705
+ command.params['accountId'] = account_id unless account_id.nil?
706
+ command.params['containerId'] = container_id unless container_id.nil?
707
+ command.params['folderId'] = folder_id unless folder_id.nil?
708
+ command.query['fields'] = fields unless fields.nil?
709
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
710
+ execute_or_queue_command(command, &block)
711
+ end
712
+
713
+ # Moves entities to a GTM Folder.
714
+ # @param [String] account_id
715
+ # The GTM Account ID.
716
+ # @param [String] container_id
717
+ # The GTM Container ID.
718
+ # @param [String] folder_id
719
+ # The GTM Folder ID.
720
+ # @param [Google::Apis::TagmanagerV1::Folder] folder_object
721
+ # @param [Array<String>, String] tag_id
722
+ # The tags to be moved to the folder.
723
+ # @param [Array<String>, String] trigger_id
724
+ # The triggers to be moved to the folder.
725
+ # @param [Array<String>, String] variable_id
726
+ # The variables to be moved to the folder.
727
+ # @param [String] fields
728
+ # Selector specifying which fields to include in a partial response.
729
+ # @param [String] quota_user
730
+ # Available to use for quota purposes for server-side applications. Can be any
731
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
732
+ # @param [Google::Apis::RequestOptions] options
733
+ # Request-specific options
734
+ #
735
+ # @yield [result, err] Result & error if block supplied
736
+ # @yieldparam result [NilClass] No result returned for this method
737
+ # @yieldparam err [StandardError] error object if request failed
738
+ #
739
+ # @return [void]
740
+ #
741
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
742
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
743
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
744
+ def update_account_container_move_folder(account_id, container_id, folder_id, folder_object = nil, tag_id: nil, trigger_id: nil, variable_id: nil, fields: nil, quota_user: nil, options: nil, &block)
745
+ command = make_simple_command(:put, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/move_folders/{folderId}', options)
746
+ command.request_representation = Google::Apis::TagmanagerV1::Folder::Representation
747
+ command.request_object = folder_object
748
+ command.params['accountId'] = account_id unless account_id.nil?
749
+ command.params['containerId'] = container_id unless container_id.nil?
750
+ command.params['folderId'] = folder_id unless folder_id.nil?
751
+ command.query['tagId'] = tag_id unless tag_id.nil?
752
+ command.query['triggerId'] = trigger_id unless trigger_id.nil?
753
+ command.query['variableId'] = variable_id unless variable_id.nil?
754
+ command.query['fields'] = fields unless fields.nil?
755
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
756
+ execute_or_queue_command(command, &block)
757
+ end
758
+
759
+ # Re-generates the authorization code for a GTM Environment.
760
+ # @param [String] account_id
761
+ # The GTM Account ID.
762
+ # @param [String] container_id
763
+ # The GTM Container ID.
764
+ # @param [String] environment_id
765
+ # The GTM Environment ID.
766
+ # @param [Google::Apis::TagmanagerV1::Environment] environment_object
767
+ # @param [String] fields
768
+ # Selector specifying which fields to include in a partial response.
769
+ # @param [String] quota_user
770
+ # Available to use for quota purposes for server-side applications. Can be any
771
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
772
+ # @param [Google::Apis::RequestOptions] options
773
+ # Request-specific options
774
+ #
775
+ # @yield [result, err] Result & error if block supplied
776
+ # @yieldparam result [Google::Apis::TagmanagerV1::Environment] parsed result object
777
+ # @yieldparam err [StandardError] error object if request failed
778
+ #
779
+ # @return [Google::Apis::TagmanagerV1::Environment]
780
+ #
781
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
782
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
783
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
784
+ def update_account_container_reauthorize_environment(account_id, container_id, environment_id, environment_object = nil, fields: nil, quota_user: nil, options: nil, &block)
785
+ command = make_simple_command(:put, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/reauthorize_environments/{environmentId}', options)
786
+ command.request_representation = Google::Apis::TagmanagerV1::Environment::Representation
787
+ command.request_object = environment_object
788
+ command.response_representation = Google::Apis::TagmanagerV1::Environment::Representation
789
+ command.response_class = Google::Apis::TagmanagerV1::Environment
790
+ command.params['accountId'] = account_id unless account_id.nil?
791
+ command.params['containerId'] = container_id unless container_id.nil?
792
+ command.params['environmentId'] = environment_id unless environment_id.nil?
793
+ command.query['fields'] = fields unless fields.nil?
794
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
795
+ execute_or_queue_command(command, &block)
796
+ end
797
+
798
+ # Creates a GTM Tag.
799
+ # @param [String] account_id
800
+ # The GTM Account ID.
801
+ # @param [String] container_id
802
+ # The GTM Container ID.
803
+ # @param [Google::Apis::TagmanagerV1::Tag] tag_object
804
+ # @param [String] fields
805
+ # Selector specifying which fields to include in a partial response.
806
+ # @param [String] quota_user
807
+ # Available to use for quota purposes for server-side applications. Can be any
808
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
809
+ # @param [Google::Apis::RequestOptions] options
810
+ # Request-specific options
811
+ #
812
+ # @yield [result, err] Result & error if block supplied
813
+ # @yieldparam result [Google::Apis::TagmanagerV1::Tag] parsed result object
814
+ # @yieldparam err [StandardError] error object if request failed
815
+ #
816
+ # @return [Google::Apis::TagmanagerV1::Tag]
817
+ #
818
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
819
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
820
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
821
+ def create_tag(account_id, container_id, tag_object = nil, fields: nil, quota_user: nil, options: nil, &block)
822
+ command = make_simple_command(:post, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/tags', options)
823
+ command.request_representation = Google::Apis::TagmanagerV1::Tag::Representation
824
+ command.request_object = tag_object
825
+ command.response_representation = Google::Apis::TagmanagerV1::Tag::Representation
826
+ command.response_class = Google::Apis::TagmanagerV1::Tag
827
+ command.params['accountId'] = account_id unless account_id.nil?
828
+ command.params['containerId'] = container_id unless container_id.nil?
829
+ command.query['fields'] = fields unless fields.nil?
830
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
831
+ execute_or_queue_command(command, &block)
832
+ end
833
+
834
+ # Deletes a GTM Tag.
835
+ # @param [String] account_id
836
+ # The GTM Account ID.
837
+ # @param [String] container_id
838
+ # The GTM Container ID.
839
+ # @param [String] tag_id
840
+ # The GTM Tag ID.
841
+ # @param [String] fields
842
+ # Selector specifying which fields to include in a partial response.
843
+ # @param [String] quota_user
844
+ # Available to use for quota purposes for server-side applications. Can be any
845
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
846
+ # @param [Google::Apis::RequestOptions] options
847
+ # Request-specific options
848
+ #
849
+ # @yield [result, err] Result & error if block supplied
850
+ # @yieldparam result [NilClass] No result returned for this method
851
+ # @yieldparam err [StandardError] error object if request failed
852
+ #
853
+ # @return [void]
854
+ #
855
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
856
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
857
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
858
+ def delete_tag(account_id, container_id, tag_id, fields: nil, quota_user: nil, options: nil, &block)
859
+ command = make_simple_command(:delete, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/tags/{tagId}', options)
860
+ command.params['accountId'] = account_id unless account_id.nil?
861
+ command.params['containerId'] = container_id unless container_id.nil?
862
+ command.params['tagId'] = tag_id unless tag_id.nil?
863
+ command.query['fields'] = fields unless fields.nil?
864
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
865
+ execute_or_queue_command(command, &block)
866
+ end
867
+
868
+ # Gets a GTM Tag.
869
+ # @param [String] account_id
870
+ # The GTM Account ID.
871
+ # @param [String] container_id
872
+ # The GTM Container ID.
873
+ # @param [String] tag_id
874
+ # The GTM Tag ID.
875
+ # @param [String] fields
876
+ # Selector specifying which fields to include in a partial response.
877
+ # @param [String] quota_user
878
+ # Available to use for quota purposes for server-side applications. Can be any
879
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
880
+ # @param [Google::Apis::RequestOptions] options
881
+ # Request-specific options
882
+ #
883
+ # @yield [result, err] Result & error if block supplied
884
+ # @yieldparam result [Google::Apis::TagmanagerV1::Tag] parsed result object
885
+ # @yieldparam err [StandardError] error object if request failed
886
+ #
887
+ # @return [Google::Apis::TagmanagerV1::Tag]
888
+ #
889
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
890
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
891
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
892
+ def get_tag(account_id, container_id, tag_id, fields: nil, quota_user: nil, options: nil, &block)
893
+ command = make_simple_command(:get, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/tags/{tagId}', options)
894
+ command.response_representation = Google::Apis::TagmanagerV1::Tag::Representation
895
+ command.response_class = Google::Apis::TagmanagerV1::Tag
896
+ command.params['accountId'] = account_id unless account_id.nil?
897
+ command.params['containerId'] = container_id unless container_id.nil?
898
+ command.params['tagId'] = tag_id unless tag_id.nil?
899
+ command.query['fields'] = fields unless fields.nil?
900
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
901
+ execute_or_queue_command(command, &block)
902
+ end
903
+
904
+ # Lists all GTM Tags of a Container.
905
+ # @param [String] account_id
906
+ # The GTM Account ID.
907
+ # @param [String] container_id
908
+ # The GTM Container ID.
909
+ # @param [String] fields
910
+ # Selector specifying which fields to include in a partial response.
911
+ # @param [String] quota_user
912
+ # Available to use for quota purposes for server-side applications. Can be any
913
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
914
+ # @param [Google::Apis::RequestOptions] options
915
+ # Request-specific options
916
+ #
917
+ # @yield [result, err] Result & error if block supplied
918
+ # @yieldparam result [Google::Apis::TagmanagerV1::ListTagsResponse] parsed result object
919
+ # @yieldparam err [StandardError] error object if request failed
920
+ #
921
+ # @return [Google::Apis::TagmanagerV1::ListTagsResponse]
922
+ #
923
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
924
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
925
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
926
+ def list_tags(account_id, container_id, fields: nil, quota_user: nil, options: nil, &block)
927
+ command = make_simple_command(:get, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/tags', options)
928
+ command.response_representation = Google::Apis::TagmanagerV1::ListTagsResponse::Representation
929
+ command.response_class = Google::Apis::TagmanagerV1::ListTagsResponse
930
+ command.params['accountId'] = account_id unless account_id.nil?
931
+ command.params['containerId'] = container_id unless container_id.nil?
932
+ command.query['fields'] = fields unless fields.nil?
933
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
934
+ execute_or_queue_command(command, &block)
935
+ end
936
+
937
+ # Updates a GTM Tag.
938
+ # @param [String] account_id
939
+ # The GTM Account ID.
940
+ # @param [String] container_id
941
+ # The GTM Container ID.
942
+ # @param [String] tag_id
943
+ # The GTM Tag ID.
944
+ # @param [Google::Apis::TagmanagerV1::Tag] tag_object
945
+ # @param [String] fingerprint
946
+ # When provided, this fingerprint must match the fingerprint of the tag in
947
+ # storage.
948
+ # @param [String] fields
949
+ # Selector specifying which fields to include in a partial response.
950
+ # @param [String] quota_user
951
+ # Available to use for quota purposes for server-side applications. Can be any
952
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
953
+ # @param [Google::Apis::RequestOptions] options
954
+ # Request-specific options
955
+ #
956
+ # @yield [result, err] Result & error if block supplied
957
+ # @yieldparam result [Google::Apis::TagmanagerV1::Tag] parsed result object
958
+ # @yieldparam err [StandardError] error object if request failed
959
+ #
960
+ # @return [Google::Apis::TagmanagerV1::Tag]
961
+ #
962
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
963
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
964
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
965
+ def update_tag(account_id, container_id, tag_id, tag_object = nil, fingerprint: nil, fields: nil, quota_user: nil, options: nil, &block)
966
+ command = make_simple_command(:put, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/tags/{tagId}', options)
967
+ command.request_representation = Google::Apis::TagmanagerV1::Tag::Representation
968
+ command.request_object = tag_object
969
+ command.response_representation = Google::Apis::TagmanagerV1::Tag::Representation
970
+ command.response_class = Google::Apis::TagmanagerV1::Tag
971
+ command.params['accountId'] = account_id unless account_id.nil?
972
+ command.params['containerId'] = container_id unless container_id.nil?
973
+ command.params['tagId'] = tag_id unless tag_id.nil?
974
+ command.query['fingerprint'] = fingerprint unless fingerprint.nil?
975
+ command.query['fields'] = fields unless fields.nil?
976
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
977
+ execute_or_queue_command(command, &block)
978
+ end
979
+
980
+ # Creates a GTM Trigger.
981
+ # @param [String] account_id
982
+ # The GTM Account ID.
983
+ # @param [String] container_id
984
+ # The GTM Container ID.
985
+ # @param [Google::Apis::TagmanagerV1::Trigger] trigger_object
986
+ # @param [String] fields
987
+ # Selector specifying which fields to include in a partial response.
988
+ # @param [String] quota_user
989
+ # Available to use for quota purposes for server-side applications. Can be any
990
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
991
+ # @param [Google::Apis::RequestOptions] options
992
+ # Request-specific options
993
+ #
994
+ # @yield [result, err] Result & error if block supplied
995
+ # @yieldparam result [Google::Apis::TagmanagerV1::Trigger] parsed result object
996
+ # @yieldparam err [StandardError] error object if request failed
997
+ #
998
+ # @return [Google::Apis::TagmanagerV1::Trigger]
999
+ #
1000
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1001
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1002
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1003
+ def create_trigger(account_id, container_id, trigger_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1004
+ command = make_simple_command(:post, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/triggers', options)
1005
+ command.request_representation = Google::Apis::TagmanagerV1::Trigger::Representation
1006
+ command.request_object = trigger_object
1007
+ command.response_representation = Google::Apis::TagmanagerV1::Trigger::Representation
1008
+ command.response_class = Google::Apis::TagmanagerV1::Trigger
1009
+ command.params['accountId'] = account_id unless account_id.nil?
1010
+ command.params['containerId'] = container_id unless container_id.nil?
1011
+ command.query['fields'] = fields unless fields.nil?
1012
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1013
+ execute_or_queue_command(command, &block)
1014
+ end
1015
+
1016
+ # Deletes a GTM Trigger.
1017
+ # @param [String] account_id
1018
+ # The GTM Account ID.
1019
+ # @param [String] container_id
1020
+ # The GTM Container ID.
1021
+ # @param [String] trigger_id
1022
+ # The GTM Trigger ID.
1023
+ # @param [String] fields
1024
+ # Selector specifying which fields to include in a partial response.
1025
+ # @param [String] quota_user
1026
+ # Available to use for quota purposes for server-side applications. Can be any
1027
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1028
+ # @param [Google::Apis::RequestOptions] options
1029
+ # Request-specific options
1030
+ #
1031
+ # @yield [result, err] Result & error if block supplied
1032
+ # @yieldparam result [NilClass] No result returned for this method
1033
+ # @yieldparam err [StandardError] error object if request failed
1034
+ #
1035
+ # @return [void]
1036
+ #
1037
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1038
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1039
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1040
+ def delete_trigger(account_id, container_id, trigger_id, fields: nil, quota_user: nil, options: nil, &block)
1041
+ command = make_simple_command(:delete, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/triggers/{triggerId}', options)
1042
+ command.params['accountId'] = account_id unless account_id.nil?
1043
+ command.params['containerId'] = container_id unless container_id.nil?
1044
+ command.params['triggerId'] = trigger_id unless trigger_id.nil?
1045
+ command.query['fields'] = fields unless fields.nil?
1046
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1047
+ execute_or_queue_command(command, &block)
1048
+ end
1049
+
1050
+ # Gets a GTM Trigger.
1051
+ # @param [String] account_id
1052
+ # The GTM Account ID.
1053
+ # @param [String] container_id
1054
+ # The GTM Container ID.
1055
+ # @param [String] trigger_id
1056
+ # The GTM Trigger ID.
1057
+ # @param [String] fields
1058
+ # Selector specifying which fields to include in a partial response.
1059
+ # @param [String] quota_user
1060
+ # Available to use for quota purposes for server-side applications. Can be any
1061
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1062
+ # @param [Google::Apis::RequestOptions] options
1063
+ # Request-specific options
1064
+ #
1065
+ # @yield [result, err] Result & error if block supplied
1066
+ # @yieldparam result [Google::Apis::TagmanagerV1::Trigger] parsed result object
1067
+ # @yieldparam err [StandardError] error object if request failed
1068
+ #
1069
+ # @return [Google::Apis::TagmanagerV1::Trigger]
1070
+ #
1071
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1072
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1073
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1074
+ def get_trigger(account_id, container_id, trigger_id, fields: nil, quota_user: nil, options: nil, &block)
1075
+ command = make_simple_command(:get, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/triggers/{triggerId}', options)
1076
+ command.response_representation = Google::Apis::TagmanagerV1::Trigger::Representation
1077
+ command.response_class = Google::Apis::TagmanagerV1::Trigger
1078
+ command.params['accountId'] = account_id unless account_id.nil?
1079
+ command.params['containerId'] = container_id unless container_id.nil?
1080
+ command.params['triggerId'] = trigger_id unless trigger_id.nil?
1081
+ command.query['fields'] = fields unless fields.nil?
1082
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1083
+ execute_or_queue_command(command, &block)
1084
+ end
1085
+
1086
+ # Lists all GTM Triggers of a Container.
1087
+ # @param [String] account_id
1088
+ # The GTM Account ID.
1089
+ # @param [String] container_id
1090
+ # The GTM Container ID.
1091
+ # @param [String] fields
1092
+ # Selector specifying which fields to include in a partial response.
1093
+ # @param [String] quota_user
1094
+ # Available to use for quota purposes for server-side applications. Can be any
1095
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1096
+ # @param [Google::Apis::RequestOptions] options
1097
+ # Request-specific options
1098
+ #
1099
+ # @yield [result, err] Result & error if block supplied
1100
+ # @yieldparam result [Google::Apis::TagmanagerV1::ListTriggersResponse] parsed result object
1101
+ # @yieldparam err [StandardError] error object if request failed
1102
+ #
1103
+ # @return [Google::Apis::TagmanagerV1::ListTriggersResponse]
1104
+ #
1105
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1106
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1107
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1108
+ def list_triggers(account_id, container_id, fields: nil, quota_user: nil, options: nil, &block)
1109
+ command = make_simple_command(:get, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/triggers', options)
1110
+ command.response_representation = Google::Apis::TagmanagerV1::ListTriggersResponse::Representation
1111
+ command.response_class = Google::Apis::TagmanagerV1::ListTriggersResponse
1112
+ command.params['accountId'] = account_id unless account_id.nil?
1113
+ command.params['containerId'] = container_id unless container_id.nil?
1114
+ command.query['fields'] = fields unless fields.nil?
1115
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1116
+ execute_or_queue_command(command, &block)
1117
+ end
1118
+
1119
+ # Updates a GTM Trigger.
1120
+ # @param [String] account_id
1121
+ # The GTM Account ID.
1122
+ # @param [String] container_id
1123
+ # The GTM Container ID.
1124
+ # @param [String] trigger_id
1125
+ # The GTM Trigger ID.
1126
+ # @param [Google::Apis::TagmanagerV1::Trigger] trigger_object
1127
+ # @param [String] fingerprint
1128
+ # When provided, this fingerprint must match the fingerprint of the trigger in
1129
+ # storage.
1130
+ # @param [String] fields
1131
+ # Selector specifying which fields to include in a partial response.
1132
+ # @param [String] quota_user
1133
+ # Available to use for quota purposes for server-side applications. Can be any
1134
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1135
+ # @param [Google::Apis::RequestOptions] options
1136
+ # Request-specific options
1137
+ #
1138
+ # @yield [result, err] Result & error if block supplied
1139
+ # @yieldparam result [Google::Apis::TagmanagerV1::Trigger] parsed result object
1140
+ # @yieldparam err [StandardError] error object if request failed
1141
+ #
1142
+ # @return [Google::Apis::TagmanagerV1::Trigger]
1143
+ #
1144
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1145
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1146
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1147
+ def update_trigger(account_id, container_id, trigger_id, trigger_object = nil, fingerprint: nil, fields: nil, quota_user: nil, options: nil, &block)
1148
+ command = make_simple_command(:put, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/triggers/{triggerId}', options)
1149
+ command.request_representation = Google::Apis::TagmanagerV1::Trigger::Representation
1150
+ command.request_object = trigger_object
1151
+ command.response_representation = Google::Apis::TagmanagerV1::Trigger::Representation
1152
+ command.response_class = Google::Apis::TagmanagerV1::Trigger
1153
+ command.params['accountId'] = account_id unless account_id.nil?
1154
+ command.params['containerId'] = container_id unless container_id.nil?
1155
+ command.params['triggerId'] = trigger_id unless trigger_id.nil?
1156
+ command.query['fingerprint'] = fingerprint unless fingerprint.nil?
1157
+ command.query['fields'] = fields unless fields.nil?
1158
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1159
+ execute_or_queue_command(command, &block)
1160
+ end
1161
+
1162
+ # Creates a GTM Variable.
1163
+ # @param [String] account_id
1164
+ # The GTM Account ID.
1165
+ # @param [String] container_id
1166
+ # The GTM Container ID.
1167
+ # @param [Google::Apis::TagmanagerV1::Variable] variable_object
1168
+ # @param [String] fields
1169
+ # Selector specifying which fields to include in a partial response.
1170
+ # @param [String] quota_user
1171
+ # Available to use for quota purposes for server-side applications. Can be any
1172
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1173
+ # @param [Google::Apis::RequestOptions] options
1174
+ # Request-specific options
1175
+ #
1176
+ # @yield [result, err] Result & error if block supplied
1177
+ # @yieldparam result [Google::Apis::TagmanagerV1::Variable] parsed result object
1178
+ # @yieldparam err [StandardError] error object if request failed
1179
+ #
1180
+ # @return [Google::Apis::TagmanagerV1::Variable]
1181
+ #
1182
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1183
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1184
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1185
+ def create_variable(account_id, container_id, variable_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1186
+ command = make_simple_command(:post, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/variables', options)
1187
+ command.request_representation = Google::Apis::TagmanagerV1::Variable::Representation
1188
+ command.request_object = variable_object
1189
+ command.response_representation = Google::Apis::TagmanagerV1::Variable::Representation
1190
+ command.response_class = Google::Apis::TagmanagerV1::Variable
1191
+ command.params['accountId'] = account_id unless account_id.nil?
1192
+ command.params['containerId'] = container_id unless container_id.nil?
1193
+ command.query['fields'] = fields unless fields.nil?
1194
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1195
+ execute_or_queue_command(command, &block)
1196
+ end
1197
+
1198
+ # Deletes a GTM Variable.
1199
+ # @param [String] account_id
1200
+ # The GTM Account ID.
1201
+ # @param [String] container_id
1202
+ # The GTM Container ID.
1203
+ # @param [String] variable_id
1204
+ # The GTM Variable ID.
1205
+ # @param [String] fields
1206
+ # Selector specifying which fields to include in a partial response.
1207
+ # @param [String] quota_user
1208
+ # Available to use for quota purposes for server-side applications. Can be any
1209
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1210
+ # @param [Google::Apis::RequestOptions] options
1211
+ # Request-specific options
1212
+ #
1213
+ # @yield [result, err] Result & error if block supplied
1214
+ # @yieldparam result [NilClass] No result returned for this method
1215
+ # @yieldparam err [StandardError] error object if request failed
1216
+ #
1217
+ # @return [void]
1218
+ #
1219
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1220
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1221
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1222
+ def delete_variable(account_id, container_id, variable_id, fields: nil, quota_user: nil, options: nil, &block)
1223
+ command = make_simple_command(:delete, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/variables/{variableId}', options)
1224
+ command.params['accountId'] = account_id unless account_id.nil?
1225
+ command.params['containerId'] = container_id unless container_id.nil?
1226
+ command.params['variableId'] = variable_id unless variable_id.nil?
1227
+ command.query['fields'] = fields unless fields.nil?
1228
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1229
+ execute_or_queue_command(command, &block)
1230
+ end
1231
+
1232
+ # Gets a GTM Variable.
1233
+ # @param [String] account_id
1234
+ # The GTM Account ID.
1235
+ # @param [String] container_id
1236
+ # The GTM Container ID.
1237
+ # @param [String] variable_id
1238
+ # The GTM Variable ID.
1239
+ # @param [String] fields
1240
+ # Selector specifying which fields to include in a partial response.
1241
+ # @param [String] quota_user
1242
+ # Available to use for quota purposes for server-side applications. Can be any
1243
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1244
+ # @param [Google::Apis::RequestOptions] options
1245
+ # Request-specific options
1246
+ #
1247
+ # @yield [result, err] Result & error if block supplied
1248
+ # @yieldparam result [Google::Apis::TagmanagerV1::Variable] parsed result object
1249
+ # @yieldparam err [StandardError] error object if request failed
1250
+ #
1251
+ # @return [Google::Apis::TagmanagerV1::Variable]
1252
+ #
1253
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1254
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1255
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1256
+ def get_variable(account_id, container_id, variable_id, fields: nil, quota_user: nil, options: nil, &block)
1257
+ command = make_simple_command(:get, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/variables/{variableId}', options)
1258
+ command.response_representation = Google::Apis::TagmanagerV1::Variable::Representation
1259
+ command.response_class = Google::Apis::TagmanagerV1::Variable
1260
+ command.params['accountId'] = account_id unless account_id.nil?
1261
+ command.params['containerId'] = container_id unless container_id.nil?
1262
+ command.params['variableId'] = variable_id unless variable_id.nil?
1263
+ command.query['fields'] = fields unless fields.nil?
1264
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1265
+ execute_or_queue_command(command, &block)
1266
+ end
1267
+
1268
+ # Lists all GTM Variables of a Container.
1269
+ # @param [String] account_id
1270
+ # The GTM Account ID.
1271
+ # @param [String] container_id
1272
+ # The GTM Container ID.
1273
+ # @param [String] fields
1274
+ # Selector specifying which fields to include in a partial response.
1275
+ # @param [String] quota_user
1276
+ # Available to use for quota purposes for server-side applications. Can be any
1277
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1278
+ # @param [Google::Apis::RequestOptions] options
1279
+ # Request-specific options
1280
+ #
1281
+ # @yield [result, err] Result & error if block supplied
1282
+ # @yieldparam result [Google::Apis::TagmanagerV1::ListVariablesResponse] parsed result object
1283
+ # @yieldparam err [StandardError] error object if request failed
1284
+ #
1285
+ # @return [Google::Apis::TagmanagerV1::ListVariablesResponse]
1286
+ #
1287
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1288
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1289
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1290
+ def list_variables(account_id, container_id, fields: nil, quota_user: nil, options: nil, &block)
1291
+ command = make_simple_command(:get, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/variables', options)
1292
+ command.response_representation = Google::Apis::TagmanagerV1::ListVariablesResponse::Representation
1293
+ command.response_class = Google::Apis::TagmanagerV1::ListVariablesResponse
1294
+ command.params['accountId'] = account_id unless account_id.nil?
1295
+ command.params['containerId'] = container_id unless container_id.nil?
1296
+ command.query['fields'] = fields unless fields.nil?
1297
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1298
+ execute_or_queue_command(command, &block)
1299
+ end
1300
+
1301
+ # Updates a GTM Variable.
1302
+ # @param [String] account_id
1303
+ # The GTM Account ID.
1304
+ # @param [String] container_id
1305
+ # The GTM Container ID.
1306
+ # @param [String] variable_id
1307
+ # The GTM Variable ID.
1308
+ # @param [Google::Apis::TagmanagerV1::Variable] variable_object
1309
+ # @param [String] fingerprint
1310
+ # When provided, this fingerprint must match the fingerprint of the variable in
1311
+ # storage.
1312
+ # @param [String] fields
1313
+ # Selector specifying which fields to include in a partial response.
1314
+ # @param [String] quota_user
1315
+ # Available to use for quota purposes for server-side applications. Can be any
1316
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1317
+ # @param [Google::Apis::RequestOptions] options
1318
+ # Request-specific options
1319
+ #
1320
+ # @yield [result, err] Result & error if block supplied
1321
+ # @yieldparam result [Google::Apis::TagmanagerV1::Variable] parsed result object
1322
+ # @yieldparam err [StandardError] error object if request failed
1323
+ #
1324
+ # @return [Google::Apis::TagmanagerV1::Variable]
1325
+ #
1326
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1327
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1328
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1329
+ def update_variable(account_id, container_id, variable_id, variable_object = nil, fingerprint: nil, fields: nil, quota_user: nil, options: nil, &block)
1330
+ command = make_simple_command(:put, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/variables/{variableId}', options)
1331
+ command.request_representation = Google::Apis::TagmanagerV1::Variable::Representation
1332
+ command.request_object = variable_object
1333
+ command.response_representation = Google::Apis::TagmanagerV1::Variable::Representation
1334
+ command.response_class = Google::Apis::TagmanagerV1::Variable
1335
+ command.params['accountId'] = account_id unless account_id.nil?
1336
+ command.params['containerId'] = container_id unless container_id.nil?
1337
+ command.params['variableId'] = variable_id unless variable_id.nil?
1338
+ command.query['fingerprint'] = fingerprint unless fingerprint.nil?
1339
+ command.query['fields'] = fields unless fields.nil?
1340
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1341
+ execute_or_queue_command(command, &block)
1342
+ end
1343
+
1344
+ # Creates a Container Version.
1345
+ # @param [String] account_id
1346
+ # The GTM Account ID.
1347
+ # @param [String] container_id
1348
+ # The GTM Container ID.
1349
+ # @param [Google::Apis::TagmanagerV1::CreateContainerVersionRequestVersionOptions] create_container_version_request_version_options_object
1350
+ # @param [String] fields
1351
+ # Selector specifying which fields to include in a partial response.
1352
+ # @param [String] quota_user
1353
+ # Available to use for quota purposes for server-side applications. Can be any
1354
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1355
+ # @param [Google::Apis::RequestOptions] options
1356
+ # Request-specific options
1357
+ #
1358
+ # @yield [result, err] Result & error if block supplied
1359
+ # @yieldparam result [Google::Apis::TagmanagerV1::CreateContainerVersionResponse] parsed result object
1360
+ # @yieldparam err [StandardError] error object if request failed
1361
+ #
1362
+ # @return [Google::Apis::TagmanagerV1::CreateContainerVersionResponse]
1363
+ #
1364
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1365
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1366
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1367
+ def create_version(account_id, container_id, create_container_version_request_version_options_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1368
+ command = make_simple_command(:post, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/versions', options)
1369
+ command.request_representation = Google::Apis::TagmanagerV1::CreateContainerVersionRequestVersionOptions::Representation
1370
+ command.request_object = create_container_version_request_version_options_object
1371
+ command.response_representation = Google::Apis::TagmanagerV1::CreateContainerVersionResponse::Representation
1372
+ command.response_class = Google::Apis::TagmanagerV1::CreateContainerVersionResponse
1373
+ command.params['accountId'] = account_id unless account_id.nil?
1374
+ command.params['containerId'] = container_id unless container_id.nil?
1375
+ command.query['fields'] = fields unless fields.nil?
1376
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1377
+ execute_or_queue_command(command, &block)
1378
+ end
1379
+
1380
+ # Deletes a Container Version.
1381
+ # @param [String] account_id
1382
+ # The GTM Account ID.
1383
+ # @param [String] container_id
1384
+ # The GTM Container ID.
1385
+ # @param [String] container_version_id
1386
+ # The GTM Container Version ID.
1387
+ # @param [String] fields
1388
+ # Selector specifying which fields to include in a partial response.
1389
+ # @param [String] quota_user
1390
+ # Available to use for quota purposes for server-side applications. Can be any
1391
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1392
+ # @param [Google::Apis::RequestOptions] options
1393
+ # Request-specific options
1394
+ #
1395
+ # @yield [result, err] Result & error if block supplied
1396
+ # @yieldparam result [NilClass] No result returned for this method
1397
+ # @yieldparam err [StandardError] error object if request failed
1398
+ #
1399
+ # @return [void]
1400
+ #
1401
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1402
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1403
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1404
+ def delete_version(account_id, container_id, container_version_id, fields: nil, quota_user: nil, options: nil, &block)
1405
+ command = make_simple_command(:delete, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/versions/{containerVersionId}', options)
1406
+ command.params['accountId'] = account_id unless account_id.nil?
1407
+ command.params['containerId'] = container_id unless container_id.nil?
1408
+ command.params['containerVersionId'] = container_version_id unless container_version_id.nil?
1409
+ command.query['fields'] = fields unless fields.nil?
1410
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1411
+ execute_or_queue_command(command, &block)
1412
+ end
1413
+
1414
+ # Gets a Container Version.
1415
+ # @param [String] account_id
1416
+ # The GTM Account ID.
1417
+ # @param [String] container_id
1418
+ # The GTM Container ID.
1419
+ # @param [String] container_version_id
1420
+ # The GTM Container Version ID. Specify published to retrieve the currently
1421
+ # published version.
1422
+ # @param [String] fields
1423
+ # Selector specifying which fields to include in a partial response.
1424
+ # @param [String] quota_user
1425
+ # Available to use for quota purposes for server-side applications. Can be any
1426
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1427
+ # @param [Google::Apis::RequestOptions] options
1428
+ # Request-specific options
1429
+ #
1430
+ # @yield [result, err] Result & error if block supplied
1431
+ # @yieldparam result [Google::Apis::TagmanagerV1::ContainerVersion] parsed result object
1432
+ # @yieldparam err [StandardError] error object if request failed
1433
+ #
1434
+ # @return [Google::Apis::TagmanagerV1::ContainerVersion]
1435
+ #
1436
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1437
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1438
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1439
+ def get_version(account_id, container_id, container_version_id, fields: nil, quota_user: nil, options: nil, &block)
1440
+ command = make_simple_command(:get, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/versions/{containerVersionId}', options)
1441
+ command.response_representation = Google::Apis::TagmanagerV1::ContainerVersion::Representation
1442
+ command.response_class = Google::Apis::TagmanagerV1::ContainerVersion
1443
+ command.params['accountId'] = account_id unless account_id.nil?
1444
+ command.params['containerId'] = container_id unless container_id.nil?
1445
+ command.params['containerVersionId'] = container_version_id unless container_version_id.nil?
1446
+ command.query['fields'] = fields unless fields.nil?
1447
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1448
+ execute_or_queue_command(command, &block)
1449
+ end
1450
+
1451
+ # Lists all Container Versions of a GTM Container.
1452
+ # @param [String] account_id
1453
+ # The GTM Account ID.
1454
+ # @param [String] container_id
1455
+ # The GTM Container ID.
1456
+ # @param [Boolean] headers
1457
+ # Retrieve headers only when true.
1458
+ # @param [Boolean] include_deleted
1459
+ # Also retrieve deleted (archived) versions when true.
1460
+ # @param [String] fields
1461
+ # Selector specifying which fields to include in a partial response.
1462
+ # @param [String] quota_user
1463
+ # Available to use for quota purposes for server-side applications. Can be any
1464
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1465
+ # @param [Google::Apis::RequestOptions] options
1466
+ # Request-specific options
1467
+ #
1468
+ # @yield [result, err] Result & error if block supplied
1469
+ # @yieldparam result [Google::Apis::TagmanagerV1::ListContainerVersionsResponse] parsed result object
1470
+ # @yieldparam err [StandardError] error object if request failed
1471
+ #
1472
+ # @return [Google::Apis::TagmanagerV1::ListContainerVersionsResponse]
1473
+ #
1474
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1475
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1476
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1477
+ def list_versions(account_id, container_id, headers: nil, include_deleted: nil, fields: nil, quota_user: nil, options: nil, &block)
1478
+ command = make_simple_command(:get, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/versions', options)
1479
+ command.response_representation = Google::Apis::TagmanagerV1::ListContainerVersionsResponse::Representation
1480
+ command.response_class = Google::Apis::TagmanagerV1::ListContainerVersionsResponse
1481
+ command.params['accountId'] = account_id unless account_id.nil?
1482
+ command.params['containerId'] = container_id unless container_id.nil?
1483
+ command.query['headers'] = headers unless headers.nil?
1484
+ command.query['includeDeleted'] = include_deleted unless include_deleted.nil?
1485
+ command.query['fields'] = fields unless fields.nil?
1486
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1487
+ execute_or_queue_command(command, &block)
1488
+ end
1489
+
1490
+ # Publishes a Container Version.
1491
+ # @param [String] account_id
1492
+ # The GTM Account ID.
1493
+ # @param [String] container_id
1494
+ # The GTM Container ID.
1495
+ # @param [String] container_version_id
1496
+ # The GTM Container Version ID.
1497
+ # @param [String] fingerprint
1498
+ # When provided, this fingerprint must match the fingerprint of the container
1499
+ # version in storage.
1500
+ # @param [String] fields
1501
+ # Selector specifying which fields to include in a partial response.
1502
+ # @param [String] quota_user
1503
+ # Available to use for quota purposes for server-side applications. Can be any
1504
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1505
+ # @param [Google::Apis::RequestOptions] options
1506
+ # Request-specific options
1507
+ #
1508
+ # @yield [result, err] Result & error if block supplied
1509
+ # @yieldparam result [Google::Apis::TagmanagerV1::PublishContainerVersionResponse] parsed result object
1510
+ # @yieldparam err [StandardError] error object if request failed
1511
+ #
1512
+ # @return [Google::Apis::TagmanagerV1::PublishContainerVersionResponse]
1513
+ #
1514
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1515
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1516
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1517
+ def publish_version(account_id, container_id, container_version_id, fingerprint: nil, fields: nil, quota_user: nil, options: nil, &block)
1518
+ command = make_simple_command(:post, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/versions/{containerVersionId}/publish', options)
1519
+ command.response_representation = Google::Apis::TagmanagerV1::PublishContainerVersionResponse::Representation
1520
+ command.response_class = Google::Apis::TagmanagerV1::PublishContainerVersionResponse
1521
+ command.params['accountId'] = account_id unless account_id.nil?
1522
+ command.params['containerId'] = container_id unless container_id.nil?
1523
+ command.params['containerVersionId'] = container_version_id unless container_version_id.nil?
1524
+ command.query['fingerprint'] = fingerprint unless fingerprint.nil?
1525
+ command.query['fields'] = fields unless fields.nil?
1526
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1527
+ execute_or_queue_command(command, &block)
1528
+ end
1529
+
1530
+ # Restores a Container Version. This will overwrite the container's current
1531
+ # configuration (including its variables, triggers and tags). The operation will
1532
+ # not have any effect on the version that is being served (i.e. the published
1533
+ # version).
1534
+ # @param [String] account_id
1535
+ # The GTM Account ID.
1536
+ # @param [String] container_id
1537
+ # The GTM Container ID.
1538
+ # @param [String] container_version_id
1539
+ # The GTM Container Version ID.
1540
+ # @param [String] fields
1541
+ # Selector specifying which fields to include in a partial response.
1542
+ # @param [String] quota_user
1543
+ # Available to use for quota purposes for server-side applications. Can be any
1544
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1545
+ # @param [Google::Apis::RequestOptions] options
1546
+ # Request-specific options
1547
+ #
1548
+ # @yield [result, err] Result & error if block supplied
1549
+ # @yieldparam result [Google::Apis::TagmanagerV1::ContainerVersion] parsed result object
1550
+ # @yieldparam err [StandardError] error object if request failed
1551
+ #
1552
+ # @return [Google::Apis::TagmanagerV1::ContainerVersion]
1553
+ #
1554
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1555
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1556
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1557
+ def restore_version(account_id, container_id, container_version_id, fields: nil, quota_user: nil, options: nil, &block)
1558
+ command = make_simple_command(:post, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/versions/{containerVersionId}/restore', options)
1559
+ command.response_representation = Google::Apis::TagmanagerV1::ContainerVersion::Representation
1560
+ command.response_class = Google::Apis::TagmanagerV1::ContainerVersion
1561
+ command.params['accountId'] = account_id unless account_id.nil?
1562
+ command.params['containerId'] = container_id unless container_id.nil?
1563
+ command.params['containerVersionId'] = container_version_id unless container_version_id.nil?
1564
+ command.query['fields'] = fields unless fields.nil?
1565
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1566
+ execute_or_queue_command(command, &block)
1567
+ end
1568
+
1569
+ # Undeletes a Container Version.
1570
+ # @param [String] account_id
1571
+ # The GTM Account ID.
1572
+ # @param [String] container_id
1573
+ # The GTM Container ID.
1574
+ # @param [String] container_version_id
1575
+ # The GTM Container Version ID.
1576
+ # @param [String] fields
1577
+ # Selector specifying which fields to include in a partial response.
1578
+ # @param [String] quota_user
1579
+ # Available to use for quota purposes for server-side applications. Can be any
1580
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1581
+ # @param [Google::Apis::RequestOptions] options
1582
+ # Request-specific options
1583
+ #
1584
+ # @yield [result, err] Result & error if block supplied
1585
+ # @yieldparam result [Google::Apis::TagmanagerV1::ContainerVersion] parsed result object
1586
+ # @yieldparam err [StandardError] error object if request failed
1587
+ #
1588
+ # @return [Google::Apis::TagmanagerV1::ContainerVersion]
1589
+ #
1590
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1591
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1592
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1593
+ def undelete_version(account_id, container_id, container_version_id, fields: nil, quota_user: nil, options: nil, &block)
1594
+ command = make_simple_command(:post, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/versions/{containerVersionId}/undelete', options)
1595
+ command.response_representation = Google::Apis::TagmanagerV1::ContainerVersion::Representation
1596
+ command.response_class = Google::Apis::TagmanagerV1::ContainerVersion
1597
+ command.params['accountId'] = account_id unless account_id.nil?
1598
+ command.params['containerId'] = container_id unless container_id.nil?
1599
+ command.params['containerVersionId'] = container_version_id unless container_version_id.nil?
1600
+ command.query['fields'] = fields unless fields.nil?
1601
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1602
+ execute_or_queue_command(command, &block)
1603
+ end
1604
+
1605
+ # Updates a Container Version.
1606
+ # @param [String] account_id
1607
+ # The GTM Account ID.
1608
+ # @param [String] container_id
1609
+ # The GTM Container ID.
1610
+ # @param [String] container_version_id
1611
+ # The GTM Container Version ID.
1612
+ # @param [Google::Apis::TagmanagerV1::ContainerVersion] container_version_object
1613
+ # @param [String] fingerprint
1614
+ # When provided, this fingerprint must match the fingerprint of the container
1615
+ # version in storage.
1616
+ # @param [String] fields
1617
+ # Selector specifying which fields to include in a partial response.
1618
+ # @param [String] quota_user
1619
+ # Available to use for quota purposes for server-side applications. Can be any
1620
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1621
+ # @param [Google::Apis::RequestOptions] options
1622
+ # Request-specific options
1623
+ #
1624
+ # @yield [result, err] Result & error if block supplied
1625
+ # @yieldparam result [Google::Apis::TagmanagerV1::ContainerVersion] parsed result object
1626
+ # @yieldparam err [StandardError] error object if request failed
1627
+ #
1628
+ # @return [Google::Apis::TagmanagerV1::ContainerVersion]
1629
+ #
1630
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1631
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1632
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1633
+ def update_version(account_id, container_id, container_version_id, container_version_object = nil, fingerprint: nil, fields: nil, quota_user: nil, options: nil, &block)
1634
+ command = make_simple_command(:put, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/versions/{containerVersionId}', options)
1635
+ command.request_representation = Google::Apis::TagmanagerV1::ContainerVersion::Representation
1636
+ command.request_object = container_version_object
1637
+ command.response_representation = Google::Apis::TagmanagerV1::ContainerVersion::Representation
1638
+ command.response_class = Google::Apis::TagmanagerV1::ContainerVersion
1639
+ command.params['accountId'] = account_id unless account_id.nil?
1640
+ command.params['containerId'] = container_id unless container_id.nil?
1641
+ command.params['containerVersionId'] = container_version_id unless container_version_id.nil?
1642
+ command.query['fingerprint'] = fingerprint unless fingerprint.nil?
1643
+ command.query['fields'] = fields unless fields.nil?
1644
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1645
+ execute_or_queue_command(command, &block)
1646
+ end
1647
+
1648
+ # Creates a user's Account & Container Permissions.
1649
+ # @param [String] account_id
1650
+ # The GTM Account ID.
1651
+ # @param [Google::Apis::TagmanagerV1::UserAccess] user_access_object
1652
+ # @param [String] fields
1653
+ # Selector specifying which fields to include in a partial response.
1654
+ # @param [String] quota_user
1655
+ # Available to use for quota purposes for server-side applications. Can be any
1656
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1657
+ # @param [Google::Apis::RequestOptions] options
1658
+ # Request-specific options
1659
+ #
1660
+ # @yield [result, err] Result & error if block supplied
1661
+ # @yieldparam result [Google::Apis::TagmanagerV1::UserAccess] parsed result object
1662
+ # @yieldparam err [StandardError] error object if request failed
1663
+ #
1664
+ # @return [Google::Apis::TagmanagerV1::UserAccess]
1665
+ #
1666
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1667
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1668
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1669
+ def create_permission(account_id, user_access_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1670
+ command = make_simple_command(:post, 'tagmanager/v1/accounts/{accountId}/permissions', options)
1671
+ command.request_representation = Google::Apis::TagmanagerV1::UserAccess::Representation
1672
+ command.request_object = user_access_object
1673
+ command.response_representation = Google::Apis::TagmanagerV1::UserAccess::Representation
1674
+ command.response_class = Google::Apis::TagmanagerV1::UserAccess
1675
+ command.params['accountId'] = account_id unless account_id.nil?
1676
+ command.query['fields'] = fields unless fields.nil?
1677
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1678
+ execute_or_queue_command(command, &block)
1679
+ end
1680
+
1681
+ # Removes a user from the account, revoking access to it and all of its
1682
+ # containers.
1683
+ # @param [String] account_id
1684
+ # The GTM Account ID.
1685
+ # @param [String] permission_id
1686
+ # The GTM User ID.
1687
+ # @param [String] fields
1688
+ # Selector specifying which fields to include in a partial response.
1689
+ # @param [String] quota_user
1690
+ # Available to use for quota purposes for server-side applications. Can be any
1691
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1692
+ # @param [Google::Apis::RequestOptions] options
1693
+ # Request-specific options
1694
+ #
1695
+ # @yield [result, err] Result & error if block supplied
1696
+ # @yieldparam result [NilClass] No result returned for this method
1697
+ # @yieldparam err [StandardError] error object if request failed
1698
+ #
1699
+ # @return [void]
1700
+ #
1701
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1702
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1703
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1704
+ def delete_permission(account_id, permission_id, fields: nil, quota_user: nil, options: nil, &block)
1705
+ command = make_simple_command(:delete, 'tagmanager/v1/accounts/{accountId}/permissions/{permissionId}', options)
1706
+ command.params['accountId'] = account_id unless account_id.nil?
1707
+ command.params['permissionId'] = permission_id unless permission_id.nil?
1708
+ command.query['fields'] = fields unless fields.nil?
1709
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1710
+ execute_or_queue_command(command, &block)
1711
+ end
1712
+
1713
+ # Gets a user's Account & Container Permissions.
1714
+ # @param [String] account_id
1715
+ # The GTM Account ID.
1716
+ # @param [String] permission_id
1717
+ # The GTM User ID.
1718
+ # @param [String] fields
1719
+ # Selector specifying which fields to include in a partial response.
1720
+ # @param [String] quota_user
1721
+ # Available to use for quota purposes for server-side applications. Can be any
1722
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1723
+ # @param [Google::Apis::RequestOptions] options
1724
+ # Request-specific options
1725
+ #
1726
+ # @yield [result, err] Result & error if block supplied
1727
+ # @yieldparam result [Google::Apis::TagmanagerV1::UserAccess] parsed result object
1728
+ # @yieldparam err [StandardError] error object if request failed
1729
+ #
1730
+ # @return [Google::Apis::TagmanagerV1::UserAccess]
1731
+ #
1732
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1733
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1734
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1735
+ def get_permission(account_id, permission_id, fields: nil, quota_user: nil, options: nil, &block)
1736
+ command = make_simple_command(:get, 'tagmanager/v1/accounts/{accountId}/permissions/{permissionId}', options)
1737
+ command.response_representation = Google::Apis::TagmanagerV1::UserAccess::Representation
1738
+ command.response_class = Google::Apis::TagmanagerV1::UserAccess
1739
+ command.params['accountId'] = account_id unless account_id.nil?
1740
+ command.params['permissionId'] = permission_id unless permission_id.nil?
1741
+ command.query['fields'] = fields unless fields.nil?
1742
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1743
+ execute_or_queue_command(command, &block)
1744
+ end
1745
+
1746
+ # List all users that have access to the account along with Account and
1747
+ # Container Permissions granted to each of them.
1748
+ # @param [String] account_id
1749
+ # The GTM Account ID.
1750
+ # @param [String] fields
1751
+ # Selector specifying which fields to include in a partial response.
1752
+ # @param [String] quota_user
1753
+ # Available to use for quota purposes for server-side applications. Can be any
1754
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1755
+ # @param [Google::Apis::RequestOptions] options
1756
+ # Request-specific options
1757
+ #
1758
+ # @yield [result, err] Result & error if block supplied
1759
+ # @yieldparam result [Google::Apis::TagmanagerV1::ListAccountUsersResponse] parsed result object
1760
+ # @yieldparam err [StandardError] error object if request failed
1761
+ #
1762
+ # @return [Google::Apis::TagmanagerV1::ListAccountUsersResponse]
1763
+ #
1764
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1765
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1766
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1767
+ def list_permissions(account_id, fields: nil, quota_user: nil, options: nil, &block)
1768
+ command = make_simple_command(:get, 'tagmanager/v1/accounts/{accountId}/permissions', options)
1769
+ command.response_representation = Google::Apis::TagmanagerV1::ListAccountUsersResponse::Representation
1770
+ command.response_class = Google::Apis::TagmanagerV1::ListAccountUsersResponse
1771
+ command.params['accountId'] = account_id unless account_id.nil?
1772
+ command.query['fields'] = fields unless fields.nil?
1773
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1774
+ execute_or_queue_command(command, &block)
1775
+ end
1776
+
1777
+ # Updates a user's Account & Container Permissions.
1778
+ # @param [String] account_id
1779
+ # The GTM Account ID.
1780
+ # @param [String] permission_id
1781
+ # The GTM User ID.
1782
+ # @param [Google::Apis::TagmanagerV1::UserAccess] user_access_object
1783
+ # @param [String] fields
1784
+ # Selector specifying which fields to include in a partial response.
1785
+ # @param [String] quota_user
1786
+ # Available to use for quota purposes for server-side applications. Can be any
1787
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1788
+ # @param [Google::Apis::RequestOptions] options
1789
+ # Request-specific options
1790
+ #
1791
+ # @yield [result, err] Result & error if block supplied
1792
+ # @yieldparam result [Google::Apis::TagmanagerV1::UserAccess] parsed result object
1793
+ # @yieldparam err [StandardError] error object if request failed
1794
+ #
1795
+ # @return [Google::Apis::TagmanagerV1::UserAccess]
1796
+ #
1797
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1798
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1799
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1800
+ def update_permission(account_id, permission_id, user_access_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1801
+ command = make_simple_command(:put, 'tagmanager/v1/accounts/{accountId}/permissions/{permissionId}', options)
1802
+ command.request_representation = Google::Apis::TagmanagerV1::UserAccess::Representation
1803
+ command.request_object = user_access_object
1804
+ command.response_representation = Google::Apis::TagmanagerV1::UserAccess::Representation
1805
+ command.response_class = Google::Apis::TagmanagerV1::UserAccess
1806
+ command.params['accountId'] = account_id unless account_id.nil?
1807
+ command.params['permissionId'] = permission_id unless permission_id.nil?
1808
+ command.query['fields'] = fields unless fields.nil?
1809
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1810
+ execute_or_queue_command(command, &block)
1811
+ end
1812
+
1813
+ protected
1814
+
1815
+ def apply_command_defaults(command)
1816
+ command.query['key'] = key unless key.nil?
1817
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1818
+ end
1819
+ end
1820
+ end
1821
+ end
1822
+ end