OLD | NEW |
1 // This is a generated file (see the discoveryapis_generator project). | 1 // This is a generated file (see the discoveryapis_generator project). |
2 | 2 |
3 library googleapis.tagmanager.v1; | 3 library googleapis.tagmanager.v1; |
4 | 4 |
5 import 'dart:core' as core; | 5 import 'dart:core' as core; |
6 import 'dart:async' as async; | 6 import 'dart:async' as async; |
7 import 'dart:convert' as convert; | 7 import 'dart:convert' as convert; |
8 | 8 |
9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; | 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
10 import 'package:http/http.dart' as http; | 10 import 'package:http/http.dart' as http; |
11 | 11 |
12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show | 12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' |
13 ApiRequestError, DetailedApiRequestError; | 13 show ApiRequestError, DetailedApiRequestError; |
14 | 14 |
15 const core.String USER_AGENT = 'dart-api-client tagmanager/v1'; | 15 const core.String USER_AGENT = 'dart-api-client tagmanager/v1'; |
16 | 16 |
17 /** Accesses Tag Manager accounts and containers. */ | 17 /// Accesses Tag Manager accounts and containers. |
18 class TagmanagerApi { | 18 class TagmanagerApi { |
19 /** Delete your Google Tag Manager containers */ | 19 /// Delete your Google Tag Manager containers |
20 static const TagmanagerDeleteContainersScope = "https://www.googleapis.com/aut
h/tagmanager.delete.containers"; | 20 static const TagmanagerDeleteContainersScope = |
| 21 "https://www.googleapis.com/auth/tagmanager.delete.containers"; |
21 | 22 |
22 /** | 23 /// Manage your Google Tag Manager container and its subcomponents, excluding |
23 * Manage your Google Tag Manager container and its subcomponents, excluding | 24 /// versioning and publishing |
24 * versioning and publishing | 25 static const TagmanagerEditContainersScope = |
25 */ | 26 "https://www.googleapis.com/auth/tagmanager.edit.containers"; |
26 static const TagmanagerEditContainersScope = "https://www.googleapis.com/auth/
tagmanager.edit.containers"; | |
27 | 27 |
28 /** Manage your Google Tag Manager container versions */ | 28 /// Manage your Google Tag Manager container versions |
29 static const TagmanagerEditContainerversionsScope = "https://www.googleapis.co
m/auth/tagmanager.edit.containerversions"; | 29 static const TagmanagerEditContainerversionsScope = |
| 30 "https://www.googleapis.com/auth/tagmanager.edit.containerversions"; |
30 | 31 |
31 /** View and manage your Google Tag Manager accounts */ | 32 /// View and manage your Google Tag Manager accounts |
32 static const TagmanagerManageAccountsScope = "https://www.googleapis.com/auth/
tagmanager.manage.accounts"; | 33 static const TagmanagerManageAccountsScope = |
| 34 "https://www.googleapis.com/auth/tagmanager.manage.accounts"; |
33 | 35 |
34 /** | 36 /// Manage user permissions of your Google Tag Manager account and container |
35 * Manage user permissions of your Google Tag Manager account and container | 37 static const TagmanagerManageUsersScope = |
36 */ | 38 "https://www.googleapis.com/auth/tagmanager.manage.users"; |
37 static const TagmanagerManageUsersScope = "https://www.googleapis.com/auth/tag
manager.manage.users"; | |
38 | 39 |
39 /** Publish your Google Tag Manager container versions */ | 40 /// Publish your Google Tag Manager container versions |
40 static const TagmanagerPublishScope = "https://www.googleapis.com/auth/tagmana
ger.publish"; | 41 static const TagmanagerPublishScope = |
| 42 "https://www.googleapis.com/auth/tagmanager.publish"; |
41 | 43 |
42 /** View your Google Tag Manager container and its subcomponents */ | 44 /// View your Google Tag Manager container and its subcomponents |
43 static const TagmanagerReadonlyScope = "https://www.googleapis.com/auth/tagman
ager.readonly"; | 45 static const TagmanagerReadonlyScope = |
44 | 46 "https://www.googleapis.com/auth/tagmanager.readonly"; |
45 | 47 |
46 final commons.ApiRequester _requester; | 48 final commons.ApiRequester _requester; |
47 | 49 |
48 AccountsResourceApi get accounts => new AccountsResourceApi(_requester); | 50 AccountsResourceApi get accounts => new AccountsResourceApi(_requester); |
49 | 51 |
50 TagmanagerApi(http.Client client, {core.String rootUrl: "https://www.googleapi
s.com/", core.String servicePath: "tagmanager/v1/"}) : | 52 TagmanagerApi(http.Client client, |
51 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); | 53 {core.String rootUrl: "https://www.googleapis.com/", |
| 54 core.String servicePath: "tagmanager/v1/"}) |
| 55 : _requester = |
| 56 new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT); |
52 } | 57 } |
53 | 58 |
54 | |
55 class AccountsResourceApi { | 59 class AccountsResourceApi { |
56 final commons.ApiRequester _requester; | 60 final commons.ApiRequester _requester; |
57 | 61 |
58 AccountsContainersResourceApi get containers => new AccountsContainersResource
Api(_requester); | 62 AccountsContainersResourceApi get containers => |
59 AccountsPermissionsResourceApi get permissions => new AccountsPermissionsResou
rceApi(_requester); | 63 new AccountsContainersResourceApi(_requester); |
| 64 AccountsPermissionsResourceApi get permissions => |
| 65 new AccountsPermissionsResourceApi(_requester); |
60 | 66 |
61 AccountsResourceApi(commons.ApiRequester client) : | 67 AccountsResourceApi(commons.ApiRequester client) : _requester = client; |
62 _requester = client; | |
63 | 68 |
64 /** | 69 /// Gets a GTM Account. |
65 * Gets a GTM Account. | 70 /// |
66 * | 71 /// Request parameters: |
67 * Request parameters: | 72 /// |
68 * | 73 /// [accountId] - The GTM Account ID. |
69 * [accountId] - The GTM Account ID. | 74 /// |
70 * | 75 /// Completes with a [Account]. |
71 * Completes with a [Account]. | 76 /// |
72 * | 77 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
73 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 78 /// an error. |
74 * error. | 79 /// |
75 * | 80 /// If the used [http.Client] completes with an error when making a REST |
76 * If the used [http.Client] completes with an error when making a REST call, | 81 /// call, this method will complete with the same error. |
77 * this method will complete with the same error. | |
78 */ | |
79 async.Future<Account> get(core.String accountId) { | 82 async.Future<Account> get(core.String accountId) { |
80 var _url = null; | 83 var _url = null; |
81 var _queryParams = new core.Map(); | 84 var _queryParams = new core.Map(); |
82 var _uploadMedia = null; | 85 var _uploadMedia = null; |
83 var _uploadOptions = null; | 86 var _uploadOptions = null; |
84 var _downloadOptions = commons.DownloadOptions.Metadata; | 87 var _downloadOptions = commons.DownloadOptions.Metadata; |
85 var _body = null; | 88 var _body = null; |
86 | 89 |
87 if (accountId == null) { | 90 if (accountId == null) { |
88 throw new core.ArgumentError("Parameter accountId is required."); | 91 throw new core.ArgumentError("Parameter accountId is required."); |
89 } | 92 } |
90 | 93 |
91 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId'); | 94 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId'); |
92 | 95 |
93 var _response = _requester.request(_url, | 96 var _response = _requester.request(_url, "GET", |
94 "GET", | 97 body: _body, |
95 body: _body, | 98 queryParams: _queryParams, |
96 queryParams: _queryParams, | 99 uploadOptions: _uploadOptions, |
97 uploadOptions: _uploadOptions, | 100 uploadMedia: _uploadMedia, |
98 uploadMedia: _uploadMedia, | 101 downloadOptions: _downloadOptions); |
99 downloadOptions: _downloadOptions); | |
100 return _response.then((data) => new Account.fromJson(data)); | 102 return _response.then((data) => new Account.fromJson(data)); |
101 } | 103 } |
102 | 104 |
103 /** | 105 /// Lists all GTM Accounts that a user has access to. |
104 * Lists all GTM Accounts that a user has access to. | 106 /// |
105 * | 107 /// Request parameters: |
106 * Request parameters: | 108 /// |
107 * | 109 /// Completes with a [ListAccountsResponse]. |
108 * Completes with a [ListAccountsResponse]. | 110 /// |
109 * | 111 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
110 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 112 /// an error. |
111 * error. | 113 /// |
112 * | 114 /// If the used [http.Client] completes with an error when making a REST |
113 * If the used [http.Client] completes with an error when making a REST call, | 115 /// call, this method will complete with the same error. |
114 * this method will complete with the same error. | |
115 */ | |
116 async.Future<ListAccountsResponse> list() { | 116 async.Future<ListAccountsResponse> list() { |
117 var _url = null; | 117 var _url = null; |
118 var _queryParams = new core.Map(); | 118 var _queryParams = new core.Map(); |
119 var _uploadMedia = null; | 119 var _uploadMedia = null; |
120 var _uploadOptions = null; | 120 var _uploadOptions = null; |
121 var _downloadOptions = commons.DownloadOptions.Metadata; | 121 var _downloadOptions = commons.DownloadOptions.Metadata; |
122 var _body = null; | 122 var _body = null; |
123 | 123 |
124 | |
125 _url = 'accounts'; | 124 _url = 'accounts'; |
126 | 125 |
127 var _response = _requester.request(_url, | 126 var _response = _requester.request(_url, "GET", |
128 "GET", | 127 body: _body, |
129 body: _body, | 128 queryParams: _queryParams, |
130 queryParams: _queryParams, | 129 uploadOptions: _uploadOptions, |
131 uploadOptions: _uploadOptions, | 130 uploadMedia: _uploadMedia, |
132 uploadMedia: _uploadMedia, | 131 downloadOptions: _downloadOptions); |
133 downloadOptions: _downloadOptions); | |
134 return _response.then((data) => new ListAccountsResponse.fromJson(data)); | 132 return _response.then((data) => new ListAccountsResponse.fromJson(data)); |
135 } | 133 } |
136 | 134 |
137 /** | 135 /// Updates a GTM Account. |
138 * Updates a GTM Account. | 136 /// |
139 * | 137 /// [request] - The metadata request object. |
140 * [request] - The metadata request object. | 138 /// |
141 * | 139 /// Request parameters: |
142 * Request parameters: | 140 /// |
143 * | 141 /// [accountId] - The GTM Account ID. |
144 * [accountId] - The GTM Account ID. | 142 /// |
145 * | 143 /// [fingerprint] - When provided, this fingerprint must match the |
146 * [fingerprint] - When provided, this fingerprint must match the fingerprint | 144 /// fingerprint of the account in storage. |
147 * of the account in storage. | 145 /// |
148 * | 146 /// Completes with a [Account]. |
149 * Completes with a [Account]. | 147 /// |
150 * | 148 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
151 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 149 /// an error. |
152 * error. | 150 /// |
153 * | 151 /// If the used [http.Client] completes with an error when making a REST |
154 * If the used [http.Client] completes with an error when making a REST call, | 152 /// call, this method will complete with the same error. |
155 * this method will complete with the same error. | 153 async.Future<Account> update(Account request, core.String accountId, |
156 */ | 154 {core.String fingerprint}) { |
157 async.Future<Account> update(Account request, core.String accountId, {core.Str
ing fingerprint}) { | |
158 var _url = null; | 155 var _url = null; |
159 var _queryParams = new core.Map(); | 156 var _queryParams = new core.Map(); |
160 var _uploadMedia = null; | 157 var _uploadMedia = null; |
161 var _uploadOptions = null; | 158 var _uploadOptions = null; |
162 var _downloadOptions = commons.DownloadOptions.Metadata; | 159 var _downloadOptions = commons.DownloadOptions.Metadata; |
163 var _body = null; | 160 var _body = null; |
164 | 161 |
165 if (request != null) { | 162 if (request != null) { |
166 _body = convert.JSON.encode((request).toJson()); | 163 _body = convert.JSON.encode((request).toJson()); |
167 } | 164 } |
168 if (accountId == null) { | 165 if (accountId == null) { |
169 throw new core.ArgumentError("Parameter accountId is required."); | 166 throw new core.ArgumentError("Parameter accountId is required."); |
170 } | 167 } |
171 if (fingerprint != null) { | 168 if (fingerprint != null) { |
172 _queryParams["fingerprint"] = [fingerprint]; | 169 _queryParams["fingerprint"] = [fingerprint]; |
173 } | 170 } |
174 | 171 |
175 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId'); | 172 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId'); |
176 | 173 |
177 var _response = _requester.request(_url, | 174 var _response = _requester.request(_url, "PUT", |
178 "PUT", | 175 body: _body, |
179 body: _body, | 176 queryParams: _queryParams, |
180 queryParams: _queryParams, | 177 uploadOptions: _uploadOptions, |
181 uploadOptions: _uploadOptions, | 178 uploadMedia: _uploadMedia, |
182 uploadMedia: _uploadMedia, | 179 downloadOptions: _downloadOptions); |
183 downloadOptions: _downloadOptions); | |
184 return _response.then((data) => new Account.fromJson(data)); | 180 return _response.then((data) => new Account.fromJson(data)); |
185 } | 181 } |
186 | |
187 } | 182 } |
188 | 183 |
189 | |
190 class AccountsContainersResourceApi { | 184 class AccountsContainersResourceApi { |
191 final commons.ApiRequester _requester; | 185 final commons.ApiRequester _requester; |
192 | 186 |
193 AccountsContainersEnvironmentsResourceApi get environments => new AccountsCont
ainersEnvironmentsResourceApi(_requester); | 187 AccountsContainersEnvironmentsResourceApi get environments => |
194 AccountsContainersFoldersResourceApi get folders => new AccountsContainersFold
ersResourceApi(_requester); | 188 new AccountsContainersEnvironmentsResourceApi(_requester); |
195 AccountsContainersMoveFoldersResourceApi get moveFolders => new AccountsContai
nersMoveFoldersResourceApi(_requester); | 189 AccountsContainersFoldersResourceApi get folders => |
196 AccountsContainersReauthorizeEnvironmentsResourceApi get reauthorizeEnvironmen
ts => new AccountsContainersReauthorizeEnvironmentsResourceApi(_requester); | 190 new AccountsContainersFoldersResourceApi(_requester); |
197 AccountsContainersTagsResourceApi get tags => new AccountsContainersTagsResour
ceApi(_requester); | 191 AccountsContainersMoveFoldersResourceApi get moveFolders => |
198 AccountsContainersTriggersResourceApi get triggers => new AccountsContainersTr
iggersResourceApi(_requester); | 192 new AccountsContainersMoveFoldersResourceApi(_requester); |
199 AccountsContainersVariablesResourceApi get variables => new AccountsContainers
VariablesResourceApi(_requester); | 193 AccountsContainersReauthorizeEnvironmentsResourceApi |
200 AccountsContainersVersionsResourceApi get versions => new AccountsContainersVe
rsionsResourceApi(_requester); | 194 get reauthorizeEnvironments => |
| 195 new AccountsContainersReauthorizeEnvironmentsResourceApi(_requester); |
| 196 AccountsContainersTagsResourceApi get tags => |
| 197 new AccountsContainersTagsResourceApi(_requester); |
| 198 AccountsContainersTriggersResourceApi get triggers => |
| 199 new AccountsContainersTriggersResourceApi(_requester); |
| 200 AccountsContainersVariablesResourceApi get variables => |
| 201 new AccountsContainersVariablesResourceApi(_requester); |
| 202 AccountsContainersVersionsResourceApi get versions => |
| 203 new AccountsContainersVersionsResourceApi(_requester); |
201 | 204 |
202 AccountsContainersResourceApi(commons.ApiRequester client) : | 205 AccountsContainersResourceApi(commons.ApiRequester client) |
203 _requester = client; | 206 : _requester = client; |
204 | 207 |
205 /** | 208 /// Creates a Container. |
206 * Creates a Container. | 209 /// |
207 * | 210 /// [request] - The metadata request object. |
208 * [request] - The metadata request object. | 211 /// |
209 * | 212 /// Request parameters: |
210 * Request parameters: | 213 /// |
211 * | 214 /// [accountId] - The GTM Account ID. |
212 * [accountId] - The GTM Account ID. | 215 /// |
213 * | 216 /// Completes with a [Container]. |
214 * Completes with a [Container]. | 217 /// |
215 * | 218 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
216 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 219 /// an error. |
217 * error. | 220 /// |
218 * | 221 /// If the used [http.Client] completes with an error when making a REST |
219 * If the used [http.Client] completes with an error when making a REST call, | 222 /// call, this method will complete with the same error. |
220 * this method will complete with the same error. | |
221 */ | |
222 async.Future<Container> create(Container request, core.String accountId) { | 223 async.Future<Container> create(Container request, core.String accountId) { |
223 var _url = null; | 224 var _url = null; |
224 var _queryParams = new core.Map(); | 225 var _queryParams = new core.Map(); |
225 var _uploadMedia = null; | 226 var _uploadMedia = null; |
226 var _uploadOptions = null; | 227 var _uploadOptions = null; |
227 var _downloadOptions = commons.DownloadOptions.Metadata; | 228 var _downloadOptions = commons.DownloadOptions.Metadata; |
228 var _body = null; | 229 var _body = null; |
229 | 230 |
230 if (request != null) { | 231 if (request != null) { |
231 _body = convert.JSON.encode((request).toJson()); | 232 _body = convert.JSON.encode((request).toJson()); |
232 } | 233 } |
233 if (accountId == null) { | 234 if (accountId == null) { |
234 throw new core.ArgumentError("Parameter accountId is required."); | 235 throw new core.ArgumentError("Parameter accountId is required."); |
235 } | 236 } |
236 | 237 |
237 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers'; | 238 _url = 'accounts/' + |
| 239 commons.Escaper.ecapeVariable('$accountId') + |
| 240 '/containers'; |
238 | 241 |
239 var _response = _requester.request(_url, | 242 var _response = _requester.request(_url, "POST", |
240 "POST", | 243 body: _body, |
241 body: _body, | 244 queryParams: _queryParams, |
242 queryParams: _queryParams, | 245 uploadOptions: _uploadOptions, |
243 uploadOptions: _uploadOptions, | 246 uploadMedia: _uploadMedia, |
244 uploadMedia: _uploadMedia, | 247 downloadOptions: _downloadOptions); |
245 downloadOptions: _downloadOptions); | |
246 return _response.then((data) => new Container.fromJson(data)); | 248 return _response.then((data) => new Container.fromJson(data)); |
247 } | 249 } |
248 | 250 |
249 /** | 251 /// Deletes a Container. |
250 * Deletes a Container. | 252 /// |
251 * | 253 /// Request parameters: |
252 * Request parameters: | 254 /// |
253 * | 255 /// [accountId] - The GTM Account ID. |
254 * [accountId] - The GTM Account ID. | 256 /// |
255 * | 257 /// [containerId] - The GTM Container ID. |
256 * [containerId] - The GTM Container ID. | 258 /// |
257 * | 259 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
258 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 260 /// an error. |
259 * error. | 261 /// |
260 * | 262 /// If the used [http.Client] completes with an error when making a REST |
261 * If the used [http.Client] completes with an error when making a REST call, | 263 /// call, this method will complete with the same error. |
262 * this method will complete with the same error. | |
263 */ | |
264 async.Future delete(core.String accountId, core.String containerId) { | 264 async.Future delete(core.String accountId, core.String containerId) { |
265 var _url = null; | 265 var _url = null; |
266 var _queryParams = new core.Map(); | 266 var _queryParams = new core.Map(); |
267 var _uploadMedia = null; | 267 var _uploadMedia = null; |
268 var _uploadOptions = null; | 268 var _uploadOptions = null; |
269 var _downloadOptions = commons.DownloadOptions.Metadata; | 269 var _downloadOptions = commons.DownloadOptions.Metadata; |
270 var _body = null; | 270 var _body = null; |
271 | 271 |
272 if (accountId == null) { | 272 if (accountId == null) { |
273 throw new core.ArgumentError("Parameter accountId is required."); | 273 throw new core.ArgumentError("Parameter accountId is required."); |
274 } | 274 } |
275 if (containerId == null) { | 275 if (containerId == null) { |
276 throw new core.ArgumentError("Parameter containerId is required."); | 276 throw new core.ArgumentError("Parameter containerId is required."); |
277 } | 277 } |
278 | 278 |
279 _downloadOptions = null; | 279 _downloadOptions = null; |
280 | 280 |
281 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId'); | 281 _url = 'accounts/' + |
| 282 commons.Escaper.ecapeVariable('$accountId') + |
| 283 '/containers/' + |
| 284 commons.Escaper.ecapeVariable('$containerId'); |
282 | 285 |
283 var _response = _requester.request(_url, | 286 var _response = _requester.request(_url, "DELETE", |
284 "DELETE", | 287 body: _body, |
285 body: _body, | 288 queryParams: _queryParams, |
286 queryParams: _queryParams, | 289 uploadOptions: _uploadOptions, |
287 uploadOptions: _uploadOptions, | 290 uploadMedia: _uploadMedia, |
288 uploadMedia: _uploadMedia, | 291 downloadOptions: _downloadOptions); |
289 downloadOptions: _downloadOptions); | |
290 return _response.then((data) => null); | 292 return _response.then((data) => null); |
291 } | 293 } |
292 | 294 |
293 /** | 295 /// Gets a Container. |
294 * Gets a Container. | 296 /// |
295 * | 297 /// Request parameters: |
296 * Request parameters: | 298 /// |
297 * | 299 /// [accountId] - The GTM Account ID. |
298 * [accountId] - The GTM Account ID. | 300 /// |
299 * | 301 /// [containerId] - The GTM Container ID. |
300 * [containerId] - The GTM Container ID. | 302 /// |
301 * | 303 /// Completes with a [Container]. |
302 * Completes with a [Container]. | 304 /// |
303 * | 305 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
304 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 306 /// an error. |
305 * error. | 307 /// |
306 * | 308 /// If the used [http.Client] completes with an error when making a REST |
307 * If the used [http.Client] completes with an error when making a REST call, | 309 /// call, this method will complete with the same error. |
308 * this method will complete with the same error. | |
309 */ | |
310 async.Future<Container> get(core.String accountId, core.String containerId) { | 310 async.Future<Container> get(core.String accountId, core.String containerId) { |
311 var _url = null; | 311 var _url = null; |
312 var _queryParams = new core.Map(); | 312 var _queryParams = new core.Map(); |
313 var _uploadMedia = null; | 313 var _uploadMedia = null; |
314 var _uploadOptions = null; | 314 var _uploadOptions = null; |
315 var _downloadOptions = commons.DownloadOptions.Metadata; | 315 var _downloadOptions = commons.DownloadOptions.Metadata; |
316 var _body = null; | 316 var _body = null; |
317 | 317 |
318 if (accountId == null) { | 318 if (accountId == null) { |
319 throw new core.ArgumentError("Parameter accountId is required."); | 319 throw new core.ArgumentError("Parameter accountId is required."); |
320 } | 320 } |
321 if (containerId == null) { | 321 if (containerId == null) { |
322 throw new core.ArgumentError("Parameter containerId is required."); | 322 throw new core.ArgumentError("Parameter containerId is required."); |
323 } | 323 } |
324 | 324 |
325 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId'); | 325 _url = 'accounts/' + |
| 326 commons.Escaper.ecapeVariable('$accountId') + |
| 327 '/containers/' + |
| 328 commons.Escaper.ecapeVariable('$containerId'); |
326 | 329 |
327 var _response = _requester.request(_url, | 330 var _response = _requester.request(_url, "GET", |
328 "GET", | 331 body: _body, |
329 body: _body, | 332 queryParams: _queryParams, |
330 queryParams: _queryParams, | 333 uploadOptions: _uploadOptions, |
331 uploadOptions: _uploadOptions, | 334 uploadMedia: _uploadMedia, |
332 uploadMedia: _uploadMedia, | 335 downloadOptions: _downloadOptions); |
333 downloadOptions: _downloadOptions); | |
334 return _response.then((data) => new Container.fromJson(data)); | 336 return _response.then((data) => new Container.fromJson(data)); |
335 } | 337 } |
336 | 338 |
337 /** | 339 /// Lists all Containers that belongs to a GTM Account. |
338 * Lists all Containers that belongs to a GTM Account. | 340 /// |
339 * | 341 /// Request parameters: |
340 * Request parameters: | 342 /// |
341 * | 343 /// [accountId] - The GTM Account ID. |
342 * [accountId] - The GTM Account ID. | 344 /// |
343 * | 345 /// Completes with a [ListContainersResponse]. |
344 * Completes with a [ListContainersResponse]. | 346 /// |
345 * | 347 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
346 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 348 /// an error. |
347 * error. | 349 /// |
348 * | 350 /// If the used [http.Client] completes with an error when making a REST |
349 * If the used [http.Client] completes with an error when making a REST call, | 351 /// call, this method will complete with the same error. |
350 * this method will complete with the same error. | |
351 */ | |
352 async.Future<ListContainersResponse> list(core.String accountId) { | 352 async.Future<ListContainersResponse> list(core.String accountId) { |
353 var _url = null; | 353 var _url = null; |
354 var _queryParams = new core.Map(); | 354 var _queryParams = new core.Map(); |
355 var _uploadMedia = null; | 355 var _uploadMedia = null; |
356 var _uploadOptions = null; | 356 var _uploadOptions = null; |
357 var _downloadOptions = commons.DownloadOptions.Metadata; | 357 var _downloadOptions = commons.DownloadOptions.Metadata; |
358 var _body = null; | 358 var _body = null; |
359 | 359 |
360 if (accountId == null) { | 360 if (accountId == null) { |
361 throw new core.ArgumentError("Parameter accountId is required."); | 361 throw new core.ArgumentError("Parameter accountId is required."); |
362 } | 362 } |
363 | 363 |
364 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers'; | 364 _url = 'accounts/' + |
| 365 commons.Escaper.ecapeVariable('$accountId') + |
| 366 '/containers'; |
365 | 367 |
366 var _response = _requester.request(_url, | 368 var _response = _requester.request(_url, "GET", |
367 "GET", | 369 body: _body, |
368 body: _body, | 370 queryParams: _queryParams, |
369 queryParams: _queryParams, | 371 uploadOptions: _uploadOptions, |
370 uploadOptions: _uploadOptions, | 372 uploadMedia: _uploadMedia, |
371 uploadMedia: _uploadMedia, | 373 downloadOptions: _downloadOptions); |
372 downloadOptions: _downloadOptions); | |
373 return _response.then((data) => new ListContainersResponse.fromJson(data)); | 374 return _response.then((data) => new ListContainersResponse.fromJson(data)); |
374 } | 375 } |
375 | 376 |
376 /** | 377 /// Updates a Container. |
377 * Updates a Container. | 378 /// |
378 * | 379 /// [request] - The metadata request object. |
379 * [request] - The metadata request object. | 380 /// |
380 * | 381 /// Request parameters: |
381 * Request parameters: | 382 /// |
382 * | 383 /// [accountId] - The GTM Account ID. |
383 * [accountId] - The GTM Account ID. | 384 /// |
384 * | 385 /// [containerId] - The GTM Container ID. |
385 * [containerId] - The GTM Container ID. | 386 /// |
386 * | 387 /// [fingerprint] - When provided, this fingerprint must match the |
387 * [fingerprint] - When provided, this fingerprint must match the fingerprint | 388 /// fingerprint of the container in storage. |
388 * of the container in storage. | 389 /// |
389 * | 390 /// Completes with a [Container]. |
390 * Completes with a [Container]. | 391 /// |
391 * | 392 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
392 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 393 /// an error. |
393 * error. | 394 /// |
394 * | 395 /// If the used [http.Client] completes with an error when making a REST |
395 * If the used [http.Client] completes with an error when making a REST call, | 396 /// call, this method will complete with the same error. |
396 * this method will complete with the same error. | 397 async.Future<Container> update( |
397 */ | 398 Container request, core.String accountId, core.String containerId, |
398 async.Future<Container> update(Container request, core.String accountId, core.
String containerId, {core.String fingerprint}) { | 399 {core.String fingerprint}) { |
399 var _url = null; | 400 var _url = null; |
400 var _queryParams = new core.Map(); | 401 var _queryParams = new core.Map(); |
401 var _uploadMedia = null; | 402 var _uploadMedia = null; |
402 var _uploadOptions = null; | 403 var _uploadOptions = null; |
403 var _downloadOptions = commons.DownloadOptions.Metadata; | 404 var _downloadOptions = commons.DownloadOptions.Metadata; |
404 var _body = null; | 405 var _body = null; |
405 | 406 |
406 if (request != null) { | 407 if (request != null) { |
407 _body = convert.JSON.encode((request).toJson()); | 408 _body = convert.JSON.encode((request).toJson()); |
408 } | 409 } |
409 if (accountId == null) { | 410 if (accountId == null) { |
410 throw new core.ArgumentError("Parameter accountId is required."); | 411 throw new core.ArgumentError("Parameter accountId is required."); |
411 } | 412 } |
412 if (containerId == null) { | 413 if (containerId == null) { |
413 throw new core.ArgumentError("Parameter containerId is required."); | 414 throw new core.ArgumentError("Parameter containerId is required."); |
414 } | 415 } |
415 if (fingerprint != null) { | 416 if (fingerprint != null) { |
416 _queryParams["fingerprint"] = [fingerprint]; | 417 _queryParams["fingerprint"] = [fingerprint]; |
417 } | 418 } |
418 | 419 |
419 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId'); | 420 _url = 'accounts/' + |
| 421 commons.Escaper.ecapeVariable('$accountId') + |
| 422 '/containers/' + |
| 423 commons.Escaper.ecapeVariable('$containerId'); |
420 | 424 |
421 var _response = _requester.request(_url, | 425 var _response = _requester.request(_url, "PUT", |
422 "PUT", | 426 body: _body, |
423 body: _body, | 427 queryParams: _queryParams, |
424 queryParams: _queryParams, | 428 uploadOptions: _uploadOptions, |
425 uploadOptions: _uploadOptions, | 429 uploadMedia: _uploadMedia, |
426 uploadMedia: _uploadMedia, | 430 downloadOptions: _downloadOptions); |
427 downloadOptions: _downloadOptions); | |
428 return _response.then((data) => new Container.fromJson(data)); | 431 return _response.then((data) => new Container.fromJson(data)); |
429 } | 432 } |
430 | |
431 } | 433 } |
432 | 434 |
433 | |
434 class AccountsContainersEnvironmentsResourceApi { | 435 class AccountsContainersEnvironmentsResourceApi { |
435 final commons.ApiRequester _requester; | 436 final commons.ApiRequester _requester; |
436 | 437 |
437 AccountsContainersEnvironmentsResourceApi(commons.ApiRequester client) : | 438 AccountsContainersEnvironmentsResourceApi(commons.ApiRequester client) |
438 _requester = client; | 439 : _requester = client; |
439 | 440 |
440 /** | 441 /// Creates a GTM Environment. |
441 * Creates a GTM Environment. | 442 /// |
442 * | 443 /// [request] - The metadata request object. |
443 * [request] - The metadata request object. | 444 /// |
444 * | 445 /// Request parameters: |
445 * Request parameters: | 446 /// |
446 * | 447 /// [accountId] - The GTM Account ID. |
447 * [accountId] - The GTM Account ID. | 448 /// |
448 * | 449 /// [containerId] - The GTM Container ID. |
449 * [containerId] - The GTM Container ID. | 450 /// |
450 * | 451 /// Completes with a [Environment]. |
451 * Completes with a [Environment]. | 452 /// |
452 * | 453 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
453 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 454 /// an error. |
454 * error. | 455 /// |
455 * | 456 /// If the used [http.Client] completes with an error when making a REST |
456 * If the used [http.Client] completes with an error when making a REST call, | 457 /// call, this method will complete with the same error. |
457 * this method will complete with the same error. | 458 async.Future<Environment> create( |
458 */ | 459 Environment request, core.String accountId, core.String containerId) { |
459 async.Future<Environment> create(Environment request, core.String accountId, c
ore.String containerId) { | |
460 var _url = null; | 460 var _url = null; |
461 var _queryParams = new core.Map(); | 461 var _queryParams = new core.Map(); |
462 var _uploadMedia = null; | 462 var _uploadMedia = null; |
463 var _uploadOptions = null; | 463 var _uploadOptions = null; |
464 var _downloadOptions = commons.DownloadOptions.Metadata; | 464 var _downloadOptions = commons.DownloadOptions.Metadata; |
465 var _body = null; | 465 var _body = null; |
466 | 466 |
467 if (request != null) { | 467 if (request != null) { |
468 _body = convert.JSON.encode((request).toJson()); | 468 _body = convert.JSON.encode((request).toJson()); |
469 } | 469 } |
470 if (accountId == null) { | 470 if (accountId == null) { |
471 throw new core.ArgumentError("Parameter accountId is required."); | 471 throw new core.ArgumentError("Parameter accountId is required."); |
472 } | 472 } |
473 if (containerId == null) { | 473 if (containerId == null) { |
474 throw new core.ArgumentError("Parameter containerId is required."); | 474 throw new core.ArgumentError("Parameter containerId is required."); |
475 } | 475 } |
476 | 476 |
477 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/environments'; | 477 _url = 'accounts/' + |
| 478 commons.Escaper.ecapeVariable('$accountId') + |
| 479 '/containers/' + |
| 480 commons.Escaper.ecapeVariable('$containerId') + |
| 481 '/environments'; |
478 | 482 |
479 var _response = _requester.request(_url, | 483 var _response = _requester.request(_url, "POST", |
480 "POST", | 484 body: _body, |
481 body: _body, | 485 queryParams: _queryParams, |
482 queryParams: _queryParams, | 486 uploadOptions: _uploadOptions, |
483 uploadOptions: _uploadOptions, | 487 uploadMedia: _uploadMedia, |
484 uploadMedia: _uploadMedia, | 488 downloadOptions: _downloadOptions); |
485 downloadOptions: _downloadOptions); | |
486 return _response.then((data) => new Environment.fromJson(data)); | 489 return _response.then((data) => new Environment.fromJson(data)); |
487 } | 490 } |
488 | 491 |
489 /** | 492 /// Deletes a GTM Environment. |
490 * Deletes a GTM Environment. | 493 /// |
491 * | 494 /// Request parameters: |
492 * Request parameters: | 495 /// |
493 * | 496 /// [accountId] - The GTM Account ID. |
494 * [accountId] - The GTM Account ID. | 497 /// |
495 * | 498 /// [containerId] - The GTM Container ID. |
496 * [containerId] - The GTM Container ID. | 499 /// |
497 * | 500 /// [environmentId] - The GTM Environment ID. |
498 * [environmentId] - The GTM Environment ID. | 501 /// |
499 * | 502 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
500 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 503 /// an error. |
501 * error. | 504 /// |
502 * | 505 /// If the used [http.Client] completes with an error when making a REST |
503 * If the used [http.Client] completes with an error when making a REST call, | 506 /// call, this method will complete with the same error. |
504 * this method will complete with the same error. | 507 async.Future delete(core.String accountId, core.String containerId, |
505 */ | 508 core.String environmentId) { |
506 async.Future delete(core.String accountId, core.String containerId, core.Strin
g environmentId) { | |
507 var _url = null; | 509 var _url = null; |
508 var _queryParams = new core.Map(); | 510 var _queryParams = new core.Map(); |
509 var _uploadMedia = null; | 511 var _uploadMedia = null; |
510 var _uploadOptions = null; | 512 var _uploadOptions = null; |
511 var _downloadOptions = commons.DownloadOptions.Metadata; | 513 var _downloadOptions = commons.DownloadOptions.Metadata; |
512 var _body = null; | 514 var _body = null; |
513 | 515 |
514 if (accountId == null) { | 516 if (accountId == null) { |
515 throw new core.ArgumentError("Parameter accountId is required."); | 517 throw new core.ArgumentError("Parameter accountId is required."); |
516 } | 518 } |
517 if (containerId == null) { | 519 if (containerId == null) { |
518 throw new core.ArgumentError("Parameter containerId is required."); | 520 throw new core.ArgumentError("Parameter containerId is required."); |
519 } | 521 } |
520 if (environmentId == null) { | 522 if (environmentId == null) { |
521 throw new core.ArgumentError("Parameter environmentId is required."); | 523 throw new core.ArgumentError("Parameter environmentId is required."); |
522 } | 524 } |
523 | 525 |
524 _downloadOptions = null; | 526 _downloadOptions = null; |
525 | 527 |
526 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/environments/' + commo
ns.Escaper.ecapeVariable('$environmentId'); | 528 _url = 'accounts/' + |
| 529 commons.Escaper.ecapeVariable('$accountId') + |
| 530 '/containers/' + |
| 531 commons.Escaper.ecapeVariable('$containerId') + |
| 532 '/environments/' + |
| 533 commons.Escaper.ecapeVariable('$environmentId'); |
527 | 534 |
528 var _response = _requester.request(_url, | 535 var _response = _requester.request(_url, "DELETE", |
529 "DELETE", | 536 body: _body, |
530 body: _body, | 537 queryParams: _queryParams, |
531 queryParams: _queryParams, | 538 uploadOptions: _uploadOptions, |
532 uploadOptions: _uploadOptions, | 539 uploadMedia: _uploadMedia, |
533 uploadMedia: _uploadMedia, | 540 downloadOptions: _downloadOptions); |
534 downloadOptions: _downloadOptions); | |
535 return _response.then((data) => null); | 541 return _response.then((data) => null); |
536 } | 542 } |
537 | 543 |
538 /** | 544 /// Gets a GTM Environment. |
539 * Gets a GTM Environment. | 545 /// |
540 * | 546 /// Request parameters: |
541 * Request parameters: | 547 /// |
542 * | 548 /// [accountId] - The GTM Account ID. |
543 * [accountId] - The GTM Account ID. | 549 /// |
544 * | 550 /// [containerId] - The GTM Container ID. |
545 * [containerId] - The GTM Container ID. | 551 /// |
546 * | 552 /// [environmentId] - The GTM Environment ID. |
547 * [environmentId] - The GTM Environment ID. | 553 /// |
548 * | 554 /// Completes with a [Environment]. |
549 * Completes with a [Environment]. | 555 /// |
550 * | 556 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
551 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 557 /// an error. |
552 * error. | 558 /// |
553 * | 559 /// If the used [http.Client] completes with an error when making a REST |
554 * If the used [http.Client] completes with an error when making a REST call, | 560 /// call, this method will complete with the same error. |
555 * this method will complete with the same error. | 561 async.Future<Environment> get(core.String accountId, core.String containerId, |
556 */ | 562 core.String environmentId) { |
557 async.Future<Environment> get(core.String accountId, core.String containerId,
core.String environmentId) { | |
558 var _url = null; | 563 var _url = null; |
559 var _queryParams = new core.Map(); | 564 var _queryParams = new core.Map(); |
560 var _uploadMedia = null; | 565 var _uploadMedia = null; |
561 var _uploadOptions = null; | 566 var _uploadOptions = null; |
562 var _downloadOptions = commons.DownloadOptions.Metadata; | 567 var _downloadOptions = commons.DownloadOptions.Metadata; |
563 var _body = null; | 568 var _body = null; |
564 | 569 |
565 if (accountId == null) { | 570 if (accountId == null) { |
566 throw new core.ArgumentError("Parameter accountId is required."); | 571 throw new core.ArgumentError("Parameter accountId is required."); |
567 } | 572 } |
568 if (containerId == null) { | 573 if (containerId == null) { |
569 throw new core.ArgumentError("Parameter containerId is required."); | 574 throw new core.ArgumentError("Parameter containerId is required."); |
570 } | 575 } |
571 if (environmentId == null) { | 576 if (environmentId == null) { |
572 throw new core.ArgumentError("Parameter environmentId is required."); | 577 throw new core.ArgumentError("Parameter environmentId is required."); |
573 } | 578 } |
574 | 579 |
575 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/environments/' + commo
ns.Escaper.ecapeVariable('$environmentId'); | 580 _url = 'accounts/' + |
| 581 commons.Escaper.ecapeVariable('$accountId') + |
| 582 '/containers/' + |
| 583 commons.Escaper.ecapeVariable('$containerId') + |
| 584 '/environments/' + |
| 585 commons.Escaper.ecapeVariable('$environmentId'); |
576 | 586 |
577 var _response = _requester.request(_url, | 587 var _response = _requester.request(_url, "GET", |
578 "GET", | 588 body: _body, |
579 body: _body, | 589 queryParams: _queryParams, |
580 queryParams: _queryParams, | 590 uploadOptions: _uploadOptions, |
581 uploadOptions: _uploadOptions, | 591 uploadMedia: _uploadMedia, |
582 uploadMedia: _uploadMedia, | 592 downloadOptions: _downloadOptions); |
583 downloadOptions: _downloadOptions); | |
584 return _response.then((data) => new Environment.fromJson(data)); | 593 return _response.then((data) => new Environment.fromJson(data)); |
585 } | 594 } |
586 | 595 |
587 /** | 596 /// Lists all GTM Environments of a GTM Container. |
588 * Lists all GTM Environments of a GTM Container. | 597 /// |
589 * | 598 /// Request parameters: |
590 * Request parameters: | 599 /// |
591 * | 600 /// [accountId] - The GTM Account ID. |
592 * [accountId] - The GTM Account ID. | 601 /// |
593 * | 602 /// [containerId] - The GTM Container ID. |
594 * [containerId] - The GTM Container ID. | 603 /// |
595 * | 604 /// Completes with a [ListEnvironmentsResponse]. |
596 * Completes with a [ListEnvironmentsResponse]. | 605 /// |
597 * | 606 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
598 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 607 /// an error. |
599 * error. | 608 /// |
600 * | 609 /// If the used [http.Client] completes with an error when making a REST |
601 * If the used [http.Client] completes with an error when making a REST call, | 610 /// call, this method will complete with the same error. |
602 * this method will complete with the same error. | 611 async.Future<ListEnvironmentsResponse> list( |
603 */ | 612 core.String accountId, core.String containerId) { |
604 async.Future<ListEnvironmentsResponse> list(core.String accountId, core.String
containerId) { | |
605 var _url = null; | 613 var _url = null; |
606 var _queryParams = new core.Map(); | 614 var _queryParams = new core.Map(); |
607 var _uploadMedia = null; | 615 var _uploadMedia = null; |
608 var _uploadOptions = null; | 616 var _uploadOptions = null; |
609 var _downloadOptions = commons.DownloadOptions.Metadata; | 617 var _downloadOptions = commons.DownloadOptions.Metadata; |
610 var _body = null; | 618 var _body = null; |
611 | 619 |
612 if (accountId == null) { | 620 if (accountId == null) { |
613 throw new core.ArgumentError("Parameter accountId is required."); | 621 throw new core.ArgumentError("Parameter accountId is required."); |
614 } | 622 } |
615 if (containerId == null) { | 623 if (containerId == null) { |
616 throw new core.ArgumentError("Parameter containerId is required."); | 624 throw new core.ArgumentError("Parameter containerId is required."); |
617 } | 625 } |
618 | 626 |
619 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/environments'; | 627 _url = 'accounts/' + |
| 628 commons.Escaper.ecapeVariable('$accountId') + |
| 629 '/containers/' + |
| 630 commons.Escaper.ecapeVariable('$containerId') + |
| 631 '/environments'; |
620 | 632 |
621 var _response = _requester.request(_url, | 633 var _response = _requester.request(_url, "GET", |
622 "GET", | 634 body: _body, |
623 body: _body, | 635 queryParams: _queryParams, |
624 queryParams: _queryParams, | 636 uploadOptions: _uploadOptions, |
625 uploadOptions: _uploadOptions, | 637 uploadMedia: _uploadMedia, |
626 uploadMedia: _uploadMedia, | 638 downloadOptions: _downloadOptions); |
627 downloadOptions: _downloadOptions); | 639 return _response |
628 return _response.then((data) => new ListEnvironmentsResponse.fromJson(data))
; | 640 .then((data) => new ListEnvironmentsResponse.fromJson(data)); |
629 } | 641 } |
630 | 642 |
631 /** | 643 /// Updates a GTM Environment. This method supports patch semantics. |
632 * Updates a GTM Environment. This method supports patch semantics. | 644 /// |
633 * | 645 /// [request] - The metadata request object. |
634 * [request] - The metadata request object. | 646 /// |
635 * | 647 /// Request parameters: |
636 * Request parameters: | 648 /// |
637 * | 649 /// [accountId] - The GTM Account ID. |
638 * [accountId] - The GTM Account ID. | 650 /// |
639 * | 651 /// [containerId] - The GTM Container ID. |
640 * [containerId] - The GTM Container ID. | 652 /// |
641 * | 653 /// [environmentId] - The GTM Environment ID. |
642 * [environmentId] - The GTM Environment ID. | 654 /// |
643 * | 655 /// [fingerprint] - When provided, this fingerprint must match the |
644 * [fingerprint] - When provided, this fingerprint must match the fingerprint | 656 /// fingerprint of the environment in storage. |
645 * of the environment in storage. | 657 /// |
646 * | 658 /// Completes with a [Environment]. |
647 * Completes with a [Environment]. | 659 /// |
648 * | 660 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
649 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 661 /// an error. |
650 * error. | 662 /// |
651 * | 663 /// If the used [http.Client] completes with an error when making a REST |
652 * If the used [http.Client] completes with an error when making a REST call, | 664 /// call, this method will complete with the same error. |
653 * this method will complete with the same error. | 665 async.Future<Environment> patch(Environment request, core.String accountId, |
654 */ | 666 core.String containerId, core.String environmentId, |
655 async.Future<Environment> patch(Environment request, core.String accountId, co
re.String containerId, core.String environmentId, {core.String fingerprint}) { | 667 {core.String fingerprint}) { |
656 var _url = null; | 668 var _url = null; |
657 var _queryParams = new core.Map(); | 669 var _queryParams = new core.Map(); |
658 var _uploadMedia = null; | 670 var _uploadMedia = null; |
659 var _uploadOptions = null; | 671 var _uploadOptions = null; |
660 var _downloadOptions = commons.DownloadOptions.Metadata; | 672 var _downloadOptions = commons.DownloadOptions.Metadata; |
661 var _body = null; | 673 var _body = null; |
662 | 674 |
663 if (request != null) { | 675 if (request != null) { |
664 _body = convert.JSON.encode((request).toJson()); | 676 _body = convert.JSON.encode((request).toJson()); |
665 } | 677 } |
666 if (accountId == null) { | 678 if (accountId == null) { |
667 throw new core.ArgumentError("Parameter accountId is required."); | 679 throw new core.ArgumentError("Parameter accountId is required."); |
668 } | 680 } |
669 if (containerId == null) { | 681 if (containerId == null) { |
670 throw new core.ArgumentError("Parameter containerId is required."); | 682 throw new core.ArgumentError("Parameter containerId is required."); |
671 } | 683 } |
672 if (environmentId == null) { | 684 if (environmentId == null) { |
673 throw new core.ArgumentError("Parameter environmentId is required."); | 685 throw new core.ArgumentError("Parameter environmentId is required."); |
674 } | 686 } |
675 if (fingerprint != null) { | 687 if (fingerprint != null) { |
676 _queryParams["fingerprint"] = [fingerprint]; | 688 _queryParams["fingerprint"] = [fingerprint]; |
677 } | 689 } |
678 | 690 |
679 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/environments/' + commo
ns.Escaper.ecapeVariable('$environmentId'); | 691 _url = 'accounts/' + |
| 692 commons.Escaper.ecapeVariable('$accountId') + |
| 693 '/containers/' + |
| 694 commons.Escaper.ecapeVariable('$containerId') + |
| 695 '/environments/' + |
| 696 commons.Escaper.ecapeVariable('$environmentId'); |
680 | 697 |
681 var _response = _requester.request(_url, | 698 var _response = _requester.request(_url, "PATCH", |
682 "PATCH", | 699 body: _body, |
683 body: _body, | 700 queryParams: _queryParams, |
684 queryParams: _queryParams, | 701 uploadOptions: _uploadOptions, |
685 uploadOptions: _uploadOptions, | 702 uploadMedia: _uploadMedia, |
686 uploadMedia: _uploadMedia, | 703 downloadOptions: _downloadOptions); |
687 downloadOptions: _downloadOptions); | |
688 return _response.then((data) => new Environment.fromJson(data)); | 704 return _response.then((data) => new Environment.fromJson(data)); |
689 } | 705 } |
690 | 706 |
691 /** | 707 /// Updates a GTM Environment. |
692 * Updates a GTM Environment. | 708 /// |
693 * | 709 /// [request] - The metadata request object. |
694 * [request] - The metadata request object. | 710 /// |
695 * | 711 /// Request parameters: |
696 * Request parameters: | 712 /// |
697 * | 713 /// [accountId] - The GTM Account ID. |
698 * [accountId] - The GTM Account ID. | 714 /// |
699 * | 715 /// [containerId] - The GTM Container ID. |
700 * [containerId] - The GTM Container ID. | 716 /// |
701 * | 717 /// [environmentId] - The GTM Environment ID. |
702 * [environmentId] - The GTM Environment ID. | 718 /// |
703 * | 719 /// [fingerprint] - When provided, this fingerprint must match the |
704 * [fingerprint] - When provided, this fingerprint must match the fingerprint | 720 /// fingerprint of the environment in storage. |
705 * of the environment in storage. | 721 /// |
706 * | 722 /// Completes with a [Environment]. |
707 * Completes with a [Environment]. | 723 /// |
708 * | 724 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
709 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 725 /// an error. |
710 * error. | 726 /// |
711 * | 727 /// If the used [http.Client] completes with an error when making a REST |
712 * If the used [http.Client] completes with an error when making a REST call, | 728 /// call, this method will complete with the same error. |
713 * this method will complete with the same error. | 729 async.Future<Environment> update(Environment request, core.String accountId, |
714 */ | 730 core.String containerId, core.String environmentId, |
715 async.Future<Environment> update(Environment request, core.String accountId, c
ore.String containerId, core.String environmentId, {core.String fingerprint}) { | 731 {core.String fingerprint}) { |
716 var _url = null; | 732 var _url = null; |
717 var _queryParams = new core.Map(); | 733 var _queryParams = new core.Map(); |
718 var _uploadMedia = null; | 734 var _uploadMedia = null; |
719 var _uploadOptions = null; | 735 var _uploadOptions = null; |
720 var _downloadOptions = commons.DownloadOptions.Metadata; | 736 var _downloadOptions = commons.DownloadOptions.Metadata; |
721 var _body = null; | 737 var _body = null; |
722 | 738 |
723 if (request != null) { | 739 if (request != null) { |
724 _body = convert.JSON.encode((request).toJson()); | 740 _body = convert.JSON.encode((request).toJson()); |
725 } | 741 } |
726 if (accountId == null) { | 742 if (accountId == null) { |
727 throw new core.ArgumentError("Parameter accountId is required."); | 743 throw new core.ArgumentError("Parameter accountId is required."); |
728 } | 744 } |
729 if (containerId == null) { | 745 if (containerId == null) { |
730 throw new core.ArgumentError("Parameter containerId is required."); | 746 throw new core.ArgumentError("Parameter containerId is required."); |
731 } | 747 } |
732 if (environmentId == null) { | 748 if (environmentId == null) { |
733 throw new core.ArgumentError("Parameter environmentId is required."); | 749 throw new core.ArgumentError("Parameter environmentId is required."); |
734 } | 750 } |
735 if (fingerprint != null) { | 751 if (fingerprint != null) { |
736 _queryParams["fingerprint"] = [fingerprint]; | 752 _queryParams["fingerprint"] = [fingerprint]; |
737 } | 753 } |
738 | 754 |
739 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/environments/' + commo
ns.Escaper.ecapeVariable('$environmentId'); | 755 _url = 'accounts/' + |
| 756 commons.Escaper.ecapeVariable('$accountId') + |
| 757 '/containers/' + |
| 758 commons.Escaper.ecapeVariable('$containerId') + |
| 759 '/environments/' + |
| 760 commons.Escaper.ecapeVariable('$environmentId'); |
740 | 761 |
741 var _response = _requester.request(_url, | 762 var _response = _requester.request(_url, "PUT", |
742 "PUT", | 763 body: _body, |
743 body: _body, | 764 queryParams: _queryParams, |
744 queryParams: _queryParams, | 765 uploadOptions: _uploadOptions, |
745 uploadOptions: _uploadOptions, | 766 uploadMedia: _uploadMedia, |
746 uploadMedia: _uploadMedia, | 767 downloadOptions: _downloadOptions); |
747 downloadOptions: _downloadOptions); | |
748 return _response.then((data) => new Environment.fromJson(data)); | 768 return _response.then((data) => new Environment.fromJson(data)); |
749 } | 769 } |
750 | |
751 } | 770 } |
752 | 771 |
753 | |
754 class AccountsContainersFoldersResourceApi { | 772 class AccountsContainersFoldersResourceApi { |
755 final commons.ApiRequester _requester; | 773 final commons.ApiRequester _requester; |
756 | 774 |
757 AccountsContainersFoldersEntitiesResourceApi get entities => new AccountsConta
inersFoldersEntitiesResourceApi(_requester); | 775 AccountsContainersFoldersEntitiesResourceApi get entities => |
| 776 new AccountsContainersFoldersEntitiesResourceApi(_requester); |
758 | 777 |
759 AccountsContainersFoldersResourceApi(commons.ApiRequester client) : | 778 AccountsContainersFoldersResourceApi(commons.ApiRequester client) |
760 _requester = client; | 779 : _requester = client; |
761 | 780 |
762 /** | 781 /// Creates a GTM Folder. |
763 * Creates a GTM Folder. | 782 /// |
764 * | 783 /// [request] - The metadata request object. |
765 * [request] - The metadata request object. | 784 /// |
766 * | 785 /// Request parameters: |
767 * Request parameters: | 786 /// |
768 * | 787 /// [accountId] - The GTM Account ID. |
769 * [accountId] - The GTM Account ID. | 788 /// |
770 * | 789 /// [containerId] - The GTM Container ID. |
771 * [containerId] - The GTM Container ID. | 790 /// |
772 * | 791 /// Completes with a [Folder]. |
773 * Completes with a [Folder]. | 792 /// |
774 * | 793 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
775 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 794 /// an error. |
776 * error. | 795 /// |
777 * | 796 /// If the used [http.Client] completes with an error when making a REST |
778 * If the used [http.Client] completes with an error when making a REST call, | 797 /// call, this method will complete with the same error. |
779 * this method will complete with the same error. | 798 async.Future<Folder> create( |
780 */ | 799 Folder request, core.String accountId, core.String containerId) { |
781 async.Future<Folder> create(Folder request, core.String accountId, core.String
containerId) { | |
782 var _url = null; | 800 var _url = null; |
783 var _queryParams = new core.Map(); | 801 var _queryParams = new core.Map(); |
784 var _uploadMedia = null; | 802 var _uploadMedia = null; |
785 var _uploadOptions = null; | 803 var _uploadOptions = null; |
786 var _downloadOptions = commons.DownloadOptions.Metadata; | 804 var _downloadOptions = commons.DownloadOptions.Metadata; |
787 var _body = null; | 805 var _body = null; |
788 | 806 |
789 if (request != null) { | 807 if (request != null) { |
790 _body = convert.JSON.encode((request).toJson()); | 808 _body = convert.JSON.encode((request).toJson()); |
791 } | 809 } |
792 if (accountId == null) { | 810 if (accountId == null) { |
793 throw new core.ArgumentError("Parameter accountId is required."); | 811 throw new core.ArgumentError("Parameter accountId is required."); |
794 } | 812 } |
795 if (containerId == null) { | 813 if (containerId == null) { |
796 throw new core.ArgumentError("Parameter containerId is required."); | 814 throw new core.ArgumentError("Parameter containerId is required."); |
797 } | 815 } |
798 | 816 |
799 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/folders'; | 817 _url = 'accounts/' + |
| 818 commons.Escaper.ecapeVariable('$accountId') + |
| 819 '/containers/' + |
| 820 commons.Escaper.ecapeVariable('$containerId') + |
| 821 '/folders'; |
800 | 822 |
801 var _response = _requester.request(_url, | 823 var _response = _requester.request(_url, "POST", |
802 "POST", | 824 body: _body, |
803 body: _body, | 825 queryParams: _queryParams, |
804 queryParams: _queryParams, | 826 uploadOptions: _uploadOptions, |
805 uploadOptions: _uploadOptions, | 827 uploadMedia: _uploadMedia, |
806 uploadMedia: _uploadMedia, | 828 downloadOptions: _downloadOptions); |
807 downloadOptions: _downloadOptions); | |
808 return _response.then((data) => new Folder.fromJson(data)); | 829 return _response.then((data) => new Folder.fromJson(data)); |
809 } | 830 } |
810 | 831 |
811 /** | 832 /// Deletes a GTM Folder. |
812 * Deletes a GTM Folder. | 833 /// |
813 * | 834 /// Request parameters: |
814 * Request parameters: | 835 /// |
815 * | 836 /// [accountId] - The GTM Account ID. |
816 * [accountId] - The GTM Account ID. | 837 /// |
817 * | 838 /// [containerId] - The GTM Container ID. |
818 * [containerId] - The GTM Container ID. | 839 /// |
819 * | 840 /// [folderId] - The GTM Folder ID. |
820 * [folderId] - The GTM Folder ID. | 841 /// |
821 * | 842 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
822 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 843 /// an error. |
823 * error. | 844 /// |
824 * | 845 /// If the used [http.Client] completes with an error when making a REST |
825 * If the used [http.Client] completes with an error when making a REST call, | 846 /// call, this method will complete with the same error. |
826 * this method will complete with the same error. | 847 async.Future delete( |
827 */ | 848 core.String accountId, core.String containerId, core.String folderId) { |
828 async.Future delete(core.String accountId, core.String containerId, core.Strin
g folderId) { | |
829 var _url = null; | 849 var _url = null; |
830 var _queryParams = new core.Map(); | 850 var _queryParams = new core.Map(); |
831 var _uploadMedia = null; | 851 var _uploadMedia = null; |
832 var _uploadOptions = null; | 852 var _uploadOptions = null; |
833 var _downloadOptions = commons.DownloadOptions.Metadata; | 853 var _downloadOptions = commons.DownloadOptions.Metadata; |
834 var _body = null; | 854 var _body = null; |
835 | 855 |
836 if (accountId == null) { | 856 if (accountId == null) { |
837 throw new core.ArgumentError("Parameter accountId is required."); | 857 throw new core.ArgumentError("Parameter accountId is required."); |
838 } | 858 } |
839 if (containerId == null) { | 859 if (containerId == null) { |
840 throw new core.ArgumentError("Parameter containerId is required."); | 860 throw new core.ArgumentError("Parameter containerId is required."); |
841 } | 861 } |
842 if (folderId == null) { | 862 if (folderId == null) { |
843 throw new core.ArgumentError("Parameter folderId is required."); | 863 throw new core.ArgumentError("Parameter folderId is required."); |
844 } | 864 } |
845 | 865 |
846 _downloadOptions = null; | 866 _downloadOptions = null; |
847 | 867 |
848 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/folders/' + commons.Es
caper.ecapeVariable('$folderId'); | 868 _url = 'accounts/' + |
| 869 commons.Escaper.ecapeVariable('$accountId') + |
| 870 '/containers/' + |
| 871 commons.Escaper.ecapeVariable('$containerId') + |
| 872 '/folders/' + |
| 873 commons.Escaper.ecapeVariable('$folderId'); |
849 | 874 |
850 var _response = _requester.request(_url, | 875 var _response = _requester.request(_url, "DELETE", |
851 "DELETE", | 876 body: _body, |
852 body: _body, | 877 queryParams: _queryParams, |
853 queryParams: _queryParams, | 878 uploadOptions: _uploadOptions, |
854 uploadOptions: _uploadOptions, | 879 uploadMedia: _uploadMedia, |
855 uploadMedia: _uploadMedia, | 880 downloadOptions: _downloadOptions); |
856 downloadOptions: _downloadOptions); | |
857 return _response.then((data) => null); | 881 return _response.then((data) => null); |
858 } | 882 } |
859 | 883 |
860 /** | 884 /// Gets a GTM Folder. |
861 * Gets a GTM Folder. | 885 /// |
862 * | 886 /// Request parameters: |
863 * Request parameters: | 887 /// |
864 * | 888 /// [accountId] - The GTM Account ID. |
865 * [accountId] - The GTM Account ID. | 889 /// |
866 * | 890 /// [containerId] - The GTM Container ID. |
867 * [containerId] - The GTM Container ID. | 891 /// |
868 * | 892 /// [folderId] - The GTM Folder ID. |
869 * [folderId] - The GTM Folder ID. | 893 /// |
870 * | 894 /// Completes with a [Folder]. |
871 * Completes with a [Folder]. | 895 /// |
872 * | 896 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
873 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 897 /// an error. |
874 * error. | 898 /// |
875 * | 899 /// If the used [http.Client] completes with an error when making a REST |
876 * If the used [http.Client] completes with an error when making a REST call, | 900 /// call, this method will complete with the same error. |
877 * this method will complete with the same error. | 901 async.Future<Folder> get( |
878 */ | 902 core.String accountId, core.String containerId, core.String folderId) { |
879 async.Future<Folder> get(core.String accountId, core.String containerId, core.
String folderId) { | |
880 var _url = null; | 903 var _url = null; |
881 var _queryParams = new core.Map(); | 904 var _queryParams = new core.Map(); |
882 var _uploadMedia = null; | 905 var _uploadMedia = null; |
883 var _uploadOptions = null; | 906 var _uploadOptions = null; |
884 var _downloadOptions = commons.DownloadOptions.Metadata; | 907 var _downloadOptions = commons.DownloadOptions.Metadata; |
885 var _body = null; | 908 var _body = null; |
886 | 909 |
887 if (accountId == null) { | 910 if (accountId == null) { |
888 throw new core.ArgumentError("Parameter accountId is required."); | 911 throw new core.ArgumentError("Parameter accountId is required."); |
889 } | 912 } |
890 if (containerId == null) { | 913 if (containerId == null) { |
891 throw new core.ArgumentError("Parameter containerId is required."); | 914 throw new core.ArgumentError("Parameter containerId is required."); |
892 } | 915 } |
893 if (folderId == null) { | 916 if (folderId == null) { |
894 throw new core.ArgumentError("Parameter folderId is required."); | 917 throw new core.ArgumentError("Parameter folderId is required."); |
895 } | 918 } |
896 | 919 |
897 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/folders/' + commons.Es
caper.ecapeVariable('$folderId'); | 920 _url = 'accounts/' + |
| 921 commons.Escaper.ecapeVariable('$accountId') + |
| 922 '/containers/' + |
| 923 commons.Escaper.ecapeVariable('$containerId') + |
| 924 '/folders/' + |
| 925 commons.Escaper.ecapeVariable('$folderId'); |
898 | 926 |
899 var _response = _requester.request(_url, | 927 var _response = _requester.request(_url, "GET", |
900 "GET", | 928 body: _body, |
901 body: _body, | 929 queryParams: _queryParams, |
902 queryParams: _queryParams, | 930 uploadOptions: _uploadOptions, |
903 uploadOptions: _uploadOptions, | 931 uploadMedia: _uploadMedia, |
904 uploadMedia: _uploadMedia, | 932 downloadOptions: _downloadOptions); |
905 downloadOptions: _downloadOptions); | |
906 return _response.then((data) => new Folder.fromJson(data)); | 933 return _response.then((data) => new Folder.fromJson(data)); |
907 } | 934 } |
908 | 935 |
909 /** | 936 /// Lists all GTM Folders of a Container. |
910 * Lists all GTM Folders of a Container. | 937 /// |
911 * | 938 /// Request parameters: |
912 * Request parameters: | 939 /// |
913 * | 940 /// [accountId] - The GTM Account ID. |
914 * [accountId] - The GTM Account ID. | 941 /// |
915 * | 942 /// [containerId] - The GTM Container ID. |
916 * [containerId] - The GTM Container ID. | 943 /// |
917 * | 944 /// Completes with a [ListFoldersResponse]. |
918 * Completes with a [ListFoldersResponse]. | 945 /// |
919 * | 946 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
920 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 947 /// an error. |
921 * error. | 948 /// |
922 * | 949 /// If the used [http.Client] completes with an error when making a REST |
923 * If the used [http.Client] completes with an error when making a REST call, | 950 /// call, this method will complete with the same error. |
924 * this method will complete with the same error. | 951 async.Future<ListFoldersResponse> list( |
925 */ | 952 core.String accountId, core.String containerId) { |
926 async.Future<ListFoldersResponse> list(core.String accountId, core.String cont
ainerId) { | |
927 var _url = null; | 953 var _url = null; |
928 var _queryParams = new core.Map(); | 954 var _queryParams = new core.Map(); |
929 var _uploadMedia = null; | 955 var _uploadMedia = null; |
930 var _uploadOptions = null; | 956 var _uploadOptions = null; |
931 var _downloadOptions = commons.DownloadOptions.Metadata; | 957 var _downloadOptions = commons.DownloadOptions.Metadata; |
932 var _body = null; | 958 var _body = null; |
933 | 959 |
934 if (accountId == null) { | 960 if (accountId == null) { |
935 throw new core.ArgumentError("Parameter accountId is required."); | 961 throw new core.ArgumentError("Parameter accountId is required."); |
936 } | 962 } |
937 if (containerId == null) { | 963 if (containerId == null) { |
938 throw new core.ArgumentError("Parameter containerId is required."); | 964 throw new core.ArgumentError("Parameter containerId is required."); |
939 } | 965 } |
940 | 966 |
941 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/folders'; | 967 _url = 'accounts/' + |
| 968 commons.Escaper.ecapeVariable('$accountId') + |
| 969 '/containers/' + |
| 970 commons.Escaper.ecapeVariable('$containerId') + |
| 971 '/folders'; |
942 | 972 |
943 var _response = _requester.request(_url, | 973 var _response = _requester.request(_url, "GET", |
944 "GET", | 974 body: _body, |
945 body: _body, | 975 queryParams: _queryParams, |
946 queryParams: _queryParams, | 976 uploadOptions: _uploadOptions, |
947 uploadOptions: _uploadOptions, | 977 uploadMedia: _uploadMedia, |
948 uploadMedia: _uploadMedia, | 978 downloadOptions: _downloadOptions); |
949 downloadOptions: _downloadOptions); | |
950 return _response.then((data) => new ListFoldersResponse.fromJson(data)); | 979 return _response.then((data) => new ListFoldersResponse.fromJson(data)); |
951 } | 980 } |
952 | 981 |
953 /** | 982 /// Updates a GTM Folder. |
954 * Updates a GTM Folder. | 983 /// |
955 * | 984 /// [request] - The metadata request object. |
956 * [request] - The metadata request object. | 985 /// |
957 * | 986 /// Request parameters: |
958 * Request parameters: | 987 /// |
959 * | 988 /// [accountId] - The GTM Account ID. |
960 * [accountId] - The GTM Account ID. | 989 /// |
961 * | 990 /// [containerId] - The GTM Container ID. |
962 * [containerId] - The GTM Container ID. | 991 /// |
963 * | 992 /// [folderId] - The GTM Folder ID. |
964 * [folderId] - The GTM Folder ID. | 993 /// |
965 * | 994 /// [fingerprint] - When provided, this fingerprint must match the |
966 * [fingerprint] - When provided, this fingerprint must match the fingerprint | 995 /// fingerprint of the folder in storage. |
967 * of the folder in storage. | 996 /// |
968 * | 997 /// Completes with a [Folder]. |
969 * Completes with a [Folder]. | 998 /// |
970 * | 999 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
971 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1000 /// an error. |
972 * error. | 1001 /// |
973 * | 1002 /// If the used [http.Client] completes with an error when making a REST |
974 * If the used [http.Client] completes with an error when making a REST call, | 1003 /// call, this method will complete with the same error. |
975 * this method will complete with the same error. | 1004 async.Future<Folder> update(Folder request, core.String accountId, |
976 */ | 1005 core.String containerId, core.String folderId, |
977 async.Future<Folder> update(Folder request, core.String accountId, core.String
containerId, core.String folderId, {core.String fingerprint}) { | 1006 {core.String fingerprint}) { |
978 var _url = null; | 1007 var _url = null; |
979 var _queryParams = new core.Map(); | 1008 var _queryParams = new core.Map(); |
980 var _uploadMedia = null; | 1009 var _uploadMedia = null; |
981 var _uploadOptions = null; | 1010 var _uploadOptions = null; |
982 var _downloadOptions = commons.DownloadOptions.Metadata; | 1011 var _downloadOptions = commons.DownloadOptions.Metadata; |
983 var _body = null; | 1012 var _body = null; |
984 | 1013 |
985 if (request != null) { | 1014 if (request != null) { |
986 _body = convert.JSON.encode((request).toJson()); | 1015 _body = convert.JSON.encode((request).toJson()); |
987 } | 1016 } |
988 if (accountId == null) { | 1017 if (accountId == null) { |
989 throw new core.ArgumentError("Parameter accountId is required."); | 1018 throw new core.ArgumentError("Parameter accountId is required."); |
990 } | 1019 } |
991 if (containerId == null) { | 1020 if (containerId == null) { |
992 throw new core.ArgumentError("Parameter containerId is required."); | 1021 throw new core.ArgumentError("Parameter containerId is required."); |
993 } | 1022 } |
994 if (folderId == null) { | 1023 if (folderId == null) { |
995 throw new core.ArgumentError("Parameter folderId is required."); | 1024 throw new core.ArgumentError("Parameter folderId is required."); |
996 } | 1025 } |
997 if (fingerprint != null) { | 1026 if (fingerprint != null) { |
998 _queryParams["fingerprint"] = [fingerprint]; | 1027 _queryParams["fingerprint"] = [fingerprint]; |
999 } | 1028 } |
1000 | 1029 |
1001 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/folders/' + commons.Es
caper.ecapeVariable('$folderId'); | 1030 _url = 'accounts/' + |
| 1031 commons.Escaper.ecapeVariable('$accountId') + |
| 1032 '/containers/' + |
| 1033 commons.Escaper.ecapeVariable('$containerId') + |
| 1034 '/folders/' + |
| 1035 commons.Escaper.ecapeVariable('$folderId'); |
1002 | 1036 |
1003 var _response = _requester.request(_url, | 1037 var _response = _requester.request(_url, "PUT", |
1004 "PUT", | 1038 body: _body, |
1005 body: _body, | 1039 queryParams: _queryParams, |
1006 queryParams: _queryParams, | 1040 uploadOptions: _uploadOptions, |
1007 uploadOptions: _uploadOptions, | 1041 uploadMedia: _uploadMedia, |
1008 uploadMedia: _uploadMedia, | 1042 downloadOptions: _downloadOptions); |
1009 downloadOptions: _downloadOptions); | |
1010 return _response.then((data) => new Folder.fromJson(data)); | 1043 return _response.then((data) => new Folder.fromJson(data)); |
1011 } | 1044 } |
1012 | |
1013 } | 1045 } |
1014 | 1046 |
1015 | |
1016 class AccountsContainersFoldersEntitiesResourceApi { | 1047 class AccountsContainersFoldersEntitiesResourceApi { |
1017 final commons.ApiRequester _requester; | 1048 final commons.ApiRequester _requester; |
1018 | 1049 |
1019 AccountsContainersFoldersEntitiesResourceApi(commons.ApiRequester client) : | 1050 AccountsContainersFoldersEntitiesResourceApi(commons.ApiRequester client) |
1020 _requester = client; | 1051 : _requester = client; |
1021 | 1052 |
1022 /** | 1053 /// List all entities in a GTM Folder. |
1023 * List all entities in a GTM Folder. | 1054 /// |
1024 * | 1055 /// Request parameters: |
1025 * Request parameters: | 1056 /// |
1026 * | 1057 /// [accountId] - The GTM Account ID. |
1027 * [accountId] - The GTM Account ID. | 1058 /// |
1028 * | 1059 /// [containerId] - The GTM Container ID. |
1029 * [containerId] - The GTM Container ID. | 1060 /// |
1030 * | 1061 /// [folderId] - The GTM Folder ID. |
1031 * [folderId] - The GTM Folder ID. | 1062 /// |
1032 * | 1063 /// Completes with a [FolderEntities]. |
1033 * Completes with a [FolderEntities]. | 1064 /// |
1034 * | 1065 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1035 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1066 /// an error. |
1036 * error. | 1067 /// |
1037 * | 1068 /// If the used [http.Client] completes with an error when making a REST |
1038 * If the used [http.Client] completes with an error when making a REST call, | 1069 /// call, this method will complete with the same error. |
1039 * this method will complete with the same error. | 1070 async.Future<FolderEntities> list( |
1040 */ | 1071 core.String accountId, core.String containerId, core.String folderId) { |
1041 async.Future<FolderEntities> list(core.String accountId, core.String container
Id, core.String folderId) { | |
1042 var _url = null; | 1072 var _url = null; |
1043 var _queryParams = new core.Map(); | 1073 var _queryParams = new core.Map(); |
1044 var _uploadMedia = null; | 1074 var _uploadMedia = null; |
1045 var _uploadOptions = null; | 1075 var _uploadOptions = null; |
1046 var _downloadOptions = commons.DownloadOptions.Metadata; | 1076 var _downloadOptions = commons.DownloadOptions.Metadata; |
1047 var _body = null; | 1077 var _body = null; |
1048 | 1078 |
1049 if (accountId == null) { | 1079 if (accountId == null) { |
1050 throw new core.ArgumentError("Parameter accountId is required."); | 1080 throw new core.ArgumentError("Parameter accountId is required."); |
1051 } | 1081 } |
1052 if (containerId == null) { | 1082 if (containerId == null) { |
1053 throw new core.ArgumentError("Parameter containerId is required."); | 1083 throw new core.ArgumentError("Parameter containerId is required."); |
1054 } | 1084 } |
1055 if (folderId == null) { | 1085 if (folderId == null) { |
1056 throw new core.ArgumentError("Parameter folderId is required."); | 1086 throw new core.ArgumentError("Parameter folderId is required."); |
1057 } | 1087 } |
1058 | 1088 |
1059 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/folders/' + commons.Es
caper.ecapeVariable('$folderId') + '/entities'; | 1089 _url = 'accounts/' + |
| 1090 commons.Escaper.ecapeVariable('$accountId') + |
| 1091 '/containers/' + |
| 1092 commons.Escaper.ecapeVariable('$containerId') + |
| 1093 '/folders/' + |
| 1094 commons.Escaper.ecapeVariable('$folderId') + |
| 1095 '/entities'; |
1060 | 1096 |
1061 var _response = _requester.request(_url, | 1097 var _response = _requester.request(_url, "GET", |
1062 "GET", | 1098 body: _body, |
1063 body: _body, | 1099 queryParams: _queryParams, |
1064 queryParams: _queryParams, | 1100 uploadOptions: _uploadOptions, |
1065 uploadOptions: _uploadOptions, | 1101 uploadMedia: _uploadMedia, |
1066 uploadMedia: _uploadMedia, | 1102 downloadOptions: _downloadOptions); |
1067 downloadOptions: _downloadOptions); | |
1068 return _response.then((data) => new FolderEntities.fromJson(data)); | 1103 return _response.then((data) => new FolderEntities.fromJson(data)); |
1069 } | 1104 } |
1070 | |
1071 } | 1105 } |
1072 | 1106 |
1073 | |
1074 class AccountsContainersMoveFoldersResourceApi { | 1107 class AccountsContainersMoveFoldersResourceApi { |
1075 final commons.ApiRequester _requester; | 1108 final commons.ApiRequester _requester; |
1076 | 1109 |
1077 AccountsContainersMoveFoldersResourceApi(commons.ApiRequester client) : | 1110 AccountsContainersMoveFoldersResourceApi(commons.ApiRequester client) |
1078 _requester = client; | 1111 : _requester = client; |
1079 | 1112 |
1080 /** | 1113 /// Moves entities to a GTM Folder. |
1081 * Moves entities to a GTM Folder. | 1114 /// |
1082 * | 1115 /// [request] - The metadata request object. |
1083 * [request] - The metadata request object. | 1116 /// |
1084 * | 1117 /// Request parameters: |
1085 * Request parameters: | 1118 /// |
1086 * | 1119 /// [accountId] - The GTM Account ID. |
1087 * [accountId] - The GTM Account ID. | 1120 /// |
1088 * | 1121 /// [containerId] - The GTM Container ID. |
1089 * [containerId] - The GTM Container ID. | 1122 /// |
1090 * | 1123 /// [folderId] - The GTM Folder ID. |
1091 * [folderId] - The GTM Folder ID. | 1124 /// |
1092 * | 1125 /// [tagId] - The tags to be moved to the folder. |
1093 * [tagId] - The tags to be moved to the folder. | 1126 /// |
1094 * | 1127 /// [triggerId] - The triggers to be moved to the folder. |
1095 * [triggerId] - The triggers to be moved to the folder. | 1128 /// |
1096 * | 1129 /// [variableId] - The variables to be moved to the folder. |
1097 * [variableId] - The variables to be moved to the folder. | 1130 /// |
1098 * | 1131 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1099 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1132 /// an error. |
1100 * error. | 1133 /// |
1101 * | 1134 /// If the used [http.Client] completes with an error when making a REST |
1102 * If the used [http.Client] completes with an error when making a REST call, | 1135 /// call, this method will complete with the same error. |
1103 * this method will complete with the same error. | 1136 async.Future update(Folder request, core.String accountId, |
1104 */ | 1137 core.String containerId, core.String folderId, |
1105 async.Future update(Folder request, core.String accountId, core.String contain
erId, core.String folderId, {core.List<core.String> tagId, core.List<core.String
> triggerId, core.List<core.String> variableId}) { | 1138 {core.List<core.String> tagId, |
| 1139 core.List<core.String> triggerId, |
| 1140 core.List<core.String> variableId}) { |
1106 var _url = null; | 1141 var _url = null; |
1107 var _queryParams = new core.Map(); | 1142 var _queryParams = new core.Map(); |
1108 var _uploadMedia = null; | 1143 var _uploadMedia = null; |
1109 var _uploadOptions = null; | 1144 var _uploadOptions = null; |
1110 var _downloadOptions = commons.DownloadOptions.Metadata; | 1145 var _downloadOptions = commons.DownloadOptions.Metadata; |
1111 var _body = null; | 1146 var _body = null; |
1112 | 1147 |
1113 if (request != null) { | 1148 if (request != null) { |
1114 _body = convert.JSON.encode((request).toJson()); | 1149 _body = convert.JSON.encode((request).toJson()); |
1115 } | 1150 } |
(...skipping 11 matching lines...) Expand all Loading... |
1127 } | 1162 } |
1128 if (triggerId != null) { | 1163 if (triggerId != null) { |
1129 _queryParams["triggerId"] = triggerId; | 1164 _queryParams["triggerId"] = triggerId; |
1130 } | 1165 } |
1131 if (variableId != null) { | 1166 if (variableId != null) { |
1132 _queryParams["variableId"] = variableId; | 1167 _queryParams["variableId"] = variableId; |
1133 } | 1168 } |
1134 | 1169 |
1135 _downloadOptions = null; | 1170 _downloadOptions = null; |
1136 | 1171 |
1137 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/move_folders/' + commo
ns.Escaper.ecapeVariable('$folderId'); | 1172 _url = 'accounts/' + |
| 1173 commons.Escaper.ecapeVariable('$accountId') + |
| 1174 '/containers/' + |
| 1175 commons.Escaper.ecapeVariable('$containerId') + |
| 1176 '/move_folders/' + |
| 1177 commons.Escaper.ecapeVariable('$folderId'); |
1138 | 1178 |
1139 var _response = _requester.request(_url, | 1179 var _response = _requester.request(_url, "PUT", |
1140 "PUT", | 1180 body: _body, |
1141 body: _body, | 1181 queryParams: _queryParams, |
1142 queryParams: _queryParams, | 1182 uploadOptions: _uploadOptions, |
1143 uploadOptions: _uploadOptions, | 1183 uploadMedia: _uploadMedia, |
1144 uploadMedia: _uploadMedia, | 1184 downloadOptions: _downloadOptions); |
1145 downloadOptions: _downloadOptions); | |
1146 return _response.then((data) => null); | 1185 return _response.then((data) => null); |
1147 } | 1186 } |
1148 | |
1149 } | 1187 } |
1150 | 1188 |
1151 | |
1152 class AccountsContainersReauthorizeEnvironmentsResourceApi { | 1189 class AccountsContainersReauthorizeEnvironmentsResourceApi { |
1153 final commons.ApiRequester _requester; | 1190 final commons.ApiRequester _requester; |
1154 | 1191 |
1155 AccountsContainersReauthorizeEnvironmentsResourceApi(commons.ApiRequester clie
nt) : | 1192 AccountsContainersReauthorizeEnvironmentsResourceApi( |
1156 _requester = client; | 1193 commons.ApiRequester client) |
| 1194 : _requester = client; |
1157 | 1195 |
1158 /** | 1196 /// Re-generates the authorization code for a GTM Environment. |
1159 * Re-generates the authorization code for a GTM Environment. | 1197 /// |
1160 * | 1198 /// [request] - The metadata request object. |
1161 * [request] - The metadata request object. | 1199 /// |
1162 * | 1200 /// Request parameters: |
1163 * Request parameters: | 1201 /// |
1164 * | 1202 /// [accountId] - The GTM Account ID. |
1165 * [accountId] - The GTM Account ID. | 1203 /// |
1166 * | 1204 /// [containerId] - The GTM Container ID. |
1167 * [containerId] - The GTM Container ID. | 1205 /// |
1168 * | 1206 /// [environmentId] - The GTM Environment ID. |
1169 * [environmentId] - The GTM Environment ID. | 1207 /// |
1170 * | 1208 /// Completes with a [Environment]. |
1171 * Completes with a [Environment]. | 1209 /// |
1172 * | 1210 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1173 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1211 /// an error. |
1174 * error. | 1212 /// |
1175 * | 1213 /// If the used [http.Client] completes with an error when making a REST |
1176 * If the used [http.Client] completes with an error when making a REST call, | 1214 /// call, this method will complete with the same error. |
1177 * this method will complete with the same error. | 1215 async.Future<Environment> update(Environment request, core.String accountId, |
1178 */ | 1216 core.String containerId, core.String environmentId) { |
1179 async.Future<Environment> update(Environment request, core.String accountId, c
ore.String containerId, core.String environmentId) { | |
1180 var _url = null; | 1217 var _url = null; |
1181 var _queryParams = new core.Map(); | 1218 var _queryParams = new core.Map(); |
1182 var _uploadMedia = null; | 1219 var _uploadMedia = null; |
1183 var _uploadOptions = null; | 1220 var _uploadOptions = null; |
1184 var _downloadOptions = commons.DownloadOptions.Metadata; | 1221 var _downloadOptions = commons.DownloadOptions.Metadata; |
1185 var _body = null; | 1222 var _body = null; |
1186 | 1223 |
1187 if (request != null) { | 1224 if (request != null) { |
1188 _body = convert.JSON.encode((request).toJson()); | 1225 _body = convert.JSON.encode((request).toJson()); |
1189 } | 1226 } |
1190 if (accountId == null) { | 1227 if (accountId == null) { |
1191 throw new core.ArgumentError("Parameter accountId is required."); | 1228 throw new core.ArgumentError("Parameter accountId is required."); |
1192 } | 1229 } |
1193 if (containerId == null) { | 1230 if (containerId == null) { |
1194 throw new core.ArgumentError("Parameter containerId is required."); | 1231 throw new core.ArgumentError("Parameter containerId is required."); |
1195 } | 1232 } |
1196 if (environmentId == null) { | 1233 if (environmentId == null) { |
1197 throw new core.ArgumentError("Parameter environmentId is required."); | 1234 throw new core.ArgumentError("Parameter environmentId is required."); |
1198 } | 1235 } |
1199 | 1236 |
1200 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/reauthorize_environmen
ts/' + commons.Escaper.ecapeVariable('$environmentId'); | 1237 _url = 'accounts/' + |
| 1238 commons.Escaper.ecapeVariable('$accountId') + |
| 1239 '/containers/' + |
| 1240 commons.Escaper.ecapeVariable('$containerId') + |
| 1241 '/reauthorize_environments/' + |
| 1242 commons.Escaper.ecapeVariable('$environmentId'); |
1201 | 1243 |
1202 var _response = _requester.request(_url, | 1244 var _response = _requester.request(_url, "PUT", |
1203 "PUT", | 1245 body: _body, |
1204 body: _body, | 1246 queryParams: _queryParams, |
1205 queryParams: _queryParams, | 1247 uploadOptions: _uploadOptions, |
1206 uploadOptions: _uploadOptions, | 1248 uploadMedia: _uploadMedia, |
1207 uploadMedia: _uploadMedia, | 1249 downloadOptions: _downloadOptions); |
1208 downloadOptions: _downloadOptions); | |
1209 return _response.then((data) => new Environment.fromJson(data)); | 1250 return _response.then((data) => new Environment.fromJson(data)); |
1210 } | 1251 } |
1211 | |
1212 } | 1252 } |
1213 | 1253 |
1214 | |
1215 class AccountsContainersTagsResourceApi { | 1254 class AccountsContainersTagsResourceApi { |
1216 final commons.ApiRequester _requester; | 1255 final commons.ApiRequester _requester; |
1217 | 1256 |
1218 AccountsContainersTagsResourceApi(commons.ApiRequester client) : | 1257 AccountsContainersTagsResourceApi(commons.ApiRequester client) |
1219 _requester = client; | 1258 : _requester = client; |
1220 | 1259 |
1221 /** | 1260 /// Creates a GTM Tag. |
1222 * Creates a GTM Tag. | 1261 /// |
1223 * | 1262 /// [request] - The metadata request object. |
1224 * [request] - The metadata request object. | 1263 /// |
1225 * | 1264 /// Request parameters: |
1226 * Request parameters: | 1265 /// |
1227 * | 1266 /// [accountId] - The GTM Account ID. |
1228 * [accountId] - The GTM Account ID. | 1267 /// |
1229 * | 1268 /// [containerId] - The GTM Container ID. |
1230 * [containerId] - The GTM Container ID. | 1269 /// |
1231 * | 1270 /// Completes with a [Tag]. |
1232 * Completes with a [Tag]. | 1271 /// |
1233 * | 1272 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1234 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1273 /// an error. |
1235 * error. | 1274 /// |
1236 * | 1275 /// If the used [http.Client] completes with an error when making a REST |
1237 * If the used [http.Client] completes with an error when making a REST call, | 1276 /// call, this method will complete with the same error. |
1238 * this method will complete with the same error. | 1277 async.Future<Tag> create( |
1239 */ | 1278 Tag request, core.String accountId, core.String containerId) { |
1240 async.Future<Tag> create(Tag request, core.String accountId, core.String conta
inerId) { | |
1241 var _url = null; | 1279 var _url = null; |
1242 var _queryParams = new core.Map(); | 1280 var _queryParams = new core.Map(); |
1243 var _uploadMedia = null; | 1281 var _uploadMedia = null; |
1244 var _uploadOptions = null; | 1282 var _uploadOptions = null; |
1245 var _downloadOptions = commons.DownloadOptions.Metadata; | 1283 var _downloadOptions = commons.DownloadOptions.Metadata; |
1246 var _body = null; | 1284 var _body = null; |
1247 | 1285 |
1248 if (request != null) { | 1286 if (request != null) { |
1249 _body = convert.JSON.encode((request).toJson()); | 1287 _body = convert.JSON.encode((request).toJson()); |
1250 } | 1288 } |
1251 if (accountId == null) { | 1289 if (accountId == null) { |
1252 throw new core.ArgumentError("Parameter accountId is required."); | 1290 throw new core.ArgumentError("Parameter accountId is required."); |
1253 } | 1291 } |
1254 if (containerId == null) { | 1292 if (containerId == null) { |
1255 throw new core.ArgumentError("Parameter containerId is required."); | 1293 throw new core.ArgumentError("Parameter containerId is required."); |
1256 } | 1294 } |
1257 | 1295 |
1258 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/tags'; | 1296 _url = 'accounts/' + |
| 1297 commons.Escaper.ecapeVariable('$accountId') + |
| 1298 '/containers/' + |
| 1299 commons.Escaper.ecapeVariable('$containerId') + |
| 1300 '/tags'; |
1259 | 1301 |
1260 var _response = _requester.request(_url, | 1302 var _response = _requester.request(_url, "POST", |
1261 "POST", | 1303 body: _body, |
1262 body: _body, | 1304 queryParams: _queryParams, |
1263 queryParams: _queryParams, | 1305 uploadOptions: _uploadOptions, |
1264 uploadOptions: _uploadOptions, | 1306 uploadMedia: _uploadMedia, |
1265 uploadMedia: _uploadMedia, | 1307 downloadOptions: _downloadOptions); |
1266 downloadOptions: _downloadOptions); | |
1267 return _response.then((data) => new Tag.fromJson(data)); | 1308 return _response.then((data) => new Tag.fromJson(data)); |
1268 } | 1309 } |
1269 | 1310 |
1270 /** | 1311 /// Deletes a GTM Tag. |
1271 * Deletes a GTM Tag. | 1312 /// |
1272 * | 1313 /// Request parameters: |
1273 * Request parameters: | 1314 /// |
1274 * | 1315 /// [accountId] - The GTM Account ID. |
1275 * [accountId] - The GTM Account ID. | 1316 /// |
1276 * | 1317 /// [containerId] - The GTM Container ID. |
1277 * [containerId] - The GTM Container ID. | 1318 /// |
1278 * | 1319 /// [tagId] - The GTM Tag ID. |
1279 * [tagId] - The GTM Tag ID. | 1320 /// |
1280 * | 1321 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1281 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1322 /// an error. |
1282 * error. | 1323 /// |
1283 * | 1324 /// If the used [http.Client] completes with an error when making a REST |
1284 * If the used [http.Client] completes with an error when making a REST call, | 1325 /// call, this method will complete with the same error. |
1285 * this method will complete with the same error. | 1326 async.Future delete( |
1286 */ | 1327 core.String accountId, core.String containerId, core.String tagId) { |
1287 async.Future delete(core.String accountId, core.String containerId, core.Strin
g tagId) { | |
1288 var _url = null; | 1328 var _url = null; |
1289 var _queryParams = new core.Map(); | 1329 var _queryParams = new core.Map(); |
1290 var _uploadMedia = null; | 1330 var _uploadMedia = null; |
1291 var _uploadOptions = null; | 1331 var _uploadOptions = null; |
1292 var _downloadOptions = commons.DownloadOptions.Metadata; | 1332 var _downloadOptions = commons.DownloadOptions.Metadata; |
1293 var _body = null; | 1333 var _body = null; |
1294 | 1334 |
1295 if (accountId == null) { | 1335 if (accountId == null) { |
1296 throw new core.ArgumentError("Parameter accountId is required."); | 1336 throw new core.ArgumentError("Parameter accountId is required."); |
1297 } | 1337 } |
1298 if (containerId == null) { | 1338 if (containerId == null) { |
1299 throw new core.ArgumentError("Parameter containerId is required."); | 1339 throw new core.ArgumentError("Parameter containerId is required."); |
1300 } | 1340 } |
1301 if (tagId == null) { | 1341 if (tagId == null) { |
1302 throw new core.ArgumentError("Parameter tagId is required."); | 1342 throw new core.ArgumentError("Parameter tagId is required."); |
1303 } | 1343 } |
1304 | 1344 |
1305 _downloadOptions = null; | 1345 _downloadOptions = null; |
1306 | 1346 |
1307 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/tags/' + commons.Escap
er.ecapeVariable('$tagId'); | 1347 _url = 'accounts/' + |
| 1348 commons.Escaper.ecapeVariable('$accountId') + |
| 1349 '/containers/' + |
| 1350 commons.Escaper.ecapeVariable('$containerId') + |
| 1351 '/tags/' + |
| 1352 commons.Escaper.ecapeVariable('$tagId'); |
1308 | 1353 |
1309 var _response = _requester.request(_url, | 1354 var _response = _requester.request(_url, "DELETE", |
1310 "DELETE", | 1355 body: _body, |
1311 body: _body, | 1356 queryParams: _queryParams, |
1312 queryParams: _queryParams, | 1357 uploadOptions: _uploadOptions, |
1313 uploadOptions: _uploadOptions, | 1358 uploadMedia: _uploadMedia, |
1314 uploadMedia: _uploadMedia, | 1359 downloadOptions: _downloadOptions); |
1315 downloadOptions: _downloadOptions); | |
1316 return _response.then((data) => null); | 1360 return _response.then((data) => null); |
1317 } | 1361 } |
1318 | 1362 |
1319 /** | 1363 /// Gets a GTM Tag. |
1320 * Gets a GTM Tag. | 1364 /// |
1321 * | 1365 /// Request parameters: |
1322 * Request parameters: | 1366 /// |
1323 * | 1367 /// [accountId] - The GTM Account ID. |
1324 * [accountId] - The GTM Account ID. | 1368 /// |
1325 * | 1369 /// [containerId] - The GTM Container ID. |
1326 * [containerId] - The GTM Container ID. | 1370 /// |
1327 * | 1371 /// [tagId] - The GTM Tag ID. |
1328 * [tagId] - The GTM Tag ID. | 1372 /// |
1329 * | 1373 /// Completes with a [Tag]. |
1330 * Completes with a [Tag]. | 1374 /// |
1331 * | 1375 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1332 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1376 /// an error. |
1333 * error. | 1377 /// |
1334 * | 1378 /// If the used [http.Client] completes with an error when making a REST |
1335 * If the used [http.Client] completes with an error when making a REST call, | 1379 /// call, this method will complete with the same error. |
1336 * this method will complete with the same error. | 1380 async.Future<Tag> get( |
1337 */ | 1381 core.String accountId, core.String containerId, core.String tagId) { |
1338 async.Future<Tag> get(core.String accountId, core.String containerId, core.Str
ing tagId) { | |
1339 var _url = null; | 1382 var _url = null; |
1340 var _queryParams = new core.Map(); | 1383 var _queryParams = new core.Map(); |
1341 var _uploadMedia = null; | 1384 var _uploadMedia = null; |
1342 var _uploadOptions = null; | 1385 var _uploadOptions = null; |
1343 var _downloadOptions = commons.DownloadOptions.Metadata; | 1386 var _downloadOptions = commons.DownloadOptions.Metadata; |
1344 var _body = null; | 1387 var _body = null; |
1345 | 1388 |
1346 if (accountId == null) { | 1389 if (accountId == null) { |
1347 throw new core.ArgumentError("Parameter accountId is required."); | 1390 throw new core.ArgumentError("Parameter accountId is required."); |
1348 } | 1391 } |
1349 if (containerId == null) { | 1392 if (containerId == null) { |
1350 throw new core.ArgumentError("Parameter containerId is required."); | 1393 throw new core.ArgumentError("Parameter containerId is required."); |
1351 } | 1394 } |
1352 if (tagId == null) { | 1395 if (tagId == null) { |
1353 throw new core.ArgumentError("Parameter tagId is required."); | 1396 throw new core.ArgumentError("Parameter tagId is required."); |
1354 } | 1397 } |
1355 | 1398 |
1356 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/tags/' + commons.Escap
er.ecapeVariable('$tagId'); | 1399 _url = 'accounts/' + |
| 1400 commons.Escaper.ecapeVariable('$accountId') + |
| 1401 '/containers/' + |
| 1402 commons.Escaper.ecapeVariable('$containerId') + |
| 1403 '/tags/' + |
| 1404 commons.Escaper.ecapeVariable('$tagId'); |
1357 | 1405 |
1358 var _response = _requester.request(_url, | 1406 var _response = _requester.request(_url, "GET", |
1359 "GET", | 1407 body: _body, |
1360 body: _body, | 1408 queryParams: _queryParams, |
1361 queryParams: _queryParams, | 1409 uploadOptions: _uploadOptions, |
1362 uploadOptions: _uploadOptions, | 1410 uploadMedia: _uploadMedia, |
1363 uploadMedia: _uploadMedia, | 1411 downloadOptions: _downloadOptions); |
1364 downloadOptions: _downloadOptions); | |
1365 return _response.then((data) => new Tag.fromJson(data)); | 1412 return _response.then((data) => new Tag.fromJson(data)); |
1366 } | 1413 } |
1367 | 1414 |
1368 /** | 1415 /// Lists all GTM Tags of a Container. |
1369 * Lists all GTM Tags of a Container. | 1416 /// |
1370 * | 1417 /// Request parameters: |
1371 * Request parameters: | 1418 /// |
1372 * | 1419 /// [accountId] - The GTM Account ID. |
1373 * [accountId] - The GTM Account ID. | 1420 /// |
1374 * | 1421 /// [containerId] - The GTM Container ID. |
1375 * [containerId] - The GTM Container ID. | 1422 /// |
1376 * | 1423 /// Completes with a [ListTagsResponse]. |
1377 * Completes with a [ListTagsResponse]. | 1424 /// |
1378 * | 1425 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1379 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1426 /// an error. |
1380 * error. | 1427 /// |
1381 * | 1428 /// If the used [http.Client] completes with an error when making a REST |
1382 * If the used [http.Client] completes with an error when making a REST call, | 1429 /// call, this method will complete with the same error. |
1383 * this method will complete with the same error. | 1430 async.Future<ListTagsResponse> list( |
1384 */ | 1431 core.String accountId, core.String containerId) { |
1385 async.Future<ListTagsResponse> list(core.String accountId, core.String contain
erId) { | |
1386 var _url = null; | 1432 var _url = null; |
1387 var _queryParams = new core.Map(); | 1433 var _queryParams = new core.Map(); |
1388 var _uploadMedia = null; | 1434 var _uploadMedia = null; |
1389 var _uploadOptions = null; | 1435 var _uploadOptions = null; |
1390 var _downloadOptions = commons.DownloadOptions.Metadata; | 1436 var _downloadOptions = commons.DownloadOptions.Metadata; |
1391 var _body = null; | 1437 var _body = null; |
1392 | 1438 |
1393 if (accountId == null) { | 1439 if (accountId == null) { |
1394 throw new core.ArgumentError("Parameter accountId is required."); | 1440 throw new core.ArgumentError("Parameter accountId is required."); |
1395 } | 1441 } |
1396 if (containerId == null) { | 1442 if (containerId == null) { |
1397 throw new core.ArgumentError("Parameter containerId is required."); | 1443 throw new core.ArgumentError("Parameter containerId is required."); |
1398 } | 1444 } |
1399 | 1445 |
1400 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/tags'; | 1446 _url = 'accounts/' + |
| 1447 commons.Escaper.ecapeVariable('$accountId') + |
| 1448 '/containers/' + |
| 1449 commons.Escaper.ecapeVariable('$containerId') + |
| 1450 '/tags'; |
1401 | 1451 |
1402 var _response = _requester.request(_url, | 1452 var _response = _requester.request(_url, "GET", |
1403 "GET", | 1453 body: _body, |
1404 body: _body, | 1454 queryParams: _queryParams, |
1405 queryParams: _queryParams, | 1455 uploadOptions: _uploadOptions, |
1406 uploadOptions: _uploadOptions, | 1456 uploadMedia: _uploadMedia, |
1407 uploadMedia: _uploadMedia, | 1457 downloadOptions: _downloadOptions); |
1408 downloadOptions: _downloadOptions); | |
1409 return _response.then((data) => new ListTagsResponse.fromJson(data)); | 1458 return _response.then((data) => new ListTagsResponse.fromJson(data)); |
1410 } | 1459 } |
1411 | 1460 |
1412 /** | 1461 /// Updates a GTM Tag. |
1413 * Updates a GTM Tag. | 1462 /// |
1414 * | 1463 /// [request] - The metadata request object. |
1415 * [request] - The metadata request object. | 1464 /// |
1416 * | 1465 /// Request parameters: |
1417 * Request parameters: | 1466 /// |
1418 * | 1467 /// [accountId] - The GTM Account ID. |
1419 * [accountId] - The GTM Account ID. | 1468 /// |
1420 * | 1469 /// [containerId] - The GTM Container ID. |
1421 * [containerId] - The GTM Container ID. | 1470 /// |
1422 * | 1471 /// [tagId] - The GTM Tag ID. |
1423 * [tagId] - The GTM Tag ID. | 1472 /// |
1424 * | 1473 /// [fingerprint] - When provided, this fingerprint must match the |
1425 * [fingerprint] - When provided, this fingerprint must match the fingerprint | 1474 /// fingerprint of the tag in storage. |
1426 * of the tag in storage. | 1475 /// |
1427 * | 1476 /// Completes with a [Tag]. |
1428 * Completes with a [Tag]. | 1477 /// |
1429 * | 1478 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1430 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1479 /// an error. |
1431 * error. | 1480 /// |
1432 * | 1481 /// If the used [http.Client] completes with an error when making a REST |
1433 * If the used [http.Client] completes with an error when making a REST call, | 1482 /// call, this method will complete with the same error. |
1434 * this method will complete with the same error. | 1483 async.Future<Tag> update(Tag request, core.String accountId, |
1435 */ | 1484 core.String containerId, core.String tagId, |
1436 async.Future<Tag> update(Tag request, core.String accountId, core.String conta
inerId, core.String tagId, {core.String fingerprint}) { | 1485 {core.String fingerprint}) { |
1437 var _url = null; | 1486 var _url = null; |
1438 var _queryParams = new core.Map(); | 1487 var _queryParams = new core.Map(); |
1439 var _uploadMedia = null; | 1488 var _uploadMedia = null; |
1440 var _uploadOptions = null; | 1489 var _uploadOptions = null; |
1441 var _downloadOptions = commons.DownloadOptions.Metadata; | 1490 var _downloadOptions = commons.DownloadOptions.Metadata; |
1442 var _body = null; | 1491 var _body = null; |
1443 | 1492 |
1444 if (request != null) { | 1493 if (request != null) { |
1445 _body = convert.JSON.encode((request).toJson()); | 1494 _body = convert.JSON.encode((request).toJson()); |
1446 } | 1495 } |
1447 if (accountId == null) { | 1496 if (accountId == null) { |
1448 throw new core.ArgumentError("Parameter accountId is required."); | 1497 throw new core.ArgumentError("Parameter accountId is required."); |
1449 } | 1498 } |
1450 if (containerId == null) { | 1499 if (containerId == null) { |
1451 throw new core.ArgumentError("Parameter containerId is required."); | 1500 throw new core.ArgumentError("Parameter containerId is required."); |
1452 } | 1501 } |
1453 if (tagId == null) { | 1502 if (tagId == null) { |
1454 throw new core.ArgumentError("Parameter tagId is required."); | 1503 throw new core.ArgumentError("Parameter tagId is required."); |
1455 } | 1504 } |
1456 if (fingerprint != null) { | 1505 if (fingerprint != null) { |
1457 _queryParams["fingerprint"] = [fingerprint]; | 1506 _queryParams["fingerprint"] = [fingerprint]; |
1458 } | 1507 } |
1459 | 1508 |
1460 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/tags/' + commons.Escap
er.ecapeVariable('$tagId'); | 1509 _url = 'accounts/' + |
| 1510 commons.Escaper.ecapeVariable('$accountId') + |
| 1511 '/containers/' + |
| 1512 commons.Escaper.ecapeVariable('$containerId') + |
| 1513 '/tags/' + |
| 1514 commons.Escaper.ecapeVariable('$tagId'); |
1461 | 1515 |
1462 var _response = _requester.request(_url, | 1516 var _response = _requester.request(_url, "PUT", |
1463 "PUT", | 1517 body: _body, |
1464 body: _body, | 1518 queryParams: _queryParams, |
1465 queryParams: _queryParams, | 1519 uploadOptions: _uploadOptions, |
1466 uploadOptions: _uploadOptions, | 1520 uploadMedia: _uploadMedia, |
1467 uploadMedia: _uploadMedia, | 1521 downloadOptions: _downloadOptions); |
1468 downloadOptions: _downloadOptions); | |
1469 return _response.then((data) => new Tag.fromJson(data)); | 1522 return _response.then((data) => new Tag.fromJson(data)); |
1470 } | 1523 } |
1471 | |
1472 } | 1524 } |
1473 | 1525 |
1474 | |
1475 class AccountsContainersTriggersResourceApi { | 1526 class AccountsContainersTriggersResourceApi { |
1476 final commons.ApiRequester _requester; | 1527 final commons.ApiRequester _requester; |
1477 | 1528 |
1478 AccountsContainersTriggersResourceApi(commons.ApiRequester client) : | 1529 AccountsContainersTriggersResourceApi(commons.ApiRequester client) |
1479 _requester = client; | 1530 : _requester = client; |
1480 | 1531 |
1481 /** | 1532 /// Creates a GTM Trigger. |
1482 * Creates a GTM Trigger. | 1533 /// |
1483 * | 1534 /// [request] - The metadata request object. |
1484 * [request] - The metadata request object. | 1535 /// |
1485 * | 1536 /// Request parameters: |
1486 * Request parameters: | 1537 /// |
1487 * | 1538 /// [accountId] - The GTM Account ID. |
1488 * [accountId] - The GTM Account ID. | 1539 /// |
1489 * | 1540 /// [containerId] - The GTM Container ID. |
1490 * [containerId] - The GTM Container ID. | 1541 /// |
1491 * | 1542 /// Completes with a [Trigger]. |
1492 * Completes with a [Trigger]. | 1543 /// |
1493 * | 1544 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1494 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1545 /// an error. |
1495 * error. | 1546 /// |
1496 * | 1547 /// If the used [http.Client] completes with an error when making a REST |
1497 * If the used [http.Client] completes with an error when making a REST call, | 1548 /// call, this method will complete with the same error. |
1498 * this method will complete with the same error. | 1549 async.Future<Trigger> create( |
1499 */ | 1550 Trigger request, core.String accountId, core.String containerId) { |
1500 async.Future<Trigger> create(Trigger request, core.String accountId, core.Stri
ng containerId) { | |
1501 var _url = null; | 1551 var _url = null; |
1502 var _queryParams = new core.Map(); | 1552 var _queryParams = new core.Map(); |
1503 var _uploadMedia = null; | 1553 var _uploadMedia = null; |
1504 var _uploadOptions = null; | 1554 var _uploadOptions = null; |
1505 var _downloadOptions = commons.DownloadOptions.Metadata; | 1555 var _downloadOptions = commons.DownloadOptions.Metadata; |
1506 var _body = null; | 1556 var _body = null; |
1507 | 1557 |
1508 if (request != null) { | 1558 if (request != null) { |
1509 _body = convert.JSON.encode((request).toJson()); | 1559 _body = convert.JSON.encode((request).toJson()); |
1510 } | 1560 } |
1511 if (accountId == null) { | 1561 if (accountId == null) { |
1512 throw new core.ArgumentError("Parameter accountId is required."); | 1562 throw new core.ArgumentError("Parameter accountId is required."); |
1513 } | 1563 } |
1514 if (containerId == null) { | 1564 if (containerId == null) { |
1515 throw new core.ArgumentError("Parameter containerId is required."); | 1565 throw new core.ArgumentError("Parameter containerId is required."); |
1516 } | 1566 } |
1517 | 1567 |
1518 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/triggers'; | 1568 _url = 'accounts/' + |
| 1569 commons.Escaper.ecapeVariable('$accountId') + |
| 1570 '/containers/' + |
| 1571 commons.Escaper.ecapeVariable('$containerId') + |
| 1572 '/triggers'; |
1519 | 1573 |
1520 var _response = _requester.request(_url, | 1574 var _response = _requester.request(_url, "POST", |
1521 "POST", | 1575 body: _body, |
1522 body: _body, | 1576 queryParams: _queryParams, |
1523 queryParams: _queryParams, | 1577 uploadOptions: _uploadOptions, |
1524 uploadOptions: _uploadOptions, | 1578 uploadMedia: _uploadMedia, |
1525 uploadMedia: _uploadMedia, | 1579 downloadOptions: _downloadOptions); |
1526 downloadOptions: _downloadOptions); | |
1527 return _response.then((data) => new Trigger.fromJson(data)); | 1580 return _response.then((data) => new Trigger.fromJson(data)); |
1528 } | 1581 } |
1529 | 1582 |
1530 /** | 1583 /// Deletes a GTM Trigger. |
1531 * Deletes a GTM Trigger. | 1584 /// |
1532 * | 1585 /// Request parameters: |
1533 * Request parameters: | 1586 /// |
1534 * | 1587 /// [accountId] - The GTM Account ID. |
1535 * [accountId] - The GTM Account ID. | 1588 /// |
1536 * | 1589 /// [containerId] - The GTM Container ID. |
1537 * [containerId] - The GTM Container ID. | 1590 /// |
1538 * | 1591 /// [triggerId] - The GTM Trigger ID. |
1539 * [triggerId] - The GTM Trigger ID. | 1592 /// |
1540 * | 1593 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1541 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1594 /// an error. |
1542 * error. | 1595 /// |
1543 * | 1596 /// If the used [http.Client] completes with an error when making a REST |
1544 * If the used [http.Client] completes with an error when making a REST call, | 1597 /// call, this method will complete with the same error. |
1545 * this method will complete with the same error. | 1598 async.Future delete( |
1546 */ | 1599 core.String accountId, core.String containerId, core.String triggerId) { |
1547 async.Future delete(core.String accountId, core.String containerId, core.Strin
g triggerId) { | |
1548 var _url = null; | 1600 var _url = null; |
1549 var _queryParams = new core.Map(); | 1601 var _queryParams = new core.Map(); |
1550 var _uploadMedia = null; | 1602 var _uploadMedia = null; |
1551 var _uploadOptions = null; | 1603 var _uploadOptions = null; |
1552 var _downloadOptions = commons.DownloadOptions.Metadata; | 1604 var _downloadOptions = commons.DownloadOptions.Metadata; |
1553 var _body = null; | 1605 var _body = null; |
1554 | 1606 |
1555 if (accountId == null) { | 1607 if (accountId == null) { |
1556 throw new core.ArgumentError("Parameter accountId is required."); | 1608 throw new core.ArgumentError("Parameter accountId is required."); |
1557 } | 1609 } |
1558 if (containerId == null) { | 1610 if (containerId == null) { |
1559 throw new core.ArgumentError("Parameter containerId is required."); | 1611 throw new core.ArgumentError("Parameter containerId is required."); |
1560 } | 1612 } |
1561 if (triggerId == null) { | 1613 if (triggerId == null) { |
1562 throw new core.ArgumentError("Parameter triggerId is required."); | 1614 throw new core.ArgumentError("Parameter triggerId is required."); |
1563 } | 1615 } |
1564 | 1616 |
1565 _downloadOptions = null; | 1617 _downloadOptions = null; |
1566 | 1618 |
1567 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/triggers/' + commons.E
scaper.ecapeVariable('$triggerId'); | 1619 _url = 'accounts/' + |
| 1620 commons.Escaper.ecapeVariable('$accountId') + |
| 1621 '/containers/' + |
| 1622 commons.Escaper.ecapeVariable('$containerId') + |
| 1623 '/triggers/' + |
| 1624 commons.Escaper.ecapeVariable('$triggerId'); |
1568 | 1625 |
1569 var _response = _requester.request(_url, | 1626 var _response = _requester.request(_url, "DELETE", |
1570 "DELETE", | 1627 body: _body, |
1571 body: _body, | 1628 queryParams: _queryParams, |
1572 queryParams: _queryParams, | 1629 uploadOptions: _uploadOptions, |
1573 uploadOptions: _uploadOptions, | 1630 uploadMedia: _uploadMedia, |
1574 uploadMedia: _uploadMedia, | 1631 downloadOptions: _downloadOptions); |
1575 downloadOptions: _downloadOptions); | |
1576 return _response.then((data) => null); | 1632 return _response.then((data) => null); |
1577 } | 1633 } |
1578 | 1634 |
1579 /** | 1635 /// Gets a GTM Trigger. |
1580 * Gets a GTM Trigger. | 1636 /// |
1581 * | 1637 /// Request parameters: |
1582 * Request parameters: | 1638 /// |
1583 * | 1639 /// [accountId] - The GTM Account ID. |
1584 * [accountId] - The GTM Account ID. | 1640 /// |
1585 * | 1641 /// [containerId] - The GTM Container ID. |
1586 * [containerId] - The GTM Container ID. | 1642 /// |
1587 * | 1643 /// [triggerId] - The GTM Trigger ID. |
1588 * [triggerId] - The GTM Trigger ID. | 1644 /// |
1589 * | 1645 /// Completes with a [Trigger]. |
1590 * Completes with a [Trigger]. | 1646 /// |
1591 * | 1647 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1592 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1648 /// an error. |
1593 * error. | 1649 /// |
1594 * | 1650 /// If the used [http.Client] completes with an error when making a REST |
1595 * If the used [http.Client] completes with an error when making a REST call, | 1651 /// call, this method will complete with the same error. |
1596 * this method will complete with the same error. | 1652 async.Future<Trigger> get( |
1597 */ | 1653 core.String accountId, core.String containerId, core.String triggerId) { |
1598 async.Future<Trigger> get(core.String accountId, core.String containerId, core
.String triggerId) { | |
1599 var _url = null; | 1654 var _url = null; |
1600 var _queryParams = new core.Map(); | 1655 var _queryParams = new core.Map(); |
1601 var _uploadMedia = null; | 1656 var _uploadMedia = null; |
1602 var _uploadOptions = null; | 1657 var _uploadOptions = null; |
1603 var _downloadOptions = commons.DownloadOptions.Metadata; | 1658 var _downloadOptions = commons.DownloadOptions.Metadata; |
1604 var _body = null; | 1659 var _body = null; |
1605 | 1660 |
1606 if (accountId == null) { | 1661 if (accountId == null) { |
1607 throw new core.ArgumentError("Parameter accountId is required."); | 1662 throw new core.ArgumentError("Parameter accountId is required."); |
1608 } | 1663 } |
1609 if (containerId == null) { | 1664 if (containerId == null) { |
1610 throw new core.ArgumentError("Parameter containerId is required."); | 1665 throw new core.ArgumentError("Parameter containerId is required."); |
1611 } | 1666 } |
1612 if (triggerId == null) { | 1667 if (triggerId == null) { |
1613 throw new core.ArgumentError("Parameter triggerId is required."); | 1668 throw new core.ArgumentError("Parameter triggerId is required."); |
1614 } | 1669 } |
1615 | 1670 |
1616 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/triggers/' + commons.E
scaper.ecapeVariable('$triggerId'); | 1671 _url = 'accounts/' + |
| 1672 commons.Escaper.ecapeVariable('$accountId') + |
| 1673 '/containers/' + |
| 1674 commons.Escaper.ecapeVariable('$containerId') + |
| 1675 '/triggers/' + |
| 1676 commons.Escaper.ecapeVariable('$triggerId'); |
1617 | 1677 |
1618 var _response = _requester.request(_url, | 1678 var _response = _requester.request(_url, "GET", |
1619 "GET", | 1679 body: _body, |
1620 body: _body, | 1680 queryParams: _queryParams, |
1621 queryParams: _queryParams, | 1681 uploadOptions: _uploadOptions, |
1622 uploadOptions: _uploadOptions, | 1682 uploadMedia: _uploadMedia, |
1623 uploadMedia: _uploadMedia, | 1683 downloadOptions: _downloadOptions); |
1624 downloadOptions: _downloadOptions); | |
1625 return _response.then((data) => new Trigger.fromJson(data)); | 1684 return _response.then((data) => new Trigger.fromJson(data)); |
1626 } | 1685 } |
1627 | 1686 |
1628 /** | 1687 /// Lists all GTM Triggers of a Container. |
1629 * Lists all GTM Triggers of a Container. | 1688 /// |
1630 * | 1689 /// Request parameters: |
1631 * Request parameters: | 1690 /// |
1632 * | 1691 /// [accountId] - The GTM Account ID. |
1633 * [accountId] - The GTM Account ID. | 1692 /// |
1634 * | 1693 /// [containerId] - The GTM Container ID. |
1635 * [containerId] - The GTM Container ID. | 1694 /// |
1636 * | 1695 /// Completes with a [ListTriggersResponse]. |
1637 * Completes with a [ListTriggersResponse]. | 1696 /// |
1638 * | 1697 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1639 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1698 /// an error. |
1640 * error. | 1699 /// |
1641 * | 1700 /// If the used [http.Client] completes with an error when making a REST |
1642 * If the used [http.Client] completes with an error when making a REST call, | 1701 /// call, this method will complete with the same error. |
1643 * this method will complete with the same error. | 1702 async.Future<ListTriggersResponse> list( |
1644 */ | 1703 core.String accountId, core.String containerId) { |
1645 async.Future<ListTriggersResponse> list(core.String accountId, core.String con
tainerId) { | |
1646 var _url = null; | 1704 var _url = null; |
1647 var _queryParams = new core.Map(); | 1705 var _queryParams = new core.Map(); |
1648 var _uploadMedia = null; | 1706 var _uploadMedia = null; |
1649 var _uploadOptions = null; | 1707 var _uploadOptions = null; |
1650 var _downloadOptions = commons.DownloadOptions.Metadata; | 1708 var _downloadOptions = commons.DownloadOptions.Metadata; |
1651 var _body = null; | 1709 var _body = null; |
1652 | 1710 |
1653 if (accountId == null) { | 1711 if (accountId == null) { |
1654 throw new core.ArgumentError("Parameter accountId is required."); | 1712 throw new core.ArgumentError("Parameter accountId is required."); |
1655 } | 1713 } |
1656 if (containerId == null) { | 1714 if (containerId == null) { |
1657 throw new core.ArgumentError("Parameter containerId is required."); | 1715 throw new core.ArgumentError("Parameter containerId is required."); |
1658 } | 1716 } |
1659 | 1717 |
1660 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/triggers'; | 1718 _url = 'accounts/' + |
| 1719 commons.Escaper.ecapeVariable('$accountId') + |
| 1720 '/containers/' + |
| 1721 commons.Escaper.ecapeVariable('$containerId') + |
| 1722 '/triggers'; |
1661 | 1723 |
1662 var _response = _requester.request(_url, | 1724 var _response = _requester.request(_url, "GET", |
1663 "GET", | 1725 body: _body, |
1664 body: _body, | 1726 queryParams: _queryParams, |
1665 queryParams: _queryParams, | 1727 uploadOptions: _uploadOptions, |
1666 uploadOptions: _uploadOptions, | 1728 uploadMedia: _uploadMedia, |
1667 uploadMedia: _uploadMedia, | 1729 downloadOptions: _downloadOptions); |
1668 downloadOptions: _downloadOptions); | |
1669 return _response.then((data) => new ListTriggersResponse.fromJson(data)); | 1730 return _response.then((data) => new ListTriggersResponse.fromJson(data)); |
1670 } | 1731 } |
1671 | 1732 |
1672 /** | 1733 /// Updates a GTM Trigger. |
1673 * Updates a GTM Trigger. | 1734 /// |
1674 * | 1735 /// [request] - The metadata request object. |
1675 * [request] - The metadata request object. | 1736 /// |
1676 * | 1737 /// Request parameters: |
1677 * Request parameters: | 1738 /// |
1678 * | 1739 /// [accountId] - The GTM Account ID. |
1679 * [accountId] - The GTM Account ID. | 1740 /// |
1680 * | 1741 /// [containerId] - The GTM Container ID. |
1681 * [containerId] - The GTM Container ID. | 1742 /// |
1682 * | 1743 /// [triggerId] - The GTM Trigger ID. |
1683 * [triggerId] - The GTM Trigger ID. | 1744 /// |
1684 * | 1745 /// [fingerprint] - When provided, this fingerprint must match the |
1685 * [fingerprint] - When provided, this fingerprint must match the fingerprint | 1746 /// fingerprint of the trigger in storage. |
1686 * of the trigger in storage. | 1747 /// |
1687 * | 1748 /// Completes with a [Trigger]. |
1688 * Completes with a [Trigger]. | 1749 /// |
1689 * | 1750 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1690 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1751 /// an error. |
1691 * error. | 1752 /// |
1692 * | 1753 /// If the used [http.Client] completes with an error when making a REST |
1693 * If the used [http.Client] completes with an error when making a REST call, | 1754 /// call, this method will complete with the same error. |
1694 * this method will complete with the same error. | 1755 async.Future<Trigger> update(Trigger request, core.String accountId, |
1695 */ | 1756 core.String containerId, core.String triggerId, |
1696 async.Future<Trigger> update(Trigger request, core.String accountId, core.Stri
ng containerId, core.String triggerId, {core.String fingerprint}) { | 1757 {core.String fingerprint}) { |
1697 var _url = null; | 1758 var _url = null; |
1698 var _queryParams = new core.Map(); | 1759 var _queryParams = new core.Map(); |
1699 var _uploadMedia = null; | 1760 var _uploadMedia = null; |
1700 var _uploadOptions = null; | 1761 var _uploadOptions = null; |
1701 var _downloadOptions = commons.DownloadOptions.Metadata; | 1762 var _downloadOptions = commons.DownloadOptions.Metadata; |
1702 var _body = null; | 1763 var _body = null; |
1703 | 1764 |
1704 if (request != null) { | 1765 if (request != null) { |
1705 _body = convert.JSON.encode((request).toJson()); | 1766 _body = convert.JSON.encode((request).toJson()); |
1706 } | 1767 } |
1707 if (accountId == null) { | 1768 if (accountId == null) { |
1708 throw new core.ArgumentError("Parameter accountId is required."); | 1769 throw new core.ArgumentError("Parameter accountId is required."); |
1709 } | 1770 } |
1710 if (containerId == null) { | 1771 if (containerId == null) { |
1711 throw new core.ArgumentError("Parameter containerId is required."); | 1772 throw new core.ArgumentError("Parameter containerId is required."); |
1712 } | 1773 } |
1713 if (triggerId == null) { | 1774 if (triggerId == null) { |
1714 throw new core.ArgumentError("Parameter triggerId is required."); | 1775 throw new core.ArgumentError("Parameter triggerId is required."); |
1715 } | 1776 } |
1716 if (fingerprint != null) { | 1777 if (fingerprint != null) { |
1717 _queryParams["fingerprint"] = [fingerprint]; | 1778 _queryParams["fingerprint"] = [fingerprint]; |
1718 } | 1779 } |
1719 | 1780 |
1720 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/triggers/' + commons.E
scaper.ecapeVariable('$triggerId'); | 1781 _url = 'accounts/' + |
| 1782 commons.Escaper.ecapeVariable('$accountId') + |
| 1783 '/containers/' + |
| 1784 commons.Escaper.ecapeVariable('$containerId') + |
| 1785 '/triggers/' + |
| 1786 commons.Escaper.ecapeVariable('$triggerId'); |
1721 | 1787 |
1722 var _response = _requester.request(_url, | 1788 var _response = _requester.request(_url, "PUT", |
1723 "PUT", | 1789 body: _body, |
1724 body: _body, | 1790 queryParams: _queryParams, |
1725 queryParams: _queryParams, | 1791 uploadOptions: _uploadOptions, |
1726 uploadOptions: _uploadOptions, | 1792 uploadMedia: _uploadMedia, |
1727 uploadMedia: _uploadMedia, | 1793 downloadOptions: _downloadOptions); |
1728 downloadOptions: _downloadOptions); | |
1729 return _response.then((data) => new Trigger.fromJson(data)); | 1794 return _response.then((data) => new Trigger.fromJson(data)); |
1730 } | 1795 } |
1731 | |
1732 } | 1796 } |
1733 | 1797 |
1734 | |
1735 class AccountsContainersVariablesResourceApi { | 1798 class AccountsContainersVariablesResourceApi { |
1736 final commons.ApiRequester _requester; | 1799 final commons.ApiRequester _requester; |
1737 | 1800 |
1738 AccountsContainersVariablesResourceApi(commons.ApiRequester client) : | 1801 AccountsContainersVariablesResourceApi(commons.ApiRequester client) |
1739 _requester = client; | 1802 : _requester = client; |
1740 | 1803 |
1741 /** | 1804 /// Creates a GTM Variable. |
1742 * Creates a GTM Variable. | 1805 /// |
1743 * | 1806 /// [request] - The metadata request object. |
1744 * [request] - The metadata request object. | 1807 /// |
1745 * | 1808 /// Request parameters: |
1746 * Request parameters: | 1809 /// |
1747 * | 1810 /// [accountId] - The GTM Account ID. |
1748 * [accountId] - The GTM Account ID. | 1811 /// |
1749 * | 1812 /// [containerId] - The GTM Container ID. |
1750 * [containerId] - The GTM Container ID. | 1813 /// |
1751 * | 1814 /// Completes with a [Variable]. |
1752 * Completes with a [Variable]. | 1815 /// |
1753 * | 1816 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1754 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1817 /// an error. |
1755 * error. | 1818 /// |
1756 * | 1819 /// If the used [http.Client] completes with an error when making a REST |
1757 * If the used [http.Client] completes with an error when making a REST call, | 1820 /// call, this method will complete with the same error. |
1758 * this method will complete with the same error. | 1821 async.Future<Variable> create( |
1759 */ | 1822 Variable request, core.String accountId, core.String containerId) { |
1760 async.Future<Variable> create(Variable request, core.String accountId, core.St
ring containerId) { | |
1761 var _url = null; | 1823 var _url = null; |
1762 var _queryParams = new core.Map(); | 1824 var _queryParams = new core.Map(); |
1763 var _uploadMedia = null; | 1825 var _uploadMedia = null; |
1764 var _uploadOptions = null; | 1826 var _uploadOptions = null; |
1765 var _downloadOptions = commons.DownloadOptions.Metadata; | 1827 var _downloadOptions = commons.DownloadOptions.Metadata; |
1766 var _body = null; | 1828 var _body = null; |
1767 | 1829 |
1768 if (request != null) { | 1830 if (request != null) { |
1769 _body = convert.JSON.encode((request).toJson()); | 1831 _body = convert.JSON.encode((request).toJson()); |
1770 } | 1832 } |
1771 if (accountId == null) { | 1833 if (accountId == null) { |
1772 throw new core.ArgumentError("Parameter accountId is required."); | 1834 throw new core.ArgumentError("Parameter accountId is required."); |
1773 } | 1835 } |
1774 if (containerId == null) { | 1836 if (containerId == null) { |
1775 throw new core.ArgumentError("Parameter containerId is required."); | 1837 throw new core.ArgumentError("Parameter containerId is required."); |
1776 } | 1838 } |
1777 | 1839 |
1778 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/variables'; | 1840 _url = 'accounts/' + |
| 1841 commons.Escaper.ecapeVariable('$accountId') + |
| 1842 '/containers/' + |
| 1843 commons.Escaper.ecapeVariable('$containerId') + |
| 1844 '/variables'; |
1779 | 1845 |
1780 var _response = _requester.request(_url, | 1846 var _response = _requester.request(_url, "POST", |
1781 "POST", | 1847 body: _body, |
1782 body: _body, | 1848 queryParams: _queryParams, |
1783 queryParams: _queryParams, | 1849 uploadOptions: _uploadOptions, |
1784 uploadOptions: _uploadOptions, | 1850 uploadMedia: _uploadMedia, |
1785 uploadMedia: _uploadMedia, | 1851 downloadOptions: _downloadOptions); |
1786 downloadOptions: _downloadOptions); | |
1787 return _response.then((data) => new Variable.fromJson(data)); | 1852 return _response.then((data) => new Variable.fromJson(data)); |
1788 } | 1853 } |
1789 | 1854 |
1790 /** | 1855 /// Deletes a GTM Variable. |
1791 * Deletes a GTM Variable. | 1856 /// |
1792 * | 1857 /// Request parameters: |
1793 * Request parameters: | 1858 /// |
1794 * | 1859 /// [accountId] - The GTM Account ID. |
1795 * [accountId] - The GTM Account ID. | 1860 /// |
1796 * | 1861 /// [containerId] - The GTM Container ID. |
1797 * [containerId] - The GTM Container ID. | 1862 /// |
1798 * | 1863 /// [variableId] - The GTM Variable ID. |
1799 * [variableId] - The GTM Variable ID. | 1864 /// |
1800 * | 1865 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1801 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1866 /// an error. |
1802 * error. | 1867 /// |
1803 * | 1868 /// If the used [http.Client] completes with an error when making a REST |
1804 * If the used [http.Client] completes with an error when making a REST call, | 1869 /// call, this method will complete with the same error. |
1805 * this method will complete with the same error. | 1870 async.Future delete( |
1806 */ | 1871 core.String accountId, core.String containerId, core.String variableId) { |
1807 async.Future delete(core.String accountId, core.String containerId, core.Strin
g variableId) { | |
1808 var _url = null; | 1872 var _url = null; |
1809 var _queryParams = new core.Map(); | 1873 var _queryParams = new core.Map(); |
1810 var _uploadMedia = null; | 1874 var _uploadMedia = null; |
1811 var _uploadOptions = null; | 1875 var _uploadOptions = null; |
1812 var _downloadOptions = commons.DownloadOptions.Metadata; | 1876 var _downloadOptions = commons.DownloadOptions.Metadata; |
1813 var _body = null; | 1877 var _body = null; |
1814 | 1878 |
1815 if (accountId == null) { | 1879 if (accountId == null) { |
1816 throw new core.ArgumentError("Parameter accountId is required."); | 1880 throw new core.ArgumentError("Parameter accountId is required."); |
1817 } | 1881 } |
1818 if (containerId == null) { | 1882 if (containerId == null) { |
1819 throw new core.ArgumentError("Parameter containerId is required."); | 1883 throw new core.ArgumentError("Parameter containerId is required."); |
1820 } | 1884 } |
1821 if (variableId == null) { | 1885 if (variableId == null) { |
1822 throw new core.ArgumentError("Parameter variableId is required."); | 1886 throw new core.ArgumentError("Parameter variableId is required."); |
1823 } | 1887 } |
1824 | 1888 |
1825 _downloadOptions = null; | 1889 _downloadOptions = null; |
1826 | 1890 |
1827 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/variables/' + commons.
Escaper.ecapeVariable('$variableId'); | 1891 _url = 'accounts/' + |
| 1892 commons.Escaper.ecapeVariable('$accountId') + |
| 1893 '/containers/' + |
| 1894 commons.Escaper.ecapeVariable('$containerId') + |
| 1895 '/variables/' + |
| 1896 commons.Escaper.ecapeVariable('$variableId'); |
1828 | 1897 |
1829 var _response = _requester.request(_url, | 1898 var _response = _requester.request(_url, "DELETE", |
1830 "DELETE", | 1899 body: _body, |
1831 body: _body, | 1900 queryParams: _queryParams, |
1832 queryParams: _queryParams, | 1901 uploadOptions: _uploadOptions, |
1833 uploadOptions: _uploadOptions, | 1902 uploadMedia: _uploadMedia, |
1834 uploadMedia: _uploadMedia, | 1903 downloadOptions: _downloadOptions); |
1835 downloadOptions: _downloadOptions); | |
1836 return _response.then((data) => null); | 1904 return _response.then((data) => null); |
1837 } | 1905 } |
1838 | 1906 |
1839 /** | 1907 /// Gets a GTM Variable. |
1840 * Gets a GTM Variable. | 1908 /// |
1841 * | 1909 /// Request parameters: |
1842 * Request parameters: | 1910 /// |
1843 * | 1911 /// [accountId] - The GTM Account ID. |
1844 * [accountId] - The GTM Account ID. | 1912 /// |
1845 * | 1913 /// [containerId] - The GTM Container ID. |
1846 * [containerId] - The GTM Container ID. | 1914 /// |
1847 * | 1915 /// [variableId] - The GTM Variable ID. |
1848 * [variableId] - The GTM Variable ID. | 1916 /// |
1849 * | 1917 /// Completes with a [Variable]. |
1850 * Completes with a [Variable]. | 1918 /// |
1851 * | 1919 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1852 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1920 /// an error. |
1853 * error. | 1921 /// |
1854 * | 1922 /// If the used [http.Client] completes with an error when making a REST |
1855 * If the used [http.Client] completes with an error when making a REST call, | 1923 /// call, this method will complete with the same error. |
1856 * this method will complete with the same error. | 1924 async.Future<Variable> get( |
1857 */ | 1925 core.String accountId, core.String containerId, core.String variableId) { |
1858 async.Future<Variable> get(core.String accountId, core.String containerId, cor
e.String variableId) { | |
1859 var _url = null; | 1926 var _url = null; |
1860 var _queryParams = new core.Map(); | 1927 var _queryParams = new core.Map(); |
1861 var _uploadMedia = null; | 1928 var _uploadMedia = null; |
1862 var _uploadOptions = null; | 1929 var _uploadOptions = null; |
1863 var _downloadOptions = commons.DownloadOptions.Metadata; | 1930 var _downloadOptions = commons.DownloadOptions.Metadata; |
1864 var _body = null; | 1931 var _body = null; |
1865 | 1932 |
1866 if (accountId == null) { | 1933 if (accountId == null) { |
1867 throw new core.ArgumentError("Parameter accountId is required."); | 1934 throw new core.ArgumentError("Parameter accountId is required."); |
1868 } | 1935 } |
1869 if (containerId == null) { | 1936 if (containerId == null) { |
1870 throw new core.ArgumentError("Parameter containerId is required."); | 1937 throw new core.ArgumentError("Parameter containerId is required."); |
1871 } | 1938 } |
1872 if (variableId == null) { | 1939 if (variableId == null) { |
1873 throw new core.ArgumentError("Parameter variableId is required."); | 1940 throw new core.ArgumentError("Parameter variableId is required."); |
1874 } | 1941 } |
1875 | 1942 |
1876 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/variables/' + commons.
Escaper.ecapeVariable('$variableId'); | 1943 _url = 'accounts/' + |
| 1944 commons.Escaper.ecapeVariable('$accountId') + |
| 1945 '/containers/' + |
| 1946 commons.Escaper.ecapeVariable('$containerId') + |
| 1947 '/variables/' + |
| 1948 commons.Escaper.ecapeVariable('$variableId'); |
1877 | 1949 |
1878 var _response = _requester.request(_url, | 1950 var _response = _requester.request(_url, "GET", |
1879 "GET", | 1951 body: _body, |
1880 body: _body, | 1952 queryParams: _queryParams, |
1881 queryParams: _queryParams, | 1953 uploadOptions: _uploadOptions, |
1882 uploadOptions: _uploadOptions, | 1954 uploadMedia: _uploadMedia, |
1883 uploadMedia: _uploadMedia, | 1955 downloadOptions: _downloadOptions); |
1884 downloadOptions: _downloadOptions); | |
1885 return _response.then((data) => new Variable.fromJson(data)); | 1956 return _response.then((data) => new Variable.fromJson(data)); |
1886 } | 1957 } |
1887 | 1958 |
1888 /** | 1959 /// Lists all GTM Variables of a Container. |
1889 * Lists all GTM Variables of a Container. | 1960 /// |
1890 * | 1961 /// Request parameters: |
1891 * Request parameters: | 1962 /// |
1892 * | 1963 /// [accountId] - The GTM Account ID. |
1893 * [accountId] - The GTM Account ID. | 1964 /// |
1894 * | 1965 /// [containerId] - The GTM Container ID. |
1895 * [containerId] - The GTM Container ID. | 1966 /// |
1896 * | 1967 /// Completes with a [ListVariablesResponse]. |
1897 * Completes with a [ListVariablesResponse]. | 1968 /// |
1898 * | 1969 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1899 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1970 /// an error. |
1900 * error. | 1971 /// |
1901 * | 1972 /// If the used [http.Client] completes with an error when making a REST |
1902 * If the used [http.Client] completes with an error when making a REST call, | 1973 /// call, this method will complete with the same error. |
1903 * this method will complete with the same error. | 1974 async.Future<ListVariablesResponse> list( |
1904 */ | 1975 core.String accountId, core.String containerId) { |
1905 async.Future<ListVariablesResponse> list(core.String accountId, core.String co
ntainerId) { | |
1906 var _url = null; | 1976 var _url = null; |
1907 var _queryParams = new core.Map(); | 1977 var _queryParams = new core.Map(); |
1908 var _uploadMedia = null; | 1978 var _uploadMedia = null; |
1909 var _uploadOptions = null; | 1979 var _uploadOptions = null; |
1910 var _downloadOptions = commons.DownloadOptions.Metadata; | 1980 var _downloadOptions = commons.DownloadOptions.Metadata; |
1911 var _body = null; | 1981 var _body = null; |
1912 | 1982 |
1913 if (accountId == null) { | 1983 if (accountId == null) { |
1914 throw new core.ArgumentError("Parameter accountId is required."); | 1984 throw new core.ArgumentError("Parameter accountId is required."); |
1915 } | 1985 } |
1916 if (containerId == null) { | 1986 if (containerId == null) { |
1917 throw new core.ArgumentError("Parameter containerId is required."); | 1987 throw new core.ArgumentError("Parameter containerId is required."); |
1918 } | 1988 } |
1919 | 1989 |
1920 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/variables'; | 1990 _url = 'accounts/' + |
| 1991 commons.Escaper.ecapeVariable('$accountId') + |
| 1992 '/containers/' + |
| 1993 commons.Escaper.ecapeVariable('$containerId') + |
| 1994 '/variables'; |
1921 | 1995 |
1922 var _response = _requester.request(_url, | 1996 var _response = _requester.request(_url, "GET", |
1923 "GET", | 1997 body: _body, |
1924 body: _body, | 1998 queryParams: _queryParams, |
1925 queryParams: _queryParams, | 1999 uploadOptions: _uploadOptions, |
1926 uploadOptions: _uploadOptions, | 2000 uploadMedia: _uploadMedia, |
1927 uploadMedia: _uploadMedia, | 2001 downloadOptions: _downloadOptions); |
1928 downloadOptions: _downloadOptions); | |
1929 return _response.then((data) => new ListVariablesResponse.fromJson(data)); | 2002 return _response.then((data) => new ListVariablesResponse.fromJson(data)); |
1930 } | 2003 } |
1931 | 2004 |
1932 /** | 2005 /// Updates a GTM Variable. |
1933 * Updates a GTM Variable. | 2006 /// |
1934 * | 2007 /// [request] - The metadata request object. |
1935 * [request] - The metadata request object. | 2008 /// |
1936 * | 2009 /// Request parameters: |
1937 * Request parameters: | 2010 /// |
1938 * | 2011 /// [accountId] - The GTM Account ID. |
1939 * [accountId] - The GTM Account ID. | 2012 /// |
1940 * | 2013 /// [containerId] - The GTM Container ID. |
1941 * [containerId] - The GTM Container ID. | 2014 /// |
1942 * | 2015 /// [variableId] - The GTM Variable ID. |
1943 * [variableId] - The GTM Variable ID. | 2016 /// |
1944 * | 2017 /// [fingerprint] - When provided, this fingerprint must match the |
1945 * [fingerprint] - When provided, this fingerprint must match the fingerprint | 2018 /// fingerprint of the variable in storage. |
1946 * of the variable in storage. | 2019 /// |
1947 * | 2020 /// Completes with a [Variable]. |
1948 * Completes with a [Variable]. | 2021 /// |
1949 * | 2022 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1950 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2023 /// an error. |
1951 * error. | 2024 /// |
1952 * | 2025 /// If the used [http.Client] completes with an error when making a REST |
1953 * If the used [http.Client] completes with an error when making a REST call, | 2026 /// call, this method will complete with the same error. |
1954 * this method will complete with the same error. | 2027 async.Future<Variable> update(Variable request, core.String accountId, |
1955 */ | 2028 core.String containerId, core.String variableId, |
1956 async.Future<Variable> update(Variable request, core.String accountId, core.St
ring containerId, core.String variableId, {core.String fingerprint}) { | 2029 {core.String fingerprint}) { |
1957 var _url = null; | 2030 var _url = null; |
1958 var _queryParams = new core.Map(); | 2031 var _queryParams = new core.Map(); |
1959 var _uploadMedia = null; | 2032 var _uploadMedia = null; |
1960 var _uploadOptions = null; | 2033 var _uploadOptions = null; |
1961 var _downloadOptions = commons.DownloadOptions.Metadata; | 2034 var _downloadOptions = commons.DownloadOptions.Metadata; |
1962 var _body = null; | 2035 var _body = null; |
1963 | 2036 |
1964 if (request != null) { | 2037 if (request != null) { |
1965 _body = convert.JSON.encode((request).toJson()); | 2038 _body = convert.JSON.encode((request).toJson()); |
1966 } | 2039 } |
1967 if (accountId == null) { | 2040 if (accountId == null) { |
1968 throw new core.ArgumentError("Parameter accountId is required."); | 2041 throw new core.ArgumentError("Parameter accountId is required."); |
1969 } | 2042 } |
1970 if (containerId == null) { | 2043 if (containerId == null) { |
1971 throw new core.ArgumentError("Parameter containerId is required."); | 2044 throw new core.ArgumentError("Parameter containerId is required."); |
1972 } | 2045 } |
1973 if (variableId == null) { | 2046 if (variableId == null) { |
1974 throw new core.ArgumentError("Parameter variableId is required."); | 2047 throw new core.ArgumentError("Parameter variableId is required."); |
1975 } | 2048 } |
1976 if (fingerprint != null) { | 2049 if (fingerprint != null) { |
1977 _queryParams["fingerprint"] = [fingerprint]; | 2050 _queryParams["fingerprint"] = [fingerprint]; |
1978 } | 2051 } |
1979 | 2052 |
1980 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/variables/' + commons.
Escaper.ecapeVariable('$variableId'); | 2053 _url = 'accounts/' + |
| 2054 commons.Escaper.ecapeVariable('$accountId') + |
| 2055 '/containers/' + |
| 2056 commons.Escaper.ecapeVariable('$containerId') + |
| 2057 '/variables/' + |
| 2058 commons.Escaper.ecapeVariable('$variableId'); |
1981 | 2059 |
1982 var _response = _requester.request(_url, | 2060 var _response = _requester.request(_url, "PUT", |
1983 "PUT", | 2061 body: _body, |
1984 body: _body, | 2062 queryParams: _queryParams, |
1985 queryParams: _queryParams, | 2063 uploadOptions: _uploadOptions, |
1986 uploadOptions: _uploadOptions, | 2064 uploadMedia: _uploadMedia, |
1987 uploadMedia: _uploadMedia, | 2065 downloadOptions: _downloadOptions); |
1988 downloadOptions: _downloadOptions); | |
1989 return _response.then((data) => new Variable.fromJson(data)); | 2066 return _response.then((data) => new Variable.fromJson(data)); |
1990 } | 2067 } |
1991 | |
1992 } | 2068 } |
1993 | 2069 |
1994 | |
1995 class AccountsContainersVersionsResourceApi { | 2070 class AccountsContainersVersionsResourceApi { |
1996 final commons.ApiRequester _requester; | 2071 final commons.ApiRequester _requester; |
1997 | 2072 |
1998 AccountsContainersVersionsResourceApi(commons.ApiRequester client) : | 2073 AccountsContainersVersionsResourceApi(commons.ApiRequester client) |
1999 _requester = client; | 2074 : _requester = client; |
2000 | 2075 |
2001 /** | 2076 /// Creates a Container Version. |
2002 * Creates a Container Version. | 2077 /// |
2003 * | 2078 /// [request] - The metadata request object. |
2004 * [request] - The metadata request object. | 2079 /// |
2005 * | 2080 /// Request parameters: |
2006 * Request parameters: | 2081 /// |
2007 * | 2082 /// [accountId] - The GTM Account ID. |
2008 * [accountId] - The GTM Account ID. | 2083 /// |
2009 * | 2084 /// [containerId] - The GTM Container ID. |
2010 * [containerId] - The GTM Container ID. | 2085 /// |
2011 * | 2086 /// Completes with a [CreateContainerVersionResponse]. |
2012 * Completes with a [CreateContainerVersionResponse]. | 2087 /// |
2013 * | 2088 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
2014 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2089 /// an error. |
2015 * error. | 2090 /// |
2016 * | 2091 /// If the used [http.Client] completes with an error when making a REST |
2017 * If the used [http.Client] completes with an error when making a REST call, | 2092 /// call, this method will complete with the same error. |
2018 * this method will complete with the same error. | 2093 async.Future<CreateContainerVersionResponse> create( |
2019 */ | 2094 CreateContainerVersionRequestVersionOptions request, |
2020 async.Future<CreateContainerVersionResponse> create(CreateContainerVersionRequ
estVersionOptions request, core.String accountId, core.String containerId) { | 2095 core.String accountId, |
| 2096 core.String containerId) { |
2021 var _url = null; | 2097 var _url = null; |
2022 var _queryParams = new core.Map(); | 2098 var _queryParams = new core.Map(); |
2023 var _uploadMedia = null; | 2099 var _uploadMedia = null; |
2024 var _uploadOptions = null; | 2100 var _uploadOptions = null; |
2025 var _downloadOptions = commons.DownloadOptions.Metadata; | 2101 var _downloadOptions = commons.DownloadOptions.Metadata; |
2026 var _body = null; | 2102 var _body = null; |
2027 | 2103 |
2028 if (request != null) { | 2104 if (request != null) { |
2029 _body = convert.JSON.encode((request).toJson()); | 2105 _body = convert.JSON.encode((request).toJson()); |
2030 } | 2106 } |
2031 if (accountId == null) { | 2107 if (accountId == null) { |
2032 throw new core.ArgumentError("Parameter accountId is required."); | 2108 throw new core.ArgumentError("Parameter accountId is required."); |
2033 } | 2109 } |
2034 if (containerId == null) { | 2110 if (containerId == null) { |
2035 throw new core.ArgumentError("Parameter containerId is required."); | 2111 throw new core.ArgumentError("Parameter containerId is required."); |
2036 } | 2112 } |
2037 | 2113 |
2038 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/versions'; | 2114 _url = 'accounts/' + |
| 2115 commons.Escaper.ecapeVariable('$accountId') + |
| 2116 '/containers/' + |
| 2117 commons.Escaper.ecapeVariable('$containerId') + |
| 2118 '/versions'; |
2039 | 2119 |
2040 var _response = _requester.request(_url, | 2120 var _response = _requester.request(_url, "POST", |
2041 "POST", | 2121 body: _body, |
2042 body: _body, | 2122 queryParams: _queryParams, |
2043 queryParams: _queryParams, | 2123 uploadOptions: _uploadOptions, |
2044 uploadOptions: _uploadOptions, | 2124 uploadMedia: _uploadMedia, |
2045 uploadMedia: _uploadMedia, | 2125 downloadOptions: _downloadOptions); |
2046 downloadOptions: _downloadOptions); | 2126 return _response |
2047 return _response.then((data) => new CreateContainerVersionResponse.fromJson(
data)); | 2127 .then((data) => new CreateContainerVersionResponse.fromJson(data)); |
2048 } | 2128 } |
2049 | 2129 |
2050 /** | 2130 /// Deletes a Container Version. |
2051 * Deletes a Container Version. | 2131 /// |
2052 * | 2132 /// Request parameters: |
2053 * Request parameters: | 2133 /// |
2054 * | 2134 /// [accountId] - The GTM Account ID. |
2055 * [accountId] - The GTM Account ID. | 2135 /// |
2056 * | 2136 /// [containerId] - The GTM Container ID. |
2057 * [containerId] - The GTM Container ID. | 2137 /// |
2058 * | 2138 /// [containerVersionId] - The GTM Container Version ID. |
2059 * [containerVersionId] - The GTM Container Version ID. | 2139 /// |
2060 * | 2140 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
2061 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2141 /// an error. |
2062 * error. | 2142 /// |
2063 * | 2143 /// If the used [http.Client] completes with an error when making a REST |
2064 * If the used [http.Client] completes with an error when making a REST call, | 2144 /// call, this method will complete with the same error. |
2065 * this method will complete with the same error. | 2145 async.Future delete(core.String accountId, core.String containerId, |
2066 */ | 2146 core.String containerVersionId) { |
2067 async.Future delete(core.String accountId, core.String containerId, core.Strin
g containerVersionId) { | |
2068 var _url = null; | 2147 var _url = null; |
2069 var _queryParams = new core.Map(); | 2148 var _queryParams = new core.Map(); |
2070 var _uploadMedia = null; | 2149 var _uploadMedia = null; |
2071 var _uploadOptions = null; | 2150 var _uploadOptions = null; |
2072 var _downloadOptions = commons.DownloadOptions.Metadata; | 2151 var _downloadOptions = commons.DownloadOptions.Metadata; |
2073 var _body = null; | 2152 var _body = null; |
2074 | 2153 |
2075 if (accountId == null) { | 2154 if (accountId == null) { |
2076 throw new core.ArgumentError("Parameter accountId is required."); | 2155 throw new core.ArgumentError("Parameter accountId is required."); |
2077 } | 2156 } |
2078 if (containerId == null) { | 2157 if (containerId == null) { |
2079 throw new core.ArgumentError("Parameter containerId is required."); | 2158 throw new core.ArgumentError("Parameter containerId is required."); |
2080 } | 2159 } |
2081 if (containerVersionId == null) { | 2160 if (containerVersionId == null) { |
2082 throw new core.ArgumentError("Parameter containerVersionId is required."); | 2161 throw new core.ArgumentError("Parameter containerVersionId is required."); |
2083 } | 2162 } |
2084 | 2163 |
2085 _downloadOptions = null; | 2164 _downloadOptions = null; |
2086 | 2165 |
2087 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/versions/' + commons.E
scaper.ecapeVariable('$containerVersionId'); | 2166 _url = 'accounts/' + |
| 2167 commons.Escaper.ecapeVariable('$accountId') + |
| 2168 '/containers/' + |
| 2169 commons.Escaper.ecapeVariable('$containerId') + |
| 2170 '/versions/' + |
| 2171 commons.Escaper.ecapeVariable('$containerVersionId'); |
2088 | 2172 |
2089 var _response = _requester.request(_url, | 2173 var _response = _requester.request(_url, "DELETE", |
2090 "DELETE", | 2174 body: _body, |
2091 body: _body, | 2175 queryParams: _queryParams, |
2092 queryParams: _queryParams, | 2176 uploadOptions: _uploadOptions, |
2093 uploadOptions: _uploadOptions, | 2177 uploadMedia: _uploadMedia, |
2094 uploadMedia: _uploadMedia, | 2178 downloadOptions: _downloadOptions); |
2095 downloadOptions: _downloadOptions); | |
2096 return _response.then((data) => null); | 2179 return _response.then((data) => null); |
2097 } | 2180 } |
2098 | 2181 |
2099 /** | 2182 /// Gets a Container Version. |
2100 * Gets a Container Version. | 2183 /// |
2101 * | 2184 /// Request parameters: |
2102 * Request parameters: | 2185 /// |
2103 * | 2186 /// [accountId] - The GTM Account ID. |
2104 * [accountId] - The GTM Account ID. | 2187 /// |
2105 * | 2188 /// [containerId] - The GTM Container ID. |
2106 * [containerId] - The GTM Container ID. | 2189 /// |
2107 * | 2190 /// [containerVersionId] - The GTM Container Version ID. Specify published to |
2108 * [containerVersionId] - The GTM Container Version ID. Specify published to | 2191 /// retrieve the currently published version. |
2109 * retrieve the currently published version. | 2192 /// |
2110 * | 2193 /// Completes with a [ContainerVersion]. |
2111 * Completes with a [ContainerVersion]. | 2194 /// |
2112 * | 2195 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
2113 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2196 /// an error. |
2114 * error. | 2197 /// |
2115 * | 2198 /// If the used [http.Client] completes with an error when making a REST |
2116 * If the used [http.Client] completes with an error when making a REST call, | 2199 /// call, this method will complete with the same error. |
2117 * this method will complete with the same error. | 2200 async.Future<ContainerVersion> get(core.String accountId, |
2118 */ | 2201 core.String containerId, core.String containerVersionId) { |
2119 async.Future<ContainerVersion> get(core.String accountId, core.String containe
rId, core.String containerVersionId) { | |
2120 var _url = null; | 2202 var _url = null; |
2121 var _queryParams = new core.Map(); | 2203 var _queryParams = new core.Map(); |
2122 var _uploadMedia = null; | 2204 var _uploadMedia = null; |
2123 var _uploadOptions = null; | 2205 var _uploadOptions = null; |
2124 var _downloadOptions = commons.DownloadOptions.Metadata; | 2206 var _downloadOptions = commons.DownloadOptions.Metadata; |
2125 var _body = null; | 2207 var _body = null; |
2126 | 2208 |
2127 if (accountId == null) { | 2209 if (accountId == null) { |
2128 throw new core.ArgumentError("Parameter accountId is required."); | 2210 throw new core.ArgumentError("Parameter accountId is required."); |
2129 } | 2211 } |
2130 if (containerId == null) { | 2212 if (containerId == null) { |
2131 throw new core.ArgumentError("Parameter containerId is required."); | 2213 throw new core.ArgumentError("Parameter containerId is required."); |
2132 } | 2214 } |
2133 if (containerVersionId == null) { | 2215 if (containerVersionId == null) { |
2134 throw new core.ArgumentError("Parameter containerVersionId is required."); | 2216 throw new core.ArgumentError("Parameter containerVersionId is required."); |
2135 } | 2217 } |
2136 | 2218 |
2137 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/versions/' + commons.E
scaper.ecapeVariable('$containerVersionId'); | 2219 _url = 'accounts/' + |
| 2220 commons.Escaper.ecapeVariable('$accountId') + |
| 2221 '/containers/' + |
| 2222 commons.Escaper.ecapeVariable('$containerId') + |
| 2223 '/versions/' + |
| 2224 commons.Escaper.ecapeVariable('$containerVersionId'); |
2138 | 2225 |
2139 var _response = _requester.request(_url, | 2226 var _response = _requester.request(_url, "GET", |
2140 "GET", | 2227 body: _body, |
2141 body: _body, | 2228 queryParams: _queryParams, |
2142 queryParams: _queryParams, | 2229 uploadOptions: _uploadOptions, |
2143 uploadOptions: _uploadOptions, | 2230 uploadMedia: _uploadMedia, |
2144 uploadMedia: _uploadMedia, | 2231 downloadOptions: _downloadOptions); |
2145 downloadOptions: _downloadOptions); | |
2146 return _response.then((data) => new ContainerVersion.fromJson(data)); | 2232 return _response.then((data) => new ContainerVersion.fromJson(data)); |
2147 } | 2233 } |
2148 | 2234 |
2149 /** | 2235 /// Lists all Container Versions of a GTM Container. |
2150 * Lists all Container Versions of a GTM Container. | 2236 /// |
2151 * | 2237 /// Request parameters: |
2152 * Request parameters: | 2238 /// |
2153 * | 2239 /// [accountId] - The GTM Account ID. |
2154 * [accountId] - The GTM Account ID. | 2240 /// |
2155 * | 2241 /// [containerId] - The GTM Container ID. |
2156 * [containerId] - The GTM Container ID. | 2242 /// |
2157 * | 2243 /// [headers] - Retrieve headers only when true. |
2158 * [headers] - Retrieve headers only when true. | 2244 /// |
2159 * | 2245 /// [includeDeleted] - Also retrieve deleted (archived) versions when true. |
2160 * [includeDeleted] - Also retrieve deleted (archived) versions when true. | 2246 /// |
2161 * | 2247 /// Completes with a [ListContainerVersionsResponse]. |
2162 * Completes with a [ListContainerVersionsResponse]. | 2248 /// |
2163 * | 2249 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
2164 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2250 /// an error. |
2165 * error. | 2251 /// |
2166 * | 2252 /// If the used [http.Client] completes with an error when making a REST |
2167 * If the used [http.Client] completes with an error when making a REST call, | 2253 /// call, this method will complete with the same error. |
2168 * this method will complete with the same error. | 2254 async.Future<ListContainerVersionsResponse> list( |
2169 */ | 2255 core.String accountId, core.String containerId, |
2170 async.Future<ListContainerVersionsResponse> list(core.String accountId, core.S
tring containerId, {core.bool headers, core.bool includeDeleted}) { | 2256 {core.bool headers, core.bool includeDeleted}) { |
2171 var _url = null; | 2257 var _url = null; |
2172 var _queryParams = new core.Map(); | 2258 var _queryParams = new core.Map(); |
2173 var _uploadMedia = null; | 2259 var _uploadMedia = null; |
2174 var _uploadOptions = null; | 2260 var _uploadOptions = null; |
2175 var _downloadOptions = commons.DownloadOptions.Metadata; | 2261 var _downloadOptions = commons.DownloadOptions.Metadata; |
2176 var _body = null; | 2262 var _body = null; |
2177 | 2263 |
2178 if (accountId == null) { | 2264 if (accountId == null) { |
2179 throw new core.ArgumentError("Parameter accountId is required."); | 2265 throw new core.ArgumentError("Parameter accountId is required."); |
2180 } | 2266 } |
2181 if (containerId == null) { | 2267 if (containerId == null) { |
2182 throw new core.ArgumentError("Parameter containerId is required."); | 2268 throw new core.ArgumentError("Parameter containerId is required."); |
2183 } | 2269 } |
2184 if (headers != null) { | 2270 if (headers != null) { |
2185 _queryParams["headers"] = ["${headers}"]; | 2271 _queryParams["headers"] = ["${headers}"]; |
2186 } | 2272 } |
2187 if (includeDeleted != null) { | 2273 if (includeDeleted != null) { |
2188 _queryParams["includeDeleted"] = ["${includeDeleted}"]; | 2274 _queryParams["includeDeleted"] = ["${includeDeleted}"]; |
2189 } | 2275 } |
2190 | 2276 |
2191 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/versions'; | 2277 _url = 'accounts/' + |
| 2278 commons.Escaper.ecapeVariable('$accountId') + |
| 2279 '/containers/' + |
| 2280 commons.Escaper.ecapeVariable('$containerId') + |
| 2281 '/versions'; |
2192 | 2282 |
2193 var _response = _requester.request(_url, | 2283 var _response = _requester.request(_url, "GET", |
2194 "GET", | 2284 body: _body, |
2195 body: _body, | 2285 queryParams: _queryParams, |
2196 queryParams: _queryParams, | 2286 uploadOptions: _uploadOptions, |
2197 uploadOptions: _uploadOptions, | 2287 uploadMedia: _uploadMedia, |
2198 uploadMedia: _uploadMedia, | 2288 downloadOptions: _downloadOptions); |
2199 downloadOptions: _downloadOptions); | 2289 return _response |
2200 return _response.then((data) => new ListContainerVersionsResponse.fromJson(d
ata)); | 2290 .then((data) => new ListContainerVersionsResponse.fromJson(data)); |
2201 } | 2291 } |
2202 | 2292 |
2203 /** | 2293 /// Publishes a Container Version. |
2204 * Publishes a Container Version. | 2294 /// |
2205 * | 2295 /// Request parameters: |
2206 * Request parameters: | 2296 /// |
2207 * | 2297 /// [accountId] - The GTM Account ID. |
2208 * [accountId] - The GTM Account ID. | 2298 /// |
2209 * | 2299 /// [containerId] - The GTM Container ID. |
2210 * [containerId] - The GTM Container ID. | 2300 /// |
2211 * | 2301 /// [containerVersionId] - The GTM Container Version ID. |
2212 * [containerVersionId] - The GTM Container Version ID. | 2302 /// |
2213 * | 2303 /// [fingerprint] - When provided, this fingerprint must match the |
2214 * [fingerprint] - When provided, this fingerprint must match the fingerprint | 2304 /// fingerprint of the container version in storage. |
2215 * of the container version in storage. | 2305 /// |
2216 * | 2306 /// Completes with a [PublishContainerVersionResponse]. |
2217 * Completes with a [PublishContainerVersionResponse]. | 2307 /// |
2218 * | 2308 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
2219 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2309 /// an error. |
2220 * error. | 2310 /// |
2221 * | 2311 /// If the used [http.Client] completes with an error when making a REST |
2222 * If the used [http.Client] completes with an error when making a REST call, | 2312 /// call, this method will complete with the same error. |
2223 * this method will complete with the same error. | 2313 async.Future<PublishContainerVersionResponse> publish(core.String accountId, |
2224 */ | 2314 core.String containerId, core.String containerVersionId, |
2225 async.Future<PublishContainerVersionResponse> publish(core.String accountId, c
ore.String containerId, core.String containerVersionId, {core.String fingerprint
}) { | 2315 {core.String fingerprint}) { |
2226 var _url = null; | 2316 var _url = null; |
2227 var _queryParams = new core.Map(); | 2317 var _queryParams = new core.Map(); |
2228 var _uploadMedia = null; | 2318 var _uploadMedia = null; |
2229 var _uploadOptions = null; | 2319 var _uploadOptions = null; |
2230 var _downloadOptions = commons.DownloadOptions.Metadata; | 2320 var _downloadOptions = commons.DownloadOptions.Metadata; |
2231 var _body = null; | 2321 var _body = null; |
2232 | 2322 |
2233 if (accountId == null) { | 2323 if (accountId == null) { |
2234 throw new core.ArgumentError("Parameter accountId is required."); | 2324 throw new core.ArgumentError("Parameter accountId is required."); |
2235 } | 2325 } |
2236 if (containerId == null) { | 2326 if (containerId == null) { |
2237 throw new core.ArgumentError("Parameter containerId is required."); | 2327 throw new core.ArgumentError("Parameter containerId is required."); |
2238 } | 2328 } |
2239 if (containerVersionId == null) { | 2329 if (containerVersionId == null) { |
2240 throw new core.ArgumentError("Parameter containerVersionId is required."); | 2330 throw new core.ArgumentError("Parameter containerVersionId is required."); |
2241 } | 2331 } |
2242 if (fingerprint != null) { | 2332 if (fingerprint != null) { |
2243 _queryParams["fingerprint"] = [fingerprint]; | 2333 _queryParams["fingerprint"] = [fingerprint]; |
2244 } | 2334 } |
2245 | 2335 |
2246 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/versions/' + commons.E
scaper.ecapeVariable('$containerVersionId') + '/publish'; | 2336 _url = 'accounts/' + |
| 2337 commons.Escaper.ecapeVariable('$accountId') + |
| 2338 '/containers/' + |
| 2339 commons.Escaper.ecapeVariable('$containerId') + |
| 2340 '/versions/' + |
| 2341 commons.Escaper.ecapeVariable('$containerVersionId') + |
| 2342 '/publish'; |
2247 | 2343 |
2248 var _response = _requester.request(_url, | 2344 var _response = _requester.request(_url, "POST", |
2249 "POST", | 2345 body: _body, |
2250 body: _body, | 2346 queryParams: _queryParams, |
2251 queryParams: _queryParams, | 2347 uploadOptions: _uploadOptions, |
2252 uploadOptions: _uploadOptions, | 2348 uploadMedia: _uploadMedia, |
2253 uploadMedia: _uploadMedia, | 2349 downloadOptions: _downloadOptions); |
2254 downloadOptions: _downloadOptions); | 2350 return _response |
2255 return _response.then((data) => new PublishContainerVersionResponse.fromJson
(data)); | 2351 .then((data) => new PublishContainerVersionResponse.fromJson(data)); |
2256 } | 2352 } |
2257 | 2353 |
2258 /** | 2354 /// Restores a Container Version. This will overwrite the container's current |
2259 * Restores a Container Version. This will overwrite the container's current | 2355 /// configuration (including its variables, triggers and tags). The operation |
2260 * configuration (including its variables, triggers and tags). The operation | 2356 /// will not have any effect on the version that is being served (i.e. the |
2261 * will not have any effect on the version that is being served (i.e. the | 2357 /// published version). |
2262 * published version). | 2358 /// |
2263 * | 2359 /// Request parameters: |
2264 * Request parameters: | 2360 /// |
2265 * | 2361 /// [accountId] - The GTM Account ID. |
2266 * [accountId] - The GTM Account ID. | 2362 /// |
2267 * | 2363 /// [containerId] - The GTM Container ID. |
2268 * [containerId] - The GTM Container ID. | 2364 /// |
2269 * | 2365 /// [containerVersionId] - The GTM Container Version ID. |
2270 * [containerVersionId] - The GTM Container Version ID. | 2366 /// |
2271 * | 2367 /// Completes with a [ContainerVersion]. |
2272 * Completes with a [ContainerVersion]. | 2368 /// |
2273 * | 2369 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
2274 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2370 /// an error. |
2275 * error. | 2371 /// |
2276 * | 2372 /// If the used [http.Client] completes with an error when making a REST |
2277 * If the used [http.Client] completes with an error when making a REST call, | 2373 /// call, this method will complete with the same error. |
2278 * this method will complete with the same error. | 2374 async.Future<ContainerVersion> restore(core.String accountId, |
2279 */ | 2375 core.String containerId, core.String containerVersionId) { |
2280 async.Future<ContainerVersion> restore(core.String accountId, core.String cont
ainerId, core.String containerVersionId) { | |
2281 var _url = null; | 2376 var _url = null; |
2282 var _queryParams = new core.Map(); | 2377 var _queryParams = new core.Map(); |
2283 var _uploadMedia = null; | 2378 var _uploadMedia = null; |
2284 var _uploadOptions = null; | 2379 var _uploadOptions = null; |
2285 var _downloadOptions = commons.DownloadOptions.Metadata; | 2380 var _downloadOptions = commons.DownloadOptions.Metadata; |
2286 var _body = null; | 2381 var _body = null; |
2287 | 2382 |
2288 if (accountId == null) { | 2383 if (accountId == null) { |
2289 throw new core.ArgumentError("Parameter accountId is required."); | 2384 throw new core.ArgumentError("Parameter accountId is required."); |
2290 } | 2385 } |
2291 if (containerId == null) { | 2386 if (containerId == null) { |
2292 throw new core.ArgumentError("Parameter containerId is required."); | 2387 throw new core.ArgumentError("Parameter containerId is required."); |
2293 } | 2388 } |
2294 if (containerVersionId == null) { | 2389 if (containerVersionId == null) { |
2295 throw new core.ArgumentError("Parameter containerVersionId is required."); | 2390 throw new core.ArgumentError("Parameter containerVersionId is required."); |
2296 } | 2391 } |
2297 | 2392 |
2298 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/versions/' + commons.E
scaper.ecapeVariable('$containerVersionId') + '/restore'; | 2393 _url = 'accounts/' + |
| 2394 commons.Escaper.ecapeVariable('$accountId') + |
| 2395 '/containers/' + |
| 2396 commons.Escaper.ecapeVariable('$containerId') + |
| 2397 '/versions/' + |
| 2398 commons.Escaper.ecapeVariable('$containerVersionId') + |
| 2399 '/restore'; |
2299 | 2400 |
2300 var _response = _requester.request(_url, | 2401 var _response = _requester.request(_url, "POST", |
2301 "POST", | 2402 body: _body, |
2302 body: _body, | 2403 queryParams: _queryParams, |
2303 queryParams: _queryParams, | 2404 uploadOptions: _uploadOptions, |
2304 uploadOptions: _uploadOptions, | 2405 uploadMedia: _uploadMedia, |
2305 uploadMedia: _uploadMedia, | 2406 downloadOptions: _downloadOptions); |
2306 downloadOptions: _downloadOptions); | |
2307 return _response.then((data) => new ContainerVersion.fromJson(data)); | 2407 return _response.then((data) => new ContainerVersion.fromJson(data)); |
2308 } | 2408 } |
2309 | 2409 |
2310 /** | 2410 /// Undeletes a Container Version. |
2311 * Undeletes a Container Version. | 2411 /// |
2312 * | 2412 /// Request parameters: |
2313 * Request parameters: | 2413 /// |
2314 * | 2414 /// [accountId] - The GTM Account ID. |
2315 * [accountId] - The GTM Account ID. | 2415 /// |
2316 * | 2416 /// [containerId] - The GTM Container ID. |
2317 * [containerId] - The GTM Container ID. | 2417 /// |
2318 * | 2418 /// [containerVersionId] - The GTM Container Version ID. |
2319 * [containerVersionId] - The GTM Container Version ID. | 2419 /// |
2320 * | 2420 /// Completes with a [ContainerVersion]. |
2321 * Completes with a [ContainerVersion]. | 2421 /// |
2322 * | 2422 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
2323 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2423 /// an error. |
2324 * error. | 2424 /// |
2325 * | 2425 /// If the used [http.Client] completes with an error when making a REST |
2326 * If the used [http.Client] completes with an error when making a REST call, | 2426 /// call, this method will complete with the same error. |
2327 * this method will complete with the same error. | 2427 async.Future<ContainerVersion> undelete(core.String accountId, |
2328 */ | 2428 core.String containerId, core.String containerVersionId) { |
2329 async.Future<ContainerVersion> undelete(core.String accountId, core.String con
tainerId, core.String containerVersionId) { | |
2330 var _url = null; | 2429 var _url = null; |
2331 var _queryParams = new core.Map(); | 2430 var _queryParams = new core.Map(); |
2332 var _uploadMedia = null; | 2431 var _uploadMedia = null; |
2333 var _uploadOptions = null; | 2432 var _uploadOptions = null; |
2334 var _downloadOptions = commons.DownloadOptions.Metadata; | 2433 var _downloadOptions = commons.DownloadOptions.Metadata; |
2335 var _body = null; | 2434 var _body = null; |
2336 | 2435 |
2337 if (accountId == null) { | 2436 if (accountId == null) { |
2338 throw new core.ArgumentError("Parameter accountId is required."); | 2437 throw new core.ArgumentError("Parameter accountId is required."); |
2339 } | 2438 } |
2340 if (containerId == null) { | 2439 if (containerId == null) { |
2341 throw new core.ArgumentError("Parameter containerId is required."); | 2440 throw new core.ArgumentError("Parameter containerId is required."); |
2342 } | 2441 } |
2343 if (containerVersionId == null) { | 2442 if (containerVersionId == null) { |
2344 throw new core.ArgumentError("Parameter containerVersionId is required."); | 2443 throw new core.ArgumentError("Parameter containerVersionId is required."); |
2345 } | 2444 } |
2346 | 2445 |
2347 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/versions/' + commons.E
scaper.ecapeVariable('$containerVersionId') + '/undelete'; | 2446 _url = 'accounts/' + |
| 2447 commons.Escaper.ecapeVariable('$accountId') + |
| 2448 '/containers/' + |
| 2449 commons.Escaper.ecapeVariable('$containerId') + |
| 2450 '/versions/' + |
| 2451 commons.Escaper.ecapeVariable('$containerVersionId') + |
| 2452 '/undelete'; |
2348 | 2453 |
2349 var _response = _requester.request(_url, | 2454 var _response = _requester.request(_url, "POST", |
2350 "POST", | 2455 body: _body, |
2351 body: _body, | 2456 queryParams: _queryParams, |
2352 queryParams: _queryParams, | 2457 uploadOptions: _uploadOptions, |
2353 uploadOptions: _uploadOptions, | 2458 uploadMedia: _uploadMedia, |
2354 uploadMedia: _uploadMedia, | 2459 downloadOptions: _downloadOptions); |
2355 downloadOptions: _downloadOptions); | |
2356 return _response.then((data) => new ContainerVersion.fromJson(data)); | 2460 return _response.then((data) => new ContainerVersion.fromJson(data)); |
2357 } | 2461 } |
2358 | 2462 |
2359 /** | 2463 /// Updates a Container Version. |
2360 * Updates a Container Version. | 2464 /// |
2361 * | 2465 /// [request] - The metadata request object. |
2362 * [request] - The metadata request object. | 2466 /// |
2363 * | 2467 /// Request parameters: |
2364 * Request parameters: | 2468 /// |
2365 * | 2469 /// [accountId] - The GTM Account ID. |
2366 * [accountId] - The GTM Account ID. | 2470 /// |
2367 * | 2471 /// [containerId] - The GTM Container ID. |
2368 * [containerId] - The GTM Container ID. | 2472 /// |
2369 * | 2473 /// [containerVersionId] - The GTM Container Version ID. |
2370 * [containerVersionId] - The GTM Container Version ID. | 2474 /// |
2371 * | 2475 /// [fingerprint] - When provided, this fingerprint must match the |
2372 * [fingerprint] - When provided, this fingerprint must match the fingerprint | 2476 /// fingerprint of the container version in storage. |
2373 * of the container version in storage. | 2477 /// |
2374 * | 2478 /// Completes with a [ContainerVersion]. |
2375 * Completes with a [ContainerVersion]. | 2479 /// |
2376 * | 2480 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
2377 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2481 /// an error. |
2378 * error. | 2482 /// |
2379 * | 2483 /// If the used [http.Client] completes with an error when making a REST |
2380 * If the used [http.Client] completes with an error when making a REST call, | 2484 /// call, this method will complete with the same error. |
2381 * this method will complete with the same error. | 2485 async.Future<ContainerVersion> update( |
2382 */ | 2486 ContainerVersion request, |
2383 async.Future<ContainerVersion> update(ContainerVersion request, core.String ac
countId, core.String containerId, core.String containerVersionId, {core.String f
ingerprint}) { | 2487 core.String accountId, |
| 2488 core.String containerId, |
| 2489 core.String containerVersionId, |
| 2490 {core.String fingerprint}) { |
2384 var _url = null; | 2491 var _url = null; |
2385 var _queryParams = new core.Map(); | 2492 var _queryParams = new core.Map(); |
2386 var _uploadMedia = null; | 2493 var _uploadMedia = null; |
2387 var _uploadOptions = null; | 2494 var _uploadOptions = null; |
2388 var _downloadOptions = commons.DownloadOptions.Metadata; | 2495 var _downloadOptions = commons.DownloadOptions.Metadata; |
2389 var _body = null; | 2496 var _body = null; |
2390 | 2497 |
2391 if (request != null) { | 2498 if (request != null) { |
2392 _body = convert.JSON.encode((request).toJson()); | 2499 _body = convert.JSON.encode((request).toJson()); |
2393 } | 2500 } |
2394 if (accountId == null) { | 2501 if (accountId == null) { |
2395 throw new core.ArgumentError("Parameter accountId is required."); | 2502 throw new core.ArgumentError("Parameter accountId is required."); |
2396 } | 2503 } |
2397 if (containerId == null) { | 2504 if (containerId == null) { |
2398 throw new core.ArgumentError("Parameter containerId is required."); | 2505 throw new core.ArgumentError("Parameter containerId is required."); |
2399 } | 2506 } |
2400 if (containerVersionId == null) { | 2507 if (containerVersionId == null) { |
2401 throw new core.ArgumentError("Parameter containerVersionId is required."); | 2508 throw new core.ArgumentError("Parameter containerVersionId is required."); |
2402 } | 2509 } |
2403 if (fingerprint != null) { | 2510 if (fingerprint != null) { |
2404 _queryParams["fingerprint"] = [fingerprint]; | 2511 _queryParams["fingerprint"] = [fingerprint]; |
2405 } | 2512 } |
2406 | 2513 |
2407 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/versions/' + commons.E
scaper.ecapeVariable('$containerVersionId'); | 2514 _url = 'accounts/' + |
| 2515 commons.Escaper.ecapeVariable('$accountId') + |
| 2516 '/containers/' + |
| 2517 commons.Escaper.ecapeVariable('$containerId') + |
| 2518 '/versions/' + |
| 2519 commons.Escaper.ecapeVariable('$containerVersionId'); |
2408 | 2520 |
2409 var _response = _requester.request(_url, | 2521 var _response = _requester.request(_url, "PUT", |
2410 "PUT", | 2522 body: _body, |
2411 body: _body, | 2523 queryParams: _queryParams, |
2412 queryParams: _queryParams, | 2524 uploadOptions: _uploadOptions, |
2413 uploadOptions: _uploadOptions, | 2525 uploadMedia: _uploadMedia, |
2414 uploadMedia: _uploadMedia, | 2526 downloadOptions: _downloadOptions); |
2415 downloadOptions: _downloadOptions); | |
2416 return _response.then((data) => new ContainerVersion.fromJson(data)); | 2527 return _response.then((data) => new ContainerVersion.fromJson(data)); |
2417 } | 2528 } |
2418 | |
2419 } | 2529 } |
2420 | 2530 |
2421 | |
2422 class AccountsPermissionsResourceApi { | 2531 class AccountsPermissionsResourceApi { |
2423 final commons.ApiRequester _requester; | 2532 final commons.ApiRequester _requester; |
2424 | 2533 |
2425 AccountsPermissionsResourceApi(commons.ApiRequester client) : | 2534 AccountsPermissionsResourceApi(commons.ApiRequester client) |
2426 _requester = client; | 2535 : _requester = client; |
2427 | 2536 |
2428 /** | 2537 /// Creates a user's Account & Container Permissions. |
2429 * Creates a user's Account & Container Permissions. | 2538 /// |
2430 * | 2539 /// [request] - The metadata request object. |
2431 * [request] - The metadata request object. | 2540 /// |
2432 * | 2541 /// Request parameters: |
2433 * Request parameters: | 2542 /// |
2434 * | 2543 /// [accountId] - The GTM Account ID. |
2435 * [accountId] - The GTM Account ID. | 2544 /// |
2436 * | 2545 /// Completes with a [UserAccess]. |
2437 * Completes with a [UserAccess]. | 2546 /// |
2438 * | 2547 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
2439 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2548 /// an error. |
2440 * error. | 2549 /// |
2441 * | 2550 /// If the used [http.Client] completes with an error when making a REST |
2442 * If the used [http.Client] completes with an error when making a REST call, | 2551 /// call, this method will complete with the same error. |
2443 * this method will complete with the same error. | |
2444 */ | |
2445 async.Future<UserAccess> create(UserAccess request, core.String accountId) { | 2552 async.Future<UserAccess> create(UserAccess request, core.String accountId) { |
2446 var _url = null; | 2553 var _url = null; |
2447 var _queryParams = new core.Map(); | 2554 var _queryParams = new core.Map(); |
2448 var _uploadMedia = null; | 2555 var _uploadMedia = null; |
2449 var _uploadOptions = null; | 2556 var _uploadOptions = null; |
2450 var _downloadOptions = commons.DownloadOptions.Metadata; | 2557 var _downloadOptions = commons.DownloadOptions.Metadata; |
2451 var _body = null; | 2558 var _body = null; |
2452 | 2559 |
2453 if (request != null) { | 2560 if (request != null) { |
2454 _body = convert.JSON.encode((request).toJson()); | 2561 _body = convert.JSON.encode((request).toJson()); |
2455 } | 2562 } |
2456 if (accountId == null) { | 2563 if (accountId == null) { |
2457 throw new core.ArgumentError("Parameter accountId is required."); | 2564 throw new core.ArgumentError("Parameter accountId is required."); |
2458 } | 2565 } |
2459 | 2566 |
2460 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/permiss
ions'; | 2567 _url = 'accounts/' + |
| 2568 commons.Escaper.ecapeVariable('$accountId') + |
| 2569 '/permissions'; |
2461 | 2570 |
2462 var _response = _requester.request(_url, | 2571 var _response = _requester.request(_url, "POST", |
2463 "POST", | 2572 body: _body, |
2464 body: _body, | 2573 queryParams: _queryParams, |
2465 queryParams: _queryParams, | 2574 uploadOptions: _uploadOptions, |
2466 uploadOptions: _uploadOptions, | 2575 uploadMedia: _uploadMedia, |
2467 uploadMedia: _uploadMedia, | 2576 downloadOptions: _downloadOptions); |
2468 downloadOptions: _downloadOptions); | |
2469 return _response.then((data) => new UserAccess.fromJson(data)); | 2577 return _response.then((data) => new UserAccess.fromJson(data)); |
2470 } | 2578 } |
2471 | 2579 |
2472 /** | 2580 /// Removes a user from the account, revoking access to it and all of its |
2473 * Removes a user from the account, revoking access to it and all of its | 2581 /// containers. |
2474 * containers. | 2582 /// |
2475 * | 2583 /// Request parameters: |
2476 * Request parameters: | 2584 /// |
2477 * | 2585 /// [accountId] - The GTM Account ID. |
2478 * [accountId] - The GTM Account ID. | 2586 /// |
2479 * | 2587 /// [permissionId] - The GTM User ID. |
2480 * [permissionId] - The GTM User ID. | 2588 /// |
2481 * | 2589 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
2482 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2590 /// an error. |
2483 * error. | 2591 /// |
2484 * | 2592 /// If the used [http.Client] completes with an error when making a REST |
2485 * If the used [http.Client] completes with an error when making a REST call, | 2593 /// call, this method will complete with the same error. |
2486 * this method will complete with the same error. | |
2487 */ | |
2488 async.Future delete(core.String accountId, core.String permissionId) { | 2594 async.Future delete(core.String accountId, core.String permissionId) { |
2489 var _url = null; | 2595 var _url = null; |
2490 var _queryParams = new core.Map(); | 2596 var _queryParams = new core.Map(); |
2491 var _uploadMedia = null; | 2597 var _uploadMedia = null; |
2492 var _uploadOptions = null; | 2598 var _uploadOptions = null; |
2493 var _downloadOptions = commons.DownloadOptions.Metadata; | 2599 var _downloadOptions = commons.DownloadOptions.Metadata; |
2494 var _body = null; | 2600 var _body = null; |
2495 | 2601 |
2496 if (accountId == null) { | 2602 if (accountId == null) { |
2497 throw new core.ArgumentError("Parameter accountId is required."); | 2603 throw new core.ArgumentError("Parameter accountId is required."); |
2498 } | 2604 } |
2499 if (permissionId == null) { | 2605 if (permissionId == null) { |
2500 throw new core.ArgumentError("Parameter permissionId is required."); | 2606 throw new core.ArgumentError("Parameter permissionId is required."); |
2501 } | 2607 } |
2502 | 2608 |
2503 _downloadOptions = null; | 2609 _downloadOptions = null; |
2504 | 2610 |
2505 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/permiss
ions/' + commons.Escaper.ecapeVariable('$permissionId'); | 2611 _url = 'accounts/' + |
| 2612 commons.Escaper.ecapeVariable('$accountId') + |
| 2613 '/permissions/' + |
| 2614 commons.Escaper.ecapeVariable('$permissionId'); |
2506 | 2615 |
2507 var _response = _requester.request(_url, | 2616 var _response = _requester.request(_url, "DELETE", |
2508 "DELETE", | 2617 body: _body, |
2509 body: _body, | 2618 queryParams: _queryParams, |
2510 queryParams: _queryParams, | 2619 uploadOptions: _uploadOptions, |
2511 uploadOptions: _uploadOptions, | 2620 uploadMedia: _uploadMedia, |
2512 uploadMedia: _uploadMedia, | 2621 downloadOptions: _downloadOptions); |
2513 downloadOptions: _downloadOptions); | |
2514 return _response.then((data) => null); | 2622 return _response.then((data) => null); |
2515 } | 2623 } |
2516 | 2624 |
2517 /** | 2625 /// Gets a user's Account & Container Permissions. |
2518 * Gets a user's Account & Container Permissions. | 2626 /// |
2519 * | 2627 /// Request parameters: |
2520 * Request parameters: | 2628 /// |
2521 * | 2629 /// [accountId] - The GTM Account ID. |
2522 * [accountId] - The GTM Account ID. | 2630 /// |
2523 * | 2631 /// [permissionId] - The GTM User ID. |
2524 * [permissionId] - The GTM User ID. | 2632 /// |
2525 * | 2633 /// Completes with a [UserAccess]. |
2526 * Completes with a [UserAccess]. | 2634 /// |
2527 * | 2635 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
2528 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2636 /// an error. |
2529 * error. | 2637 /// |
2530 * | 2638 /// If the used [http.Client] completes with an error when making a REST |
2531 * If the used [http.Client] completes with an error when making a REST call, | 2639 /// call, this method will complete with the same error. |
2532 * this method will complete with the same error. | 2640 async.Future<UserAccess> get( |
2533 */ | 2641 core.String accountId, core.String permissionId) { |
2534 async.Future<UserAccess> get(core.String accountId, core.String permissionId)
{ | |
2535 var _url = null; | 2642 var _url = null; |
2536 var _queryParams = new core.Map(); | 2643 var _queryParams = new core.Map(); |
2537 var _uploadMedia = null; | 2644 var _uploadMedia = null; |
2538 var _uploadOptions = null; | 2645 var _uploadOptions = null; |
2539 var _downloadOptions = commons.DownloadOptions.Metadata; | 2646 var _downloadOptions = commons.DownloadOptions.Metadata; |
2540 var _body = null; | 2647 var _body = null; |
2541 | 2648 |
2542 if (accountId == null) { | 2649 if (accountId == null) { |
2543 throw new core.ArgumentError("Parameter accountId is required."); | 2650 throw new core.ArgumentError("Parameter accountId is required."); |
2544 } | 2651 } |
2545 if (permissionId == null) { | 2652 if (permissionId == null) { |
2546 throw new core.ArgumentError("Parameter permissionId is required."); | 2653 throw new core.ArgumentError("Parameter permissionId is required."); |
2547 } | 2654 } |
2548 | 2655 |
2549 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/permiss
ions/' + commons.Escaper.ecapeVariable('$permissionId'); | 2656 _url = 'accounts/' + |
| 2657 commons.Escaper.ecapeVariable('$accountId') + |
| 2658 '/permissions/' + |
| 2659 commons.Escaper.ecapeVariable('$permissionId'); |
2550 | 2660 |
2551 var _response = _requester.request(_url, | 2661 var _response = _requester.request(_url, "GET", |
2552 "GET", | 2662 body: _body, |
2553 body: _body, | 2663 queryParams: _queryParams, |
2554 queryParams: _queryParams, | 2664 uploadOptions: _uploadOptions, |
2555 uploadOptions: _uploadOptions, | 2665 uploadMedia: _uploadMedia, |
2556 uploadMedia: _uploadMedia, | 2666 downloadOptions: _downloadOptions); |
2557 downloadOptions: _downloadOptions); | |
2558 return _response.then((data) => new UserAccess.fromJson(data)); | 2667 return _response.then((data) => new UserAccess.fromJson(data)); |
2559 } | 2668 } |
2560 | 2669 |
2561 /** | 2670 /// List all users that have access to the account along with Account and |
2562 * List all users that have access to the account along with Account and | 2671 /// Container Permissions granted to each of them. |
2563 * Container Permissions granted to each of them. | 2672 /// |
2564 * | 2673 /// Request parameters: |
2565 * Request parameters: | 2674 /// |
2566 * | 2675 /// [accountId] - The GTM Account ID. @required |
2567 * [accountId] - The GTM Account ID. @required | 2676 /// tagmanager.accounts.permissions.list |
2568 * tagmanager.accounts.permissions.list | 2677 /// |
2569 * | 2678 /// Completes with a [ListAccountUsersResponse]. |
2570 * Completes with a [ListAccountUsersResponse]. | 2679 /// |
2571 * | 2680 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
2572 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2681 /// an error. |
2573 * error. | 2682 /// |
2574 * | 2683 /// If the used [http.Client] completes with an error when making a REST |
2575 * If the used [http.Client] completes with an error when making a REST call, | 2684 /// call, this method will complete with the same error. |
2576 * this method will complete with the same error. | |
2577 */ | |
2578 async.Future<ListAccountUsersResponse> list(core.String accountId) { | 2685 async.Future<ListAccountUsersResponse> list(core.String accountId) { |
2579 var _url = null; | 2686 var _url = null; |
2580 var _queryParams = new core.Map(); | 2687 var _queryParams = new core.Map(); |
2581 var _uploadMedia = null; | 2688 var _uploadMedia = null; |
2582 var _uploadOptions = null; | 2689 var _uploadOptions = null; |
2583 var _downloadOptions = commons.DownloadOptions.Metadata; | 2690 var _downloadOptions = commons.DownloadOptions.Metadata; |
2584 var _body = null; | 2691 var _body = null; |
2585 | 2692 |
2586 if (accountId == null) { | 2693 if (accountId == null) { |
2587 throw new core.ArgumentError("Parameter accountId is required."); | 2694 throw new core.ArgumentError("Parameter accountId is required."); |
2588 } | 2695 } |
2589 | 2696 |
2590 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/permiss
ions'; | 2697 _url = 'accounts/' + |
| 2698 commons.Escaper.ecapeVariable('$accountId') + |
| 2699 '/permissions'; |
2591 | 2700 |
2592 var _response = _requester.request(_url, | 2701 var _response = _requester.request(_url, "GET", |
2593 "GET", | 2702 body: _body, |
2594 body: _body, | 2703 queryParams: _queryParams, |
2595 queryParams: _queryParams, | 2704 uploadOptions: _uploadOptions, |
2596 uploadOptions: _uploadOptions, | 2705 uploadMedia: _uploadMedia, |
2597 uploadMedia: _uploadMedia, | 2706 downloadOptions: _downloadOptions); |
2598 downloadOptions: _downloadOptions); | 2707 return _response |
2599 return _response.then((data) => new ListAccountUsersResponse.fromJson(data))
; | 2708 .then((data) => new ListAccountUsersResponse.fromJson(data)); |
2600 } | 2709 } |
2601 | 2710 |
2602 /** | 2711 /// Updates a user's Account & Container Permissions. |
2603 * Updates a user's Account & Container Permissions. | 2712 /// |
2604 * | 2713 /// [request] - The metadata request object. |
2605 * [request] - The metadata request object. | 2714 /// |
2606 * | 2715 /// Request parameters: |
2607 * Request parameters: | 2716 /// |
2608 * | 2717 /// [accountId] - The GTM Account ID. |
2609 * [accountId] - The GTM Account ID. | 2718 /// |
2610 * | 2719 /// [permissionId] - The GTM User ID. |
2611 * [permissionId] - The GTM User ID. | 2720 /// |
2612 * | 2721 /// Completes with a [UserAccess]. |
2613 * Completes with a [UserAccess]. | 2722 /// |
2614 * | 2723 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
2615 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2724 /// an error. |
2616 * error. | 2725 /// |
2617 * | 2726 /// If the used [http.Client] completes with an error when making a REST |
2618 * If the used [http.Client] completes with an error when making a REST call, | 2727 /// call, this method will complete with the same error. |
2619 * this method will complete with the same error. | 2728 async.Future<UserAccess> update( |
2620 */ | 2729 UserAccess request, core.String accountId, core.String permissionId) { |
2621 async.Future<UserAccess> update(UserAccess request, core.String accountId, cor
e.String permissionId) { | |
2622 var _url = null; | 2730 var _url = null; |
2623 var _queryParams = new core.Map(); | 2731 var _queryParams = new core.Map(); |
2624 var _uploadMedia = null; | 2732 var _uploadMedia = null; |
2625 var _uploadOptions = null; | 2733 var _uploadOptions = null; |
2626 var _downloadOptions = commons.DownloadOptions.Metadata; | 2734 var _downloadOptions = commons.DownloadOptions.Metadata; |
2627 var _body = null; | 2735 var _body = null; |
2628 | 2736 |
2629 if (request != null) { | 2737 if (request != null) { |
2630 _body = convert.JSON.encode((request).toJson()); | 2738 _body = convert.JSON.encode((request).toJson()); |
2631 } | 2739 } |
2632 if (accountId == null) { | 2740 if (accountId == null) { |
2633 throw new core.ArgumentError("Parameter accountId is required."); | 2741 throw new core.ArgumentError("Parameter accountId is required."); |
2634 } | 2742 } |
2635 if (permissionId == null) { | 2743 if (permissionId == null) { |
2636 throw new core.ArgumentError("Parameter permissionId is required."); | 2744 throw new core.ArgumentError("Parameter permissionId is required."); |
2637 } | 2745 } |
2638 | 2746 |
2639 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/permiss
ions/' + commons.Escaper.ecapeVariable('$permissionId'); | 2747 _url = 'accounts/' + |
| 2748 commons.Escaper.ecapeVariable('$accountId') + |
| 2749 '/permissions/' + |
| 2750 commons.Escaper.ecapeVariable('$permissionId'); |
2640 | 2751 |
2641 var _response = _requester.request(_url, | 2752 var _response = _requester.request(_url, "PUT", |
2642 "PUT", | 2753 body: _body, |
2643 body: _body, | 2754 queryParams: _queryParams, |
2644 queryParams: _queryParams, | 2755 uploadOptions: _uploadOptions, |
2645 uploadOptions: _uploadOptions, | 2756 uploadMedia: _uploadMedia, |
2646 uploadMedia: _uploadMedia, | 2757 downloadOptions: _downloadOptions); |
2647 downloadOptions: _downloadOptions); | |
2648 return _response.then((data) => new UserAccess.fromJson(data)); | 2758 return _response.then((data) => new UserAccess.fromJson(data)); |
2649 } | 2759 } |
2650 | |
2651 } | 2760 } |
2652 | 2761 |
| 2762 /// Represents a Google Tag Manager Account. |
| 2763 class Account { |
| 2764 /// The Account ID uniquely identifies the GTM Account. |
| 2765 core.String accountId; |
2653 | 2766 |
| 2767 /// The fingerprint of the GTM Account as computed at storage time. This |
| 2768 /// value is recomputed whenever the account is modified. |
| 2769 core.String fingerprint; |
2654 | 2770 |
2655 /** Represents a Google Tag Manager Account. */ | 2771 /// Account display name. |
2656 class Account { | |
2657 /** The Account ID uniquely identifies the GTM Account. */ | |
2658 core.String accountId; | |
2659 /** | |
2660 * The fingerprint of the GTM Account as computed at storage time. This value | |
2661 * is recomputed whenever the account is modified. | |
2662 */ | |
2663 core.String fingerprint; | |
2664 /** Account display name. */ | |
2665 core.String name; | 2772 core.String name; |
2666 /** Whether the account shares data anonymously with Google and others. */ | 2773 |
| 2774 /// Whether the account shares data anonymously with Google and others. |
2667 core.bool shareData; | 2775 core.bool shareData; |
2668 | 2776 |
2669 Account(); | 2777 Account(); |
2670 | 2778 |
2671 Account.fromJson(core.Map _json) { | 2779 Account.fromJson(core.Map _json) { |
2672 if (_json.containsKey("accountId")) { | 2780 if (_json.containsKey("accountId")) { |
2673 accountId = _json["accountId"]; | 2781 accountId = _json["accountId"]; |
2674 } | 2782 } |
2675 if (_json.containsKey("fingerprint")) { | 2783 if (_json.containsKey("fingerprint")) { |
2676 fingerprint = _json["fingerprint"]; | 2784 fingerprint = _json["fingerprint"]; |
2677 } | 2785 } |
2678 if (_json.containsKey("name")) { | 2786 if (_json.containsKey("name")) { |
2679 name = _json["name"]; | 2787 name = _json["name"]; |
2680 } | 2788 } |
2681 if (_json.containsKey("shareData")) { | 2789 if (_json.containsKey("shareData")) { |
2682 shareData = _json["shareData"]; | 2790 shareData = _json["shareData"]; |
2683 } | 2791 } |
2684 } | 2792 } |
2685 | 2793 |
2686 core.Map<core.String, core.Object> toJson() { | 2794 core.Map<core.String, core.Object> toJson() { |
2687 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2795 final core.Map<core.String, core.Object> _json = |
| 2796 new core.Map<core.String, core.Object>(); |
2688 if (accountId != null) { | 2797 if (accountId != null) { |
2689 _json["accountId"] = accountId; | 2798 _json["accountId"] = accountId; |
2690 } | 2799 } |
2691 if (fingerprint != null) { | 2800 if (fingerprint != null) { |
2692 _json["fingerprint"] = fingerprint; | 2801 _json["fingerprint"] = fingerprint; |
2693 } | 2802 } |
2694 if (name != null) { | 2803 if (name != null) { |
2695 _json["name"] = name; | 2804 _json["name"] = name; |
2696 } | 2805 } |
2697 if (shareData != null) { | 2806 if (shareData != null) { |
2698 _json["shareData"] = shareData; | 2807 _json["shareData"] = shareData; |
2699 } | 2808 } |
2700 return _json; | 2809 return _json; |
2701 } | 2810 } |
2702 } | 2811 } |
2703 | 2812 |
2704 /** Defines the Google Tag Manager Account access permissions. */ | 2813 /// Defines the Google Tag Manager Account access permissions. |
2705 class AccountAccess { | 2814 class AccountAccess { |
2706 /** | 2815 /// List of Account permissions. Valid account permissions are read and |
2707 * List of Account permissions. Valid account permissions are read and manage. | 2816 /// manage. |
2708 */ | |
2709 core.List<core.String> permission; | 2817 core.List<core.String> permission; |
2710 | 2818 |
2711 AccountAccess(); | 2819 AccountAccess(); |
2712 | 2820 |
2713 AccountAccess.fromJson(core.Map _json) { | 2821 AccountAccess.fromJson(core.Map _json) { |
2714 if (_json.containsKey("permission")) { | 2822 if (_json.containsKey("permission")) { |
2715 permission = _json["permission"]; | 2823 permission = _json["permission"]; |
2716 } | 2824 } |
2717 } | 2825 } |
2718 | 2826 |
2719 core.Map<core.String, core.Object> toJson() { | 2827 core.Map<core.String, core.Object> toJson() { |
2720 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2828 final core.Map<core.String, core.Object> _json = |
| 2829 new core.Map<core.String, core.Object>(); |
2721 if (permission != null) { | 2830 if (permission != null) { |
2722 _json["permission"] = permission; | 2831 _json["permission"] = permission; |
2723 } | 2832 } |
2724 return _json; | 2833 return _json; |
2725 } | 2834 } |
2726 } | 2835 } |
2727 | 2836 |
2728 /** Represents a predicate. */ | 2837 /// Represents a predicate. |
2729 class Condition { | 2838 class Condition { |
2730 /** | 2839 /// A list of named parameters (key/value), depending on the condition's |
2731 * A list of named parameters (key/value), depending on the condition's type. | 2840 /// type. Notes: |
2732 * Notes: | 2841 /// - For binary operators, include parameters named arg0 and arg1 for |
2733 * - For binary operators, include parameters named arg0 and arg1 for | 2842 /// specifying the left and right operands, respectively. |
2734 * specifying the left and right operands, respectively. | 2843 /// - At this time, the left operand (arg0) must be a reference to a |
2735 * - At this time, the left operand (arg0) must be a reference to a variable. | 2844 /// variable. |
2736 * - For case-insensitive Regex matching, include a boolean parameter named | 2845 /// - For case-insensitive Regex matching, include a boolean parameter named |
2737 * ignore_case that is set to true. If not specified or set to any other | 2846 /// ignore_case that is set to true. If not specified or set to any other |
2738 * value, the matching will be case sensitive. | 2847 /// value, the matching will be case sensitive. |
2739 * - To negate an operator, include a boolean parameter named negate boolean | 2848 /// - To negate an operator, include a boolean parameter named negate boolean |
2740 * parameter that is set to true. | 2849 /// parameter that is set to true. |
2741 */ | |
2742 core.List<Parameter> parameter; | 2850 core.List<Parameter> parameter; |
2743 /** | 2851 |
2744 * The type of operator for this condition. | 2852 /// The type of operator for this condition. |
2745 * Possible string values are: | 2853 /// Possible string values are: |
2746 * - "contains" | 2854 /// - "contains" |
2747 * - "cssSelector" | 2855 /// - "cssSelector" |
2748 * - "endsWith" | 2856 /// - "endsWith" |
2749 * - "equals" | 2857 /// - "equals" |
2750 * - "greater" | 2858 /// - "greater" |
2751 * - "greaterOrEquals" | 2859 /// - "greaterOrEquals" |
2752 * - "less" | 2860 /// - "less" |
2753 * - "lessOrEquals" | 2861 /// - "lessOrEquals" |
2754 * - "matchRegex" | 2862 /// - "matchRegex" |
2755 * - "startsWith" | 2863 /// - "startsWith" |
2756 * - "urlMatches" | 2864 /// - "urlMatches" |
2757 */ | |
2758 core.String type; | 2865 core.String type; |
2759 | 2866 |
2760 Condition(); | 2867 Condition(); |
2761 | 2868 |
2762 Condition.fromJson(core.Map _json) { | 2869 Condition.fromJson(core.Map _json) { |
2763 if (_json.containsKey("parameter")) { | 2870 if (_json.containsKey("parameter")) { |
2764 parameter = _json["parameter"].map((value) => new Parameter.fromJson(value
)).toList(); | 2871 parameter = _json["parameter"] |
| 2872 .map((value) => new Parameter.fromJson(value)) |
| 2873 .toList(); |
2765 } | 2874 } |
2766 if (_json.containsKey("type")) { | 2875 if (_json.containsKey("type")) { |
2767 type = _json["type"]; | 2876 type = _json["type"]; |
2768 } | 2877 } |
2769 } | 2878 } |
2770 | 2879 |
2771 core.Map<core.String, core.Object> toJson() { | 2880 core.Map<core.String, core.Object> toJson() { |
2772 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2881 final core.Map<core.String, core.Object> _json = |
| 2882 new core.Map<core.String, core.Object>(); |
2773 if (parameter != null) { | 2883 if (parameter != null) { |
2774 _json["parameter"] = parameter.map((value) => (value).toJson()).toList(); | 2884 _json["parameter"] = parameter.map((value) => (value).toJson()).toList(); |
2775 } | 2885 } |
2776 if (type != null) { | 2886 if (type != null) { |
2777 _json["type"] = type; | 2887 _json["type"] = type; |
2778 } | 2888 } |
2779 return _json; | 2889 return _json; |
2780 } | 2890 } |
2781 } | 2891 } |
2782 | 2892 |
2783 /** Represents a Google Tag Manager Container. */ | 2893 /// Represents a Google Tag Manager Container. |
2784 class Container { | 2894 class Container { |
2785 /** GTM Account ID. */ | 2895 /// GTM Account ID. |
2786 core.String accountId; | 2896 core.String accountId; |
2787 /** The Container ID uniquely identifies the GTM Container. */ | 2897 |
| 2898 /// The Container ID uniquely identifies the GTM Container. |
2788 core.String containerId; | 2899 core.String containerId; |
2789 /** Optional list of domain names associated with the Container. */ | 2900 |
| 2901 /// Optional list of domain names associated with the Container. |
2790 core.List<core.String> domainName; | 2902 core.List<core.String> domainName; |
2791 /** | 2903 |
2792 * List of enabled built-in variables. Valid values include: pageUrl, | 2904 /// List of enabled built-in variables. Valid values include: pageUrl, |
2793 * pageHostname, pagePath, referrer, event, clickElement, clickClasses, | 2905 /// pageHostname, pagePath, referrer, event, clickElement, clickClasses, |
2794 * clickId, clickTarget, clickUrl, clickText, formElement, formClasses, | 2906 /// clickId, clickTarget, clickUrl, clickText, formElement, formClasses, |
2795 * formId, formTarget, formUrl, formText, errorMessage, errorUrl, errorLine, | 2907 /// formId, formTarget, formUrl, formText, errorMessage, errorUrl, errorLine, |
2796 * newHistoryFragment, oldHistoryFragment, newHistoryState, oldHistoryState, | 2908 /// newHistoryFragment, oldHistoryFragment, newHistoryState, oldHistoryState, |
2797 * historySource, containerVersion, debugMode, randomNumber, containerId. | 2909 /// historySource, containerVersion, debugMode, randomNumber, containerId. |
2798 */ | |
2799 core.List<core.String> enabledBuiltInVariable; | 2910 core.List<core.String> enabledBuiltInVariable; |
2800 /** | 2911 |
2801 * The fingerprint of the GTM Container as computed at storage time. This | 2912 /// The fingerprint of the GTM Container as computed at storage time. This |
2802 * value is recomputed whenever the account is modified. | 2913 /// value is recomputed whenever the account is modified. |
2803 */ | |
2804 core.String fingerprint; | 2914 core.String fingerprint; |
2805 /** Container display name. */ | 2915 |
| 2916 /// Container display name. |
2806 core.String name; | 2917 core.String name; |
2807 /** Container Notes. */ | 2918 |
| 2919 /// Container Notes. |
2808 core.String notes; | 2920 core.String notes; |
2809 /** Container Public ID. */ | 2921 |
| 2922 /// Container Public ID. |
2810 core.String publicId; | 2923 core.String publicId; |
2811 /** Container Country ID. */ | 2924 |
| 2925 /// Container Country ID. |
2812 core.String timeZoneCountryId; | 2926 core.String timeZoneCountryId; |
2813 /** Container Time Zone ID. */ | 2927 |
| 2928 /// Container Time Zone ID. |
2814 core.String timeZoneId; | 2929 core.String timeZoneId; |
2815 /** | 2930 |
2816 * List of Usage Contexts for the Container. Valid values include: web, | 2931 /// List of Usage Contexts for the Container. Valid values include: web, |
2817 * android, ios. | 2932 /// android, ios. |
2818 */ | |
2819 core.List<core.String> usageContext; | 2933 core.List<core.String> usageContext; |
2820 | 2934 |
2821 Container(); | 2935 Container(); |
2822 | 2936 |
2823 Container.fromJson(core.Map _json) { | 2937 Container.fromJson(core.Map _json) { |
2824 if (_json.containsKey("accountId")) { | 2938 if (_json.containsKey("accountId")) { |
2825 accountId = _json["accountId"]; | 2939 accountId = _json["accountId"]; |
2826 } | 2940 } |
2827 if (_json.containsKey("containerId")) { | 2941 if (_json.containsKey("containerId")) { |
2828 containerId = _json["containerId"]; | 2942 containerId = _json["containerId"]; |
(...skipping 21 matching lines...) Expand all Loading... |
2850 } | 2964 } |
2851 if (_json.containsKey("timeZoneId")) { | 2965 if (_json.containsKey("timeZoneId")) { |
2852 timeZoneId = _json["timeZoneId"]; | 2966 timeZoneId = _json["timeZoneId"]; |
2853 } | 2967 } |
2854 if (_json.containsKey("usageContext")) { | 2968 if (_json.containsKey("usageContext")) { |
2855 usageContext = _json["usageContext"]; | 2969 usageContext = _json["usageContext"]; |
2856 } | 2970 } |
2857 } | 2971 } |
2858 | 2972 |
2859 core.Map<core.String, core.Object> toJson() { | 2973 core.Map<core.String, core.Object> toJson() { |
2860 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2974 final core.Map<core.String, core.Object> _json = |
| 2975 new core.Map<core.String, core.Object>(); |
2861 if (accountId != null) { | 2976 if (accountId != null) { |
2862 _json["accountId"] = accountId; | 2977 _json["accountId"] = accountId; |
2863 } | 2978 } |
2864 if (containerId != null) { | 2979 if (containerId != null) { |
2865 _json["containerId"] = containerId; | 2980 _json["containerId"] = containerId; |
2866 } | 2981 } |
2867 if (domainName != null) { | 2982 if (domainName != null) { |
2868 _json["domainName"] = domainName; | 2983 _json["domainName"] = domainName; |
2869 } | 2984 } |
2870 if (enabledBuiltInVariable != null) { | 2985 if (enabledBuiltInVariable != null) { |
(...skipping 17 matching lines...) Expand all Loading... |
2888 if (timeZoneId != null) { | 3003 if (timeZoneId != null) { |
2889 _json["timeZoneId"] = timeZoneId; | 3004 _json["timeZoneId"] = timeZoneId; |
2890 } | 3005 } |
2891 if (usageContext != null) { | 3006 if (usageContext != null) { |
2892 _json["usageContext"] = usageContext; | 3007 _json["usageContext"] = usageContext; |
2893 } | 3008 } |
2894 return _json; | 3009 return _json; |
2895 } | 3010 } |
2896 } | 3011 } |
2897 | 3012 |
2898 /** Defines the Google Tag Manager Container access permissions. */ | 3013 /// Defines the Google Tag Manager Container access permissions. |
2899 class ContainerAccess { | 3014 class ContainerAccess { |
2900 /** GTM Container ID. */ | 3015 /// GTM Container ID. |
2901 core.String containerId; | 3016 core.String containerId; |
2902 /** | 3017 |
2903 * List of Container permissions. Valid container permissions are: read, edit, | 3018 /// List of Container permissions. Valid container permissions are: read, |
2904 * delete, publish. | 3019 /// edit, delete, publish. |
2905 */ | |
2906 core.List<core.String> permission; | 3020 core.List<core.String> permission; |
2907 | 3021 |
2908 ContainerAccess(); | 3022 ContainerAccess(); |
2909 | 3023 |
2910 ContainerAccess.fromJson(core.Map _json) { | 3024 ContainerAccess.fromJson(core.Map _json) { |
2911 if (_json.containsKey("containerId")) { | 3025 if (_json.containsKey("containerId")) { |
2912 containerId = _json["containerId"]; | 3026 containerId = _json["containerId"]; |
2913 } | 3027 } |
2914 if (_json.containsKey("permission")) { | 3028 if (_json.containsKey("permission")) { |
2915 permission = _json["permission"]; | 3029 permission = _json["permission"]; |
2916 } | 3030 } |
2917 } | 3031 } |
2918 | 3032 |
2919 core.Map<core.String, core.Object> toJson() { | 3033 core.Map<core.String, core.Object> toJson() { |
2920 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3034 final core.Map<core.String, core.Object> _json = |
| 3035 new core.Map<core.String, core.Object>(); |
2921 if (containerId != null) { | 3036 if (containerId != null) { |
2922 _json["containerId"] = containerId; | 3037 _json["containerId"] = containerId; |
2923 } | 3038 } |
2924 if (permission != null) { | 3039 if (permission != null) { |
2925 _json["permission"] = permission; | 3040 _json["permission"] = permission; |
2926 } | 3041 } |
2927 return _json; | 3042 return _json; |
2928 } | 3043 } |
2929 } | 3044 } |
2930 | 3045 |
2931 /** Represents a Google Tag Manager Container Version. */ | 3046 /// Represents a Google Tag Manager Container Version. |
2932 class ContainerVersion { | 3047 class ContainerVersion { |
2933 /** GTM Account ID. */ | 3048 /// GTM Account ID. |
2934 core.String accountId; | 3049 core.String accountId; |
2935 /** The container that this version was taken from. */ | 3050 |
| 3051 /// The container that this version was taken from. |
2936 Container container; | 3052 Container container; |
2937 /** GTM Container ID. */ | 3053 |
| 3054 /// GTM Container ID. |
2938 core.String containerId; | 3055 core.String containerId; |
2939 /** | 3056 |
2940 * The Container Version ID uniquely identifies the GTM Container Version. | 3057 /// The Container Version ID uniquely identifies the GTM Container Version. |
2941 */ | |
2942 core.String containerVersionId; | 3058 core.String containerVersionId; |
2943 /** A value of true indicates this container version has been deleted. */ | 3059 |
| 3060 /// A value of true indicates this container version has been deleted. |
2944 core.bool deleted; | 3061 core.bool deleted; |
2945 /** | 3062 |
2946 * The fingerprint of the GTM Container Version as computed at storage time. | 3063 /// The fingerprint of the GTM Container Version as computed at storage time. |
2947 * This value is recomputed whenever the container version is modified. | 3064 /// This value is recomputed whenever the container version is modified. |
2948 */ | |
2949 core.String fingerprint; | 3065 core.String fingerprint; |
2950 /** The folders in the container that this version was taken from. */ | 3066 |
| 3067 /// The folders in the container that this version was taken from. |
2951 core.List<Folder> folder; | 3068 core.List<Folder> folder; |
2952 /** The macros in the container that this version was taken from. */ | 3069 |
| 3070 /// The macros in the container that this version was taken from. |
2953 core.List<Macro> macro; | 3071 core.List<Macro> macro; |
2954 /** Container version display name. */ | 3072 |
| 3073 /// Container version display name. |
2955 core.String name; | 3074 core.String name; |
2956 /** User notes on how to apply this container version in the container. */ | 3075 |
| 3076 /// User notes on how to apply this container version in the container. |
2957 core.String notes; | 3077 core.String notes; |
2958 /** The rules in the container that this version was taken from. */ | 3078 |
| 3079 /// The rules in the container that this version was taken from. |
2959 core.List<Rule> rule; | 3080 core.List<Rule> rule; |
2960 /** The tags in the container that this version was taken from. */ | 3081 |
| 3082 /// The tags in the container that this version was taken from. |
2961 core.List<Tag> tag; | 3083 core.List<Tag> tag; |
2962 /** The triggers in the container that this version was taken from. */ | 3084 |
| 3085 /// The triggers in the container that this version was taken from. |
2963 core.List<Trigger> trigger; | 3086 core.List<Trigger> trigger; |
2964 /** The variables in the container that this version was taken from. */ | 3087 |
| 3088 /// The variables in the container that this version was taken from. |
2965 core.List<Variable> variable; | 3089 core.List<Variable> variable; |
2966 | 3090 |
2967 ContainerVersion(); | 3091 ContainerVersion(); |
2968 | 3092 |
2969 ContainerVersion.fromJson(core.Map _json) { | 3093 ContainerVersion.fromJson(core.Map _json) { |
2970 if (_json.containsKey("accountId")) { | 3094 if (_json.containsKey("accountId")) { |
2971 accountId = _json["accountId"]; | 3095 accountId = _json["accountId"]; |
2972 } | 3096 } |
2973 if (_json.containsKey("container")) { | 3097 if (_json.containsKey("container")) { |
2974 container = new Container.fromJson(_json["container"]); | 3098 container = new Container.fromJson(_json["container"]); |
2975 } | 3099 } |
2976 if (_json.containsKey("containerId")) { | 3100 if (_json.containsKey("containerId")) { |
2977 containerId = _json["containerId"]; | 3101 containerId = _json["containerId"]; |
2978 } | 3102 } |
2979 if (_json.containsKey("containerVersionId")) { | 3103 if (_json.containsKey("containerVersionId")) { |
2980 containerVersionId = _json["containerVersionId"]; | 3104 containerVersionId = _json["containerVersionId"]; |
2981 } | 3105 } |
2982 if (_json.containsKey("deleted")) { | 3106 if (_json.containsKey("deleted")) { |
2983 deleted = _json["deleted"]; | 3107 deleted = _json["deleted"]; |
2984 } | 3108 } |
2985 if (_json.containsKey("fingerprint")) { | 3109 if (_json.containsKey("fingerprint")) { |
2986 fingerprint = _json["fingerprint"]; | 3110 fingerprint = _json["fingerprint"]; |
2987 } | 3111 } |
2988 if (_json.containsKey("folder")) { | 3112 if (_json.containsKey("folder")) { |
2989 folder = _json["folder"].map((value) => new Folder.fromJson(value)).toList
(); | 3113 folder = |
| 3114 _json["folder"].map((value) => new Folder.fromJson(value)).toList(); |
2990 } | 3115 } |
2991 if (_json.containsKey("macro")) { | 3116 if (_json.containsKey("macro")) { |
2992 macro = _json["macro"].map((value) => new Macro.fromJson(value)).toList(); | 3117 macro = _json["macro"].map((value) => new Macro.fromJson(value)).toList(); |
2993 } | 3118 } |
2994 if (_json.containsKey("name")) { | 3119 if (_json.containsKey("name")) { |
2995 name = _json["name"]; | 3120 name = _json["name"]; |
2996 } | 3121 } |
2997 if (_json.containsKey("notes")) { | 3122 if (_json.containsKey("notes")) { |
2998 notes = _json["notes"]; | 3123 notes = _json["notes"]; |
2999 } | 3124 } |
3000 if (_json.containsKey("rule")) { | 3125 if (_json.containsKey("rule")) { |
3001 rule = _json["rule"].map((value) => new Rule.fromJson(value)).toList(); | 3126 rule = _json["rule"].map((value) => new Rule.fromJson(value)).toList(); |
3002 } | 3127 } |
3003 if (_json.containsKey("tag")) { | 3128 if (_json.containsKey("tag")) { |
3004 tag = _json["tag"].map((value) => new Tag.fromJson(value)).toList(); | 3129 tag = _json["tag"].map((value) => new Tag.fromJson(value)).toList(); |
3005 } | 3130 } |
3006 if (_json.containsKey("trigger")) { | 3131 if (_json.containsKey("trigger")) { |
3007 trigger = _json["trigger"].map((value) => new Trigger.fromJson(value)).toL
ist(); | 3132 trigger = |
| 3133 _json["trigger"].map((value) => new Trigger.fromJson(value)).toList(); |
3008 } | 3134 } |
3009 if (_json.containsKey("variable")) { | 3135 if (_json.containsKey("variable")) { |
3010 variable = _json["variable"].map((value) => new Variable.fromJson(value)).
toList(); | 3136 variable = _json["variable"] |
| 3137 .map((value) => new Variable.fromJson(value)) |
| 3138 .toList(); |
3011 } | 3139 } |
3012 } | 3140 } |
3013 | 3141 |
3014 core.Map<core.String, core.Object> toJson() { | 3142 core.Map<core.String, core.Object> toJson() { |
3015 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3143 final core.Map<core.String, core.Object> _json = |
| 3144 new core.Map<core.String, core.Object>(); |
3016 if (accountId != null) { | 3145 if (accountId != null) { |
3017 _json["accountId"] = accountId; | 3146 _json["accountId"] = accountId; |
3018 } | 3147 } |
3019 if (container != null) { | 3148 if (container != null) { |
3020 _json["container"] = (container).toJson(); | 3149 _json["container"] = (container).toJson(); |
3021 } | 3150 } |
3022 if (containerId != null) { | 3151 if (containerId != null) { |
3023 _json["containerId"] = containerId; | 3152 _json["containerId"] = containerId; |
3024 } | 3153 } |
3025 if (containerVersionId != null) { | 3154 if (containerVersionId != null) { |
(...skipping 26 matching lines...) Expand all Loading... |
3052 if (trigger != null) { | 3181 if (trigger != null) { |
3053 _json["trigger"] = trigger.map((value) => (value).toJson()).toList(); | 3182 _json["trigger"] = trigger.map((value) => (value).toJson()).toList(); |
3054 } | 3183 } |
3055 if (variable != null) { | 3184 if (variable != null) { |
3056 _json["variable"] = variable.map((value) => (value).toJson()).toList(); | 3185 _json["variable"] = variable.map((value) => (value).toJson()).toList(); |
3057 } | 3186 } |
3058 return _json; | 3187 return _json; |
3059 } | 3188 } |
3060 } | 3189 } |
3061 | 3190 |
3062 /** Represents a Google Tag Manager Container Version Header. */ | 3191 /// Represents a Google Tag Manager Container Version Header. |
3063 class ContainerVersionHeader { | 3192 class ContainerVersionHeader { |
3064 /** GTM Account ID. */ | 3193 /// GTM Account ID. |
3065 core.String accountId; | 3194 core.String accountId; |
3066 /** GTM Container ID. */ | 3195 |
| 3196 /// GTM Container ID. |
3067 core.String containerId; | 3197 core.String containerId; |
3068 /** | 3198 |
3069 * The Container Version ID uniquely identifies the GTM Container Version. | 3199 /// The Container Version ID uniquely identifies the GTM Container Version. |
3070 */ | |
3071 core.String containerVersionId; | 3200 core.String containerVersionId; |
3072 /** A value of true indicates this container version has been deleted. */ | 3201 |
| 3202 /// A value of true indicates this container version has been deleted. |
3073 core.bool deleted; | 3203 core.bool deleted; |
3074 /** Container version display name. */ | 3204 |
| 3205 /// Container version display name. |
3075 core.String name; | 3206 core.String name; |
3076 /** Number of macros in the container version. */ | 3207 |
| 3208 /// Number of macros in the container version. |
3077 core.String numMacros; | 3209 core.String numMacros; |
3078 /** Number of rules in the container version. */ | 3210 |
| 3211 /// Number of rules in the container version. |
3079 core.String numRules; | 3212 core.String numRules; |
3080 /** Number of tags in the container version. */ | 3213 |
| 3214 /// Number of tags in the container version. |
3081 core.String numTags; | 3215 core.String numTags; |
3082 /** Number of triggers in the container version. */ | 3216 |
| 3217 /// Number of triggers in the container version. |
3083 core.String numTriggers; | 3218 core.String numTriggers; |
3084 /** Number of variables in the container version. */ | 3219 |
| 3220 /// Number of variables in the container version. |
3085 core.String numVariables; | 3221 core.String numVariables; |
3086 | 3222 |
3087 ContainerVersionHeader(); | 3223 ContainerVersionHeader(); |
3088 | 3224 |
3089 ContainerVersionHeader.fromJson(core.Map _json) { | 3225 ContainerVersionHeader.fromJson(core.Map _json) { |
3090 if (_json.containsKey("accountId")) { | 3226 if (_json.containsKey("accountId")) { |
3091 accountId = _json["accountId"]; | 3227 accountId = _json["accountId"]; |
3092 } | 3228 } |
3093 if (_json.containsKey("containerId")) { | 3229 if (_json.containsKey("containerId")) { |
3094 containerId = _json["containerId"]; | 3230 containerId = _json["containerId"]; |
(...skipping 18 matching lines...) Expand all Loading... |
3113 } | 3249 } |
3114 if (_json.containsKey("numTriggers")) { | 3250 if (_json.containsKey("numTriggers")) { |
3115 numTriggers = _json["numTriggers"]; | 3251 numTriggers = _json["numTriggers"]; |
3116 } | 3252 } |
3117 if (_json.containsKey("numVariables")) { | 3253 if (_json.containsKey("numVariables")) { |
3118 numVariables = _json["numVariables"]; | 3254 numVariables = _json["numVariables"]; |
3119 } | 3255 } |
3120 } | 3256 } |
3121 | 3257 |
3122 core.Map<core.String, core.Object> toJson() { | 3258 core.Map<core.String, core.Object> toJson() { |
3123 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3259 final core.Map<core.String, core.Object> _json = |
| 3260 new core.Map<core.String, core.Object>(); |
3124 if (accountId != null) { | 3261 if (accountId != null) { |
3125 _json["accountId"] = accountId; | 3262 _json["accountId"] = accountId; |
3126 } | 3263 } |
3127 if (containerId != null) { | 3264 if (containerId != null) { |
3128 _json["containerId"] = containerId; | 3265 _json["containerId"] = containerId; |
3129 } | 3266 } |
3130 if (containerVersionId != null) { | 3267 if (containerVersionId != null) { |
3131 _json["containerVersionId"] = containerVersionId; | 3268 _json["containerVersionId"] = containerVersionId; |
3132 } | 3269 } |
3133 if (deleted != null) { | 3270 if (deleted != null) { |
(...skipping 14 matching lines...) Expand all Loading... |
3148 if (numTriggers != null) { | 3285 if (numTriggers != null) { |
3149 _json["numTriggers"] = numTriggers; | 3286 _json["numTriggers"] = numTriggers; |
3150 } | 3287 } |
3151 if (numVariables != null) { | 3288 if (numVariables != null) { |
3152 _json["numVariables"] = numVariables; | 3289 _json["numVariables"] = numVariables; |
3153 } | 3290 } |
3154 return _json; | 3291 return _json; |
3155 } | 3292 } |
3156 } | 3293 } |
3157 | 3294 |
3158 /** Options for new container versions. */ | 3295 /// Options for new container versions. |
3159 class CreateContainerVersionRequestVersionOptions { | 3296 class CreateContainerVersionRequestVersionOptions { |
3160 /** The name of the container version to be created. */ | 3297 /// The name of the container version to be created. |
3161 core.String name; | 3298 core.String name; |
3162 /** The notes of the container version to be created. */ | 3299 |
| 3300 /// The notes of the container version to be created. |
3163 core.String notes; | 3301 core.String notes; |
3164 /** | 3302 |
3165 * The creation of this version may be for quick preview and shouldn't be | 3303 /// The creation of this version may be for quick preview and shouldn't be |
3166 * saved. | 3304 /// saved. |
3167 */ | |
3168 core.bool quickPreview; | 3305 core.bool quickPreview; |
3169 | 3306 |
3170 CreateContainerVersionRequestVersionOptions(); | 3307 CreateContainerVersionRequestVersionOptions(); |
3171 | 3308 |
3172 CreateContainerVersionRequestVersionOptions.fromJson(core.Map _json) { | 3309 CreateContainerVersionRequestVersionOptions.fromJson(core.Map _json) { |
3173 if (_json.containsKey("name")) { | 3310 if (_json.containsKey("name")) { |
3174 name = _json["name"]; | 3311 name = _json["name"]; |
3175 } | 3312 } |
3176 if (_json.containsKey("notes")) { | 3313 if (_json.containsKey("notes")) { |
3177 notes = _json["notes"]; | 3314 notes = _json["notes"]; |
3178 } | 3315 } |
3179 if (_json.containsKey("quickPreview")) { | 3316 if (_json.containsKey("quickPreview")) { |
3180 quickPreview = _json["quickPreview"]; | 3317 quickPreview = _json["quickPreview"]; |
3181 } | 3318 } |
3182 } | 3319 } |
3183 | 3320 |
3184 core.Map<core.String, core.Object> toJson() { | 3321 core.Map<core.String, core.Object> toJson() { |
3185 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3322 final core.Map<core.String, core.Object> _json = |
| 3323 new core.Map<core.String, core.Object>(); |
3186 if (name != null) { | 3324 if (name != null) { |
3187 _json["name"] = name; | 3325 _json["name"] = name; |
3188 } | 3326 } |
3189 if (notes != null) { | 3327 if (notes != null) { |
3190 _json["notes"] = notes; | 3328 _json["notes"] = notes; |
3191 } | 3329 } |
3192 if (quickPreview != null) { | 3330 if (quickPreview != null) { |
3193 _json["quickPreview"] = quickPreview; | 3331 _json["quickPreview"] = quickPreview; |
3194 } | 3332 } |
3195 return _json; | 3333 return _json; |
3196 } | 3334 } |
3197 } | 3335 } |
3198 | 3336 |
3199 /** Create container versions response. */ | 3337 /// Create container versions response. |
3200 class CreateContainerVersionResponse { | 3338 class CreateContainerVersionResponse { |
3201 /** Compiler errors or not. */ | 3339 /// Compiler errors or not. |
3202 core.bool compilerError; | 3340 core.bool compilerError; |
3203 /** The container version created. */ | 3341 |
| 3342 /// The container version created. |
3204 ContainerVersion containerVersion; | 3343 ContainerVersion containerVersion; |
3205 | 3344 |
3206 CreateContainerVersionResponse(); | 3345 CreateContainerVersionResponse(); |
3207 | 3346 |
3208 CreateContainerVersionResponse.fromJson(core.Map _json) { | 3347 CreateContainerVersionResponse.fromJson(core.Map _json) { |
3209 if (_json.containsKey("compilerError")) { | 3348 if (_json.containsKey("compilerError")) { |
3210 compilerError = _json["compilerError"]; | 3349 compilerError = _json["compilerError"]; |
3211 } | 3350 } |
3212 if (_json.containsKey("containerVersion")) { | 3351 if (_json.containsKey("containerVersion")) { |
3213 containerVersion = new ContainerVersion.fromJson(_json["containerVersion"]
); | 3352 containerVersion = |
| 3353 new ContainerVersion.fromJson(_json["containerVersion"]); |
3214 } | 3354 } |
3215 } | 3355 } |
3216 | 3356 |
3217 core.Map<core.String, core.Object> toJson() { | 3357 core.Map<core.String, core.Object> toJson() { |
3218 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3358 final core.Map<core.String, core.Object> _json = |
| 3359 new core.Map<core.String, core.Object>(); |
3219 if (compilerError != null) { | 3360 if (compilerError != null) { |
3220 _json["compilerError"] = compilerError; | 3361 _json["compilerError"] = compilerError; |
3221 } | 3362 } |
3222 if (containerVersion != null) { | 3363 if (containerVersion != null) { |
3223 _json["containerVersion"] = (containerVersion).toJson(); | 3364 _json["containerVersion"] = (containerVersion).toJson(); |
3224 } | 3365 } |
3225 return _json; | 3366 return _json; |
3226 } | 3367 } |
3227 } | 3368 } |
3228 | 3369 |
3229 /** | 3370 /// Represents a Google Tag Manager Environment. Note that a user can create, |
3230 * Represents a Google Tag Manager Environment. Note that a user can create, | 3371 /// delete and update environments of type USER, but can only update the |
3231 * delete and update environments of type USER, but can only update the | 3372 /// enable_debug and url fields of environments of other types. |
3232 * enable_debug and url fields of environments of other types. | |
3233 */ | |
3234 class Environment { | 3373 class Environment { |
3235 /** GTM Account ID. */ | 3374 /// GTM Account ID. |
3236 core.String accountId; | 3375 core.String accountId; |
3237 /** The environment authorization code. */ | 3376 |
| 3377 /// The environment authorization code. |
3238 core.String authorizationCode; | 3378 core.String authorizationCode; |
3239 /** The last update time-stamp for the authorization code. */ | 3379 |
| 3380 /// The last update time-stamp for the authorization code. |
3240 core.String authorizationTimestampMs; | 3381 core.String authorizationTimestampMs; |
3241 /** GTM Container ID. */ | 3382 |
| 3383 /// GTM Container ID. |
3242 core.String containerId; | 3384 core.String containerId; |
3243 core.String containerVersionId; | 3385 core.String containerVersionId; |
3244 /** | 3386 |
3245 * The environment description. Can be set or changed only on USER type | 3387 /// The environment description. Can be set or changed only on USER type |
3246 * environments. | 3388 /// environments. |
3247 */ | |
3248 core.String description; | 3389 core.String description; |
3249 /** Whether or not to enable debug by default on for the environment. */ | 3390 |
| 3391 /// Whether or not to enable debug by default on for the environment. |
3250 core.bool enableDebug; | 3392 core.bool enableDebug; |
3251 /** GTM Environment ID uniquely identifies the GTM Environment. */ | 3393 |
| 3394 /// GTM Environment ID uniquely identifies the GTM Environment. |
3252 core.String environmentId; | 3395 core.String environmentId; |
3253 /** | 3396 |
3254 * The fingerprint of the GTM environment as computed at storage time. This | 3397 /// The fingerprint of the GTM environment as computed at storage time. This |
3255 * value is recomputed whenever the environment is modified. | 3398 /// value is recomputed whenever the environment is modified. |
3256 */ | |
3257 core.String fingerprint; | 3399 core.String fingerprint; |
3258 /** | 3400 |
3259 * The environment display name. Can be set or changed only on USER type | 3401 /// The environment display name. Can be set or changed only on USER type |
3260 * environments. | 3402 /// environments. |
3261 */ | |
3262 core.String name; | 3403 core.String name; |
3263 /** | 3404 |
3264 * The type of this environment. | 3405 /// The type of this environment. |
3265 * Possible string values are: | 3406 /// Possible string values are: |
3266 * - "draft" | 3407 /// - "draft" |
3267 * - "latest" | 3408 /// - "latest" |
3268 * - "live" | 3409 /// - "live" |
3269 * - "user" | 3410 /// - "user" |
3270 */ | |
3271 core.String type; | 3411 core.String type; |
3272 /** Default preview page url for the environment. */ | 3412 |
| 3413 /// Default preview page url for the environment. |
3273 core.String url; | 3414 core.String url; |
3274 | 3415 |
3275 Environment(); | 3416 Environment(); |
3276 | 3417 |
3277 Environment.fromJson(core.Map _json) { | 3418 Environment.fromJson(core.Map _json) { |
3278 if (_json.containsKey("accountId")) { | 3419 if (_json.containsKey("accountId")) { |
3279 accountId = _json["accountId"]; | 3420 accountId = _json["accountId"]; |
3280 } | 3421 } |
3281 if (_json.containsKey("authorizationCode")) { | 3422 if (_json.containsKey("authorizationCode")) { |
3282 authorizationCode = _json["authorizationCode"]; | 3423 authorizationCode = _json["authorizationCode"]; |
(...skipping 24 matching lines...) Expand all Loading... |
3307 } | 3448 } |
3308 if (_json.containsKey("type")) { | 3449 if (_json.containsKey("type")) { |
3309 type = _json["type"]; | 3450 type = _json["type"]; |
3310 } | 3451 } |
3311 if (_json.containsKey("url")) { | 3452 if (_json.containsKey("url")) { |
3312 url = _json["url"]; | 3453 url = _json["url"]; |
3313 } | 3454 } |
3314 } | 3455 } |
3315 | 3456 |
3316 core.Map<core.String, core.Object> toJson() { | 3457 core.Map<core.String, core.Object> toJson() { |
3317 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3458 final core.Map<core.String, core.Object> _json = |
| 3459 new core.Map<core.String, core.Object>(); |
3318 if (accountId != null) { | 3460 if (accountId != null) { |
3319 _json["accountId"] = accountId; | 3461 _json["accountId"] = accountId; |
3320 } | 3462 } |
3321 if (authorizationCode != null) { | 3463 if (authorizationCode != null) { |
3322 _json["authorizationCode"] = authorizationCode; | 3464 _json["authorizationCode"] = authorizationCode; |
3323 } | 3465 } |
3324 if (authorizationTimestampMs != null) { | 3466 if (authorizationTimestampMs != null) { |
3325 _json["authorizationTimestampMs"] = authorizationTimestampMs; | 3467 _json["authorizationTimestampMs"] = authorizationTimestampMs; |
3326 } | 3468 } |
3327 if (containerId != null) { | 3469 if (containerId != null) { |
(...skipping 20 matching lines...) Expand all Loading... |
3348 if (type != null) { | 3490 if (type != null) { |
3349 _json["type"] = type; | 3491 _json["type"] = type; |
3350 } | 3492 } |
3351 if (url != null) { | 3493 if (url != null) { |
3352 _json["url"] = url; | 3494 _json["url"] = url; |
3353 } | 3495 } |
3354 return _json; | 3496 return _json; |
3355 } | 3497 } |
3356 } | 3498 } |
3357 | 3499 |
3358 /** Represents a Google Tag Manager Folder. */ | 3500 /// Represents a Google Tag Manager Folder. |
3359 class Folder { | 3501 class Folder { |
3360 /** GTM Account ID. */ | 3502 /// GTM Account ID. |
3361 core.String accountId; | 3503 core.String accountId; |
3362 /** GTM Container ID. */ | 3504 |
| 3505 /// GTM Container ID. |
3363 core.String containerId; | 3506 core.String containerId; |
3364 /** | 3507 |
3365 * The fingerprint of the GTM Folder as computed at storage time. This value | 3508 /// The fingerprint of the GTM Folder as computed at storage time. This value |
3366 * is recomputed whenever the folder is modified. | 3509 /// is recomputed whenever the folder is modified. |
3367 */ | |
3368 core.String fingerprint; | 3510 core.String fingerprint; |
3369 /** The Folder ID uniquely identifies the GTM Folder. */ | 3511 |
| 3512 /// The Folder ID uniquely identifies the GTM Folder. |
3370 core.String folderId; | 3513 core.String folderId; |
3371 /** Folder display name. */ | 3514 |
| 3515 /// Folder display name. |
3372 core.String name; | 3516 core.String name; |
3373 | 3517 |
3374 Folder(); | 3518 Folder(); |
3375 | 3519 |
3376 Folder.fromJson(core.Map _json) { | 3520 Folder.fromJson(core.Map _json) { |
3377 if (_json.containsKey("accountId")) { | 3521 if (_json.containsKey("accountId")) { |
3378 accountId = _json["accountId"]; | 3522 accountId = _json["accountId"]; |
3379 } | 3523 } |
3380 if (_json.containsKey("containerId")) { | 3524 if (_json.containsKey("containerId")) { |
3381 containerId = _json["containerId"]; | 3525 containerId = _json["containerId"]; |
3382 } | 3526 } |
3383 if (_json.containsKey("fingerprint")) { | 3527 if (_json.containsKey("fingerprint")) { |
3384 fingerprint = _json["fingerprint"]; | 3528 fingerprint = _json["fingerprint"]; |
3385 } | 3529 } |
3386 if (_json.containsKey("folderId")) { | 3530 if (_json.containsKey("folderId")) { |
3387 folderId = _json["folderId"]; | 3531 folderId = _json["folderId"]; |
3388 } | 3532 } |
3389 if (_json.containsKey("name")) { | 3533 if (_json.containsKey("name")) { |
3390 name = _json["name"]; | 3534 name = _json["name"]; |
3391 } | 3535 } |
3392 } | 3536 } |
3393 | 3537 |
3394 core.Map<core.String, core.Object> toJson() { | 3538 core.Map<core.String, core.Object> toJson() { |
3395 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3539 final core.Map<core.String, core.Object> _json = |
| 3540 new core.Map<core.String, core.Object>(); |
3396 if (accountId != null) { | 3541 if (accountId != null) { |
3397 _json["accountId"] = accountId; | 3542 _json["accountId"] = accountId; |
3398 } | 3543 } |
3399 if (containerId != null) { | 3544 if (containerId != null) { |
3400 _json["containerId"] = containerId; | 3545 _json["containerId"] = containerId; |
3401 } | 3546 } |
3402 if (fingerprint != null) { | 3547 if (fingerprint != null) { |
3403 _json["fingerprint"] = fingerprint; | 3548 _json["fingerprint"] = fingerprint; |
3404 } | 3549 } |
3405 if (folderId != null) { | 3550 if (folderId != null) { |
3406 _json["folderId"] = folderId; | 3551 _json["folderId"] = folderId; |
3407 } | 3552 } |
3408 if (name != null) { | 3553 if (name != null) { |
3409 _json["name"] = name; | 3554 _json["name"] = name; |
3410 } | 3555 } |
3411 return _json; | 3556 return _json; |
3412 } | 3557 } |
3413 } | 3558 } |
3414 | 3559 |
3415 /** Represents a Google Tag Manager Folder's contents. */ | 3560 /// Represents a Google Tag Manager Folder's contents. |
3416 class FolderEntities { | 3561 class FolderEntities { |
3417 /** The list of tags inside the folder. */ | 3562 /// The list of tags inside the folder. |
3418 core.List<Tag> tag; | 3563 core.List<Tag> tag; |
3419 /** The list of triggers inside the folder. */ | 3564 |
| 3565 /// The list of triggers inside the folder. |
3420 core.List<Trigger> trigger; | 3566 core.List<Trigger> trigger; |
3421 /** The list of variables inside the folder. */ | 3567 |
| 3568 /// The list of variables inside the folder. |
3422 core.List<Variable> variable; | 3569 core.List<Variable> variable; |
3423 | 3570 |
3424 FolderEntities(); | 3571 FolderEntities(); |
3425 | 3572 |
3426 FolderEntities.fromJson(core.Map _json) { | 3573 FolderEntities.fromJson(core.Map _json) { |
3427 if (_json.containsKey("tag")) { | 3574 if (_json.containsKey("tag")) { |
3428 tag = _json["tag"].map((value) => new Tag.fromJson(value)).toList(); | 3575 tag = _json["tag"].map((value) => new Tag.fromJson(value)).toList(); |
3429 } | 3576 } |
3430 if (_json.containsKey("trigger")) { | 3577 if (_json.containsKey("trigger")) { |
3431 trigger = _json["trigger"].map((value) => new Trigger.fromJson(value)).toL
ist(); | 3578 trigger = |
| 3579 _json["trigger"].map((value) => new Trigger.fromJson(value)).toList(); |
3432 } | 3580 } |
3433 if (_json.containsKey("variable")) { | 3581 if (_json.containsKey("variable")) { |
3434 variable = _json["variable"].map((value) => new Variable.fromJson(value)).
toList(); | 3582 variable = _json["variable"] |
| 3583 .map((value) => new Variable.fromJson(value)) |
| 3584 .toList(); |
3435 } | 3585 } |
3436 } | 3586 } |
3437 | 3587 |
3438 core.Map<core.String, core.Object> toJson() { | 3588 core.Map<core.String, core.Object> toJson() { |
3439 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3589 final core.Map<core.String, core.Object> _json = |
| 3590 new core.Map<core.String, core.Object>(); |
3440 if (tag != null) { | 3591 if (tag != null) { |
3441 _json["tag"] = tag.map((value) => (value).toJson()).toList(); | 3592 _json["tag"] = tag.map((value) => (value).toJson()).toList(); |
3442 } | 3593 } |
3443 if (trigger != null) { | 3594 if (trigger != null) { |
3444 _json["trigger"] = trigger.map((value) => (value).toJson()).toList(); | 3595 _json["trigger"] = trigger.map((value) => (value).toJson()).toList(); |
3445 } | 3596 } |
3446 if (variable != null) { | 3597 if (variable != null) { |
3447 _json["variable"] = variable.map((value) => (value).toJson()).toList(); | 3598 _json["variable"] = variable.map((value) => (value).toJson()).toList(); |
3448 } | 3599 } |
3449 return _json; | 3600 return _json; |
3450 } | 3601 } |
3451 } | 3602 } |
3452 | 3603 |
3453 /** List AccountUsers Response. */ | 3604 /// List AccountUsers Response. |
3454 class ListAccountUsersResponse { | 3605 class ListAccountUsersResponse { |
3455 /** All GTM AccountUsers of a GTM Account. */ | 3606 /// All GTM AccountUsers of a GTM Account. |
3456 core.List<UserAccess> userAccess; | 3607 core.List<UserAccess> userAccess; |
3457 | 3608 |
3458 ListAccountUsersResponse(); | 3609 ListAccountUsersResponse(); |
3459 | 3610 |
3460 ListAccountUsersResponse.fromJson(core.Map _json) { | 3611 ListAccountUsersResponse.fromJson(core.Map _json) { |
3461 if (_json.containsKey("userAccess")) { | 3612 if (_json.containsKey("userAccess")) { |
3462 userAccess = _json["userAccess"].map((value) => new UserAccess.fromJson(va
lue)).toList(); | 3613 userAccess = _json["userAccess"] |
| 3614 .map((value) => new UserAccess.fromJson(value)) |
| 3615 .toList(); |
3463 } | 3616 } |
3464 } | 3617 } |
3465 | 3618 |
3466 core.Map<core.String, core.Object> toJson() { | 3619 core.Map<core.String, core.Object> toJson() { |
3467 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3620 final core.Map<core.String, core.Object> _json = |
| 3621 new core.Map<core.String, core.Object>(); |
3468 if (userAccess != null) { | 3622 if (userAccess != null) { |
3469 _json["userAccess"] = userAccess.map((value) => (value).toJson()).toList()
; | 3623 _json["userAccess"] = |
| 3624 userAccess.map((value) => (value).toJson()).toList(); |
3470 } | 3625 } |
3471 return _json; | 3626 return _json; |
3472 } | 3627 } |
3473 } | 3628 } |
3474 | 3629 |
3475 /** List Accounts Response. */ | 3630 /// List Accounts Response. |
3476 class ListAccountsResponse { | 3631 class ListAccountsResponse { |
3477 /** List of GTM Accounts that a user has access to. */ | 3632 /// List of GTM Accounts that a user has access to. |
3478 core.List<Account> accounts; | 3633 core.List<Account> accounts; |
3479 | 3634 |
3480 ListAccountsResponse(); | 3635 ListAccountsResponse(); |
3481 | 3636 |
3482 ListAccountsResponse.fromJson(core.Map _json) { | 3637 ListAccountsResponse.fromJson(core.Map _json) { |
3483 if (_json.containsKey("accounts")) { | 3638 if (_json.containsKey("accounts")) { |
3484 accounts = _json["accounts"].map((value) => new Account.fromJson(value)).t
oList(); | 3639 accounts = _json["accounts"] |
| 3640 .map((value) => new Account.fromJson(value)) |
| 3641 .toList(); |
3485 } | 3642 } |
3486 } | 3643 } |
3487 | 3644 |
3488 core.Map<core.String, core.Object> toJson() { | 3645 core.Map<core.String, core.Object> toJson() { |
3489 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3646 final core.Map<core.String, core.Object> _json = |
| 3647 new core.Map<core.String, core.Object>(); |
3490 if (accounts != null) { | 3648 if (accounts != null) { |
3491 _json["accounts"] = accounts.map((value) => (value).toJson()).toList(); | 3649 _json["accounts"] = accounts.map((value) => (value).toJson()).toList(); |
3492 } | 3650 } |
3493 return _json; | 3651 return _json; |
3494 } | 3652 } |
3495 } | 3653 } |
3496 | 3654 |
3497 /** List container versions response. */ | 3655 /// List container versions response. |
3498 class ListContainerVersionsResponse { | 3656 class ListContainerVersionsResponse { |
3499 /** All versions of a GTM Container. */ | 3657 /// All versions of a GTM Container. |
3500 core.List<ContainerVersion> containerVersion; | 3658 core.List<ContainerVersion> containerVersion; |
3501 /** All container version headers of a GTM Container. */ | 3659 |
| 3660 /// All container version headers of a GTM Container. |
3502 core.List<ContainerVersionHeader> containerVersionHeader; | 3661 core.List<ContainerVersionHeader> containerVersionHeader; |
3503 | 3662 |
3504 ListContainerVersionsResponse(); | 3663 ListContainerVersionsResponse(); |
3505 | 3664 |
3506 ListContainerVersionsResponse.fromJson(core.Map _json) { | 3665 ListContainerVersionsResponse.fromJson(core.Map _json) { |
3507 if (_json.containsKey("containerVersion")) { | 3666 if (_json.containsKey("containerVersion")) { |
3508 containerVersion = _json["containerVersion"].map((value) => new ContainerV
ersion.fromJson(value)).toList(); | 3667 containerVersion = _json["containerVersion"] |
| 3668 .map((value) => new ContainerVersion.fromJson(value)) |
| 3669 .toList(); |
3509 } | 3670 } |
3510 if (_json.containsKey("containerVersionHeader")) { | 3671 if (_json.containsKey("containerVersionHeader")) { |
3511 containerVersionHeader = _json["containerVersionHeader"].map((value) => ne
w ContainerVersionHeader.fromJson(value)).toList(); | 3672 containerVersionHeader = _json["containerVersionHeader"] |
| 3673 .map((value) => new ContainerVersionHeader.fromJson(value)) |
| 3674 .toList(); |
3512 } | 3675 } |
3513 } | 3676 } |
3514 | 3677 |
3515 core.Map<core.String, core.Object> toJson() { | 3678 core.Map<core.String, core.Object> toJson() { |
3516 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3679 final core.Map<core.String, core.Object> _json = |
| 3680 new core.Map<core.String, core.Object>(); |
3517 if (containerVersion != null) { | 3681 if (containerVersion != null) { |
3518 _json["containerVersion"] = containerVersion.map((value) => (value).toJson
()).toList(); | 3682 _json["containerVersion"] = |
| 3683 containerVersion.map((value) => (value).toJson()).toList(); |
3519 } | 3684 } |
3520 if (containerVersionHeader != null) { | 3685 if (containerVersionHeader != null) { |
3521 _json["containerVersionHeader"] = containerVersionHeader.map((value) => (v
alue).toJson()).toList(); | 3686 _json["containerVersionHeader"] = |
| 3687 containerVersionHeader.map((value) => (value).toJson()).toList(); |
3522 } | 3688 } |
3523 return _json; | 3689 return _json; |
3524 } | 3690 } |
3525 } | 3691 } |
3526 | 3692 |
3527 /** List Containers Response. */ | 3693 /// List Containers Response. |
3528 class ListContainersResponse { | 3694 class ListContainersResponse { |
3529 /** All Containers of a GTM Account. */ | 3695 /// All Containers of a GTM Account. |
3530 core.List<Container> containers; | 3696 core.List<Container> containers; |
3531 | 3697 |
3532 ListContainersResponse(); | 3698 ListContainersResponse(); |
3533 | 3699 |
3534 ListContainersResponse.fromJson(core.Map _json) { | 3700 ListContainersResponse.fromJson(core.Map _json) { |
3535 if (_json.containsKey("containers")) { | 3701 if (_json.containsKey("containers")) { |
3536 containers = _json["containers"].map((value) => new Container.fromJson(val
ue)).toList(); | 3702 containers = _json["containers"] |
| 3703 .map((value) => new Container.fromJson(value)) |
| 3704 .toList(); |
3537 } | 3705 } |
3538 } | 3706 } |
3539 | 3707 |
3540 core.Map<core.String, core.Object> toJson() { | 3708 core.Map<core.String, core.Object> toJson() { |
3541 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3709 final core.Map<core.String, core.Object> _json = |
| 3710 new core.Map<core.String, core.Object>(); |
3542 if (containers != null) { | 3711 if (containers != null) { |
3543 _json["containers"] = containers.map((value) => (value).toJson()).toList()
; | 3712 _json["containers"] = |
| 3713 containers.map((value) => (value).toJson()).toList(); |
3544 } | 3714 } |
3545 return _json; | 3715 return _json; |
3546 } | 3716 } |
3547 } | 3717 } |
3548 | 3718 |
3549 /** List Environments Response. */ | 3719 /// List Environments Response. |
3550 class ListEnvironmentsResponse { | 3720 class ListEnvironmentsResponse { |
3551 /** All Environments of a GTM Container. */ | 3721 /// All Environments of a GTM Container. |
3552 core.List<Environment> environments; | 3722 core.List<Environment> environments; |
3553 | 3723 |
3554 ListEnvironmentsResponse(); | 3724 ListEnvironmentsResponse(); |
3555 | 3725 |
3556 ListEnvironmentsResponse.fromJson(core.Map _json) { | 3726 ListEnvironmentsResponse.fromJson(core.Map _json) { |
3557 if (_json.containsKey("environments")) { | 3727 if (_json.containsKey("environments")) { |
3558 environments = _json["environments"].map((value) => new Environment.fromJs
on(value)).toList(); | 3728 environments = _json["environments"] |
| 3729 .map((value) => new Environment.fromJson(value)) |
| 3730 .toList(); |
3559 } | 3731 } |
3560 } | 3732 } |
3561 | 3733 |
3562 core.Map<core.String, core.Object> toJson() { | 3734 core.Map<core.String, core.Object> toJson() { |
3563 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3735 final core.Map<core.String, core.Object> _json = |
| 3736 new core.Map<core.String, core.Object>(); |
3564 if (environments != null) { | 3737 if (environments != null) { |
3565 _json["environments"] = environments.map((value) => (value).toJson()).toLi
st(); | 3738 _json["environments"] = |
| 3739 environments.map((value) => (value).toJson()).toList(); |
3566 } | 3740 } |
3567 return _json; | 3741 return _json; |
3568 } | 3742 } |
3569 } | 3743 } |
3570 | 3744 |
3571 /** List Folders Response. */ | 3745 /// List Folders Response. |
3572 class ListFoldersResponse { | 3746 class ListFoldersResponse { |
3573 /** All GTM Folders of a GTM Container. */ | 3747 /// All GTM Folders of a GTM Container. |
3574 core.List<Folder> folders; | 3748 core.List<Folder> folders; |
3575 | 3749 |
3576 ListFoldersResponse(); | 3750 ListFoldersResponse(); |
3577 | 3751 |
3578 ListFoldersResponse.fromJson(core.Map _json) { | 3752 ListFoldersResponse.fromJson(core.Map _json) { |
3579 if (_json.containsKey("folders")) { | 3753 if (_json.containsKey("folders")) { |
3580 folders = _json["folders"].map((value) => new Folder.fromJson(value)).toLi
st(); | 3754 folders = |
| 3755 _json["folders"].map((value) => new Folder.fromJson(value)).toList(); |
3581 } | 3756 } |
3582 } | 3757 } |
3583 | 3758 |
3584 core.Map<core.String, core.Object> toJson() { | 3759 core.Map<core.String, core.Object> toJson() { |
3585 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3760 final core.Map<core.String, core.Object> _json = |
| 3761 new core.Map<core.String, core.Object>(); |
3586 if (folders != null) { | 3762 if (folders != null) { |
3587 _json["folders"] = folders.map((value) => (value).toJson()).toList(); | 3763 _json["folders"] = folders.map((value) => (value).toJson()).toList(); |
3588 } | 3764 } |
3589 return _json; | 3765 return _json; |
3590 } | 3766 } |
3591 } | 3767 } |
3592 | 3768 |
3593 /** List Tags Response. */ | 3769 /// List Tags Response. |
3594 class ListTagsResponse { | 3770 class ListTagsResponse { |
3595 /** All GTM Tags of a GTM Container. */ | 3771 /// All GTM Tags of a GTM Container. |
3596 core.List<Tag> tags; | 3772 core.List<Tag> tags; |
3597 | 3773 |
3598 ListTagsResponse(); | 3774 ListTagsResponse(); |
3599 | 3775 |
3600 ListTagsResponse.fromJson(core.Map _json) { | 3776 ListTagsResponse.fromJson(core.Map _json) { |
3601 if (_json.containsKey("tags")) { | 3777 if (_json.containsKey("tags")) { |
3602 tags = _json["tags"].map((value) => new Tag.fromJson(value)).toList(); | 3778 tags = _json["tags"].map((value) => new Tag.fromJson(value)).toList(); |
3603 } | 3779 } |
3604 } | 3780 } |
3605 | 3781 |
3606 core.Map<core.String, core.Object> toJson() { | 3782 core.Map<core.String, core.Object> toJson() { |
3607 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3783 final core.Map<core.String, core.Object> _json = |
| 3784 new core.Map<core.String, core.Object>(); |
3608 if (tags != null) { | 3785 if (tags != null) { |
3609 _json["tags"] = tags.map((value) => (value).toJson()).toList(); | 3786 _json["tags"] = tags.map((value) => (value).toJson()).toList(); |
3610 } | 3787 } |
3611 return _json; | 3788 return _json; |
3612 } | 3789 } |
3613 } | 3790 } |
3614 | 3791 |
3615 /** List triggers response. */ | 3792 /// List triggers response. |
3616 class ListTriggersResponse { | 3793 class ListTriggersResponse { |
3617 /** All GTM Triggers of a GTM Container. */ | 3794 /// All GTM Triggers of a GTM Container. |
3618 core.List<Trigger> triggers; | 3795 core.List<Trigger> triggers; |
3619 | 3796 |
3620 ListTriggersResponse(); | 3797 ListTriggersResponse(); |
3621 | 3798 |
3622 ListTriggersResponse.fromJson(core.Map _json) { | 3799 ListTriggersResponse.fromJson(core.Map _json) { |
3623 if (_json.containsKey("triggers")) { | 3800 if (_json.containsKey("triggers")) { |
3624 triggers = _json["triggers"].map((value) => new Trigger.fromJson(value)).t
oList(); | 3801 triggers = _json["triggers"] |
| 3802 .map((value) => new Trigger.fromJson(value)) |
| 3803 .toList(); |
3625 } | 3804 } |
3626 } | 3805 } |
3627 | 3806 |
3628 core.Map<core.String, core.Object> toJson() { | 3807 core.Map<core.String, core.Object> toJson() { |
3629 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3808 final core.Map<core.String, core.Object> _json = |
| 3809 new core.Map<core.String, core.Object>(); |
3630 if (triggers != null) { | 3810 if (triggers != null) { |
3631 _json["triggers"] = triggers.map((value) => (value).toJson()).toList(); | 3811 _json["triggers"] = triggers.map((value) => (value).toJson()).toList(); |
3632 } | 3812 } |
3633 return _json; | 3813 return _json; |
3634 } | 3814 } |
3635 } | 3815 } |
3636 | 3816 |
3637 /** List Variables Response. */ | 3817 /// List Variables Response. |
3638 class ListVariablesResponse { | 3818 class ListVariablesResponse { |
3639 /** All GTM Variables of a GTM Container. */ | 3819 /// All GTM Variables of a GTM Container. |
3640 core.List<Variable> variables; | 3820 core.List<Variable> variables; |
3641 | 3821 |
3642 ListVariablesResponse(); | 3822 ListVariablesResponse(); |
3643 | 3823 |
3644 ListVariablesResponse.fromJson(core.Map _json) { | 3824 ListVariablesResponse.fromJson(core.Map _json) { |
3645 if (_json.containsKey("variables")) { | 3825 if (_json.containsKey("variables")) { |
3646 variables = _json["variables"].map((value) => new Variable.fromJson(value)
).toList(); | 3826 variables = _json["variables"] |
| 3827 .map((value) => new Variable.fromJson(value)) |
| 3828 .toList(); |
3647 } | 3829 } |
3648 } | 3830 } |
3649 | 3831 |
3650 core.Map<core.String, core.Object> toJson() { | 3832 core.Map<core.String, core.Object> toJson() { |
3651 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3833 final core.Map<core.String, core.Object> _json = |
| 3834 new core.Map<core.String, core.Object>(); |
3652 if (variables != null) { | 3835 if (variables != null) { |
3653 _json["variables"] = variables.map((value) => (value).toJson()).toList(); | 3836 _json["variables"] = variables.map((value) => (value).toJson()).toList(); |
3654 } | 3837 } |
3655 return _json; | 3838 return _json; |
3656 } | 3839 } |
3657 } | 3840 } |
3658 | 3841 |
3659 /** Represents a Google Tag Manager Macro. */ | 3842 /// Represents a Google Tag Manager Macro. |
3660 class Macro { | 3843 class Macro { |
3661 /** GTM Account ID. */ | 3844 /// GTM Account ID. |
3662 core.String accountId; | 3845 core.String accountId; |
3663 /** GTM Container ID. */ | 3846 |
| 3847 /// GTM Container ID. |
3664 core.String containerId; | 3848 core.String containerId; |
3665 /** | 3849 |
3666 * For mobile containers only: A list of rule IDs for disabling conditional | 3850 /// For mobile containers only: A list of rule IDs for disabling conditional |
3667 * macros; the macro is enabled if one of the enabling rules is true while all | 3851 /// macros; the macro is enabled if one of the enabling rules is true while |
3668 * the disabling rules are false. Treated as an unordered set. | 3852 /// all the disabling rules are false. Treated as an unordered set. |
3669 */ | |
3670 core.List<core.String> disablingRuleId; | 3853 core.List<core.String> disablingRuleId; |
3671 /** | 3854 |
3672 * For mobile containers only: A list of rule IDs for enabling conditional | 3855 /// For mobile containers only: A list of rule IDs for enabling conditional |
3673 * macros; the macro is enabled if one of the enabling rules is true while all | 3856 /// macros; the macro is enabled if one of the enabling rules is true while |
3674 * the disabling rules are false. Treated as an unordered set. | 3857 /// all the disabling rules are false. Treated as an unordered set. |
3675 */ | |
3676 core.List<core.String> enablingRuleId; | 3858 core.List<core.String> enablingRuleId; |
3677 /** | 3859 |
3678 * The fingerprint of the GTM Macro as computed at storage time. This value is | 3860 /// The fingerprint of the GTM Macro as computed at storage time. This value |
3679 * recomputed whenever the macro is modified. | 3861 /// is recomputed whenever the macro is modified. |
3680 */ | |
3681 core.String fingerprint; | 3862 core.String fingerprint; |
3682 /** The Macro ID uniquely identifies the GTM Macro. */ | 3863 |
| 3864 /// The Macro ID uniquely identifies the GTM Macro. |
3683 core.String macroId; | 3865 core.String macroId; |
3684 /** Macro display name. */ | 3866 |
| 3867 /// Macro display name. |
3685 core.String name; | 3868 core.String name; |
3686 /** User notes on how to apply this macro in the container. */ | 3869 |
| 3870 /// User notes on how to apply this macro in the container. |
3687 core.String notes; | 3871 core.String notes; |
3688 /** The macro's parameters. */ | 3872 |
| 3873 /// The macro's parameters. |
3689 core.List<Parameter> parameter; | 3874 core.List<Parameter> parameter; |
3690 /** Parent folder id. */ | 3875 |
| 3876 /// Parent folder id. |
3691 core.String parentFolderId; | 3877 core.String parentFolderId; |
3692 /** The end timestamp in milliseconds to schedule a macro. */ | 3878 |
| 3879 /// The end timestamp in milliseconds to schedule a macro. |
3693 core.String scheduleEndMs; | 3880 core.String scheduleEndMs; |
3694 /** The start timestamp in milliseconds to schedule a macro. */ | 3881 |
| 3882 /// The start timestamp in milliseconds to schedule a macro. |
3695 core.String scheduleStartMs; | 3883 core.String scheduleStartMs; |
3696 /** GTM Macro Type. */ | 3884 |
| 3885 /// GTM Macro Type. |
3697 core.String type; | 3886 core.String type; |
3698 | 3887 |
3699 Macro(); | 3888 Macro(); |
3700 | 3889 |
3701 Macro.fromJson(core.Map _json) { | 3890 Macro.fromJson(core.Map _json) { |
3702 if (_json.containsKey("accountId")) { | 3891 if (_json.containsKey("accountId")) { |
3703 accountId = _json["accountId"]; | 3892 accountId = _json["accountId"]; |
3704 } | 3893 } |
3705 if (_json.containsKey("containerId")) { | 3894 if (_json.containsKey("containerId")) { |
3706 containerId = _json["containerId"]; | 3895 containerId = _json["containerId"]; |
(...skipping 10 matching lines...) Expand all Loading... |
3717 if (_json.containsKey("macroId")) { | 3906 if (_json.containsKey("macroId")) { |
3718 macroId = _json["macroId"]; | 3907 macroId = _json["macroId"]; |
3719 } | 3908 } |
3720 if (_json.containsKey("name")) { | 3909 if (_json.containsKey("name")) { |
3721 name = _json["name"]; | 3910 name = _json["name"]; |
3722 } | 3911 } |
3723 if (_json.containsKey("notes")) { | 3912 if (_json.containsKey("notes")) { |
3724 notes = _json["notes"]; | 3913 notes = _json["notes"]; |
3725 } | 3914 } |
3726 if (_json.containsKey("parameter")) { | 3915 if (_json.containsKey("parameter")) { |
3727 parameter = _json["parameter"].map((value) => new Parameter.fromJson(value
)).toList(); | 3916 parameter = _json["parameter"] |
| 3917 .map((value) => new Parameter.fromJson(value)) |
| 3918 .toList(); |
3728 } | 3919 } |
3729 if (_json.containsKey("parentFolderId")) { | 3920 if (_json.containsKey("parentFolderId")) { |
3730 parentFolderId = _json["parentFolderId"]; | 3921 parentFolderId = _json["parentFolderId"]; |
3731 } | 3922 } |
3732 if (_json.containsKey("scheduleEndMs")) { | 3923 if (_json.containsKey("scheduleEndMs")) { |
3733 scheduleEndMs = _json["scheduleEndMs"]; | 3924 scheduleEndMs = _json["scheduleEndMs"]; |
3734 } | 3925 } |
3735 if (_json.containsKey("scheduleStartMs")) { | 3926 if (_json.containsKey("scheduleStartMs")) { |
3736 scheduleStartMs = _json["scheduleStartMs"]; | 3927 scheduleStartMs = _json["scheduleStartMs"]; |
3737 } | 3928 } |
3738 if (_json.containsKey("type")) { | 3929 if (_json.containsKey("type")) { |
3739 type = _json["type"]; | 3930 type = _json["type"]; |
3740 } | 3931 } |
3741 } | 3932 } |
3742 | 3933 |
3743 core.Map<core.String, core.Object> toJson() { | 3934 core.Map<core.String, core.Object> toJson() { |
3744 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3935 final core.Map<core.String, core.Object> _json = |
| 3936 new core.Map<core.String, core.Object>(); |
3745 if (accountId != null) { | 3937 if (accountId != null) { |
3746 _json["accountId"] = accountId; | 3938 _json["accountId"] = accountId; |
3747 } | 3939 } |
3748 if (containerId != null) { | 3940 if (containerId != null) { |
3749 _json["containerId"] = containerId; | 3941 _json["containerId"] = containerId; |
3750 } | 3942 } |
3751 if (disablingRuleId != null) { | 3943 if (disablingRuleId != null) { |
3752 _json["disablingRuleId"] = disablingRuleId; | 3944 _json["disablingRuleId"] = disablingRuleId; |
3753 } | 3945 } |
3754 if (enablingRuleId != null) { | 3946 if (enablingRuleId != null) { |
(...skipping 23 matching lines...) Expand all Loading... |
3778 if (scheduleStartMs != null) { | 3970 if (scheduleStartMs != null) { |
3779 _json["scheduleStartMs"] = scheduleStartMs; | 3971 _json["scheduleStartMs"] = scheduleStartMs; |
3780 } | 3972 } |
3781 if (type != null) { | 3973 if (type != null) { |
3782 _json["type"] = type; | 3974 _json["type"] = type; |
3783 } | 3975 } |
3784 return _json; | 3976 return _json; |
3785 } | 3977 } |
3786 } | 3978 } |
3787 | 3979 |
3788 /** Represents a Google Tag Manager Parameter. */ | 3980 /// Represents a Google Tag Manager Parameter. |
3789 class Parameter { | 3981 class Parameter { |
3790 /** | 3982 /// The named key that uniquely identifies a parameter. Required for |
3791 * The named key that uniquely identifies a parameter. Required for top-level | 3983 /// top-level parameters, as well as map values. Ignored for list values. |
3792 * parameters, as well as map values. Ignored for list values. | |
3793 */ | |
3794 core.String key; | 3984 core.String key; |
3795 /** This list parameter's parameters (keys will be ignored). */ | 3985 |
| 3986 /// This list parameter's parameters (keys will be ignored). |
3796 core.List<Parameter> list; | 3987 core.List<Parameter> list; |
3797 /** This map parameter's parameters (must have keys; keys must be unique). */ | 3988 |
| 3989 /// This map parameter's parameters (must have keys; keys must be unique). |
3798 core.List<Parameter> map; | 3990 core.List<Parameter> map; |
3799 /** | 3991 |
3800 * The parameter type. Valid values are: | 3992 /// The parameter type. Valid values are: |
3801 * - boolean: The value represents a boolean, represented as 'true' or 'false' | 3993 /// - boolean: The value represents a boolean, represented as 'true' or |
3802 * - integer: The value represents a 64-bit signed integer value, in base 10 | 3994 /// 'false' |
3803 * - list: A list of parameters should be specified | 3995 /// - integer: The value represents a 64-bit signed integer value, in base 10 |
3804 * - map: A map of parameters should be specified | 3996 /// - list: A list of parameters should be specified |
3805 * - template: The value represents any text; this can include variable | 3997 /// - map: A map of parameters should be specified |
3806 * references (even variable references that might return non-string types) | 3998 /// - template: The value represents any text; this can include variable |
3807 * Possible string values are: | 3999 /// references (even variable references that might return non-string types) |
3808 * - "boolean" | 4000 /// Possible string values are: |
3809 * - "integer" | 4001 /// - "boolean" |
3810 * - "list" | 4002 /// - "integer" |
3811 * - "map" | 4003 /// - "list" |
3812 * - "template" | 4004 /// - "map" |
3813 */ | 4005 /// - "template" |
3814 core.String type; | 4006 core.String type; |
3815 /** | 4007 |
3816 * A parameter's value (may contain variable references such as | 4008 /// A parameter's value (may contain variable references such as |
3817 * "{{myVariable}}") as appropriate to the specified type. | 4009 /// "{{myVariable}}") as appropriate to the specified type. |
3818 */ | |
3819 core.String value; | 4010 core.String value; |
3820 | 4011 |
3821 Parameter(); | 4012 Parameter(); |
3822 | 4013 |
3823 Parameter.fromJson(core.Map _json) { | 4014 Parameter.fromJson(core.Map _json) { |
3824 if (_json.containsKey("key")) { | 4015 if (_json.containsKey("key")) { |
3825 key = _json["key"]; | 4016 key = _json["key"]; |
3826 } | 4017 } |
3827 if (_json.containsKey("list")) { | 4018 if (_json.containsKey("list")) { |
3828 list = _json["list"].map((value) => new Parameter.fromJson(value)).toList(
); | 4019 list = |
| 4020 _json["list"].map((value) => new Parameter.fromJson(value)).toList(); |
3829 } | 4021 } |
3830 if (_json.containsKey("map")) { | 4022 if (_json.containsKey("map")) { |
3831 map = _json["map"].map((value) => new Parameter.fromJson(value)).toList(); | 4023 map = _json["map"].map((value) => new Parameter.fromJson(value)).toList(); |
3832 } | 4024 } |
3833 if (_json.containsKey("type")) { | 4025 if (_json.containsKey("type")) { |
3834 type = _json["type"]; | 4026 type = _json["type"]; |
3835 } | 4027 } |
3836 if (_json.containsKey("value")) { | 4028 if (_json.containsKey("value")) { |
3837 value = _json["value"]; | 4029 value = _json["value"]; |
3838 } | 4030 } |
3839 } | 4031 } |
3840 | 4032 |
3841 core.Map<core.String, core.Object> toJson() { | 4033 core.Map<core.String, core.Object> toJson() { |
3842 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4034 final core.Map<core.String, core.Object> _json = |
| 4035 new core.Map<core.String, core.Object>(); |
3843 if (key != null) { | 4036 if (key != null) { |
3844 _json["key"] = key; | 4037 _json["key"] = key; |
3845 } | 4038 } |
3846 if (list != null) { | 4039 if (list != null) { |
3847 _json["list"] = list.map((value) => (value).toJson()).toList(); | 4040 _json["list"] = list.map((value) => (value).toJson()).toList(); |
3848 } | 4041 } |
3849 if (map != null) { | 4042 if (map != null) { |
3850 _json["map"] = map.map((value) => (value).toJson()).toList(); | 4043 _json["map"] = map.map((value) => (value).toJson()).toList(); |
3851 } | 4044 } |
3852 if (type != null) { | 4045 if (type != null) { |
3853 _json["type"] = type; | 4046 _json["type"] = type; |
3854 } | 4047 } |
3855 if (value != null) { | 4048 if (value != null) { |
3856 _json["value"] = value; | 4049 _json["value"] = value; |
3857 } | 4050 } |
3858 return _json; | 4051 return _json; |
3859 } | 4052 } |
3860 } | 4053 } |
3861 | 4054 |
3862 /** Publish container version response. */ | 4055 /// Publish container version response. |
3863 class PublishContainerVersionResponse { | 4056 class PublishContainerVersionResponse { |
3864 /** Compiler errors or not. */ | 4057 /// Compiler errors or not. |
3865 core.bool compilerError; | 4058 core.bool compilerError; |
3866 /** The container version created. */ | 4059 |
| 4060 /// The container version created. |
3867 ContainerVersion containerVersion; | 4061 ContainerVersion containerVersion; |
3868 | 4062 |
3869 PublishContainerVersionResponse(); | 4063 PublishContainerVersionResponse(); |
3870 | 4064 |
3871 PublishContainerVersionResponse.fromJson(core.Map _json) { | 4065 PublishContainerVersionResponse.fromJson(core.Map _json) { |
3872 if (_json.containsKey("compilerError")) { | 4066 if (_json.containsKey("compilerError")) { |
3873 compilerError = _json["compilerError"]; | 4067 compilerError = _json["compilerError"]; |
3874 } | 4068 } |
3875 if (_json.containsKey("containerVersion")) { | 4069 if (_json.containsKey("containerVersion")) { |
3876 containerVersion = new ContainerVersion.fromJson(_json["containerVersion"]
); | 4070 containerVersion = |
| 4071 new ContainerVersion.fromJson(_json["containerVersion"]); |
3877 } | 4072 } |
3878 } | 4073 } |
3879 | 4074 |
3880 core.Map<core.String, core.Object> toJson() { | 4075 core.Map<core.String, core.Object> toJson() { |
3881 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4076 final core.Map<core.String, core.Object> _json = |
| 4077 new core.Map<core.String, core.Object>(); |
3882 if (compilerError != null) { | 4078 if (compilerError != null) { |
3883 _json["compilerError"] = compilerError; | 4079 _json["compilerError"] = compilerError; |
3884 } | 4080 } |
3885 if (containerVersion != null) { | 4081 if (containerVersion != null) { |
3886 _json["containerVersion"] = (containerVersion).toJson(); | 4082 _json["containerVersion"] = (containerVersion).toJson(); |
3887 } | 4083 } |
3888 return _json; | 4084 return _json; |
3889 } | 4085 } |
3890 } | 4086 } |
3891 | 4087 |
3892 /** Represents a Google Tag Manager Rule. */ | 4088 /// Represents a Google Tag Manager Rule. |
3893 class Rule { | 4089 class Rule { |
3894 /** GTM Account ID. */ | 4090 /// GTM Account ID. |
3895 core.String accountId; | 4091 core.String accountId; |
3896 /** | 4092 |
3897 * The list of conditions that make up this rule (implicit AND between them). | 4093 /// The list of conditions that make up this rule (implicit AND between |
3898 */ | 4094 /// them). |
3899 core.List<Condition> condition; | 4095 core.List<Condition> condition; |
3900 /** GTM Container ID. */ | 4096 |
| 4097 /// GTM Container ID. |
3901 core.String containerId; | 4098 core.String containerId; |
3902 /** | 4099 |
3903 * The fingerprint of the GTM Rule as computed at storage time. This value is | 4100 /// The fingerprint of the GTM Rule as computed at storage time. This value |
3904 * recomputed whenever the rule is modified. | 4101 /// is recomputed whenever the rule is modified. |
3905 */ | |
3906 core.String fingerprint; | 4102 core.String fingerprint; |
3907 /** Rule display name. */ | 4103 |
| 4104 /// Rule display name. |
3908 core.String name; | 4105 core.String name; |
3909 /** User notes on how to apply this rule in the container. */ | 4106 |
| 4107 /// User notes on how to apply this rule in the container. |
3910 core.String notes; | 4108 core.String notes; |
3911 /** The Rule ID uniquely identifies the GTM Rule. */ | 4109 |
| 4110 /// The Rule ID uniquely identifies the GTM Rule. |
3912 core.String ruleId; | 4111 core.String ruleId; |
3913 | 4112 |
3914 Rule(); | 4113 Rule(); |
3915 | 4114 |
3916 Rule.fromJson(core.Map _json) { | 4115 Rule.fromJson(core.Map _json) { |
3917 if (_json.containsKey("accountId")) { | 4116 if (_json.containsKey("accountId")) { |
3918 accountId = _json["accountId"]; | 4117 accountId = _json["accountId"]; |
3919 } | 4118 } |
3920 if (_json.containsKey("condition")) { | 4119 if (_json.containsKey("condition")) { |
3921 condition = _json["condition"].map((value) => new Condition.fromJson(value
)).toList(); | 4120 condition = _json["condition"] |
| 4121 .map((value) => new Condition.fromJson(value)) |
| 4122 .toList(); |
3922 } | 4123 } |
3923 if (_json.containsKey("containerId")) { | 4124 if (_json.containsKey("containerId")) { |
3924 containerId = _json["containerId"]; | 4125 containerId = _json["containerId"]; |
3925 } | 4126 } |
3926 if (_json.containsKey("fingerprint")) { | 4127 if (_json.containsKey("fingerprint")) { |
3927 fingerprint = _json["fingerprint"]; | 4128 fingerprint = _json["fingerprint"]; |
3928 } | 4129 } |
3929 if (_json.containsKey("name")) { | 4130 if (_json.containsKey("name")) { |
3930 name = _json["name"]; | 4131 name = _json["name"]; |
3931 } | 4132 } |
3932 if (_json.containsKey("notes")) { | 4133 if (_json.containsKey("notes")) { |
3933 notes = _json["notes"]; | 4134 notes = _json["notes"]; |
3934 } | 4135 } |
3935 if (_json.containsKey("ruleId")) { | 4136 if (_json.containsKey("ruleId")) { |
3936 ruleId = _json["ruleId"]; | 4137 ruleId = _json["ruleId"]; |
3937 } | 4138 } |
3938 } | 4139 } |
3939 | 4140 |
3940 core.Map<core.String, core.Object> toJson() { | 4141 core.Map<core.String, core.Object> toJson() { |
3941 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4142 final core.Map<core.String, core.Object> _json = |
| 4143 new core.Map<core.String, core.Object>(); |
3942 if (accountId != null) { | 4144 if (accountId != null) { |
3943 _json["accountId"] = accountId; | 4145 _json["accountId"] = accountId; |
3944 } | 4146 } |
3945 if (condition != null) { | 4147 if (condition != null) { |
3946 _json["condition"] = condition.map((value) => (value).toJson()).toList(); | 4148 _json["condition"] = condition.map((value) => (value).toJson()).toList(); |
3947 } | 4149 } |
3948 if (containerId != null) { | 4150 if (containerId != null) { |
3949 _json["containerId"] = containerId; | 4151 _json["containerId"] = containerId; |
3950 } | 4152 } |
3951 if (fingerprint != null) { | 4153 if (fingerprint != null) { |
3952 _json["fingerprint"] = fingerprint; | 4154 _json["fingerprint"] = fingerprint; |
3953 } | 4155 } |
3954 if (name != null) { | 4156 if (name != null) { |
3955 _json["name"] = name; | 4157 _json["name"] = name; |
3956 } | 4158 } |
3957 if (notes != null) { | 4159 if (notes != null) { |
3958 _json["notes"] = notes; | 4160 _json["notes"] = notes; |
3959 } | 4161 } |
3960 if (ruleId != null) { | 4162 if (ruleId != null) { |
3961 _json["ruleId"] = ruleId; | 4163 _json["ruleId"] = ruleId; |
3962 } | 4164 } |
3963 return _json; | 4165 return _json; |
3964 } | 4166 } |
3965 } | 4167 } |
3966 | 4168 |
3967 class SetupTag { | 4169 class SetupTag { |
3968 /** | 4170 /// If true, fire the main tag if and only if the setup tag fires |
3969 * If true, fire the main tag if and only if the setup tag fires successfully. | 4171 /// successfully. If false, fire the main tag regardless of setup tag firing |
3970 * If false, fire the main tag regardless of setup tag firing status. | 4172 /// status. |
3971 */ | |
3972 core.bool stopOnSetupFailure; | 4173 core.bool stopOnSetupFailure; |
3973 /** The name of the setup tag. */ | 4174 |
| 4175 /// The name of the setup tag. |
3974 core.String tagName; | 4176 core.String tagName; |
3975 | 4177 |
3976 SetupTag(); | 4178 SetupTag(); |
3977 | 4179 |
3978 SetupTag.fromJson(core.Map _json) { | 4180 SetupTag.fromJson(core.Map _json) { |
3979 if (_json.containsKey("stopOnSetupFailure")) { | 4181 if (_json.containsKey("stopOnSetupFailure")) { |
3980 stopOnSetupFailure = _json["stopOnSetupFailure"]; | 4182 stopOnSetupFailure = _json["stopOnSetupFailure"]; |
3981 } | 4183 } |
3982 if (_json.containsKey("tagName")) { | 4184 if (_json.containsKey("tagName")) { |
3983 tagName = _json["tagName"]; | 4185 tagName = _json["tagName"]; |
3984 } | 4186 } |
3985 } | 4187 } |
3986 | 4188 |
3987 core.Map<core.String, core.Object> toJson() { | 4189 core.Map<core.String, core.Object> toJson() { |
3988 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4190 final core.Map<core.String, core.Object> _json = |
| 4191 new core.Map<core.String, core.Object>(); |
3989 if (stopOnSetupFailure != null) { | 4192 if (stopOnSetupFailure != null) { |
3990 _json["stopOnSetupFailure"] = stopOnSetupFailure; | 4193 _json["stopOnSetupFailure"] = stopOnSetupFailure; |
3991 } | 4194 } |
3992 if (tagName != null) { | 4195 if (tagName != null) { |
3993 _json["tagName"] = tagName; | 4196 _json["tagName"] = tagName; |
3994 } | 4197 } |
3995 return _json; | 4198 return _json; |
3996 } | 4199 } |
3997 } | 4200 } |
3998 | 4201 |
3999 /** Represents a Google Tag Manager Tag. */ | 4202 /// Represents a Google Tag Manager Tag. |
4000 class Tag { | 4203 class Tag { |
4001 /** GTM Account ID. */ | 4204 /// GTM Account ID. |
4002 core.String accountId; | 4205 core.String accountId; |
4003 /** | 4206 |
4004 * Blocking rule IDs. If any of the listed rules evaluate to true, the tag | 4207 /// Blocking rule IDs. If any of the listed rules evaluate to true, the tag |
4005 * will not fire. | 4208 /// will not fire. |
4006 */ | |
4007 core.List<core.String> blockingRuleId; | 4209 core.List<core.String> blockingRuleId; |
4008 /** | 4210 |
4009 * Blocking trigger IDs. If any of the listed triggers evaluate to true, the | 4211 /// Blocking trigger IDs. If any of the listed triggers evaluate to true, the |
4010 * tag will not fire. | 4212 /// tag will not fire. |
4011 */ | |
4012 core.List<core.String> blockingTriggerId; | 4213 core.List<core.String> blockingTriggerId; |
4013 /** GTM Container ID. */ | 4214 |
| 4215 /// GTM Container ID. |
4014 core.String containerId; | 4216 core.String containerId; |
4015 /** | 4217 |
4016 * The fingerprint of the GTM Tag as computed at storage time. This value is | 4218 /// The fingerprint of the GTM Tag as computed at storage time. This value is |
4017 * recomputed whenever the tag is modified. | 4219 /// recomputed whenever the tag is modified. |
4018 */ | |
4019 core.String fingerprint; | 4220 core.String fingerprint; |
4020 /** | 4221 |
4021 * Firing rule IDs. A tag will fire when any of the listed rules are true and | 4222 /// Firing rule IDs. A tag will fire when any of the listed rules are true |
4022 * all of its blockingRuleIds (if any specified) are false. | 4223 /// and all of its blockingRuleIds (if any specified) are false. |
4023 */ | |
4024 core.List<core.String> firingRuleId; | 4224 core.List<core.String> firingRuleId; |
4025 /** | 4225 |
4026 * Firing trigger IDs. A tag will fire when any of the listed triggers are | 4226 /// Firing trigger IDs. A tag will fire when any of the listed triggers are |
4027 * true and all of its blockingTriggerIds (if any specified) are false. | 4227 /// true and all of its blockingTriggerIds (if any specified) are false. |
4028 */ | |
4029 core.List<core.String> firingTriggerId; | 4228 core.List<core.String> firingTriggerId; |
4030 /** | 4229 |
4031 * If set to true, this tag will only fire in the live environment (e.g. not | 4230 /// If set to true, this tag will only fire in the live environment (e.g. not |
4032 * in preview or debug mode). | 4231 /// in preview or debug mode). |
4033 */ | |
4034 core.bool liveOnly; | 4232 core.bool liveOnly; |
4035 /** Tag display name. */ | 4233 |
| 4234 /// Tag display name. |
4036 core.String name; | 4235 core.String name; |
4037 /** User notes on how to apply this tag in the container. */ | 4236 |
| 4237 /// User notes on how to apply this tag in the container. |
4038 core.String notes; | 4238 core.String notes; |
4039 /** The tag's parameters. */ | 4239 |
| 4240 /// The tag's parameters. |
4040 core.List<Parameter> parameter; | 4241 core.List<Parameter> parameter; |
4041 /** Parent folder id. */ | 4242 |
| 4243 /// Parent folder id. |
4042 core.String parentFolderId; | 4244 core.String parentFolderId; |
4043 /** | 4245 |
4044 * User defined numeric priority of the tag. Tags are fired asynchronously in | 4246 /// User defined numeric priority of the tag. Tags are fired asynchronously |
4045 * order of priority. Tags with higher numeric value fire first. A tag's | 4247 /// in order of priority. Tags with higher numeric value fire first. A tag's |
4046 * priority can be a positive or negative value. The default value is 0. | 4248 /// priority can be a positive or negative value. The default value is 0. |
4047 */ | |
4048 Parameter priority; | 4249 Parameter priority; |
4049 /** The end timestamp in milliseconds to schedule a tag. */ | 4250 |
| 4251 /// The end timestamp in milliseconds to schedule a tag. |
4050 core.String scheduleEndMs; | 4252 core.String scheduleEndMs; |
4051 /** The start timestamp in milliseconds to schedule a tag. */ | 4253 |
| 4254 /// The start timestamp in milliseconds to schedule a tag. |
4052 core.String scheduleStartMs; | 4255 core.String scheduleStartMs; |
4053 /** The list of setup tags. Currently we only allow one. */ | 4256 |
| 4257 /// The list of setup tags. Currently we only allow one. |
4054 core.List<SetupTag> setupTag; | 4258 core.List<SetupTag> setupTag; |
4055 /** | 4259 |
4056 * Option to fire this tag. | 4260 /// Option to fire this tag. |
4057 * Possible string values are: | 4261 /// Possible string values are: |
4058 * - "oncePerEvent" | 4262 /// - "oncePerEvent" |
4059 * - "oncePerLoad" | 4263 /// - "oncePerLoad" |
4060 * - "unlimited" | 4264 /// - "unlimited" |
4061 */ | |
4062 core.String tagFiringOption; | 4265 core.String tagFiringOption; |
4063 /** The Tag ID uniquely identifies the GTM Tag. */ | 4266 |
| 4267 /// The Tag ID uniquely identifies the GTM Tag. |
4064 core.String tagId; | 4268 core.String tagId; |
4065 /** The list of teardown tags. Currently we only allow one. */ | 4269 |
| 4270 /// The list of teardown tags. Currently we only allow one. |
4066 core.List<TeardownTag> teardownTag; | 4271 core.List<TeardownTag> teardownTag; |
4067 /** GTM Tag Type. */ | 4272 |
| 4273 /// GTM Tag Type. |
4068 core.String type; | 4274 core.String type; |
4069 | 4275 |
4070 Tag(); | 4276 Tag(); |
4071 | 4277 |
4072 Tag.fromJson(core.Map _json) { | 4278 Tag.fromJson(core.Map _json) { |
4073 if (_json.containsKey("accountId")) { | 4279 if (_json.containsKey("accountId")) { |
4074 accountId = _json["accountId"]; | 4280 accountId = _json["accountId"]; |
4075 } | 4281 } |
4076 if (_json.containsKey("blockingRuleId")) { | 4282 if (_json.containsKey("blockingRuleId")) { |
4077 blockingRuleId = _json["blockingRuleId"]; | 4283 blockingRuleId = _json["blockingRuleId"]; |
(...skipping 16 matching lines...) Expand all Loading... |
4094 if (_json.containsKey("liveOnly")) { | 4300 if (_json.containsKey("liveOnly")) { |
4095 liveOnly = _json["liveOnly"]; | 4301 liveOnly = _json["liveOnly"]; |
4096 } | 4302 } |
4097 if (_json.containsKey("name")) { | 4303 if (_json.containsKey("name")) { |
4098 name = _json["name"]; | 4304 name = _json["name"]; |
4099 } | 4305 } |
4100 if (_json.containsKey("notes")) { | 4306 if (_json.containsKey("notes")) { |
4101 notes = _json["notes"]; | 4307 notes = _json["notes"]; |
4102 } | 4308 } |
4103 if (_json.containsKey("parameter")) { | 4309 if (_json.containsKey("parameter")) { |
4104 parameter = _json["parameter"].map((value) => new Parameter.fromJson(value
)).toList(); | 4310 parameter = _json["parameter"] |
| 4311 .map((value) => new Parameter.fromJson(value)) |
| 4312 .toList(); |
4105 } | 4313 } |
4106 if (_json.containsKey("parentFolderId")) { | 4314 if (_json.containsKey("parentFolderId")) { |
4107 parentFolderId = _json["parentFolderId"]; | 4315 parentFolderId = _json["parentFolderId"]; |
4108 } | 4316 } |
4109 if (_json.containsKey("priority")) { | 4317 if (_json.containsKey("priority")) { |
4110 priority = new Parameter.fromJson(_json["priority"]); | 4318 priority = new Parameter.fromJson(_json["priority"]); |
4111 } | 4319 } |
4112 if (_json.containsKey("scheduleEndMs")) { | 4320 if (_json.containsKey("scheduleEndMs")) { |
4113 scheduleEndMs = _json["scheduleEndMs"]; | 4321 scheduleEndMs = _json["scheduleEndMs"]; |
4114 } | 4322 } |
4115 if (_json.containsKey("scheduleStartMs")) { | 4323 if (_json.containsKey("scheduleStartMs")) { |
4116 scheduleStartMs = _json["scheduleStartMs"]; | 4324 scheduleStartMs = _json["scheduleStartMs"]; |
4117 } | 4325 } |
4118 if (_json.containsKey("setupTag")) { | 4326 if (_json.containsKey("setupTag")) { |
4119 setupTag = _json["setupTag"].map((value) => new SetupTag.fromJson(value)).
toList(); | 4327 setupTag = _json["setupTag"] |
| 4328 .map((value) => new SetupTag.fromJson(value)) |
| 4329 .toList(); |
4120 } | 4330 } |
4121 if (_json.containsKey("tagFiringOption")) { | 4331 if (_json.containsKey("tagFiringOption")) { |
4122 tagFiringOption = _json["tagFiringOption"]; | 4332 tagFiringOption = _json["tagFiringOption"]; |
4123 } | 4333 } |
4124 if (_json.containsKey("tagId")) { | 4334 if (_json.containsKey("tagId")) { |
4125 tagId = _json["tagId"]; | 4335 tagId = _json["tagId"]; |
4126 } | 4336 } |
4127 if (_json.containsKey("teardownTag")) { | 4337 if (_json.containsKey("teardownTag")) { |
4128 teardownTag = _json["teardownTag"].map((value) => new TeardownTag.fromJson
(value)).toList(); | 4338 teardownTag = _json["teardownTag"] |
| 4339 .map((value) => new TeardownTag.fromJson(value)) |
| 4340 .toList(); |
4129 } | 4341 } |
4130 if (_json.containsKey("type")) { | 4342 if (_json.containsKey("type")) { |
4131 type = _json["type"]; | 4343 type = _json["type"]; |
4132 } | 4344 } |
4133 } | 4345 } |
4134 | 4346 |
4135 core.Map<core.String, core.Object> toJson() { | 4347 core.Map<core.String, core.Object> toJson() { |
4136 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4348 final core.Map<core.String, core.Object> _json = |
| 4349 new core.Map<core.String, core.Object>(); |
4137 if (accountId != null) { | 4350 if (accountId != null) { |
4138 _json["accountId"] = accountId; | 4351 _json["accountId"] = accountId; |
4139 } | 4352 } |
4140 if (blockingRuleId != null) { | 4353 if (blockingRuleId != null) { |
4141 _json["blockingRuleId"] = blockingRuleId; | 4354 _json["blockingRuleId"] = blockingRuleId; |
4142 } | 4355 } |
4143 if (blockingTriggerId != null) { | 4356 if (blockingTriggerId != null) { |
4144 _json["blockingTriggerId"] = blockingTriggerId; | 4357 _json["blockingTriggerId"] = blockingTriggerId; |
4145 } | 4358 } |
4146 if (containerId != null) { | 4359 if (containerId != null) { |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4182 if (setupTag != null) { | 4395 if (setupTag != null) { |
4183 _json["setupTag"] = setupTag.map((value) => (value).toJson()).toList(); | 4396 _json["setupTag"] = setupTag.map((value) => (value).toJson()).toList(); |
4184 } | 4397 } |
4185 if (tagFiringOption != null) { | 4398 if (tagFiringOption != null) { |
4186 _json["tagFiringOption"] = tagFiringOption; | 4399 _json["tagFiringOption"] = tagFiringOption; |
4187 } | 4400 } |
4188 if (tagId != null) { | 4401 if (tagId != null) { |
4189 _json["tagId"] = tagId; | 4402 _json["tagId"] = tagId; |
4190 } | 4403 } |
4191 if (teardownTag != null) { | 4404 if (teardownTag != null) { |
4192 _json["teardownTag"] = teardownTag.map((value) => (value).toJson()).toList
(); | 4405 _json["teardownTag"] = |
| 4406 teardownTag.map((value) => (value).toJson()).toList(); |
4193 } | 4407 } |
4194 if (type != null) { | 4408 if (type != null) { |
4195 _json["type"] = type; | 4409 _json["type"] = type; |
4196 } | 4410 } |
4197 return _json; | 4411 return _json; |
4198 } | 4412 } |
4199 } | 4413 } |
4200 | 4414 |
4201 class TeardownTag { | 4415 class TeardownTag { |
4202 /** | 4416 /// If true, fire the teardown tag if and only if the main tag fires |
4203 * If true, fire the teardown tag if and only if the main tag fires | 4417 /// successfully. If false, fire the teardown tag regardless of main tag |
4204 * successfully. If false, fire the teardown tag regardless of main tag firing | 4418 /// firing status. |
4205 * status. | |
4206 */ | |
4207 core.bool stopTeardownOnFailure; | 4419 core.bool stopTeardownOnFailure; |
4208 /** The name of the teardown tag. */ | 4420 |
| 4421 /// The name of the teardown tag. |
4209 core.String tagName; | 4422 core.String tagName; |
4210 | 4423 |
4211 TeardownTag(); | 4424 TeardownTag(); |
4212 | 4425 |
4213 TeardownTag.fromJson(core.Map _json) { | 4426 TeardownTag.fromJson(core.Map _json) { |
4214 if (_json.containsKey("stopTeardownOnFailure")) { | 4427 if (_json.containsKey("stopTeardownOnFailure")) { |
4215 stopTeardownOnFailure = _json["stopTeardownOnFailure"]; | 4428 stopTeardownOnFailure = _json["stopTeardownOnFailure"]; |
4216 } | 4429 } |
4217 if (_json.containsKey("tagName")) { | 4430 if (_json.containsKey("tagName")) { |
4218 tagName = _json["tagName"]; | 4431 tagName = _json["tagName"]; |
4219 } | 4432 } |
4220 } | 4433 } |
4221 | 4434 |
4222 core.Map<core.String, core.Object> toJson() { | 4435 core.Map<core.String, core.Object> toJson() { |
4223 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4436 final core.Map<core.String, core.Object> _json = |
| 4437 new core.Map<core.String, core.Object>(); |
4224 if (stopTeardownOnFailure != null) { | 4438 if (stopTeardownOnFailure != null) { |
4225 _json["stopTeardownOnFailure"] = stopTeardownOnFailure; | 4439 _json["stopTeardownOnFailure"] = stopTeardownOnFailure; |
4226 } | 4440 } |
4227 if (tagName != null) { | 4441 if (tagName != null) { |
4228 _json["tagName"] = tagName; | 4442 _json["tagName"] = tagName; |
4229 } | 4443 } |
4230 return _json; | 4444 return _json; |
4231 } | 4445 } |
4232 } | 4446 } |
4233 | 4447 |
4234 /** Represents a Google Tag Manager Trigger */ | 4448 /// Represents a Google Tag Manager Trigger |
4235 class Trigger { | 4449 class Trigger { |
4236 /** GTM Account ID. */ | 4450 /// GTM Account ID. |
4237 core.String accountId; | 4451 core.String accountId; |
4238 /** Used in the case of auto event tracking. */ | 4452 |
| 4453 /// Used in the case of auto event tracking. |
4239 core.List<Condition> autoEventFilter; | 4454 core.List<Condition> autoEventFilter; |
4240 /** | 4455 |
4241 * Whether or not we should only fire tags if the form submit or link click | 4456 /// Whether or not we should only fire tags if the form submit or link click |
4242 * event is not cancelled by some other event handler (e.g. because of | 4457 /// event is not cancelled by some other event handler (e.g. because of |
4243 * validation). Only valid for Form Submission and Link Click triggers. | 4458 /// validation). Only valid for Form Submission and Link Click triggers. |
4244 */ | |
4245 Parameter checkValidation; | 4459 Parameter checkValidation; |
4246 /** GTM Container ID. */ | 4460 |
| 4461 /// GTM Container ID. |
4247 core.String containerId; | 4462 core.String containerId; |
4248 /** | 4463 |
4249 * Used in the case of custom event, which is fired iff all Conditions are | 4464 /// Used in the case of custom event, which is fired iff all Conditions are |
4250 * true. | 4465 /// true. |
4251 */ | |
4252 core.List<Condition> customEventFilter; | 4466 core.List<Condition> customEventFilter; |
4253 /** | 4467 |
4254 * Reloads the videos in the page that don't already have the YT API enabled. | 4468 /// Reloads the videos in the page that don't already have the YT API |
4255 * If false, only capture events from videos that already have the API | 4469 /// enabled. If false, only capture events from videos that already have the |
4256 * enabled. Only valid for YouTube triggers. | 4470 /// API enabled. Only valid for YouTube triggers. |
4257 */ | |
4258 Parameter enableAllVideos; | 4471 Parameter enableAllVideos; |
4259 /** Name of the GTM event that is fired. Only valid for Timer triggers. */ | 4472 |
| 4473 /// Name of the GTM event that is fired. Only valid for Timer triggers. |
4260 Parameter eventName; | 4474 Parameter eventName; |
4261 /** The trigger will only fire iff all Conditions are true. */ | 4475 |
| 4476 /// The trigger will only fire iff all Conditions are true. |
4262 core.List<Condition> filter; | 4477 core.List<Condition> filter; |
4263 /** | 4478 |
4264 * The fingerprint of the GTM Trigger as computed at storage time. This value | 4479 /// The fingerprint of the GTM Trigger as computed at storage time. This |
4265 * is recomputed whenever the trigger is modified. | 4480 /// value is recomputed whenever the trigger is modified. |
4266 */ | |
4267 core.String fingerprint; | 4481 core.String fingerprint; |
4268 /** | 4482 |
4269 * Time between triggering recurring Timer Events (in milliseconds). Only | 4483 /// Time between triggering recurring Timer Events (in milliseconds). Only |
4270 * valid for Timer triggers. | 4484 /// valid for Timer triggers. |
4271 */ | |
4272 Parameter interval; | 4485 Parameter interval; |
4273 /** | 4486 |
4274 * Limit of the number of GTM events this Timer Trigger will fire. If no limit | 4487 /// Limit of the number of GTM events this Timer Trigger will fire. If no |
4275 * is set, we will continue to fire GTM events until the user leaves the page. | 4488 /// limit is set, we will continue to fire GTM events until the user leaves |
4276 * Only valid for Timer triggers. | 4489 /// the page. Only valid for Timer triggers. |
4277 */ | |
4278 Parameter limit; | 4490 Parameter limit; |
4279 /** Trigger display name. */ | 4491 |
| 4492 /// Trigger display name. |
4280 core.String name; | 4493 core.String name; |
4281 /** Parent folder id. */ | 4494 |
| 4495 /// Parent folder id. |
4282 core.String parentFolderId; | 4496 core.String parentFolderId; |
4283 /** The Trigger ID uniquely identifies the GTM Trigger. */ | 4497 |
| 4498 /// The Trigger ID uniquely identifies the GTM Trigger. |
4284 core.String triggerId; | 4499 core.String triggerId; |
4285 /** | 4500 |
4286 * Defines the data layer event that causes this trigger. | 4501 /// Defines the data layer event that causes this trigger. |
4287 * Possible string values are: | 4502 /// Possible string values are: |
4288 * - "ajaxSubmission" | 4503 /// - "ajaxSubmission" |
4289 * - "always" | 4504 /// - "always" |
4290 * - "click" | 4505 /// - "click" |
4291 * - "customEvent" | 4506 /// - "customEvent" |
4292 * - "domReady" | 4507 /// - "domReady" |
4293 * - "formSubmission" | 4508 /// - "formSubmission" |
4294 * - "historyChange" | 4509 /// - "historyChange" |
4295 * - "jsError" | 4510 /// - "jsError" |
4296 * - "linkClick" | 4511 /// - "linkClick" |
4297 * - "pageview" | 4512 /// - "pageview" |
4298 * - "timer" | 4513 /// - "timer" |
4299 * - "windowLoaded" | 4514 /// - "windowLoaded" |
4300 * - "youTube" | 4515 /// - "youTube" |
4301 */ | |
4302 core.String type; | 4516 core.String type; |
4303 /** | 4517 |
4304 * Globally unique id of the trigger that auto-generates this (a Form Submit, | 4518 /// Globally unique id of the trigger that auto-generates this (a Form |
4305 * Link Click or Timer listener) if any. Used to make incompatible auto-events | 4519 /// Submit, Link Click or Timer listener) if any. Used to make incompatible |
4306 * work together with trigger filtering based on trigger ids. This value is | 4520 /// auto-events work together with trigger filtering based on trigger ids. |
4307 * populated during output generation since the tags implied by triggers don't | 4521 /// This value is populated during output generation since the tags implied |
4308 * exist until then. Only valid for Form Submit, Link Click and Timer | 4522 /// by triggers don't exist until then. Only valid for Form Submit, Link |
4309 * triggers. | 4523 /// Click and Timer triggers. |
4310 */ | |
4311 Parameter uniqueTriggerId; | 4524 Parameter uniqueTriggerId; |
4312 /** | 4525 |
4313 * List of integer percentage values. The trigger will fire as each percentage | 4526 /// List of integer percentage values. The trigger will fire as each |
4314 * is reached in any instrumented videos. Only valid for YouTube triggers. | 4527 /// percentage is reached in any instrumented videos. Only valid for YouTube |
4315 */ | 4528 /// triggers. |
4316 Parameter videoPercentageList; | 4529 Parameter videoPercentageList; |
4317 /** | 4530 |
4318 * Whether or not we should delay the form submissions or link opening until | 4531 /// Whether or not we should delay the form submissions or link opening until |
4319 * all of the tags have fired (by preventing the default action and later | 4532 /// all of the tags have fired (by preventing the default action and later |
4320 * simulating the default action). Only valid for Form Submission and Link | 4533 /// simulating the default action). Only valid for Form Submission and Link |
4321 * Click triggers. | 4534 /// Click triggers. |
4322 */ | |
4323 Parameter waitForTags; | 4535 Parameter waitForTags; |
4324 /** | 4536 |
4325 * How long to wait (in milliseconds) for tags to fire when 'waits_for_tags' | 4537 /// How long to wait (in milliseconds) for tags to fire when 'waits_for_tags' |
4326 * above evaluates to true. Only valid for Form Submission and Link Click | 4538 /// above evaluates to true. Only valid for Form Submission and Link Click |
4327 * triggers. | 4539 /// triggers. |
4328 */ | |
4329 Parameter waitForTagsTimeout; | 4540 Parameter waitForTagsTimeout; |
4330 | 4541 |
4331 Trigger(); | 4542 Trigger(); |
4332 | 4543 |
4333 Trigger.fromJson(core.Map _json) { | 4544 Trigger.fromJson(core.Map _json) { |
4334 if (_json.containsKey("accountId")) { | 4545 if (_json.containsKey("accountId")) { |
4335 accountId = _json["accountId"]; | 4546 accountId = _json["accountId"]; |
4336 } | 4547 } |
4337 if (_json.containsKey("autoEventFilter")) { | 4548 if (_json.containsKey("autoEventFilter")) { |
4338 autoEventFilter = _json["autoEventFilter"].map((value) => new Condition.fr
omJson(value)).toList(); | 4549 autoEventFilter = _json["autoEventFilter"] |
| 4550 .map((value) => new Condition.fromJson(value)) |
| 4551 .toList(); |
4339 } | 4552 } |
4340 if (_json.containsKey("checkValidation")) { | 4553 if (_json.containsKey("checkValidation")) { |
4341 checkValidation = new Parameter.fromJson(_json["checkValidation"]); | 4554 checkValidation = new Parameter.fromJson(_json["checkValidation"]); |
4342 } | 4555 } |
4343 if (_json.containsKey("containerId")) { | 4556 if (_json.containsKey("containerId")) { |
4344 containerId = _json["containerId"]; | 4557 containerId = _json["containerId"]; |
4345 } | 4558 } |
4346 if (_json.containsKey("customEventFilter")) { | 4559 if (_json.containsKey("customEventFilter")) { |
4347 customEventFilter = _json["customEventFilter"].map((value) => new Conditio
n.fromJson(value)).toList(); | 4560 customEventFilter = _json["customEventFilter"] |
| 4561 .map((value) => new Condition.fromJson(value)) |
| 4562 .toList(); |
4348 } | 4563 } |
4349 if (_json.containsKey("enableAllVideos")) { | 4564 if (_json.containsKey("enableAllVideos")) { |
4350 enableAllVideos = new Parameter.fromJson(_json["enableAllVideos"]); | 4565 enableAllVideos = new Parameter.fromJson(_json["enableAllVideos"]); |
4351 } | 4566 } |
4352 if (_json.containsKey("eventName")) { | 4567 if (_json.containsKey("eventName")) { |
4353 eventName = new Parameter.fromJson(_json["eventName"]); | 4568 eventName = new Parameter.fromJson(_json["eventName"]); |
4354 } | 4569 } |
4355 if (_json.containsKey("filter")) { | 4570 if (_json.containsKey("filter")) { |
4356 filter = _json["filter"].map((value) => new Condition.fromJson(value)).toL
ist(); | 4571 filter = _json["filter"] |
| 4572 .map((value) => new Condition.fromJson(value)) |
| 4573 .toList(); |
4357 } | 4574 } |
4358 if (_json.containsKey("fingerprint")) { | 4575 if (_json.containsKey("fingerprint")) { |
4359 fingerprint = _json["fingerprint"]; | 4576 fingerprint = _json["fingerprint"]; |
4360 } | 4577 } |
4361 if (_json.containsKey("interval")) { | 4578 if (_json.containsKey("interval")) { |
4362 interval = new Parameter.fromJson(_json["interval"]); | 4579 interval = new Parameter.fromJson(_json["interval"]); |
4363 } | 4580 } |
4364 if (_json.containsKey("limit")) { | 4581 if (_json.containsKey("limit")) { |
4365 limit = new Parameter.fromJson(_json["limit"]); | 4582 limit = new Parameter.fromJson(_json["limit"]); |
4366 } | 4583 } |
4367 if (_json.containsKey("name")) { | 4584 if (_json.containsKey("name")) { |
4368 name = _json["name"]; | 4585 name = _json["name"]; |
4369 } | 4586 } |
4370 if (_json.containsKey("parentFolderId")) { | 4587 if (_json.containsKey("parentFolderId")) { |
4371 parentFolderId = _json["parentFolderId"]; | 4588 parentFolderId = _json["parentFolderId"]; |
4372 } | 4589 } |
4373 if (_json.containsKey("triggerId")) { | 4590 if (_json.containsKey("triggerId")) { |
4374 triggerId = _json["triggerId"]; | 4591 triggerId = _json["triggerId"]; |
4375 } | 4592 } |
4376 if (_json.containsKey("type")) { | 4593 if (_json.containsKey("type")) { |
4377 type = _json["type"]; | 4594 type = _json["type"]; |
4378 } | 4595 } |
4379 if (_json.containsKey("uniqueTriggerId")) { | 4596 if (_json.containsKey("uniqueTriggerId")) { |
4380 uniqueTriggerId = new Parameter.fromJson(_json["uniqueTriggerId"]); | 4597 uniqueTriggerId = new Parameter.fromJson(_json["uniqueTriggerId"]); |
4381 } | 4598 } |
4382 if (_json.containsKey("videoPercentageList")) { | 4599 if (_json.containsKey("videoPercentageList")) { |
4383 videoPercentageList = new Parameter.fromJson(_json["videoPercentageList"])
; | 4600 videoPercentageList = |
| 4601 new Parameter.fromJson(_json["videoPercentageList"]); |
4384 } | 4602 } |
4385 if (_json.containsKey("waitForTags")) { | 4603 if (_json.containsKey("waitForTags")) { |
4386 waitForTags = new Parameter.fromJson(_json["waitForTags"]); | 4604 waitForTags = new Parameter.fromJson(_json["waitForTags"]); |
4387 } | 4605 } |
4388 if (_json.containsKey("waitForTagsTimeout")) { | 4606 if (_json.containsKey("waitForTagsTimeout")) { |
4389 waitForTagsTimeout = new Parameter.fromJson(_json["waitForTagsTimeout"]); | 4607 waitForTagsTimeout = new Parameter.fromJson(_json["waitForTagsTimeout"]); |
4390 } | 4608 } |
4391 } | 4609 } |
4392 | 4610 |
4393 core.Map<core.String, core.Object> toJson() { | 4611 core.Map<core.String, core.Object> toJson() { |
4394 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4612 final core.Map<core.String, core.Object> _json = |
| 4613 new core.Map<core.String, core.Object>(); |
4395 if (accountId != null) { | 4614 if (accountId != null) { |
4396 _json["accountId"] = accountId; | 4615 _json["accountId"] = accountId; |
4397 } | 4616 } |
4398 if (autoEventFilter != null) { | 4617 if (autoEventFilter != null) { |
4399 _json["autoEventFilter"] = autoEventFilter.map((value) => (value).toJson()
).toList(); | 4618 _json["autoEventFilter"] = |
| 4619 autoEventFilter.map((value) => (value).toJson()).toList(); |
4400 } | 4620 } |
4401 if (checkValidation != null) { | 4621 if (checkValidation != null) { |
4402 _json["checkValidation"] = (checkValidation).toJson(); | 4622 _json["checkValidation"] = (checkValidation).toJson(); |
4403 } | 4623 } |
4404 if (containerId != null) { | 4624 if (containerId != null) { |
4405 _json["containerId"] = containerId; | 4625 _json["containerId"] = containerId; |
4406 } | 4626 } |
4407 if (customEventFilter != null) { | 4627 if (customEventFilter != null) { |
4408 _json["customEventFilter"] = customEventFilter.map((value) => (value).toJs
on()).toList(); | 4628 _json["customEventFilter"] = |
| 4629 customEventFilter.map((value) => (value).toJson()).toList(); |
4409 } | 4630 } |
4410 if (enableAllVideos != null) { | 4631 if (enableAllVideos != null) { |
4411 _json["enableAllVideos"] = (enableAllVideos).toJson(); | 4632 _json["enableAllVideos"] = (enableAllVideos).toJson(); |
4412 } | 4633 } |
4413 if (eventName != null) { | 4634 if (eventName != null) { |
4414 _json["eventName"] = (eventName).toJson(); | 4635 _json["eventName"] = (eventName).toJson(); |
4415 } | 4636 } |
4416 if (filter != null) { | 4637 if (filter != null) { |
4417 _json["filter"] = filter.map((value) => (value).toJson()).toList(); | 4638 _json["filter"] = filter.map((value) => (value).toJson()).toList(); |
4418 } | 4639 } |
(...skipping 27 matching lines...) Expand all Loading... |
4446 if (waitForTags != null) { | 4667 if (waitForTags != null) { |
4447 _json["waitForTags"] = (waitForTags).toJson(); | 4668 _json["waitForTags"] = (waitForTags).toJson(); |
4448 } | 4669 } |
4449 if (waitForTagsTimeout != null) { | 4670 if (waitForTagsTimeout != null) { |
4450 _json["waitForTagsTimeout"] = (waitForTagsTimeout).toJson(); | 4671 _json["waitForTagsTimeout"] = (waitForTagsTimeout).toJson(); |
4451 } | 4672 } |
4452 return _json; | 4673 return _json; |
4453 } | 4674 } |
4454 } | 4675 } |
4455 | 4676 |
4456 /** Represents a user's permissions to an account and its container. */ | 4677 /// Represents a user's permissions to an account and its container. |
4457 class UserAccess { | 4678 class UserAccess { |
4458 /** GTM Account access permissions. */ | 4679 /// GTM Account access permissions. |
4459 AccountAccess accountAccess; | 4680 AccountAccess accountAccess; |
4460 /** GTM Account ID. */ | 4681 |
| 4682 /// GTM Account ID. |
4461 core.String accountId; | 4683 core.String accountId; |
4462 /** GTM Container access permissions. */ | 4684 |
| 4685 /// GTM Container access permissions. |
4463 core.List<ContainerAccess> containerAccess; | 4686 core.List<ContainerAccess> containerAccess; |
4464 /** User's email address. */ | 4687 |
| 4688 /// User's email address. |
4465 core.String emailAddress; | 4689 core.String emailAddress; |
4466 /** Account Permission ID. */ | 4690 |
| 4691 /// Account Permission ID. |
4467 core.String permissionId; | 4692 core.String permissionId; |
4468 | 4693 |
4469 UserAccess(); | 4694 UserAccess(); |
4470 | 4695 |
4471 UserAccess.fromJson(core.Map _json) { | 4696 UserAccess.fromJson(core.Map _json) { |
4472 if (_json.containsKey("accountAccess")) { | 4697 if (_json.containsKey("accountAccess")) { |
4473 accountAccess = new AccountAccess.fromJson(_json["accountAccess"]); | 4698 accountAccess = new AccountAccess.fromJson(_json["accountAccess"]); |
4474 } | 4699 } |
4475 if (_json.containsKey("accountId")) { | 4700 if (_json.containsKey("accountId")) { |
4476 accountId = _json["accountId"]; | 4701 accountId = _json["accountId"]; |
4477 } | 4702 } |
4478 if (_json.containsKey("containerAccess")) { | 4703 if (_json.containsKey("containerAccess")) { |
4479 containerAccess = _json["containerAccess"].map((value) => new ContainerAcc
ess.fromJson(value)).toList(); | 4704 containerAccess = _json["containerAccess"] |
| 4705 .map((value) => new ContainerAccess.fromJson(value)) |
| 4706 .toList(); |
4480 } | 4707 } |
4481 if (_json.containsKey("emailAddress")) { | 4708 if (_json.containsKey("emailAddress")) { |
4482 emailAddress = _json["emailAddress"]; | 4709 emailAddress = _json["emailAddress"]; |
4483 } | 4710 } |
4484 if (_json.containsKey("permissionId")) { | 4711 if (_json.containsKey("permissionId")) { |
4485 permissionId = _json["permissionId"]; | 4712 permissionId = _json["permissionId"]; |
4486 } | 4713 } |
4487 } | 4714 } |
4488 | 4715 |
4489 core.Map<core.String, core.Object> toJson() { | 4716 core.Map<core.String, core.Object> toJson() { |
4490 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4717 final core.Map<core.String, core.Object> _json = |
| 4718 new core.Map<core.String, core.Object>(); |
4491 if (accountAccess != null) { | 4719 if (accountAccess != null) { |
4492 _json["accountAccess"] = (accountAccess).toJson(); | 4720 _json["accountAccess"] = (accountAccess).toJson(); |
4493 } | 4721 } |
4494 if (accountId != null) { | 4722 if (accountId != null) { |
4495 _json["accountId"] = accountId; | 4723 _json["accountId"] = accountId; |
4496 } | 4724 } |
4497 if (containerAccess != null) { | 4725 if (containerAccess != null) { |
4498 _json["containerAccess"] = containerAccess.map((value) => (value).toJson()
).toList(); | 4726 _json["containerAccess"] = |
| 4727 containerAccess.map((value) => (value).toJson()).toList(); |
4499 } | 4728 } |
4500 if (emailAddress != null) { | 4729 if (emailAddress != null) { |
4501 _json["emailAddress"] = emailAddress; | 4730 _json["emailAddress"] = emailAddress; |
4502 } | 4731 } |
4503 if (permissionId != null) { | 4732 if (permissionId != null) { |
4504 _json["permissionId"] = permissionId; | 4733 _json["permissionId"] = permissionId; |
4505 } | 4734 } |
4506 return _json; | 4735 return _json; |
4507 } | 4736 } |
4508 } | 4737 } |
4509 | 4738 |
4510 /** Represents a Google Tag Manager Variable. */ | 4739 /// Represents a Google Tag Manager Variable. |
4511 class Variable { | 4740 class Variable { |
4512 /** GTM Account ID. */ | 4741 /// GTM Account ID. |
4513 core.String accountId; | 4742 core.String accountId; |
4514 /** GTM Container ID. */ | 4743 |
| 4744 /// GTM Container ID. |
4515 core.String containerId; | 4745 core.String containerId; |
4516 /** | 4746 |
4517 * For mobile containers only: A list of trigger IDs for disabling conditional | 4747 /// For mobile containers only: A list of trigger IDs for disabling |
4518 * variables; the variable is enabled if one of the enabling trigger is true | 4748 /// conditional variables; the variable is enabled if one of the enabling |
4519 * while all the disabling trigger are false. Treated as an unordered set. | 4749 /// trigger is true while all the disabling trigger are false. Treated as an |
4520 */ | 4750 /// unordered set. |
4521 core.List<core.String> disablingTriggerId; | 4751 core.List<core.String> disablingTriggerId; |
4522 /** | 4752 |
4523 * For mobile containers only: A list of trigger IDs for enabling conditional | 4753 /// For mobile containers only: A list of trigger IDs for enabling |
4524 * variables; the variable is enabled if one of the enabling triggers is true | 4754 /// conditional variables; the variable is enabled if one of the enabling |
4525 * while all the disabling triggers are false. Treated as an unordered set. | 4755 /// triggers is true while all the disabling triggers are false. Treated as |
4526 */ | 4756 /// an unordered set. |
4527 core.List<core.String> enablingTriggerId; | 4757 core.List<core.String> enablingTriggerId; |
4528 /** | 4758 |
4529 * The fingerprint of the GTM Variable as computed at storage time. This value | 4759 /// The fingerprint of the GTM Variable as computed at storage time. This |
4530 * is recomputed whenever the variable is modified. | 4760 /// value is recomputed whenever the variable is modified. |
4531 */ | |
4532 core.String fingerprint; | 4761 core.String fingerprint; |
4533 /** Variable display name. */ | 4762 |
| 4763 /// Variable display name. |
4534 core.String name; | 4764 core.String name; |
4535 /** User notes on how to apply this variable in the container. */ | 4765 |
| 4766 /// User notes on how to apply this variable in the container. |
4536 core.String notes; | 4767 core.String notes; |
4537 /** The variable's parameters. */ | 4768 |
| 4769 /// The variable's parameters. |
4538 core.List<Parameter> parameter; | 4770 core.List<Parameter> parameter; |
4539 /** Parent folder id. */ | 4771 |
| 4772 /// Parent folder id. |
4540 core.String parentFolderId; | 4773 core.String parentFolderId; |
4541 /** The end timestamp in milliseconds to schedule a variable. */ | 4774 |
| 4775 /// The end timestamp in milliseconds to schedule a variable. |
4542 core.String scheduleEndMs; | 4776 core.String scheduleEndMs; |
4543 /** The start timestamp in milliseconds to schedule a variable. */ | 4777 |
| 4778 /// The start timestamp in milliseconds to schedule a variable. |
4544 core.String scheduleStartMs; | 4779 core.String scheduleStartMs; |
4545 /** GTM Variable Type. */ | 4780 |
| 4781 /// GTM Variable Type. |
4546 core.String type; | 4782 core.String type; |
4547 /** The Variable ID uniquely identifies the GTM Variable. */ | 4783 |
| 4784 /// The Variable ID uniquely identifies the GTM Variable. |
4548 core.String variableId; | 4785 core.String variableId; |
4549 | 4786 |
4550 Variable(); | 4787 Variable(); |
4551 | 4788 |
4552 Variable.fromJson(core.Map _json) { | 4789 Variable.fromJson(core.Map _json) { |
4553 if (_json.containsKey("accountId")) { | 4790 if (_json.containsKey("accountId")) { |
4554 accountId = _json["accountId"]; | 4791 accountId = _json["accountId"]; |
4555 } | 4792 } |
4556 if (_json.containsKey("containerId")) { | 4793 if (_json.containsKey("containerId")) { |
4557 containerId = _json["containerId"]; | 4794 containerId = _json["containerId"]; |
4558 } | 4795 } |
4559 if (_json.containsKey("disablingTriggerId")) { | 4796 if (_json.containsKey("disablingTriggerId")) { |
4560 disablingTriggerId = _json["disablingTriggerId"]; | 4797 disablingTriggerId = _json["disablingTriggerId"]; |
4561 } | 4798 } |
4562 if (_json.containsKey("enablingTriggerId")) { | 4799 if (_json.containsKey("enablingTriggerId")) { |
4563 enablingTriggerId = _json["enablingTriggerId"]; | 4800 enablingTriggerId = _json["enablingTriggerId"]; |
4564 } | 4801 } |
4565 if (_json.containsKey("fingerprint")) { | 4802 if (_json.containsKey("fingerprint")) { |
4566 fingerprint = _json["fingerprint"]; | 4803 fingerprint = _json["fingerprint"]; |
4567 } | 4804 } |
4568 if (_json.containsKey("name")) { | 4805 if (_json.containsKey("name")) { |
4569 name = _json["name"]; | 4806 name = _json["name"]; |
4570 } | 4807 } |
4571 if (_json.containsKey("notes")) { | 4808 if (_json.containsKey("notes")) { |
4572 notes = _json["notes"]; | 4809 notes = _json["notes"]; |
4573 } | 4810 } |
4574 if (_json.containsKey("parameter")) { | 4811 if (_json.containsKey("parameter")) { |
4575 parameter = _json["parameter"].map((value) => new Parameter.fromJson(value
)).toList(); | 4812 parameter = _json["parameter"] |
| 4813 .map((value) => new Parameter.fromJson(value)) |
| 4814 .toList(); |
4576 } | 4815 } |
4577 if (_json.containsKey("parentFolderId")) { | 4816 if (_json.containsKey("parentFolderId")) { |
4578 parentFolderId = _json["parentFolderId"]; | 4817 parentFolderId = _json["parentFolderId"]; |
4579 } | 4818 } |
4580 if (_json.containsKey("scheduleEndMs")) { | 4819 if (_json.containsKey("scheduleEndMs")) { |
4581 scheduleEndMs = _json["scheduleEndMs"]; | 4820 scheduleEndMs = _json["scheduleEndMs"]; |
4582 } | 4821 } |
4583 if (_json.containsKey("scheduleStartMs")) { | 4822 if (_json.containsKey("scheduleStartMs")) { |
4584 scheduleStartMs = _json["scheduleStartMs"]; | 4823 scheduleStartMs = _json["scheduleStartMs"]; |
4585 } | 4824 } |
4586 if (_json.containsKey("type")) { | 4825 if (_json.containsKey("type")) { |
4587 type = _json["type"]; | 4826 type = _json["type"]; |
4588 } | 4827 } |
4589 if (_json.containsKey("variableId")) { | 4828 if (_json.containsKey("variableId")) { |
4590 variableId = _json["variableId"]; | 4829 variableId = _json["variableId"]; |
4591 } | 4830 } |
4592 } | 4831 } |
4593 | 4832 |
4594 core.Map<core.String, core.Object> toJson() { | 4833 core.Map<core.String, core.Object> toJson() { |
4595 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4834 final core.Map<core.String, core.Object> _json = |
| 4835 new core.Map<core.String, core.Object>(); |
4596 if (accountId != null) { | 4836 if (accountId != null) { |
4597 _json["accountId"] = accountId; | 4837 _json["accountId"] = accountId; |
4598 } | 4838 } |
4599 if (containerId != null) { | 4839 if (containerId != null) { |
4600 _json["containerId"] = containerId; | 4840 _json["containerId"] = containerId; |
4601 } | 4841 } |
4602 if (disablingTriggerId != null) { | 4842 if (disablingTriggerId != null) { |
4603 _json["disablingTriggerId"] = disablingTriggerId; | 4843 _json["disablingTriggerId"] = disablingTriggerId; |
4604 } | 4844 } |
4605 if (enablingTriggerId != null) { | 4845 if (enablingTriggerId != null) { |
(...skipping 22 matching lines...) Expand all Loading... |
4628 } | 4868 } |
4629 if (type != null) { | 4869 if (type != null) { |
4630 _json["type"] = type; | 4870 _json["type"] = type; |
4631 } | 4871 } |
4632 if (variableId != null) { | 4872 if (variableId != null) { |
4633 _json["variableId"] = variableId; | 4873 _json["variableId"] = variableId; |
4634 } | 4874 } |
4635 return _json; | 4875 return _json; |
4636 } | 4876 } |
4637 } | 4877 } |
OLD | NEW |