| OLD | NEW |
| 1 // This is a generated file (see the discoveryapis_generator project). |
| 2 |
| 1 library googleapis.tagmanager.v1; | 3 library googleapis.tagmanager.v1; |
| 2 | 4 |
| 3 import "dart:core" as core; | 5 import 'dart:core' as core; |
| 4 import "dart:collection" as collection; | 6 import 'dart:collection' as collection; |
| 5 import "dart:async" as async; | 7 import 'dart:async' as async; |
| 6 import "dart:convert" as convert; | 8 import 'dart:convert' as convert; |
| 7 | 9 |
| 8 import "package:crypto/crypto.dart" as crypto; | 10 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
| 11 import 'package:crypto/crypto.dart' as crypto; |
| 9 import 'package:http/http.dart' as http; | 12 import 'package:http/http.dart' as http; |
| 10 import '../src/common_internal.dart' as common_internal; | |
| 11 import '../common/common.dart' as common; | |
| 12 | 13 |
| 13 export '../common/common.dart' show ApiRequestError; | 14 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show |
| 14 export '../common/common.dart' show DetailedApiRequestError; | 15 ApiRequestError, DetailedApiRequestError; |
| 16 |
| 17 const core.String USER_AGENT = 'dart-api-client tagmanager/v1'; |
| 15 | 18 |
| 16 /** API for accessing Tag Manager accounts and containers. */ | 19 /** API for accessing Tag Manager accounts and containers. */ |
| 17 class TagmanagerApi { | 20 class TagmanagerApi { |
| 18 /** Delete your Google Tag Manager containers */ | 21 /** Delete your Google Tag Manager containers */ |
| 19 static const TagmanagerDeleteContainersScope = "https://www.googleapis.com/aut
h/tagmanager.delete.containers"; | 22 static const TagmanagerDeleteContainersScope = "https://www.googleapis.com/aut
h/tagmanager.delete.containers"; |
| 20 | 23 |
| 21 /** Manage your Google Tag Manager containers */ | 24 /** Manage your Google Tag Manager containers */ |
| 22 static const TagmanagerEditContainersScope = "https://www.googleapis.com/auth/
tagmanager.edit.containers"; | 25 static const TagmanagerEditContainersScope = "https://www.googleapis.com/auth/
tagmanager.edit.containers"; |
| 23 | 26 |
| 24 /** Manage your Google Tag Manager container versions */ | 27 /** Manage your Google Tag Manager container versions */ |
| 25 static const TagmanagerEditContainerversionsScope = "https://www.googleapis.co
m/auth/tagmanager.edit.containerversions"; | 28 static const TagmanagerEditContainerversionsScope = "https://www.googleapis.co
m/auth/tagmanager.edit.containerversions"; |
| 26 | 29 |
| 27 /** Manage your Google Tag Manager accounts */ | 30 /** Manage your Google Tag Manager accounts */ |
| 28 static const TagmanagerManageAccountsScope = "https://www.googleapis.com/auth/
tagmanager.manage.accounts"; | 31 static const TagmanagerManageAccountsScope = "https://www.googleapis.com/auth/
tagmanager.manage.accounts"; |
| 29 | 32 |
| 30 /** Manage user permissions of your Google Tag Manager data */ | 33 /** Manage user permissions of your Google Tag Manager data */ |
| 31 static const TagmanagerManageUsersScope = "https://www.googleapis.com/auth/tag
manager.manage.users"; | 34 static const TagmanagerManageUsersScope = "https://www.googleapis.com/auth/tag
manager.manage.users"; |
| 32 | 35 |
| 33 /** Publish your Google Tag Manager containers */ | 36 /** Publish your Google Tag Manager containers */ |
| 34 static const TagmanagerPublishScope = "https://www.googleapis.com/auth/tagmana
ger.publish"; | 37 static const TagmanagerPublishScope = "https://www.googleapis.com/auth/tagmana
ger.publish"; |
| 35 | 38 |
| 36 /** View your Google Tag Manager containers */ | 39 /** View your Google Tag Manager containers */ |
| 37 static const TagmanagerReadonlyScope = "https://www.googleapis.com/auth/tagman
ager.readonly"; | 40 static const TagmanagerReadonlyScope = "https://www.googleapis.com/auth/tagman
ager.readonly"; |
| 38 | 41 |
| 39 | 42 |
| 40 final common_internal.ApiRequester _requester; | 43 final commons.ApiRequester _requester; |
| 41 | 44 |
| 42 AccountsResourceApi get accounts => new AccountsResourceApi(_requester); | 45 AccountsResourceApi get accounts => new AccountsResourceApi(_requester); |
| 43 | 46 |
| 44 TagmanagerApi(http.Client client, {core.String rootUrl: "https://www.googleapi
s.com/", core.String servicePath: "tagmanager/v1/"}) : | 47 TagmanagerApi(http.Client client, {core.String rootUrl: "https://www.googleapi
s.com/", core.String servicePath: "tagmanager/v1/"}) : |
| 45 _requester = new common_internal.ApiRequester(client, rootUrl, servicePath
); | 48 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); |
| 46 } | 49 } |
| 47 | 50 |
| 48 | 51 |
| 49 /** Not documented yet. */ | |
| 50 class AccountsResourceApi { | 52 class AccountsResourceApi { |
| 51 final common_internal.ApiRequester _requester; | 53 final commons.ApiRequester _requester; |
| 52 | 54 |
| 53 AccountsContainersResourceApi get containers => new AccountsContainersResource
Api(_requester); | 55 AccountsContainersResourceApi get containers => new AccountsContainersResource
Api(_requester); |
| 54 AccountsPermissionsResourceApi get permissions => new AccountsPermissionsResou
rceApi(_requester); | 56 AccountsPermissionsResourceApi get permissions => new AccountsPermissionsResou
rceApi(_requester); |
| 55 | 57 |
| 56 AccountsResourceApi(common_internal.ApiRequester client) : | 58 AccountsResourceApi(commons.ApiRequester client) : |
| 57 _requester = client; | 59 _requester = client; |
| 58 | 60 |
| 59 /** | 61 /** |
| 60 * Gets a GTM Account. | 62 * Gets a GTM Account. |
| 61 * | 63 * |
| 62 * Request parameters: | 64 * Request parameters: |
| 63 * | 65 * |
| 64 * [accountId] - The GTM Account ID. | 66 * [accountId] - The GTM Account ID. |
| 65 * | 67 * |
| 66 * Completes with a [Account]. | 68 * Completes with a [Account]. |
| 67 * | 69 * |
| 68 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 70 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 69 * error. | 71 * error. |
| 70 * | 72 * |
| 71 * If the used [http.Client] completes with an error when making a REST call, | 73 * If the used [http.Client] completes with an error when making a REST call, |
| 72 * this method will complete with the same error. | 74 * this method will complete with the same error. |
| 73 */ | 75 */ |
| 74 async.Future<Account> get(core.String accountId) { | 76 async.Future<Account> get(core.String accountId) { |
| 75 var _url = null; | 77 var _url = null; |
| 76 var _queryParams = new core.Map(); | 78 var _queryParams = new core.Map(); |
| 77 var _uploadMedia = null; | 79 var _uploadMedia = null; |
| 78 var _uploadOptions = null; | 80 var _uploadOptions = null; |
| 79 var _downloadOptions = common.DownloadOptions.Metadata; | 81 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 80 var _body = null; | 82 var _body = null; |
| 81 | 83 |
| 82 if (accountId == null) { | 84 if (accountId == null) { |
| 83 throw new core.ArgumentError("Parameter accountId is required."); | 85 throw new core.ArgumentError("Parameter accountId is required."); |
| 84 } | 86 } |
| 85 | 87 |
| 86 | 88 |
| 87 _url = 'accounts/' + common_internal.Escaper.ecapeVariable('$accountId'); | 89 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId'); |
| 88 | 90 |
| 89 var _response = _requester.request(_url, | 91 var _response = _requester.request(_url, |
| 90 "GET", | 92 "GET", |
| 91 body: _body, | 93 body: _body, |
| 92 queryParams: _queryParams, | 94 queryParams: _queryParams, |
| 93 uploadOptions: _uploadOptions, | 95 uploadOptions: _uploadOptions, |
| 94 uploadMedia: _uploadMedia, | 96 uploadMedia: _uploadMedia, |
| 95 downloadOptions: _downloadOptions); | 97 downloadOptions: _downloadOptions); |
| 96 return _response.then((data) => new Account.fromJson(data)); | 98 return _response.then((data) => new Account.fromJson(data)); |
| 97 } | 99 } |
| 98 | 100 |
| 99 /** | 101 /** |
| 100 * Lists all GTM Accounts that a user has access to. | 102 * Lists all GTM Accounts that a user has access to. |
| 101 * | 103 * |
| 102 * Request parameters: | 104 * Request parameters: |
| 103 * | 105 * |
| 104 * Completes with a [ListAccountsResponse]. | 106 * Completes with a [ListAccountsResponse]. |
| 105 * | 107 * |
| 106 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 108 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 107 * error. | 109 * error. |
| 108 * | 110 * |
| 109 * If the used [http.Client] completes with an error when making a REST call, | 111 * If the used [http.Client] completes with an error when making a REST call, |
| 110 * this method will complete with the same error. | 112 * this method will complete with the same error. |
| 111 */ | 113 */ |
| 112 async.Future<ListAccountsResponse> list() { | 114 async.Future<ListAccountsResponse> list() { |
| 113 var _url = null; | 115 var _url = null; |
| 114 var _queryParams = new core.Map(); | 116 var _queryParams = new core.Map(); |
| 115 var _uploadMedia = null; | 117 var _uploadMedia = null; |
| 116 var _uploadOptions = null; | 118 var _uploadOptions = null; |
| 117 var _downloadOptions = common.DownloadOptions.Metadata; | 119 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 118 var _body = null; | 120 var _body = null; |
| 119 | 121 |
| 120 | 122 |
| 121 | 123 |
| 122 _url = 'accounts'; | 124 _url = 'accounts'; |
| 123 | 125 |
| 124 var _response = _requester.request(_url, | 126 var _response = _requester.request(_url, |
| 125 "GET", | 127 "GET", |
| 126 body: _body, | 128 body: _body, |
| 127 queryParams: _queryParams, | 129 queryParams: _queryParams, |
| (...skipping 10 matching lines...) Expand all Loading... |
| 138 * | 140 * |
| 139 * Request parameters: | 141 * Request parameters: |
| 140 * | 142 * |
| 141 * [accountId] - The GTM Account ID. | 143 * [accountId] - The GTM Account ID. |
| 142 * | 144 * |
| 143 * [fingerprint] - When provided, this fingerprint must match the fingerprint | 145 * [fingerprint] - When provided, this fingerprint must match the fingerprint |
| 144 * of the account in storage. | 146 * of the account in storage. |
| 145 * | 147 * |
| 146 * Completes with a [Account]. | 148 * Completes with a [Account]. |
| 147 * | 149 * |
| 148 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 150 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 149 * error. | 151 * error. |
| 150 * | 152 * |
| 151 * If the used [http.Client] completes with an error when making a REST call, | 153 * If the used [http.Client] completes with an error when making a REST call, |
| 152 * this method will complete with the same error. | 154 * this method will complete with the same error. |
| 153 */ | 155 */ |
| 154 async.Future<Account> update(Account request, core.String accountId, {core.Str
ing fingerprint}) { | 156 async.Future<Account> update(Account request, core.String accountId, {core.Str
ing fingerprint}) { |
| 155 var _url = null; | 157 var _url = null; |
| 156 var _queryParams = new core.Map(); | 158 var _queryParams = new core.Map(); |
| 157 var _uploadMedia = null; | 159 var _uploadMedia = null; |
| 158 var _uploadOptions = null; | 160 var _uploadOptions = null; |
| 159 var _downloadOptions = common.DownloadOptions.Metadata; | 161 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 160 var _body = null; | 162 var _body = null; |
| 161 | 163 |
| 162 if (request != null) { | 164 if (request != null) { |
| 163 _body = convert.JSON.encode((request).toJson()); | 165 _body = convert.JSON.encode((request).toJson()); |
| 164 } | 166 } |
| 165 if (accountId == null) { | 167 if (accountId == null) { |
| 166 throw new core.ArgumentError("Parameter accountId is required."); | 168 throw new core.ArgumentError("Parameter accountId is required."); |
| 167 } | 169 } |
| 168 if (fingerprint != null) { | 170 if (fingerprint != null) { |
| 169 _queryParams["fingerprint"] = [fingerprint]; | 171 _queryParams["fingerprint"] = [fingerprint]; |
| 170 } | 172 } |
| 171 | 173 |
| 172 | 174 |
| 173 _url = 'accounts/' + common_internal.Escaper.ecapeVariable('$accountId'); | 175 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId'); |
| 174 | 176 |
| 175 var _response = _requester.request(_url, | 177 var _response = _requester.request(_url, |
| 176 "PUT", | 178 "PUT", |
| 177 body: _body, | 179 body: _body, |
| 178 queryParams: _queryParams, | 180 queryParams: _queryParams, |
| 179 uploadOptions: _uploadOptions, | 181 uploadOptions: _uploadOptions, |
| 180 uploadMedia: _uploadMedia, | 182 uploadMedia: _uploadMedia, |
| 181 downloadOptions: _downloadOptions); | 183 downloadOptions: _downloadOptions); |
| 182 return _response.then((data) => new Account.fromJson(data)); | 184 return _response.then((data) => new Account.fromJson(data)); |
| 183 } | 185 } |
| 184 | 186 |
| 185 } | 187 } |
| 186 | 188 |
| 187 | 189 |
| 188 /** Not documented yet. */ | |
| 189 class AccountsContainersResourceApi { | 190 class AccountsContainersResourceApi { |
| 190 final common_internal.ApiRequester _requester; | 191 final commons.ApiRequester _requester; |
| 191 | 192 |
| 192 AccountsContainersMacrosResourceApi get macros => new AccountsContainersMacros
ResourceApi(_requester); | 193 AccountsContainersMacrosResourceApi get macros => new AccountsContainersMacros
ResourceApi(_requester); |
| 193 AccountsContainersRulesResourceApi get rules => new AccountsContainersRulesRes
ourceApi(_requester); | 194 AccountsContainersRulesResourceApi get rules => new AccountsContainersRulesRes
ourceApi(_requester); |
| 194 AccountsContainersTagsResourceApi get tags => new AccountsContainersTagsResour
ceApi(_requester); | 195 AccountsContainersTagsResourceApi get tags => new AccountsContainersTagsResour
ceApi(_requester); |
| 195 AccountsContainersTriggersResourceApi get triggers => new AccountsContainersTr
iggersResourceApi(_requester); | 196 AccountsContainersTriggersResourceApi get triggers => new AccountsContainersTr
iggersResourceApi(_requester); |
| 196 AccountsContainersVariablesResourceApi get variables => new AccountsContainers
VariablesResourceApi(_requester); | 197 AccountsContainersVariablesResourceApi get variables => new AccountsContainers
VariablesResourceApi(_requester); |
| 197 AccountsContainersVersionsResourceApi get versions => new AccountsContainersVe
rsionsResourceApi(_requester); | 198 AccountsContainersVersionsResourceApi get versions => new AccountsContainersVe
rsionsResourceApi(_requester); |
| 198 | 199 |
| 199 AccountsContainersResourceApi(common_internal.ApiRequester client) : | 200 AccountsContainersResourceApi(commons.ApiRequester client) : |
| 200 _requester = client; | 201 _requester = client; |
| 201 | 202 |
| 202 /** | 203 /** |
| 203 * Creates a Container. | 204 * Creates a Container. |
| 204 * | 205 * |
| 205 * [request] - The metadata request object. | 206 * [request] - The metadata request object. |
| 206 * | 207 * |
| 207 * Request parameters: | 208 * Request parameters: |
| 208 * | 209 * |
| 209 * [accountId] - The GTM Account ID. | 210 * [accountId] - The GTM Account ID. |
| 210 * | 211 * |
| 211 * Completes with a [Container]. | 212 * Completes with a [Container]. |
| 212 * | 213 * |
| 213 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 214 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 214 * error. | 215 * error. |
| 215 * | 216 * |
| 216 * If the used [http.Client] completes with an error when making a REST call, | 217 * If the used [http.Client] completes with an error when making a REST call, |
| 217 * this method will complete with the same error. | 218 * this method will complete with the same error. |
| 218 */ | 219 */ |
| 219 async.Future<Container> create(Container request, core.String accountId) { | 220 async.Future<Container> create(Container request, core.String accountId) { |
| 220 var _url = null; | 221 var _url = null; |
| 221 var _queryParams = new core.Map(); | 222 var _queryParams = new core.Map(); |
| 222 var _uploadMedia = null; | 223 var _uploadMedia = null; |
| 223 var _uploadOptions = null; | 224 var _uploadOptions = null; |
| 224 var _downloadOptions = common.DownloadOptions.Metadata; | 225 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 225 var _body = null; | 226 var _body = null; |
| 226 | 227 |
| 227 if (request != null) { | 228 if (request != null) { |
| 228 _body = convert.JSON.encode((request).toJson()); | 229 _body = convert.JSON.encode((request).toJson()); |
| 229 } | 230 } |
| 230 if (accountId == null) { | 231 if (accountId == null) { |
| 231 throw new core.ArgumentError("Parameter accountId is required."); | 232 throw new core.ArgumentError("Parameter accountId is required."); |
| 232 } | 233 } |
| 233 | 234 |
| 234 | 235 |
| 235 _url = 'accounts/' + common_internal.Escaper.ecapeVariable('$accountId') + '
/containers'; | 236 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers'; |
| 236 | 237 |
| 237 var _response = _requester.request(_url, | 238 var _response = _requester.request(_url, |
| 238 "POST", | 239 "POST", |
| 239 body: _body, | 240 body: _body, |
| 240 queryParams: _queryParams, | 241 queryParams: _queryParams, |
| 241 uploadOptions: _uploadOptions, | 242 uploadOptions: _uploadOptions, |
| 242 uploadMedia: _uploadMedia, | 243 uploadMedia: _uploadMedia, |
| 243 downloadOptions: _downloadOptions); | 244 downloadOptions: _downloadOptions); |
| 244 return _response.then((data) => new Container.fromJson(data)); | 245 return _response.then((data) => new Container.fromJson(data)); |
| 245 } | 246 } |
| 246 | 247 |
| 247 /** | 248 /** |
| 248 * Deletes a Container. | 249 * Deletes a Container. |
| 249 * | 250 * |
| 250 * Request parameters: | 251 * Request parameters: |
| 251 * | 252 * |
| 252 * [accountId] - The GTM Account ID. | 253 * [accountId] - The GTM Account ID. |
| 253 * | 254 * |
| 254 * [containerId] - The GTM Container ID. | 255 * [containerId] - The GTM Container ID. |
| 255 * | 256 * |
| 256 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 257 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 257 * error. | 258 * error. |
| 258 * | 259 * |
| 259 * If the used [http.Client] completes with an error when making a REST call, | 260 * If the used [http.Client] completes with an error when making a REST call, |
| 260 * this method will complete with the same error. | 261 * this method will complete with the same error. |
| 261 */ | 262 */ |
| 262 async.Future delete(core.String accountId, core.String containerId) { | 263 async.Future delete(core.String accountId, core.String containerId) { |
| 263 var _url = null; | 264 var _url = null; |
| 264 var _queryParams = new core.Map(); | 265 var _queryParams = new core.Map(); |
| 265 var _uploadMedia = null; | 266 var _uploadMedia = null; |
| 266 var _uploadOptions = null; | 267 var _uploadOptions = null; |
| 267 var _downloadOptions = common.DownloadOptions.Metadata; | 268 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 268 var _body = null; | 269 var _body = null; |
| 269 | 270 |
| 270 if (accountId == null) { | 271 if (accountId == null) { |
| 271 throw new core.ArgumentError("Parameter accountId is required."); | 272 throw new core.ArgumentError("Parameter accountId is required."); |
| 272 } | 273 } |
| 273 if (containerId == null) { | 274 if (containerId == null) { |
| 274 throw new core.ArgumentError("Parameter containerId is required."); | 275 throw new core.ArgumentError("Parameter containerId is required."); |
| 275 } | 276 } |
| 276 | 277 |
| 277 _downloadOptions = null; | 278 _downloadOptions = null; |
| 278 | 279 |
| 279 _url = 'accounts/' + common_internal.Escaper.ecapeVariable('$accountId') + '
/containers/' + common_internal.Escaper.ecapeVariable('$containerId'); | 280 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId'); |
| 280 | 281 |
| 281 var _response = _requester.request(_url, | 282 var _response = _requester.request(_url, |
| 282 "DELETE", | 283 "DELETE", |
| 283 body: _body, | 284 body: _body, |
| 284 queryParams: _queryParams, | 285 queryParams: _queryParams, |
| 285 uploadOptions: _uploadOptions, | 286 uploadOptions: _uploadOptions, |
| 286 uploadMedia: _uploadMedia, | 287 uploadMedia: _uploadMedia, |
| 287 downloadOptions: _downloadOptions); | 288 downloadOptions: _downloadOptions); |
| 288 return _response.then((data) => null); | 289 return _response.then((data) => null); |
| 289 } | 290 } |
| 290 | 291 |
| 291 /** | 292 /** |
| 292 * Gets a Container. | 293 * Gets a Container. |
| 293 * | 294 * |
| 294 * Request parameters: | 295 * Request parameters: |
| 295 * | 296 * |
| 296 * [accountId] - The GTM Account ID. | 297 * [accountId] - The GTM Account ID. |
| 297 * | 298 * |
| 298 * [containerId] - The GTM Container ID. | 299 * [containerId] - The GTM Container ID. |
| 299 * | 300 * |
| 300 * Completes with a [Container]. | 301 * Completes with a [Container]. |
| 301 * | 302 * |
| 302 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 303 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 303 * error. | 304 * error. |
| 304 * | 305 * |
| 305 * If the used [http.Client] completes with an error when making a REST call, | 306 * If the used [http.Client] completes with an error when making a REST call, |
| 306 * this method will complete with the same error. | 307 * this method will complete with the same error. |
| 307 */ | 308 */ |
| 308 async.Future<Container> get(core.String accountId, core.String containerId) { | 309 async.Future<Container> get(core.String accountId, core.String containerId) { |
| 309 var _url = null; | 310 var _url = null; |
| 310 var _queryParams = new core.Map(); | 311 var _queryParams = new core.Map(); |
| 311 var _uploadMedia = null; | 312 var _uploadMedia = null; |
| 312 var _uploadOptions = null; | 313 var _uploadOptions = null; |
| 313 var _downloadOptions = common.DownloadOptions.Metadata; | 314 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 314 var _body = null; | 315 var _body = null; |
| 315 | 316 |
| 316 if (accountId == null) { | 317 if (accountId == null) { |
| 317 throw new core.ArgumentError("Parameter accountId is required."); | 318 throw new core.ArgumentError("Parameter accountId is required."); |
| 318 } | 319 } |
| 319 if (containerId == null) { | 320 if (containerId == null) { |
| 320 throw new core.ArgumentError("Parameter containerId is required."); | 321 throw new core.ArgumentError("Parameter containerId is required."); |
| 321 } | 322 } |
| 322 | 323 |
| 323 | 324 |
| 324 _url = 'accounts/' + common_internal.Escaper.ecapeVariable('$accountId') + '
/containers/' + common_internal.Escaper.ecapeVariable('$containerId'); | 325 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId'); |
| 325 | 326 |
| 326 var _response = _requester.request(_url, | 327 var _response = _requester.request(_url, |
| 327 "GET", | 328 "GET", |
| 328 body: _body, | 329 body: _body, |
| 329 queryParams: _queryParams, | 330 queryParams: _queryParams, |
| 330 uploadOptions: _uploadOptions, | 331 uploadOptions: _uploadOptions, |
| 331 uploadMedia: _uploadMedia, | 332 uploadMedia: _uploadMedia, |
| 332 downloadOptions: _downloadOptions); | 333 downloadOptions: _downloadOptions); |
| 333 return _response.then((data) => new Container.fromJson(data)); | 334 return _response.then((data) => new Container.fromJson(data)); |
| 334 } | 335 } |
| 335 | 336 |
| 336 /** | 337 /** |
| 337 * Lists all Containers that belongs to a GTM Account. | 338 * Lists all Containers that belongs to a GTM Account. |
| 338 * | 339 * |
| 339 * Request parameters: | 340 * Request parameters: |
| 340 * | 341 * |
| 341 * [accountId] - The GTM Account ID. | 342 * [accountId] - The GTM Account ID. |
| 342 * | 343 * |
| 343 * Completes with a [ListContainersResponse]. | 344 * Completes with a [ListContainersResponse]. |
| 344 * | 345 * |
| 345 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 346 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 346 * error. | 347 * error. |
| 347 * | 348 * |
| 348 * If the used [http.Client] completes with an error when making a REST call, | 349 * If the used [http.Client] completes with an error when making a REST call, |
| 349 * this method will complete with the same error. | 350 * this method will complete with the same error. |
| 350 */ | 351 */ |
| 351 async.Future<ListContainersResponse> list(core.String accountId) { | 352 async.Future<ListContainersResponse> list(core.String accountId) { |
| 352 var _url = null; | 353 var _url = null; |
| 353 var _queryParams = new core.Map(); | 354 var _queryParams = new core.Map(); |
| 354 var _uploadMedia = null; | 355 var _uploadMedia = null; |
| 355 var _uploadOptions = null; | 356 var _uploadOptions = null; |
| 356 var _downloadOptions = common.DownloadOptions.Metadata; | 357 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 357 var _body = null; | 358 var _body = null; |
| 358 | 359 |
| 359 if (accountId == null) { | 360 if (accountId == null) { |
| 360 throw new core.ArgumentError("Parameter accountId is required."); | 361 throw new core.ArgumentError("Parameter accountId is required."); |
| 361 } | 362 } |
| 362 | 363 |
| 363 | 364 |
| 364 _url = 'accounts/' + common_internal.Escaper.ecapeVariable('$accountId') + '
/containers'; | 365 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers'; |
| 365 | 366 |
| 366 var _response = _requester.request(_url, | 367 var _response = _requester.request(_url, |
| 367 "GET", | 368 "GET", |
| 368 body: _body, | 369 body: _body, |
| 369 queryParams: _queryParams, | 370 queryParams: _queryParams, |
| 370 uploadOptions: _uploadOptions, | 371 uploadOptions: _uploadOptions, |
| 371 uploadMedia: _uploadMedia, | 372 uploadMedia: _uploadMedia, |
| 372 downloadOptions: _downloadOptions); | 373 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 /** |
| 377 * Updates a Container. | 378 * Updates a Container. |
| 378 * | 379 * |
| 379 * [request] - The metadata request object. | 380 * [request] - The metadata request object. |
| 380 * | 381 * |
| 381 * Request parameters: | 382 * Request parameters: |
| 382 * | 383 * |
| 383 * [accountId] - The GTM Account ID. | 384 * [accountId] - The GTM Account ID. |
| 384 * | 385 * |
| 385 * [containerId] - The GTM Container ID. | 386 * [containerId] - The GTM Container ID. |
| 386 * | 387 * |
| 387 * [fingerprint] - When provided, this fingerprint must match the fingerprint | 388 * [fingerprint] - When provided, this fingerprint must match the fingerprint |
| 388 * of the container in storage. | 389 * of the container in storage. |
| 389 * | 390 * |
| 390 * Completes with a [Container]. | 391 * Completes with a [Container]. |
| 391 * | 392 * |
| 392 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 393 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 393 * error. | 394 * error. |
| 394 * | 395 * |
| 395 * If the used [http.Client] completes with an error when making a REST call, | 396 * If the used [http.Client] completes with an error when making a REST call, |
| 396 * this method will complete with the same error. | 397 * this method will complete with the same error. |
| 397 */ | 398 */ |
| 398 async.Future<Container> update(Container request, core.String accountId, core.
String containerId, {core.String fingerprint}) { | 399 async.Future<Container> update(Container request, core.String accountId, core.
String containerId, {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 = common.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 | 420 |
| 420 _url = 'accounts/' + common_internal.Escaper.ecapeVariable('$accountId') + '
/containers/' + common_internal.Escaper.ecapeVariable('$containerId'); | 421 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId'); |
| 421 | 422 |
| 422 var _response = _requester.request(_url, | 423 var _response = _requester.request(_url, |
| 423 "PUT", | 424 "PUT", |
| 424 body: _body, | 425 body: _body, |
| 425 queryParams: _queryParams, | 426 queryParams: _queryParams, |
| 426 uploadOptions: _uploadOptions, | 427 uploadOptions: _uploadOptions, |
| 427 uploadMedia: _uploadMedia, | 428 uploadMedia: _uploadMedia, |
| 428 downloadOptions: _downloadOptions); | 429 downloadOptions: _downloadOptions); |
| 429 return _response.then((data) => new Container.fromJson(data)); | 430 return _response.then((data) => new Container.fromJson(data)); |
| 430 } | 431 } |
| 431 | 432 |
| 432 } | 433 } |
| 433 | 434 |
| 434 | 435 |
| 435 /** Not documented yet. */ | |
| 436 class AccountsContainersMacrosResourceApi { | 436 class AccountsContainersMacrosResourceApi { |
| 437 final common_internal.ApiRequester _requester; | 437 final commons.ApiRequester _requester; |
| 438 | 438 |
| 439 AccountsContainersMacrosResourceApi(common_internal.ApiRequester client) : | 439 AccountsContainersMacrosResourceApi(commons.ApiRequester client) : |
| 440 _requester = client; | 440 _requester = client; |
| 441 | 441 |
| 442 /** | 442 /** |
| 443 * Creates a GTM Macro. | 443 * Creates a GTM Macro. |
| 444 * | 444 * |
| 445 * [request] - The metadata request object. | 445 * [request] - The metadata request object. |
| 446 * | 446 * |
| 447 * Request parameters: | 447 * Request parameters: |
| 448 * | 448 * |
| 449 * [accountId] - The GTM Account ID. | 449 * [accountId] - The GTM Account ID. |
| 450 * | 450 * |
| 451 * [containerId] - The GTM Container ID. | 451 * [containerId] - The GTM Container ID. |
| 452 * | 452 * |
| 453 * Completes with a [Macro]. | 453 * Completes with a [Macro]. |
| 454 * | 454 * |
| 455 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 455 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 456 * error. | 456 * error. |
| 457 * | 457 * |
| 458 * If the used [http.Client] completes with an error when making a REST call, | 458 * If the used [http.Client] completes with an error when making a REST call, |
| 459 * this method will complete with the same error. | 459 * this method will complete with the same error. |
| 460 */ | 460 */ |
| 461 async.Future<Macro> create(Macro request, core.String accountId, core.String c
ontainerId) { | 461 async.Future<Macro> create(Macro request, core.String accountId, core.String c
ontainerId) { |
| 462 var _url = null; | 462 var _url = null; |
| 463 var _queryParams = new core.Map(); | 463 var _queryParams = new core.Map(); |
| 464 var _uploadMedia = null; | 464 var _uploadMedia = null; |
| 465 var _uploadOptions = null; | 465 var _uploadOptions = null; |
| 466 var _downloadOptions = common.DownloadOptions.Metadata; | 466 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 467 var _body = null; | 467 var _body = null; |
| 468 | 468 |
| 469 if (request != null) { | 469 if (request != null) { |
| 470 _body = convert.JSON.encode((request).toJson()); | 470 _body = convert.JSON.encode((request).toJson()); |
| 471 } | 471 } |
| 472 if (accountId == null) { | 472 if (accountId == null) { |
| 473 throw new core.ArgumentError("Parameter accountId is required."); | 473 throw new core.ArgumentError("Parameter accountId is required."); |
| 474 } | 474 } |
| 475 if (containerId == null) { | 475 if (containerId == null) { |
| 476 throw new core.ArgumentError("Parameter containerId is required."); | 476 throw new core.ArgumentError("Parameter containerId is required."); |
| 477 } | 477 } |
| 478 | 478 |
| 479 | 479 |
| 480 _url = 'accounts/' + common_internal.Escaper.ecapeVariable('$accountId') + '
/containers/' + common_internal.Escaper.ecapeVariable('$containerId') + '/macros
'; | 480 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/macros'; |
| 481 | 481 |
| 482 var _response = _requester.request(_url, | 482 var _response = _requester.request(_url, |
| 483 "POST", | 483 "POST", |
| 484 body: _body, | 484 body: _body, |
| 485 queryParams: _queryParams, | 485 queryParams: _queryParams, |
| 486 uploadOptions: _uploadOptions, | 486 uploadOptions: _uploadOptions, |
| 487 uploadMedia: _uploadMedia, | 487 uploadMedia: _uploadMedia, |
| 488 downloadOptions: _downloadOptions); | 488 downloadOptions: _downloadOptions); |
| 489 return _response.then((data) => new Macro.fromJson(data)); | 489 return _response.then((data) => new Macro.fromJson(data)); |
| 490 } | 490 } |
| 491 | 491 |
| 492 /** | 492 /** |
| 493 * Deletes a GTM Macro. | 493 * Deletes a GTM Macro. |
| 494 * | 494 * |
| 495 * Request parameters: | 495 * Request parameters: |
| 496 * | 496 * |
| 497 * [accountId] - The GTM Account ID. | 497 * [accountId] - The GTM Account ID. |
| 498 * | 498 * |
| 499 * [containerId] - The GTM Container ID. | 499 * [containerId] - The GTM Container ID. |
| 500 * | 500 * |
| 501 * [macroId] - The GTM Macro ID. | 501 * [macroId] - The GTM Macro ID. |
| 502 * | 502 * |
| 503 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 503 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 504 * error. | 504 * error. |
| 505 * | 505 * |
| 506 * If the used [http.Client] completes with an error when making a REST call, | 506 * If the used [http.Client] completes with an error when making a REST call, |
| 507 * this method will complete with the same error. | 507 * this method will complete with the same error. |
| 508 */ | 508 */ |
| 509 async.Future delete(core.String accountId, core.String containerId, core.Strin
g macroId) { | 509 async.Future delete(core.String accountId, core.String containerId, core.Strin
g macroId) { |
| 510 var _url = null; | 510 var _url = null; |
| 511 var _queryParams = new core.Map(); | 511 var _queryParams = new core.Map(); |
| 512 var _uploadMedia = null; | 512 var _uploadMedia = null; |
| 513 var _uploadOptions = null; | 513 var _uploadOptions = null; |
| 514 var _downloadOptions = common.DownloadOptions.Metadata; | 514 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 515 var _body = null; | 515 var _body = null; |
| 516 | 516 |
| 517 if (accountId == null) { | 517 if (accountId == null) { |
| 518 throw new core.ArgumentError("Parameter accountId is required."); | 518 throw new core.ArgumentError("Parameter accountId is required."); |
| 519 } | 519 } |
| 520 if (containerId == null) { | 520 if (containerId == null) { |
| 521 throw new core.ArgumentError("Parameter containerId is required."); | 521 throw new core.ArgumentError("Parameter containerId is required."); |
| 522 } | 522 } |
| 523 if (macroId == null) { | 523 if (macroId == null) { |
| 524 throw new core.ArgumentError("Parameter macroId is required."); | 524 throw new core.ArgumentError("Parameter macroId is required."); |
| 525 } | 525 } |
| 526 | 526 |
| 527 _downloadOptions = null; | 527 _downloadOptions = null; |
| 528 | 528 |
| 529 _url = 'accounts/' + common_internal.Escaper.ecapeVariable('$accountId') + '
/containers/' + common_internal.Escaper.ecapeVariable('$containerId') + '/macros
/' + common_internal.Escaper.ecapeVariable('$macroId'); | 529 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/macros/' + commons.Esc
aper.ecapeVariable('$macroId'); |
| 530 | 530 |
| 531 var _response = _requester.request(_url, | 531 var _response = _requester.request(_url, |
| 532 "DELETE", | 532 "DELETE", |
| 533 body: _body, | 533 body: _body, |
| 534 queryParams: _queryParams, | 534 queryParams: _queryParams, |
| 535 uploadOptions: _uploadOptions, | 535 uploadOptions: _uploadOptions, |
| 536 uploadMedia: _uploadMedia, | 536 uploadMedia: _uploadMedia, |
| 537 downloadOptions: _downloadOptions); | 537 downloadOptions: _downloadOptions); |
| 538 return _response.then((data) => null); | 538 return _response.then((data) => null); |
| 539 } | 539 } |
| 540 | 540 |
| 541 /** | 541 /** |
| 542 * Gets a GTM Macro. | 542 * Gets a GTM Macro. |
| 543 * | 543 * |
| 544 * Request parameters: | 544 * Request parameters: |
| 545 * | 545 * |
| 546 * [accountId] - The GTM Account ID. | 546 * [accountId] - The GTM Account ID. |
| 547 * | 547 * |
| 548 * [containerId] - The GTM Container ID. | 548 * [containerId] - The GTM Container ID. |
| 549 * | 549 * |
| 550 * [macroId] - The GTM Macro ID. | 550 * [macroId] - The GTM Macro ID. |
| 551 * | 551 * |
| 552 * Completes with a [Macro]. | 552 * Completes with a [Macro]. |
| 553 * | 553 * |
| 554 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 554 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 555 * error. | 555 * error. |
| 556 * | 556 * |
| 557 * If the used [http.Client] completes with an error when making a REST call, | 557 * If the used [http.Client] completes with an error when making a REST call, |
| 558 * this method will complete with the same error. | 558 * this method will complete with the same error. |
| 559 */ | 559 */ |
| 560 async.Future<Macro> get(core.String accountId, core.String containerId, core.S
tring macroId) { | 560 async.Future<Macro> get(core.String accountId, core.String containerId, core.S
tring macroId) { |
| 561 var _url = null; | 561 var _url = null; |
| 562 var _queryParams = new core.Map(); | 562 var _queryParams = new core.Map(); |
| 563 var _uploadMedia = null; | 563 var _uploadMedia = null; |
| 564 var _uploadOptions = null; | 564 var _uploadOptions = null; |
| 565 var _downloadOptions = common.DownloadOptions.Metadata; | 565 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 566 var _body = null; | 566 var _body = null; |
| 567 | 567 |
| 568 if (accountId == null) { | 568 if (accountId == null) { |
| 569 throw new core.ArgumentError("Parameter accountId is required."); | 569 throw new core.ArgumentError("Parameter accountId is required."); |
| 570 } | 570 } |
| 571 if (containerId == null) { | 571 if (containerId == null) { |
| 572 throw new core.ArgumentError("Parameter containerId is required."); | 572 throw new core.ArgumentError("Parameter containerId is required."); |
| 573 } | 573 } |
| 574 if (macroId == null) { | 574 if (macroId == null) { |
| 575 throw new core.ArgumentError("Parameter macroId is required."); | 575 throw new core.ArgumentError("Parameter macroId is required."); |
| 576 } | 576 } |
| 577 | 577 |
| 578 | 578 |
| 579 _url = 'accounts/' + common_internal.Escaper.ecapeVariable('$accountId') + '
/containers/' + common_internal.Escaper.ecapeVariable('$containerId') + '/macros
/' + common_internal.Escaper.ecapeVariable('$macroId'); | 579 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/macros/' + commons.Esc
aper.ecapeVariable('$macroId'); |
| 580 | 580 |
| 581 var _response = _requester.request(_url, | 581 var _response = _requester.request(_url, |
| 582 "GET", | 582 "GET", |
| 583 body: _body, | 583 body: _body, |
| 584 queryParams: _queryParams, | 584 queryParams: _queryParams, |
| 585 uploadOptions: _uploadOptions, | 585 uploadOptions: _uploadOptions, |
| 586 uploadMedia: _uploadMedia, | 586 uploadMedia: _uploadMedia, |
| 587 downloadOptions: _downloadOptions); | 587 downloadOptions: _downloadOptions); |
| 588 return _response.then((data) => new Macro.fromJson(data)); | 588 return _response.then((data) => new Macro.fromJson(data)); |
| 589 } | 589 } |
| 590 | 590 |
| 591 /** | 591 /** |
| 592 * Lists all GTM Macros of a Container. | 592 * Lists all GTM Macros of a Container. |
| 593 * | 593 * |
| 594 * Request parameters: | 594 * Request parameters: |
| 595 * | 595 * |
| 596 * [accountId] - The GTM Account ID. | 596 * [accountId] - The GTM Account ID. |
| 597 * | 597 * |
| 598 * [containerId] - The GTM Container ID. | 598 * [containerId] - The GTM Container ID. |
| 599 * | 599 * |
| 600 * Completes with a [ListMacrosResponse]. | 600 * Completes with a [ListMacrosResponse]. |
| 601 * | 601 * |
| 602 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 602 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 603 * error. | 603 * error. |
| 604 * | 604 * |
| 605 * If the used [http.Client] completes with an error when making a REST call, | 605 * If the used [http.Client] completes with an error when making a REST call, |
| 606 * this method will complete with the same error. | 606 * this method will complete with the same error. |
| 607 */ | 607 */ |
| 608 async.Future<ListMacrosResponse> list(core.String accountId, core.String conta
inerId) { | 608 async.Future<ListMacrosResponse> list(core.String accountId, core.String conta
inerId) { |
| 609 var _url = null; | 609 var _url = null; |
| 610 var _queryParams = new core.Map(); | 610 var _queryParams = new core.Map(); |
| 611 var _uploadMedia = null; | 611 var _uploadMedia = null; |
| 612 var _uploadOptions = null; | 612 var _uploadOptions = null; |
| 613 var _downloadOptions = common.DownloadOptions.Metadata; | 613 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 614 var _body = null; | 614 var _body = null; |
| 615 | 615 |
| 616 if (accountId == null) { | 616 if (accountId == null) { |
| 617 throw new core.ArgumentError("Parameter accountId is required."); | 617 throw new core.ArgumentError("Parameter accountId is required."); |
| 618 } | 618 } |
| 619 if (containerId == null) { | 619 if (containerId == null) { |
| 620 throw new core.ArgumentError("Parameter containerId is required."); | 620 throw new core.ArgumentError("Parameter containerId is required."); |
| 621 } | 621 } |
| 622 | 622 |
| 623 | 623 |
| 624 _url = 'accounts/' + common_internal.Escaper.ecapeVariable('$accountId') + '
/containers/' + common_internal.Escaper.ecapeVariable('$containerId') + '/macros
'; | 624 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/macros'; |
| 625 | 625 |
| 626 var _response = _requester.request(_url, | 626 var _response = _requester.request(_url, |
| 627 "GET", | 627 "GET", |
| 628 body: _body, | 628 body: _body, |
| 629 queryParams: _queryParams, | 629 queryParams: _queryParams, |
| 630 uploadOptions: _uploadOptions, | 630 uploadOptions: _uploadOptions, |
| 631 uploadMedia: _uploadMedia, | 631 uploadMedia: _uploadMedia, |
| 632 downloadOptions: _downloadOptions); | 632 downloadOptions: _downloadOptions); |
| 633 return _response.then((data) => new ListMacrosResponse.fromJson(data)); | 633 return _response.then((data) => new ListMacrosResponse.fromJson(data)); |
| 634 } | 634 } |
| 635 | 635 |
| 636 /** | 636 /** |
| 637 * Updates a GTM Macro. | 637 * Updates a GTM Macro. |
| 638 * | 638 * |
| 639 * [request] - The metadata request object. | 639 * [request] - The metadata request object. |
| 640 * | 640 * |
| 641 * Request parameters: | 641 * Request parameters: |
| 642 * | 642 * |
| 643 * [accountId] - The GTM Account ID. | 643 * [accountId] - The GTM Account ID. |
| 644 * | 644 * |
| 645 * [containerId] - The GTM Container ID. | 645 * [containerId] - The GTM Container ID. |
| 646 * | 646 * |
| 647 * [macroId] - The GTM Macro ID. | 647 * [macroId] - The GTM Macro ID. |
| 648 * | 648 * |
| 649 * [fingerprint] - When provided, this fingerprint must match the fingerprint | 649 * [fingerprint] - When provided, this fingerprint must match the fingerprint |
| 650 * of the macro in storage. | 650 * of the macro in storage. |
| 651 * | 651 * |
| 652 * Completes with a [Macro]. | 652 * Completes with a [Macro]. |
| 653 * | 653 * |
| 654 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 654 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 655 * error. | 655 * error. |
| 656 * | 656 * |
| 657 * If the used [http.Client] completes with an error when making a REST call, | 657 * If the used [http.Client] completes with an error when making a REST call, |
| 658 * this method will complete with the same error. | 658 * this method will complete with the same error. |
| 659 */ | 659 */ |
| 660 async.Future<Macro> update(Macro request, core.String accountId, core.String c
ontainerId, core.String macroId, {core.String fingerprint}) { | 660 async.Future<Macro> update(Macro request, core.String accountId, core.String c
ontainerId, core.String macroId, {core.String fingerprint}) { |
| 661 var _url = null; | 661 var _url = null; |
| 662 var _queryParams = new core.Map(); | 662 var _queryParams = new core.Map(); |
| 663 var _uploadMedia = null; | 663 var _uploadMedia = null; |
| 664 var _uploadOptions = null; | 664 var _uploadOptions = null; |
| 665 var _downloadOptions = common.DownloadOptions.Metadata; | 665 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 666 var _body = null; | 666 var _body = null; |
| 667 | 667 |
| 668 if (request != null) { | 668 if (request != null) { |
| 669 _body = convert.JSON.encode((request).toJson()); | 669 _body = convert.JSON.encode((request).toJson()); |
| 670 } | 670 } |
| 671 if (accountId == null) { | 671 if (accountId == null) { |
| 672 throw new core.ArgumentError("Parameter accountId is required."); | 672 throw new core.ArgumentError("Parameter accountId is required."); |
| 673 } | 673 } |
| 674 if (containerId == null) { | 674 if (containerId == null) { |
| 675 throw new core.ArgumentError("Parameter containerId is required."); | 675 throw new core.ArgumentError("Parameter containerId is required."); |
| 676 } | 676 } |
| 677 if (macroId == null) { | 677 if (macroId == null) { |
| 678 throw new core.ArgumentError("Parameter macroId is required."); | 678 throw new core.ArgumentError("Parameter macroId is required."); |
| 679 } | 679 } |
| 680 if (fingerprint != null) { | 680 if (fingerprint != null) { |
| 681 _queryParams["fingerprint"] = [fingerprint]; | 681 _queryParams["fingerprint"] = [fingerprint]; |
| 682 } | 682 } |
| 683 | 683 |
| 684 | 684 |
| 685 _url = 'accounts/' + common_internal.Escaper.ecapeVariable('$accountId') + '
/containers/' + common_internal.Escaper.ecapeVariable('$containerId') + '/macros
/' + common_internal.Escaper.ecapeVariable('$macroId'); | 685 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/macros/' + commons.Esc
aper.ecapeVariable('$macroId'); |
| 686 | 686 |
| 687 var _response = _requester.request(_url, | 687 var _response = _requester.request(_url, |
| 688 "PUT", | 688 "PUT", |
| 689 body: _body, | 689 body: _body, |
| 690 queryParams: _queryParams, | 690 queryParams: _queryParams, |
| 691 uploadOptions: _uploadOptions, | 691 uploadOptions: _uploadOptions, |
| 692 uploadMedia: _uploadMedia, | 692 uploadMedia: _uploadMedia, |
| 693 downloadOptions: _downloadOptions); | 693 downloadOptions: _downloadOptions); |
| 694 return _response.then((data) => new Macro.fromJson(data)); | 694 return _response.then((data) => new Macro.fromJson(data)); |
| 695 } | 695 } |
| 696 | 696 |
| 697 } | 697 } |
| 698 | 698 |
| 699 | 699 |
| 700 /** Not documented yet. */ | |
| 701 class AccountsContainersRulesResourceApi { | 700 class AccountsContainersRulesResourceApi { |
| 702 final common_internal.ApiRequester _requester; | 701 final commons.ApiRequester _requester; |
| 703 | 702 |
| 704 AccountsContainersRulesResourceApi(common_internal.ApiRequester client) : | 703 AccountsContainersRulesResourceApi(commons.ApiRequester client) : |
| 705 _requester = client; | 704 _requester = client; |
| 706 | 705 |
| 707 /** | 706 /** |
| 708 * Creates a GTM Rule. | 707 * Creates a GTM Rule. |
| 709 * | 708 * |
| 710 * [request] - The metadata request object. | 709 * [request] - The metadata request object. |
| 711 * | 710 * |
| 712 * Request parameters: | 711 * Request parameters: |
| 713 * | 712 * |
| 714 * [accountId] - The GTM Account ID. | 713 * [accountId] - The GTM Account ID. |
| 715 * | 714 * |
| 716 * [containerId] - The GTM Container ID. | 715 * [containerId] - The GTM Container ID. |
| 717 * | 716 * |
| 718 * Completes with a [Rule]. | 717 * Completes with a [Rule]. |
| 719 * | 718 * |
| 720 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 719 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 721 * error. | 720 * error. |
| 722 * | 721 * |
| 723 * If the used [http.Client] completes with an error when making a REST call, | 722 * If the used [http.Client] completes with an error when making a REST call, |
| 724 * this method will complete with the same error. | 723 * this method will complete with the same error. |
| 725 */ | 724 */ |
| 726 async.Future<Rule> create(Rule request, core.String accountId, core.String con
tainerId) { | 725 async.Future<Rule> create(Rule request, core.String accountId, core.String con
tainerId) { |
| 727 var _url = null; | 726 var _url = null; |
| 728 var _queryParams = new core.Map(); | 727 var _queryParams = new core.Map(); |
| 729 var _uploadMedia = null; | 728 var _uploadMedia = null; |
| 730 var _uploadOptions = null; | 729 var _uploadOptions = null; |
| 731 var _downloadOptions = common.DownloadOptions.Metadata; | 730 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 732 var _body = null; | 731 var _body = null; |
| 733 | 732 |
| 734 if (request != null) { | 733 if (request != null) { |
| 735 _body = convert.JSON.encode((request).toJson()); | 734 _body = convert.JSON.encode((request).toJson()); |
| 736 } | 735 } |
| 737 if (accountId == null) { | 736 if (accountId == null) { |
| 738 throw new core.ArgumentError("Parameter accountId is required."); | 737 throw new core.ArgumentError("Parameter accountId is required."); |
| 739 } | 738 } |
| 740 if (containerId == null) { | 739 if (containerId == null) { |
| 741 throw new core.ArgumentError("Parameter containerId is required."); | 740 throw new core.ArgumentError("Parameter containerId is required."); |
| 742 } | 741 } |
| 743 | 742 |
| 744 | 743 |
| 745 _url = 'accounts/' + common_internal.Escaper.ecapeVariable('$accountId') + '
/containers/' + common_internal.Escaper.ecapeVariable('$containerId') + '/rules'
; | 744 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/rules'; |
| 746 | 745 |
| 747 var _response = _requester.request(_url, | 746 var _response = _requester.request(_url, |
| 748 "POST", | 747 "POST", |
| 749 body: _body, | 748 body: _body, |
| 750 queryParams: _queryParams, | 749 queryParams: _queryParams, |
| 751 uploadOptions: _uploadOptions, | 750 uploadOptions: _uploadOptions, |
| 752 uploadMedia: _uploadMedia, | 751 uploadMedia: _uploadMedia, |
| 753 downloadOptions: _downloadOptions); | 752 downloadOptions: _downloadOptions); |
| 754 return _response.then((data) => new Rule.fromJson(data)); | 753 return _response.then((data) => new Rule.fromJson(data)); |
| 755 } | 754 } |
| 756 | 755 |
| 757 /** | 756 /** |
| 758 * Deletes a GTM Rule. | 757 * Deletes a GTM Rule. |
| 759 * | 758 * |
| 760 * Request parameters: | 759 * Request parameters: |
| 761 * | 760 * |
| 762 * [accountId] - The GTM Account ID. | 761 * [accountId] - The GTM Account ID. |
| 763 * | 762 * |
| 764 * [containerId] - The GTM Container ID. | 763 * [containerId] - The GTM Container ID. |
| 765 * | 764 * |
| 766 * [ruleId] - The GTM Rule ID. | 765 * [ruleId] - The GTM Rule ID. |
| 767 * | 766 * |
| 768 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 767 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 769 * error. | 768 * error. |
| 770 * | 769 * |
| 771 * If the used [http.Client] completes with an error when making a REST call, | 770 * If the used [http.Client] completes with an error when making a REST call, |
| 772 * this method will complete with the same error. | 771 * this method will complete with the same error. |
| 773 */ | 772 */ |
| 774 async.Future delete(core.String accountId, core.String containerId, core.Strin
g ruleId) { | 773 async.Future delete(core.String accountId, core.String containerId, core.Strin
g ruleId) { |
| 775 var _url = null; | 774 var _url = null; |
| 776 var _queryParams = new core.Map(); | 775 var _queryParams = new core.Map(); |
| 777 var _uploadMedia = null; | 776 var _uploadMedia = null; |
| 778 var _uploadOptions = null; | 777 var _uploadOptions = null; |
| 779 var _downloadOptions = common.DownloadOptions.Metadata; | 778 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 780 var _body = null; | 779 var _body = null; |
| 781 | 780 |
| 782 if (accountId == null) { | 781 if (accountId == null) { |
| 783 throw new core.ArgumentError("Parameter accountId is required."); | 782 throw new core.ArgumentError("Parameter accountId is required."); |
| 784 } | 783 } |
| 785 if (containerId == null) { | 784 if (containerId == null) { |
| 786 throw new core.ArgumentError("Parameter containerId is required."); | 785 throw new core.ArgumentError("Parameter containerId is required."); |
| 787 } | 786 } |
| 788 if (ruleId == null) { | 787 if (ruleId == null) { |
| 789 throw new core.ArgumentError("Parameter ruleId is required."); | 788 throw new core.ArgumentError("Parameter ruleId is required."); |
| 790 } | 789 } |
| 791 | 790 |
| 792 _downloadOptions = null; | 791 _downloadOptions = null; |
| 793 | 792 |
| 794 _url = 'accounts/' + common_internal.Escaper.ecapeVariable('$accountId') + '
/containers/' + common_internal.Escaper.ecapeVariable('$containerId') + '/rules/
' + common_internal.Escaper.ecapeVariable('$ruleId'); | 793 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/rules/' + commons.Esca
per.ecapeVariable('$ruleId'); |
| 795 | 794 |
| 796 var _response = _requester.request(_url, | 795 var _response = _requester.request(_url, |
| 797 "DELETE", | 796 "DELETE", |
| 798 body: _body, | 797 body: _body, |
| 799 queryParams: _queryParams, | 798 queryParams: _queryParams, |
| 800 uploadOptions: _uploadOptions, | 799 uploadOptions: _uploadOptions, |
| 801 uploadMedia: _uploadMedia, | 800 uploadMedia: _uploadMedia, |
| 802 downloadOptions: _downloadOptions); | 801 downloadOptions: _downloadOptions); |
| 803 return _response.then((data) => null); | 802 return _response.then((data) => null); |
| 804 } | 803 } |
| 805 | 804 |
| 806 /** | 805 /** |
| 807 * Gets a GTM Rule. | 806 * Gets a GTM Rule. |
| 808 * | 807 * |
| 809 * Request parameters: | 808 * Request parameters: |
| 810 * | 809 * |
| 811 * [accountId] - The GTM Account ID. | 810 * [accountId] - The GTM Account ID. |
| 812 * | 811 * |
| 813 * [containerId] - The GTM Container ID. | 812 * [containerId] - The GTM Container ID. |
| 814 * | 813 * |
| 815 * [ruleId] - The GTM Rule ID. | 814 * [ruleId] - The GTM Rule ID. |
| 816 * | 815 * |
| 817 * Completes with a [Rule]. | 816 * Completes with a [Rule]. |
| 818 * | 817 * |
| 819 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 818 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 820 * error. | 819 * error. |
| 821 * | 820 * |
| 822 * If the used [http.Client] completes with an error when making a REST call, | 821 * If the used [http.Client] completes with an error when making a REST call, |
| 823 * this method will complete with the same error. | 822 * this method will complete with the same error. |
| 824 */ | 823 */ |
| 825 async.Future<Rule> get(core.String accountId, core.String containerId, core.St
ring ruleId) { | 824 async.Future<Rule> get(core.String accountId, core.String containerId, core.St
ring ruleId) { |
| 826 var _url = null; | 825 var _url = null; |
| 827 var _queryParams = new core.Map(); | 826 var _queryParams = new core.Map(); |
| 828 var _uploadMedia = null; | 827 var _uploadMedia = null; |
| 829 var _uploadOptions = null; | 828 var _uploadOptions = null; |
| 830 var _downloadOptions = common.DownloadOptions.Metadata; | 829 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 831 var _body = null; | 830 var _body = null; |
| 832 | 831 |
| 833 if (accountId == null) { | 832 if (accountId == null) { |
| 834 throw new core.ArgumentError("Parameter accountId is required."); | 833 throw new core.ArgumentError("Parameter accountId is required."); |
| 835 } | 834 } |
| 836 if (containerId == null) { | 835 if (containerId == null) { |
| 837 throw new core.ArgumentError("Parameter containerId is required."); | 836 throw new core.ArgumentError("Parameter containerId is required."); |
| 838 } | 837 } |
| 839 if (ruleId == null) { | 838 if (ruleId == null) { |
| 840 throw new core.ArgumentError("Parameter ruleId is required."); | 839 throw new core.ArgumentError("Parameter ruleId is required."); |
| 841 } | 840 } |
| 842 | 841 |
| 843 | 842 |
| 844 _url = 'accounts/' + common_internal.Escaper.ecapeVariable('$accountId') + '
/containers/' + common_internal.Escaper.ecapeVariable('$containerId') + '/rules/
' + common_internal.Escaper.ecapeVariable('$ruleId'); | 843 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/rules/' + commons.Esca
per.ecapeVariable('$ruleId'); |
| 845 | 844 |
| 846 var _response = _requester.request(_url, | 845 var _response = _requester.request(_url, |
| 847 "GET", | 846 "GET", |
| 848 body: _body, | 847 body: _body, |
| 849 queryParams: _queryParams, | 848 queryParams: _queryParams, |
| 850 uploadOptions: _uploadOptions, | 849 uploadOptions: _uploadOptions, |
| 851 uploadMedia: _uploadMedia, | 850 uploadMedia: _uploadMedia, |
| 852 downloadOptions: _downloadOptions); | 851 downloadOptions: _downloadOptions); |
| 853 return _response.then((data) => new Rule.fromJson(data)); | 852 return _response.then((data) => new Rule.fromJson(data)); |
| 854 } | 853 } |
| 855 | 854 |
| 856 /** | 855 /** |
| 857 * Lists all GTM Rules of a Container. | 856 * Lists all GTM Rules of a Container. |
| 858 * | 857 * |
| 859 * Request parameters: | 858 * Request parameters: |
| 860 * | 859 * |
| 861 * [accountId] - The GTM Account ID. | 860 * [accountId] - The GTM Account ID. |
| 862 * | 861 * |
| 863 * [containerId] - The GTM Container ID. | 862 * [containerId] - The GTM Container ID. |
| 864 * | 863 * |
| 865 * Completes with a [ListRulesResponse]. | 864 * Completes with a [ListRulesResponse]. |
| 866 * | 865 * |
| 867 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 866 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 868 * error. | 867 * error. |
| 869 * | 868 * |
| 870 * If the used [http.Client] completes with an error when making a REST call, | 869 * If the used [http.Client] completes with an error when making a REST call, |
| 871 * this method will complete with the same error. | 870 * this method will complete with the same error. |
| 872 */ | 871 */ |
| 873 async.Future<ListRulesResponse> list(core.String accountId, core.String contai
nerId) { | 872 async.Future<ListRulesResponse> list(core.String accountId, core.String contai
nerId) { |
| 874 var _url = null; | 873 var _url = null; |
| 875 var _queryParams = new core.Map(); | 874 var _queryParams = new core.Map(); |
| 876 var _uploadMedia = null; | 875 var _uploadMedia = null; |
| 877 var _uploadOptions = null; | 876 var _uploadOptions = null; |
| 878 var _downloadOptions = common.DownloadOptions.Metadata; | 877 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 879 var _body = null; | 878 var _body = null; |
| 880 | 879 |
| 881 if (accountId == null) { | 880 if (accountId == null) { |
| 882 throw new core.ArgumentError("Parameter accountId is required."); | 881 throw new core.ArgumentError("Parameter accountId is required."); |
| 883 } | 882 } |
| 884 if (containerId == null) { | 883 if (containerId == null) { |
| 885 throw new core.ArgumentError("Parameter containerId is required."); | 884 throw new core.ArgumentError("Parameter containerId is required."); |
| 886 } | 885 } |
| 887 | 886 |
| 888 | 887 |
| 889 _url = 'accounts/' + common_internal.Escaper.ecapeVariable('$accountId') + '
/containers/' + common_internal.Escaper.ecapeVariable('$containerId') + '/rules'
; | 888 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/rules'; |
| 890 | 889 |
| 891 var _response = _requester.request(_url, | 890 var _response = _requester.request(_url, |
| 892 "GET", | 891 "GET", |
| 893 body: _body, | 892 body: _body, |
| 894 queryParams: _queryParams, | 893 queryParams: _queryParams, |
| 895 uploadOptions: _uploadOptions, | 894 uploadOptions: _uploadOptions, |
| 896 uploadMedia: _uploadMedia, | 895 uploadMedia: _uploadMedia, |
| 897 downloadOptions: _downloadOptions); | 896 downloadOptions: _downloadOptions); |
| 898 return _response.then((data) => new ListRulesResponse.fromJson(data)); | 897 return _response.then((data) => new ListRulesResponse.fromJson(data)); |
| 899 } | 898 } |
| 900 | 899 |
| 901 /** | 900 /** |
| 902 * Updates a GTM Rule. | 901 * Updates a GTM Rule. |
| 903 * | 902 * |
| 904 * [request] - The metadata request object. | 903 * [request] - The metadata request object. |
| 905 * | 904 * |
| 906 * Request parameters: | 905 * Request parameters: |
| 907 * | 906 * |
| 908 * [accountId] - The GTM Account ID. | 907 * [accountId] - The GTM Account ID. |
| 909 * | 908 * |
| 910 * [containerId] - The GTM Container ID. | 909 * [containerId] - The GTM Container ID. |
| 911 * | 910 * |
| 912 * [ruleId] - The GTM Rule ID. | 911 * [ruleId] - The GTM Rule ID. |
| 913 * | 912 * |
| 914 * [fingerprint] - When provided, this fingerprint must match the fingerprint | 913 * [fingerprint] - When provided, this fingerprint must match the fingerprint |
| 915 * of the rule in storage. | 914 * of the rule in storage. |
| 916 * | 915 * |
| 917 * Completes with a [Rule]. | 916 * Completes with a [Rule]. |
| 918 * | 917 * |
| 919 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 918 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 920 * error. | 919 * error. |
| 921 * | 920 * |
| 922 * If the used [http.Client] completes with an error when making a REST call, | 921 * If the used [http.Client] completes with an error when making a REST call, |
| 923 * this method will complete with the same error. | 922 * this method will complete with the same error. |
| 924 */ | 923 */ |
| 925 async.Future<Rule> update(Rule request, core.String accountId, core.String con
tainerId, core.String ruleId, {core.String fingerprint}) { | 924 async.Future<Rule> update(Rule request, core.String accountId, core.String con
tainerId, core.String ruleId, {core.String fingerprint}) { |
| 926 var _url = null; | 925 var _url = null; |
| 927 var _queryParams = new core.Map(); | 926 var _queryParams = new core.Map(); |
| 928 var _uploadMedia = null; | 927 var _uploadMedia = null; |
| 929 var _uploadOptions = null; | 928 var _uploadOptions = null; |
| 930 var _downloadOptions = common.DownloadOptions.Metadata; | 929 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 931 var _body = null; | 930 var _body = null; |
| 932 | 931 |
| 933 if (request != null) { | 932 if (request != null) { |
| 934 _body = convert.JSON.encode((request).toJson()); | 933 _body = convert.JSON.encode((request).toJson()); |
| 935 } | 934 } |
| 936 if (accountId == null) { | 935 if (accountId == null) { |
| 937 throw new core.ArgumentError("Parameter accountId is required."); | 936 throw new core.ArgumentError("Parameter accountId is required."); |
| 938 } | 937 } |
| 939 if (containerId == null) { | 938 if (containerId == null) { |
| 940 throw new core.ArgumentError("Parameter containerId is required."); | 939 throw new core.ArgumentError("Parameter containerId is required."); |
| 941 } | 940 } |
| 942 if (ruleId == null) { | 941 if (ruleId == null) { |
| 943 throw new core.ArgumentError("Parameter ruleId is required."); | 942 throw new core.ArgumentError("Parameter ruleId is required."); |
| 944 } | 943 } |
| 945 if (fingerprint != null) { | 944 if (fingerprint != null) { |
| 946 _queryParams["fingerprint"] = [fingerprint]; | 945 _queryParams["fingerprint"] = [fingerprint]; |
| 947 } | 946 } |
| 948 | 947 |
| 949 | 948 |
| 950 _url = 'accounts/' + common_internal.Escaper.ecapeVariable('$accountId') + '
/containers/' + common_internal.Escaper.ecapeVariable('$containerId') + '/rules/
' + common_internal.Escaper.ecapeVariable('$ruleId'); | 949 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/rules/' + commons.Esca
per.ecapeVariable('$ruleId'); |
| 951 | 950 |
| 952 var _response = _requester.request(_url, | 951 var _response = _requester.request(_url, |
| 953 "PUT", | 952 "PUT", |
| 954 body: _body, | 953 body: _body, |
| 955 queryParams: _queryParams, | 954 queryParams: _queryParams, |
| 956 uploadOptions: _uploadOptions, | 955 uploadOptions: _uploadOptions, |
| 957 uploadMedia: _uploadMedia, | 956 uploadMedia: _uploadMedia, |
| 958 downloadOptions: _downloadOptions); | 957 downloadOptions: _downloadOptions); |
| 959 return _response.then((data) => new Rule.fromJson(data)); | 958 return _response.then((data) => new Rule.fromJson(data)); |
| 960 } | 959 } |
| 961 | 960 |
| 962 } | 961 } |
| 963 | 962 |
| 964 | 963 |
| 965 /** Not documented yet. */ | |
| 966 class AccountsContainersTagsResourceApi { | 964 class AccountsContainersTagsResourceApi { |
| 967 final common_internal.ApiRequester _requester; | 965 final commons.ApiRequester _requester; |
| 968 | 966 |
| 969 AccountsContainersTagsResourceApi(common_internal.ApiRequester client) : | 967 AccountsContainersTagsResourceApi(commons.ApiRequester client) : |
| 970 _requester = client; | 968 _requester = client; |
| 971 | 969 |
| 972 /** | 970 /** |
| 973 * Creates a GTM Tag. | 971 * Creates a GTM Tag. |
| 974 * | 972 * |
| 975 * [request] - The metadata request object. | 973 * [request] - The metadata request object. |
| 976 * | 974 * |
| 977 * Request parameters: | 975 * Request parameters: |
| 978 * | 976 * |
| 979 * [accountId] - The GTM Account ID. | 977 * [accountId] - The GTM Account ID. |
| 980 * | 978 * |
| 981 * [containerId] - The GTM Container ID. | 979 * [containerId] - The GTM Container ID. |
| 982 * | 980 * |
| 983 * Completes with a [Tag]. | 981 * Completes with a [Tag]. |
| 984 * | 982 * |
| 985 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 983 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 986 * error. | 984 * error. |
| 987 * | 985 * |
| 988 * If the used [http.Client] completes with an error when making a REST call, | 986 * If the used [http.Client] completes with an error when making a REST call, |
| 989 * this method will complete with the same error. | 987 * this method will complete with the same error. |
| 990 */ | 988 */ |
| 991 async.Future<Tag> create(Tag request, core.String accountId, core.String conta
inerId) { | 989 async.Future<Tag> create(Tag request, core.String accountId, core.String conta
inerId) { |
| 992 var _url = null; | 990 var _url = null; |
| 993 var _queryParams = new core.Map(); | 991 var _queryParams = new core.Map(); |
| 994 var _uploadMedia = null; | 992 var _uploadMedia = null; |
| 995 var _uploadOptions = null; | 993 var _uploadOptions = null; |
| 996 var _downloadOptions = common.DownloadOptions.Metadata; | 994 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 997 var _body = null; | 995 var _body = null; |
| 998 | 996 |
| 999 if (request != null) { | 997 if (request != null) { |
| 1000 _body = convert.JSON.encode((request).toJson()); | 998 _body = convert.JSON.encode((request).toJson()); |
| 1001 } | 999 } |
| 1002 if (accountId == null) { | 1000 if (accountId == null) { |
| 1003 throw new core.ArgumentError("Parameter accountId is required."); | 1001 throw new core.ArgumentError("Parameter accountId is required."); |
| 1004 } | 1002 } |
| 1005 if (containerId == null) { | 1003 if (containerId == null) { |
| 1006 throw new core.ArgumentError("Parameter containerId is required."); | 1004 throw new core.ArgumentError("Parameter containerId is required."); |
| 1007 } | 1005 } |
| 1008 | 1006 |
| 1009 | 1007 |
| 1010 _url = 'accounts/' + common_internal.Escaper.ecapeVariable('$accountId') + '
/containers/' + common_internal.Escaper.ecapeVariable('$containerId') + '/tags'; | 1008 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/tags'; |
| 1011 | 1009 |
| 1012 var _response = _requester.request(_url, | 1010 var _response = _requester.request(_url, |
| 1013 "POST", | 1011 "POST", |
| 1014 body: _body, | 1012 body: _body, |
| 1015 queryParams: _queryParams, | 1013 queryParams: _queryParams, |
| 1016 uploadOptions: _uploadOptions, | 1014 uploadOptions: _uploadOptions, |
| 1017 uploadMedia: _uploadMedia, | 1015 uploadMedia: _uploadMedia, |
| 1018 downloadOptions: _downloadOptions); | 1016 downloadOptions: _downloadOptions); |
| 1019 return _response.then((data) => new Tag.fromJson(data)); | 1017 return _response.then((data) => new Tag.fromJson(data)); |
| 1020 } | 1018 } |
| 1021 | 1019 |
| 1022 /** | 1020 /** |
| 1023 * Deletes a GTM Tag. | 1021 * Deletes a GTM Tag. |
| 1024 * | 1022 * |
| 1025 * Request parameters: | 1023 * Request parameters: |
| 1026 * | 1024 * |
| 1027 * [accountId] - The GTM Account ID. | 1025 * [accountId] - The GTM Account ID. |
| 1028 * | 1026 * |
| 1029 * [containerId] - The GTM Container ID. | 1027 * [containerId] - The GTM Container ID. |
| 1030 * | 1028 * |
| 1031 * [tagId] - The GTM Tag ID. | 1029 * [tagId] - The GTM Tag ID. |
| 1032 * | 1030 * |
| 1033 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1031 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 1034 * error. | 1032 * error. |
| 1035 * | 1033 * |
| 1036 * If the used [http.Client] completes with an error when making a REST call, | 1034 * If the used [http.Client] completes with an error when making a REST call, |
| 1037 * this method will complete with the same error. | 1035 * this method will complete with the same error. |
| 1038 */ | 1036 */ |
| 1039 async.Future delete(core.String accountId, core.String containerId, core.Strin
g tagId) { | 1037 async.Future delete(core.String accountId, core.String containerId, core.Strin
g tagId) { |
| 1040 var _url = null; | 1038 var _url = null; |
| 1041 var _queryParams = new core.Map(); | 1039 var _queryParams = new core.Map(); |
| 1042 var _uploadMedia = null; | 1040 var _uploadMedia = null; |
| 1043 var _uploadOptions = null; | 1041 var _uploadOptions = null; |
| 1044 var _downloadOptions = common.DownloadOptions.Metadata; | 1042 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1045 var _body = null; | 1043 var _body = null; |
| 1046 | 1044 |
| 1047 if (accountId == null) { | 1045 if (accountId == null) { |
| 1048 throw new core.ArgumentError("Parameter accountId is required."); | 1046 throw new core.ArgumentError("Parameter accountId is required."); |
| 1049 } | 1047 } |
| 1050 if (containerId == null) { | 1048 if (containerId == null) { |
| 1051 throw new core.ArgumentError("Parameter containerId is required."); | 1049 throw new core.ArgumentError("Parameter containerId is required."); |
| 1052 } | 1050 } |
| 1053 if (tagId == null) { | 1051 if (tagId == null) { |
| 1054 throw new core.ArgumentError("Parameter tagId is required."); | 1052 throw new core.ArgumentError("Parameter tagId is required."); |
| 1055 } | 1053 } |
| 1056 | 1054 |
| 1057 _downloadOptions = null; | 1055 _downloadOptions = null; |
| 1058 | 1056 |
| 1059 _url = 'accounts/' + common_internal.Escaper.ecapeVariable('$accountId') + '
/containers/' + common_internal.Escaper.ecapeVariable('$containerId') + '/tags/'
+ common_internal.Escaper.ecapeVariable('$tagId'); | 1057 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/tags/' + commons.Escap
er.ecapeVariable('$tagId'); |
| 1060 | 1058 |
| 1061 var _response = _requester.request(_url, | 1059 var _response = _requester.request(_url, |
| 1062 "DELETE", | 1060 "DELETE", |
| 1063 body: _body, | 1061 body: _body, |
| 1064 queryParams: _queryParams, | 1062 queryParams: _queryParams, |
| 1065 uploadOptions: _uploadOptions, | 1063 uploadOptions: _uploadOptions, |
| 1066 uploadMedia: _uploadMedia, | 1064 uploadMedia: _uploadMedia, |
| 1067 downloadOptions: _downloadOptions); | 1065 downloadOptions: _downloadOptions); |
| 1068 return _response.then((data) => null); | 1066 return _response.then((data) => null); |
| 1069 } | 1067 } |
| 1070 | 1068 |
| 1071 /** | 1069 /** |
| 1072 * Gets a GTM Tag. | 1070 * Gets a GTM Tag. |
| 1073 * | 1071 * |
| 1074 * Request parameters: | 1072 * Request parameters: |
| 1075 * | 1073 * |
| 1076 * [accountId] - The GTM Account ID. | 1074 * [accountId] - The GTM Account ID. |
| 1077 * | 1075 * |
| 1078 * [containerId] - The GTM Container ID. | 1076 * [containerId] - The GTM Container ID. |
| 1079 * | 1077 * |
| 1080 * [tagId] - The GTM Tag ID. | 1078 * [tagId] - The GTM Tag ID. |
| 1081 * | 1079 * |
| 1082 * Completes with a [Tag]. | 1080 * Completes with a [Tag]. |
| 1083 * | 1081 * |
| 1084 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1082 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 1085 * error. | 1083 * error. |
| 1086 * | 1084 * |
| 1087 * If the used [http.Client] completes with an error when making a REST call, | 1085 * If the used [http.Client] completes with an error when making a REST call, |
| 1088 * this method will complete with the same error. | 1086 * this method will complete with the same error. |
| 1089 */ | 1087 */ |
| 1090 async.Future<Tag> get(core.String accountId, core.String containerId, core.Str
ing tagId) { | 1088 async.Future<Tag> get(core.String accountId, core.String containerId, core.Str
ing tagId) { |
| 1091 var _url = null; | 1089 var _url = null; |
| 1092 var _queryParams = new core.Map(); | 1090 var _queryParams = new core.Map(); |
| 1093 var _uploadMedia = null; | 1091 var _uploadMedia = null; |
| 1094 var _uploadOptions = null; | 1092 var _uploadOptions = null; |
| 1095 var _downloadOptions = common.DownloadOptions.Metadata; | 1093 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1096 var _body = null; | 1094 var _body = null; |
| 1097 | 1095 |
| 1098 if (accountId == null) { | 1096 if (accountId == null) { |
| 1099 throw new core.ArgumentError("Parameter accountId is required."); | 1097 throw new core.ArgumentError("Parameter accountId is required."); |
| 1100 } | 1098 } |
| 1101 if (containerId == null) { | 1099 if (containerId == null) { |
| 1102 throw new core.ArgumentError("Parameter containerId is required."); | 1100 throw new core.ArgumentError("Parameter containerId is required."); |
| 1103 } | 1101 } |
| 1104 if (tagId == null) { | 1102 if (tagId == null) { |
| 1105 throw new core.ArgumentError("Parameter tagId is required."); | 1103 throw new core.ArgumentError("Parameter tagId is required."); |
| 1106 } | 1104 } |
| 1107 | 1105 |
| 1108 | 1106 |
| 1109 _url = 'accounts/' + common_internal.Escaper.ecapeVariable('$accountId') + '
/containers/' + common_internal.Escaper.ecapeVariable('$containerId') + '/tags/'
+ common_internal.Escaper.ecapeVariable('$tagId'); | 1107 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/tags/' + commons.Escap
er.ecapeVariable('$tagId'); |
| 1110 | 1108 |
| 1111 var _response = _requester.request(_url, | 1109 var _response = _requester.request(_url, |
| 1112 "GET", | 1110 "GET", |
| 1113 body: _body, | 1111 body: _body, |
| 1114 queryParams: _queryParams, | 1112 queryParams: _queryParams, |
| 1115 uploadOptions: _uploadOptions, | 1113 uploadOptions: _uploadOptions, |
| 1116 uploadMedia: _uploadMedia, | 1114 uploadMedia: _uploadMedia, |
| 1117 downloadOptions: _downloadOptions); | 1115 downloadOptions: _downloadOptions); |
| 1118 return _response.then((data) => new Tag.fromJson(data)); | 1116 return _response.then((data) => new Tag.fromJson(data)); |
| 1119 } | 1117 } |
| 1120 | 1118 |
| 1121 /** | 1119 /** |
| 1122 * Lists all GTM Tags of a Container. | 1120 * Lists all GTM Tags of a Container. |
| 1123 * | 1121 * |
| 1124 * Request parameters: | 1122 * Request parameters: |
| 1125 * | 1123 * |
| 1126 * [accountId] - The GTM Account ID. | 1124 * [accountId] - The GTM Account ID. |
| 1127 * | 1125 * |
| 1128 * [containerId] - The GTM Container ID. | 1126 * [containerId] - The GTM Container ID. |
| 1129 * | 1127 * |
| 1130 * Completes with a [ListTagsResponse]. | 1128 * Completes with a [ListTagsResponse]. |
| 1131 * | 1129 * |
| 1132 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1130 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 1133 * error. | 1131 * error. |
| 1134 * | 1132 * |
| 1135 * If the used [http.Client] completes with an error when making a REST call, | 1133 * If the used [http.Client] completes with an error when making a REST call, |
| 1136 * this method will complete with the same error. | 1134 * this method will complete with the same error. |
| 1137 */ | 1135 */ |
| 1138 async.Future<ListTagsResponse> list(core.String accountId, core.String contain
erId) { | 1136 async.Future<ListTagsResponse> list(core.String accountId, core.String contain
erId) { |
| 1139 var _url = null; | 1137 var _url = null; |
| 1140 var _queryParams = new core.Map(); | 1138 var _queryParams = new core.Map(); |
| 1141 var _uploadMedia = null; | 1139 var _uploadMedia = null; |
| 1142 var _uploadOptions = null; | 1140 var _uploadOptions = null; |
| 1143 var _downloadOptions = common.DownloadOptions.Metadata; | 1141 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1144 var _body = null; | 1142 var _body = null; |
| 1145 | 1143 |
| 1146 if (accountId == null) { | 1144 if (accountId == null) { |
| 1147 throw new core.ArgumentError("Parameter accountId is required."); | 1145 throw new core.ArgumentError("Parameter accountId is required."); |
| 1148 } | 1146 } |
| 1149 if (containerId == null) { | 1147 if (containerId == null) { |
| 1150 throw new core.ArgumentError("Parameter containerId is required."); | 1148 throw new core.ArgumentError("Parameter containerId is required."); |
| 1151 } | 1149 } |
| 1152 | 1150 |
| 1153 | 1151 |
| 1154 _url = 'accounts/' + common_internal.Escaper.ecapeVariable('$accountId') + '
/containers/' + common_internal.Escaper.ecapeVariable('$containerId') + '/tags'; | 1152 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/tags'; |
| 1155 | 1153 |
| 1156 var _response = _requester.request(_url, | 1154 var _response = _requester.request(_url, |
| 1157 "GET", | 1155 "GET", |
| 1158 body: _body, | 1156 body: _body, |
| 1159 queryParams: _queryParams, | 1157 queryParams: _queryParams, |
| 1160 uploadOptions: _uploadOptions, | 1158 uploadOptions: _uploadOptions, |
| 1161 uploadMedia: _uploadMedia, | 1159 uploadMedia: _uploadMedia, |
| 1162 downloadOptions: _downloadOptions); | 1160 downloadOptions: _downloadOptions); |
| 1163 return _response.then((data) => new ListTagsResponse.fromJson(data)); | 1161 return _response.then((data) => new ListTagsResponse.fromJson(data)); |
| 1164 } | 1162 } |
| 1165 | 1163 |
| 1166 /** | 1164 /** |
| 1167 * Updates a GTM Tag. | 1165 * Updates a GTM Tag. |
| 1168 * | 1166 * |
| 1169 * [request] - The metadata request object. | 1167 * [request] - The metadata request object. |
| 1170 * | 1168 * |
| 1171 * Request parameters: | 1169 * Request parameters: |
| 1172 * | 1170 * |
| 1173 * [accountId] - The GTM Account ID. | 1171 * [accountId] - The GTM Account ID. |
| 1174 * | 1172 * |
| 1175 * [containerId] - The GTM Container ID. | 1173 * [containerId] - The GTM Container ID. |
| 1176 * | 1174 * |
| 1177 * [tagId] - The GTM Tag ID. | 1175 * [tagId] - The GTM Tag ID. |
| 1178 * | 1176 * |
| 1179 * [fingerprint] - When provided, this fingerprint must match the fingerprint | 1177 * [fingerprint] - When provided, this fingerprint must match the fingerprint |
| 1180 * of the tag in storage. | 1178 * of the tag in storage. |
| 1181 * | 1179 * |
| 1182 * Completes with a [Tag]. | 1180 * Completes with a [Tag]. |
| 1183 * | 1181 * |
| 1184 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1182 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 1185 * error. | 1183 * error. |
| 1186 * | 1184 * |
| 1187 * If the used [http.Client] completes with an error when making a REST call, | 1185 * If the used [http.Client] completes with an error when making a REST call, |
| 1188 * this method will complete with the same error. | 1186 * this method will complete with the same error. |
| 1189 */ | 1187 */ |
| 1190 async.Future<Tag> update(Tag request, core.String accountId, core.String conta
inerId, core.String tagId, {core.String fingerprint}) { | 1188 async.Future<Tag> update(Tag request, core.String accountId, core.String conta
inerId, core.String tagId, {core.String fingerprint}) { |
| 1191 var _url = null; | 1189 var _url = null; |
| 1192 var _queryParams = new core.Map(); | 1190 var _queryParams = new core.Map(); |
| 1193 var _uploadMedia = null; | 1191 var _uploadMedia = null; |
| 1194 var _uploadOptions = null; | 1192 var _uploadOptions = null; |
| 1195 var _downloadOptions = common.DownloadOptions.Metadata; | 1193 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1196 var _body = null; | 1194 var _body = null; |
| 1197 | 1195 |
| 1198 if (request != null) { | 1196 if (request != null) { |
| 1199 _body = convert.JSON.encode((request).toJson()); | 1197 _body = convert.JSON.encode((request).toJson()); |
| 1200 } | 1198 } |
| 1201 if (accountId == null) { | 1199 if (accountId == null) { |
| 1202 throw new core.ArgumentError("Parameter accountId is required."); | 1200 throw new core.ArgumentError("Parameter accountId is required."); |
| 1203 } | 1201 } |
| 1204 if (containerId == null) { | 1202 if (containerId == null) { |
| 1205 throw new core.ArgumentError("Parameter containerId is required."); | 1203 throw new core.ArgumentError("Parameter containerId is required."); |
| 1206 } | 1204 } |
| 1207 if (tagId == null) { | 1205 if (tagId == null) { |
| 1208 throw new core.ArgumentError("Parameter tagId is required."); | 1206 throw new core.ArgumentError("Parameter tagId is required."); |
| 1209 } | 1207 } |
| 1210 if (fingerprint != null) { | 1208 if (fingerprint != null) { |
| 1211 _queryParams["fingerprint"] = [fingerprint]; | 1209 _queryParams["fingerprint"] = [fingerprint]; |
| 1212 } | 1210 } |
| 1213 | 1211 |
| 1214 | 1212 |
| 1215 _url = 'accounts/' + common_internal.Escaper.ecapeVariable('$accountId') + '
/containers/' + common_internal.Escaper.ecapeVariable('$containerId') + '/tags/'
+ common_internal.Escaper.ecapeVariable('$tagId'); | 1213 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/tags/' + commons.Escap
er.ecapeVariable('$tagId'); |
| 1216 | 1214 |
| 1217 var _response = _requester.request(_url, | 1215 var _response = _requester.request(_url, |
| 1218 "PUT", | 1216 "PUT", |
| 1219 body: _body, | 1217 body: _body, |
| 1220 queryParams: _queryParams, | 1218 queryParams: _queryParams, |
| 1221 uploadOptions: _uploadOptions, | 1219 uploadOptions: _uploadOptions, |
| 1222 uploadMedia: _uploadMedia, | 1220 uploadMedia: _uploadMedia, |
| 1223 downloadOptions: _downloadOptions); | 1221 downloadOptions: _downloadOptions); |
| 1224 return _response.then((data) => new Tag.fromJson(data)); | 1222 return _response.then((data) => new Tag.fromJson(data)); |
| 1225 } | 1223 } |
| 1226 | 1224 |
| 1227 } | 1225 } |
| 1228 | 1226 |
| 1229 | 1227 |
| 1230 /** Not documented yet. */ | |
| 1231 class AccountsContainersTriggersResourceApi { | 1228 class AccountsContainersTriggersResourceApi { |
| 1232 final common_internal.ApiRequester _requester; | 1229 final commons.ApiRequester _requester; |
| 1233 | 1230 |
| 1234 AccountsContainersTriggersResourceApi(common_internal.ApiRequester client) : | 1231 AccountsContainersTriggersResourceApi(commons.ApiRequester client) : |
| 1235 _requester = client; | 1232 _requester = client; |
| 1236 | 1233 |
| 1237 /** | 1234 /** |
| 1238 * Creates a GTM Trigger. | 1235 * Creates a GTM Trigger. |
| 1239 * | 1236 * |
| 1240 * [request] - The metadata request object. | 1237 * [request] - The metadata request object. |
| 1241 * | 1238 * |
| 1242 * Request parameters: | 1239 * Request parameters: |
| 1243 * | 1240 * |
| 1244 * [accountId] - The GTM Account ID. | 1241 * [accountId] - The GTM Account ID. |
| 1245 * | 1242 * |
| 1246 * [containerId] - The GTM Container ID. | 1243 * [containerId] - The GTM Container ID. |
| 1247 * | 1244 * |
| 1248 * Completes with a [Trigger]. | 1245 * Completes with a [Trigger]. |
| 1249 * | 1246 * |
| 1250 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1247 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 1251 * error. | 1248 * error. |
| 1252 * | 1249 * |
| 1253 * If the used [http.Client] completes with an error when making a REST call, | 1250 * If the used [http.Client] completes with an error when making a REST call, |
| 1254 * this method will complete with the same error. | 1251 * this method will complete with the same error. |
| 1255 */ | 1252 */ |
| 1256 async.Future<Trigger> create(Trigger request, core.String accountId, core.Stri
ng containerId) { | 1253 async.Future<Trigger> create(Trigger request, core.String accountId, core.Stri
ng containerId) { |
| 1257 var _url = null; | 1254 var _url = null; |
| 1258 var _queryParams = new core.Map(); | 1255 var _queryParams = new core.Map(); |
| 1259 var _uploadMedia = null; | 1256 var _uploadMedia = null; |
| 1260 var _uploadOptions = null; | 1257 var _uploadOptions = null; |
| 1261 var _downloadOptions = common.DownloadOptions.Metadata; | 1258 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1262 var _body = null; | 1259 var _body = null; |
| 1263 | 1260 |
| 1264 if (request != null) { | 1261 if (request != null) { |
| 1265 _body = convert.JSON.encode((request).toJson()); | 1262 _body = convert.JSON.encode((request).toJson()); |
| 1266 } | 1263 } |
| 1267 if (accountId == null) { | 1264 if (accountId == null) { |
| 1268 throw new core.ArgumentError("Parameter accountId is required."); | 1265 throw new core.ArgumentError("Parameter accountId is required."); |
| 1269 } | 1266 } |
| 1270 if (containerId == null) { | 1267 if (containerId == null) { |
| 1271 throw new core.ArgumentError("Parameter containerId is required."); | 1268 throw new core.ArgumentError("Parameter containerId is required."); |
| 1272 } | 1269 } |
| 1273 | 1270 |
| 1274 | 1271 |
| 1275 _url = 'accounts/' + common_internal.Escaper.ecapeVariable('$accountId') + '
/containers/' + common_internal.Escaper.ecapeVariable('$containerId') + '/trigge
rs'; | 1272 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/triggers'; |
| 1276 | 1273 |
| 1277 var _response = _requester.request(_url, | 1274 var _response = _requester.request(_url, |
| 1278 "POST", | 1275 "POST", |
| 1279 body: _body, | 1276 body: _body, |
| 1280 queryParams: _queryParams, | 1277 queryParams: _queryParams, |
| 1281 uploadOptions: _uploadOptions, | 1278 uploadOptions: _uploadOptions, |
| 1282 uploadMedia: _uploadMedia, | 1279 uploadMedia: _uploadMedia, |
| 1283 downloadOptions: _downloadOptions); | 1280 downloadOptions: _downloadOptions); |
| 1284 return _response.then((data) => new Trigger.fromJson(data)); | 1281 return _response.then((data) => new Trigger.fromJson(data)); |
| 1285 } | 1282 } |
| 1286 | 1283 |
| 1287 /** | 1284 /** |
| 1288 * Deletes a GTM Trigger. | 1285 * Deletes a GTM Trigger. |
| 1289 * | 1286 * |
| 1290 * Request parameters: | 1287 * Request parameters: |
| 1291 * | 1288 * |
| 1292 * [accountId] - The GTM Account ID. | 1289 * [accountId] - The GTM Account ID. |
| 1293 * | 1290 * |
| 1294 * [containerId] - The GTM Container ID. | 1291 * [containerId] - The GTM Container ID. |
| 1295 * | 1292 * |
| 1296 * [triggerId] - The GTM Trigger ID. | 1293 * [triggerId] - The GTM Trigger ID. |
| 1297 * | 1294 * |
| 1298 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1295 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 1299 * error. | 1296 * error. |
| 1300 * | 1297 * |
| 1301 * If the used [http.Client] completes with an error when making a REST call, | 1298 * If the used [http.Client] completes with an error when making a REST call, |
| 1302 * this method will complete with the same error. | 1299 * this method will complete with the same error. |
| 1303 */ | 1300 */ |
| 1304 async.Future delete(core.String accountId, core.String containerId, core.Strin
g triggerId) { | 1301 async.Future delete(core.String accountId, core.String containerId, core.Strin
g triggerId) { |
| 1305 var _url = null; | 1302 var _url = null; |
| 1306 var _queryParams = new core.Map(); | 1303 var _queryParams = new core.Map(); |
| 1307 var _uploadMedia = null; | 1304 var _uploadMedia = null; |
| 1308 var _uploadOptions = null; | 1305 var _uploadOptions = null; |
| 1309 var _downloadOptions = common.DownloadOptions.Metadata; | 1306 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1310 var _body = null; | 1307 var _body = null; |
| 1311 | 1308 |
| 1312 if (accountId == null) { | 1309 if (accountId == null) { |
| 1313 throw new core.ArgumentError("Parameter accountId is required."); | 1310 throw new core.ArgumentError("Parameter accountId is required."); |
| 1314 } | 1311 } |
| 1315 if (containerId == null) { | 1312 if (containerId == null) { |
| 1316 throw new core.ArgumentError("Parameter containerId is required."); | 1313 throw new core.ArgumentError("Parameter containerId is required."); |
| 1317 } | 1314 } |
| 1318 if (triggerId == null) { | 1315 if (triggerId == null) { |
| 1319 throw new core.ArgumentError("Parameter triggerId is required."); | 1316 throw new core.ArgumentError("Parameter triggerId is required."); |
| 1320 } | 1317 } |
| 1321 | 1318 |
| 1322 _downloadOptions = null; | 1319 _downloadOptions = null; |
| 1323 | 1320 |
| 1324 _url = 'accounts/' + common_internal.Escaper.ecapeVariable('$accountId') + '
/containers/' + common_internal.Escaper.ecapeVariable('$containerId') + '/trigge
rs/' + common_internal.Escaper.ecapeVariable('$triggerId'); | 1321 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/triggers/' + commons.E
scaper.ecapeVariable('$triggerId'); |
| 1325 | 1322 |
| 1326 var _response = _requester.request(_url, | 1323 var _response = _requester.request(_url, |
| 1327 "DELETE", | 1324 "DELETE", |
| 1328 body: _body, | 1325 body: _body, |
| 1329 queryParams: _queryParams, | 1326 queryParams: _queryParams, |
| 1330 uploadOptions: _uploadOptions, | 1327 uploadOptions: _uploadOptions, |
| 1331 uploadMedia: _uploadMedia, | 1328 uploadMedia: _uploadMedia, |
| 1332 downloadOptions: _downloadOptions); | 1329 downloadOptions: _downloadOptions); |
| 1333 return _response.then((data) => null); | 1330 return _response.then((data) => null); |
| 1334 } | 1331 } |
| 1335 | 1332 |
| 1336 /** | 1333 /** |
| 1337 * Gets a GTM Trigger. | 1334 * Gets a GTM Trigger. |
| 1338 * | 1335 * |
| 1339 * Request parameters: | 1336 * Request parameters: |
| 1340 * | 1337 * |
| 1341 * [accountId] - The GTM Account ID. | 1338 * [accountId] - The GTM Account ID. |
| 1342 * | 1339 * |
| 1343 * [containerId] - The GTM Container ID. | 1340 * [containerId] - The GTM Container ID. |
| 1344 * | 1341 * |
| 1345 * [triggerId] - The GTM Trigger ID. | 1342 * [triggerId] - The GTM Trigger ID. |
| 1346 * | 1343 * |
| 1347 * Completes with a [Trigger]. | 1344 * Completes with a [Trigger]. |
| 1348 * | 1345 * |
| 1349 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1346 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 1350 * error. | 1347 * error. |
| 1351 * | 1348 * |
| 1352 * If the used [http.Client] completes with an error when making a REST call, | 1349 * If the used [http.Client] completes with an error when making a REST call, |
| 1353 * this method will complete with the same error. | 1350 * this method will complete with the same error. |
| 1354 */ | 1351 */ |
| 1355 async.Future<Trigger> get(core.String accountId, core.String containerId, core
.String triggerId) { | 1352 async.Future<Trigger> get(core.String accountId, core.String containerId, core
.String triggerId) { |
| 1356 var _url = null; | 1353 var _url = null; |
| 1357 var _queryParams = new core.Map(); | 1354 var _queryParams = new core.Map(); |
| 1358 var _uploadMedia = null; | 1355 var _uploadMedia = null; |
| 1359 var _uploadOptions = null; | 1356 var _uploadOptions = null; |
| 1360 var _downloadOptions = common.DownloadOptions.Metadata; | 1357 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1361 var _body = null; | 1358 var _body = null; |
| 1362 | 1359 |
| 1363 if (accountId == null) { | 1360 if (accountId == null) { |
| 1364 throw new core.ArgumentError("Parameter accountId is required."); | 1361 throw new core.ArgumentError("Parameter accountId is required."); |
| 1365 } | 1362 } |
| 1366 if (containerId == null) { | 1363 if (containerId == null) { |
| 1367 throw new core.ArgumentError("Parameter containerId is required."); | 1364 throw new core.ArgumentError("Parameter containerId is required."); |
| 1368 } | 1365 } |
| 1369 if (triggerId == null) { | 1366 if (triggerId == null) { |
| 1370 throw new core.ArgumentError("Parameter triggerId is required."); | 1367 throw new core.ArgumentError("Parameter triggerId is required."); |
| 1371 } | 1368 } |
| 1372 | 1369 |
| 1373 | 1370 |
| 1374 _url = 'accounts/' + common_internal.Escaper.ecapeVariable('$accountId') + '
/containers/' + common_internal.Escaper.ecapeVariable('$containerId') + '/trigge
rs/' + common_internal.Escaper.ecapeVariable('$triggerId'); | 1371 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/triggers/' + commons.E
scaper.ecapeVariable('$triggerId'); |
| 1375 | 1372 |
| 1376 var _response = _requester.request(_url, | 1373 var _response = _requester.request(_url, |
| 1377 "GET", | 1374 "GET", |
| 1378 body: _body, | 1375 body: _body, |
| 1379 queryParams: _queryParams, | 1376 queryParams: _queryParams, |
| 1380 uploadOptions: _uploadOptions, | 1377 uploadOptions: _uploadOptions, |
| 1381 uploadMedia: _uploadMedia, | 1378 uploadMedia: _uploadMedia, |
| 1382 downloadOptions: _downloadOptions); | 1379 downloadOptions: _downloadOptions); |
| 1383 return _response.then((data) => new Trigger.fromJson(data)); | 1380 return _response.then((data) => new Trigger.fromJson(data)); |
| 1384 } | 1381 } |
| 1385 | 1382 |
| 1386 /** | 1383 /** |
| 1387 * Lists all GTM Triggers of a Container. | 1384 * Lists all GTM Triggers of a Container. |
| 1388 * | 1385 * |
| 1389 * Request parameters: | 1386 * Request parameters: |
| 1390 * | 1387 * |
| 1391 * [accountId] - The GTM Account ID. | 1388 * [accountId] - The GTM Account ID. |
| 1392 * | 1389 * |
| 1393 * [containerId] - The GTM Container ID. | 1390 * [containerId] - The GTM Container ID. |
| 1394 * | 1391 * |
| 1395 * Completes with a [ListTriggersResponse]. | 1392 * Completes with a [ListTriggersResponse]. |
| 1396 * | 1393 * |
| 1397 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1394 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 1398 * error. | 1395 * error. |
| 1399 * | 1396 * |
| 1400 * If the used [http.Client] completes with an error when making a REST call, | 1397 * If the used [http.Client] completes with an error when making a REST call, |
| 1401 * this method will complete with the same error. | 1398 * this method will complete with the same error. |
| 1402 */ | 1399 */ |
| 1403 async.Future<ListTriggersResponse> list(core.String accountId, core.String con
tainerId) { | 1400 async.Future<ListTriggersResponse> list(core.String accountId, core.String con
tainerId) { |
| 1404 var _url = null; | 1401 var _url = null; |
| 1405 var _queryParams = new core.Map(); | 1402 var _queryParams = new core.Map(); |
| 1406 var _uploadMedia = null; | 1403 var _uploadMedia = null; |
| 1407 var _uploadOptions = null; | 1404 var _uploadOptions = null; |
| 1408 var _downloadOptions = common.DownloadOptions.Metadata; | 1405 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1409 var _body = null; | 1406 var _body = null; |
| 1410 | 1407 |
| 1411 if (accountId == null) { | 1408 if (accountId == null) { |
| 1412 throw new core.ArgumentError("Parameter accountId is required."); | 1409 throw new core.ArgumentError("Parameter accountId is required."); |
| 1413 } | 1410 } |
| 1414 if (containerId == null) { | 1411 if (containerId == null) { |
| 1415 throw new core.ArgumentError("Parameter containerId is required."); | 1412 throw new core.ArgumentError("Parameter containerId is required."); |
| 1416 } | 1413 } |
| 1417 | 1414 |
| 1418 | 1415 |
| 1419 _url = 'accounts/' + common_internal.Escaper.ecapeVariable('$accountId') + '
/containers/' + common_internal.Escaper.ecapeVariable('$containerId') + '/trigge
rs'; | 1416 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/triggers'; |
| 1420 | 1417 |
| 1421 var _response = _requester.request(_url, | 1418 var _response = _requester.request(_url, |
| 1422 "GET", | 1419 "GET", |
| 1423 body: _body, | 1420 body: _body, |
| 1424 queryParams: _queryParams, | 1421 queryParams: _queryParams, |
| 1425 uploadOptions: _uploadOptions, | 1422 uploadOptions: _uploadOptions, |
| 1426 uploadMedia: _uploadMedia, | 1423 uploadMedia: _uploadMedia, |
| 1427 downloadOptions: _downloadOptions); | 1424 downloadOptions: _downloadOptions); |
| 1428 return _response.then((data) => new ListTriggersResponse.fromJson(data)); | 1425 return _response.then((data) => new ListTriggersResponse.fromJson(data)); |
| 1429 } | 1426 } |
| 1430 | 1427 |
| 1431 /** | 1428 /** |
| 1432 * Updates a GTM Trigger. | 1429 * Updates a GTM Trigger. |
| 1433 * | 1430 * |
| 1434 * [request] - The metadata request object. | 1431 * [request] - The metadata request object. |
| 1435 * | 1432 * |
| 1436 * Request parameters: | 1433 * Request parameters: |
| 1437 * | 1434 * |
| 1438 * [accountId] - The GTM Account ID. | 1435 * [accountId] - The GTM Account ID. |
| 1439 * | 1436 * |
| 1440 * [containerId] - The GTM Container ID. | 1437 * [containerId] - The GTM Container ID. |
| 1441 * | 1438 * |
| 1442 * [triggerId] - The GTM Trigger ID. | 1439 * [triggerId] - The GTM Trigger ID. |
| 1443 * | 1440 * |
| 1444 * [fingerprint] - When provided, this fingerprint must match the fingerprint | 1441 * [fingerprint] - When provided, this fingerprint must match the fingerprint |
| 1445 * of the trigger in storage. | 1442 * of the trigger in storage. |
| 1446 * | 1443 * |
| 1447 * Completes with a [Trigger]. | 1444 * Completes with a [Trigger]. |
| 1448 * | 1445 * |
| 1449 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1446 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 1450 * error. | 1447 * error. |
| 1451 * | 1448 * |
| 1452 * If the used [http.Client] completes with an error when making a REST call, | 1449 * If the used [http.Client] completes with an error when making a REST call, |
| 1453 * this method will complete with the same error. | 1450 * this method will complete with the same error. |
| 1454 */ | 1451 */ |
| 1455 async.Future<Trigger> update(Trigger request, core.String accountId, core.Stri
ng containerId, core.String triggerId, {core.String fingerprint}) { | 1452 async.Future<Trigger> update(Trigger request, core.String accountId, core.Stri
ng containerId, core.String triggerId, {core.String fingerprint}) { |
| 1456 var _url = null; | 1453 var _url = null; |
| 1457 var _queryParams = new core.Map(); | 1454 var _queryParams = new core.Map(); |
| 1458 var _uploadMedia = null; | 1455 var _uploadMedia = null; |
| 1459 var _uploadOptions = null; | 1456 var _uploadOptions = null; |
| 1460 var _downloadOptions = common.DownloadOptions.Metadata; | 1457 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1461 var _body = null; | 1458 var _body = null; |
| 1462 | 1459 |
| 1463 if (request != null) { | 1460 if (request != null) { |
| 1464 _body = convert.JSON.encode((request).toJson()); | 1461 _body = convert.JSON.encode((request).toJson()); |
| 1465 } | 1462 } |
| 1466 if (accountId == null) { | 1463 if (accountId == null) { |
| 1467 throw new core.ArgumentError("Parameter accountId is required."); | 1464 throw new core.ArgumentError("Parameter accountId is required."); |
| 1468 } | 1465 } |
| 1469 if (containerId == null) { | 1466 if (containerId == null) { |
| 1470 throw new core.ArgumentError("Parameter containerId is required."); | 1467 throw new core.ArgumentError("Parameter containerId is required."); |
| 1471 } | 1468 } |
| 1472 if (triggerId == null) { | 1469 if (triggerId == null) { |
| 1473 throw new core.ArgumentError("Parameter triggerId is required."); | 1470 throw new core.ArgumentError("Parameter triggerId is required."); |
| 1474 } | 1471 } |
| 1475 if (fingerprint != null) { | 1472 if (fingerprint != null) { |
| 1476 _queryParams["fingerprint"] = [fingerprint]; | 1473 _queryParams["fingerprint"] = [fingerprint]; |
| 1477 } | 1474 } |
| 1478 | 1475 |
| 1479 | 1476 |
| 1480 _url = 'accounts/' + common_internal.Escaper.ecapeVariable('$accountId') + '
/containers/' + common_internal.Escaper.ecapeVariable('$containerId') + '/trigge
rs/' + common_internal.Escaper.ecapeVariable('$triggerId'); | 1477 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/triggers/' + commons.E
scaper.ecapeVariable('$triggerId'); |
| 1481 | 1478 |
| 1482 var _response = _requester.request(_url, | 1479 var _response = _requester.request(_url, |
| 1483 "PUT", | 1480 "PUT", |
| 1484 body: _body, | 1481 body: _body, |
| 1485 queryParams: _queryParams, | 1482 queryParams: _queryParams, |
| 1486 uploadOptions: _uploadOptions, | 1483 uploadOptions: _uploadOptions, |
| 1487 uploadMedia: _uploadMedia, | 1484 uploadMedia: _uploadMedia, |
| 1488 downloadOptions: _downloadOptions); | 1485 downloadOptions: _downloadOptions); |
| 1489 return _response.then((data) => new Trigger.fromJson(data)); | 1486 return _response.then((data) => new Trigger.fromJson(data)); |
| 1490 } | 1487 } |
| 1491 | 1488 |
| 1492 } | 1489 } |
| 1493 | 1490 |
| 1494 | 1491 |
| 1495 /** Not documented yet. */ | |
| 1496 class AccountsContainersVariablesResourceApi { | 1492 class AccountsContainersVariablesResourceApi { |
| 1497 final common_internal.ApiRequester _requester; | 1493 final commons.ApiRequester _requester; |
| 1498 | 1494 |
| 1499 AccountsContainersVariablesResourceApi(common_internal.ApiRequester client) : | 1495 AccountsContainersVariablesResourceApi(commons.ApiRequester client) : |
| 1500 _requester = client; | 1496 _requester = client; |
| 1501 | 1497 |
| 1502 /** | 1498 /** |
| 1503 * Creates a GTM Variable. | 1499 * Creates a GTM Variable. |
| 1504 * | 1500 * |
| 1505 * [request] - The metadata request object. | 1501 * [request] - The metadata request object. |
| 1506 * | 1502 * |
| 1507 * Request parameters: | 1503 * Request parameters: |
| 1508 * | 1504 * |
| 1509 * [accountId] - The GTM Account ID. | 1505 * [accountId] - The GTM Account ID. |
| 1510 * | 1506 * |
| 1511 * [containerId] - The GTM Container ID. | 1507 * [containerId] - The GTM Container ID. |
| 1512 * | 1508 * |
| 1513 * Completes with a [Variable]. | 1509 * Completes with a [Variable]. |
| 1514 * | 1510 * |
| 1515 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1511 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 1516 * error. | 1512 * error. |
| 1517 * | 1513 * |
| 1518 * If the used [http.Client] completes with an error when making a REST call, | 1514 * If the used [http.Client] completes with an error when making a REST call, |
| 1519 * this method will complete with the same error. | 1515 * this method will complete with the same error. |
| 1520 */ | 1516 */ |
| 1521 async.Future<Variable> create(Variable request, core.String accountId, core.St
ring containerId) { | 1517 async.Future<Variable> create(Variable request, core.String accountId, core.St
ring containerId) { |
| 1522 var _url = null; | 1518 var _url = null; |
| 1523 var _queryParams = new core.Map(); | 1519 var _queryParams = new core.Map(); |
| 1524 var _uploadMedia = null; | 1520 var _uploadMedia = null; |
| 1525 var _uploadOptions = null; | 1521 var _uploadOptions = null; |
| 1526 var _downloadOptions = common.DownloadOptions.Metadata; | 1522 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1527 var _body = null; | 1523 var _body = null; |
| 1528 | 1524 |
| 1529 if (request != null) { | 1525 if (request != null) { |
| 1530 _body = convert.JSON.encode((request).toJson()); | 1526 _body = convert.JSON.encode((request).toJson()); |
| 1531 } | 1527 } |
| 1532 if (accountId == null) { | 1528 if (accountId == null) { |
| 1533 throw new core.ArgumentError("Parameter accountId is required."); | 1529 throw new core.ArgumentError("Parameter accountId is required."); |
| 1534 } | 1530 } |
| 1535 if (containerId == null) { | 1531 if (containerId == null) { |
| 1536 throw new core.ArgumentError("Parameter containerId is required."); | 1532 throw new core.ArgumentError("Parameter containerId is required."); |
| 1537 } | 1533 } |
| 1538 | 1534 |
| 1539 | 1535 |
| 1540 _url = 'accounts/' + common_internal.Escaper.ecapeVariable('$accountId') + '
/containers/' + common_internal.Escaper.ecapeVariable('$containerId') + '/variab
les'; | 1536 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/variables'; |
| 1541 | 1537 |
| 1542 var _response = _requester.request(_url, | 1538 var _response = _requester.request(_url, |
| 1543 "POST", | 1539 "POST", |
| 1544 body: _body, | 1540 body: _body, |
| 1545 queryParams: _queryParams, | 1541 queryParams: _queryParams, |
| 1546 uploadOptions: _uploadOptions, | 1542 uploadOptions: _uploadOptions, |
| 1547 uploadMedia: _uploadMedia, | 1543 uploadMedia: _uploadMedia, |
| 1548 downloadOptions: _downloadOptions); | 1544 downloadOptions: _downloadOptions); |
| 1549 return _response.then((data) => new Variable.fromJson(data)); | 1545 return _response.then((data) => new Variable.fromJson(data)); |
| 1550 } | 1546 } |
| 1551 | 1547 |
| 1552 /** | 1548 /** |
| 1553 * Deletes a GTM Variable. | 1549 * Deletes a GTM Variable. |
| 1554 * | 1550 * |
| 1555 * Request parameters: | 1551 * Request parameters: |
| 1556 * | 1552 * |
| 1557 * [accountId] - The GTM Account ID. | 1553 * [accountId] - The GTM Account ID. |
| 1558 * | 1554 * |
| 1559 * [containerId] - The GTM Container ID. | 1555 * [containerId] - The GTM Container ID. |
| 1560 * | 1556 * |
| 1561 * [variableId] - The GTM Variable ID. | 1557 * [variableId] - The GTM Variable ID. |
| 1562 * | 1558 * |
| 1563 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1559 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 1564 * error. | 1560 * error. |
| 1565 * | 1561 * |
| 1566 * If the used [http.Client] completes with an error when making a REST call, | 1562 * If the used [http.Client] completes with an error when making a REST call, |
| 1567 * this method will complete with the same error. | 1563 * this method will complete with the same error. |
| 1568 */ | 1564 */ |
| 1569 async.Future delete(core.String accountId, core.String containerId, core.Strin
g variableId) { | 1565 async.Future delete(core.String accountId, core.String containerId, core.Strin
g variableId) { |
| 1570 var _url = null; | 1566 var _url = null; |
| 1571 var _queryParams = new core.Map(); | 1567 var _queryParams = new core.Map(); |
| 1572 var _uploadMedia = null; | 1568 var _uploadMedia = null; |
| 1573 var _uploadOptions = null; | 1569 var _uploadOptions = null; |
| 1574 var _downloadOptions = common.DownloadOptions.Metadata; | 1570 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1575 var _body = null; | 1571 var _body = null; |
| 1576 | 1572 |
| 1577 if (accountId == null) { | 1573 if (accountId == null) { |
| 1578 throw new core.ArgumentError("Parameter accountId is required."); | 1574 throw new core.ArgumentError("Parameter accountId is required."); |
| 1579 } | 1575 } |
| 1580 if (containerId == null) { | 1576 if (containerId == null) { |
| 1581 throw new core.ArgumentError("Parameter containerId is required."); | 1577 throw new core.ArgumentError("Parameter containerId is required."); |
| 1582 } | 1578 } |
| 1583 if (variableId == null) { | 1579 if (variableId == null) { |
| 1584 throw new core.ArgumentError("Parameter variableId is required."); | 1580 throw new core.ArgumentError("Parameter variableId is required."); |
| 1585 } | 1581 } |
| 1586 | 1582 |
| 1587 _downloadOptions = null; | 1583 _downloadOptions = null; |
| 1588 | 1584 |
| 1589 _url = 'accounts/' + common_internal.Escaper.ecapeVariable('$accountId') + '
/containers/' + common_internal.Escaper.ecapeVariable('$containerId') + '/variab
les/' + common_internal.Escaper.ecapeVariable('$variableId'); | 1585 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/variables/' + commons.
Escaper.ecapeVariable('$variableId'); |
| 1590 | 1586 |
| 1591 var _response = _requester.request(_url, | 1587 var _response = _requester.request(_url, |
| 1592 "DELETE", | 1588 "DELETE", |
| 1593 body: _body, | 1589 body: _body, |
| 1594 queryParams: _queryParams, | 1590 queryParams: _queryParams, |
| 1595 uploadOptions: _uploadOptions, | 1591 uploadOptions: _uploadOptions, |
| 1596 uploadMedia: _uploadMedia, | 1592 uploadMedia: _uploadMedia, |
| 1597 downloadOptions: _downloadOptions); | 1593 downloadOptions: _downloadOptions); |
| 1598 return _response.then((data) => null); | 1594 return _response.then((data) => null); |
| 1599 } | 1595 } |
| 1600 | 1596 |
| 1601 /** | 1597 /** |
| 1602 * Gets a GTM Variable. | 1598 * Gets a GTM Variable. |
| 1603 * | 1599 * |
| 1604 * Request parameters: | 1600 * Request parameters: |
| 1605 * | 1601 * |
| 1606 * [accountId] - The GTM Account ID. | 1602 * [accountId] - The GTM Account ID. |
| 1607 * | 1603 * |
| 1608 * [containerId] - The GTM Container ID. | 1604 * [containerId] - The GTM Container ID. |
| 1609 * | 1605 * |
| 1610 * [variableId] - The GTM Variable ID. | 1606 * [variableId] - The GTM Variable ID. |
| 1611 * | 1607 * |
| 1612 * Completes with a [Variable]. | 1608 * Completes with a [Variable]. |
| 1613 * | 1609 * |
| 1614 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1610 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 1615 * error. | 1611 * error. |
| 1616 * | 1612 * |
| 1617 * If the used [http.Client] completes with an error when making a REST call, | 1613 * If the used [http.Client] completes with an error when making a REST call, |
| 1618 * this method will complete with the same error. | 1614 * this method will complete with the same error. |
| 1619 */ | 1615 */ |
| 1620 async.Future<Variable> get(core.String accountId, core.String containerId, cor
e.String variableId) { | 1616 async.Future<Variable> get(core.String accountId, core.String containerId, cor
e.String variableId) { |
| 1621 var _url = null; | 1617 var _url = null; |
| 1622 var _queryParams = new core.Map(); | 1618 var _queryParams = new core.Map(); |
| 1623 var _uploadMedia = null; | 1619 var _uploadMedia = null; |
| 1624 var _uploadOptions = null; | 1620 var _uploadOptions = null; |
| 1625 var _downloadOptions = common.DownloadOptions.Metadata; | 1621 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1626 var _body = null; | 1622 var _body = null; |
| 1627 | 1623 |
| 1628 if (accountId == null) { | 1624 if (accountId == null) { |
| 1629 throw new core.ArgumentError("Parameter accountId is required."); | 1625 throw new core.ArgumentError("Parameter accountId is required."); |
| 1630 } | 1626 } |
| 1631 if (containerId == null) { | 1627 if (containerId == null) { |
| 1632 throw new core.ArgumentError("Parameter containerId is required."); | 1628 throw new core.ArgumentError("Parameter containerId is required."); |
| 1633 } | 1629 } |
| 1634 if (variableId == null) { | 1630 if (variableId == null) { |
| 1635 throw new core.ArgumentError("Parameter variableId is required."); | 1631 throw new core.ArgumentError("Parameter variableId is required."); |
| 1636 } | 1632 } |
| 1637 | 1633 |
| 1638 | 1634 |
| 1639 _url = 'accounts/' + common_internal.Escaper.ecapeVariable('$accountId') + '
/containers/' + common_internal.Escaper.ecapeVariable('$containerId') + '/variab
les/' + common_internal.Escaper.ecapeVariable('$variableId'); | 1635 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/variables/' + commons.
Escaper.ecapeVariable('$variableId'); |
| 1640 | 1636 |
| 1641 var _response = _requester.request(_url, | 1637 var _response = _requester.request(_url, |
| 1642 "GET", | 1638 "GET", |
| 1643 body: _body, | 1639 body: _body, |
| 1644 queryParams: _queryParams, | 1640 queryParams: _queryParams, |
| 1645 uploadOptions: _uploadOptions, | 1641 uploadOptions: _uploadOptions, |
| 1646 uploadMedia: _uploadMedia, | 1642 uploadMedia: _uploadMedia, |
| 1647 downloadOptions: _downloadOptions); | 1643 downloadOptions: _downloadOptions); |
| 1648 return _response.then((data) => new Variable.fromJson(data)); | 1644 return _response.then((data) => new Variable.fromJson(data)); |
| 1649 } | 1645 } |
| 1650 | 1646 |
| 1651 /** | 1647 /** |
| 1652 * Lists all GTM Variables of a Container. | 1648 * Lists all GTM Variables of a Container. |
| 1653 * | 1649 * |
| 1654 * Request parameters: | 1650 * Request parameters: |
| 1655 * | 1651 * |
| 1656 * [accountId] - The GTM Account ID. | 1652 * [accountId] - The GTM Account ID. |
| 1657 * | 1653 * |
| 1658 * [containerId] - The GTM Container ID. | 1654 * [containerId] - The GTM Container ID. |
| 1659 * | 1655 * |
| 1660 * Completes with a [ListVariablesResponse]. | 1656 * Completes with a [ListVariablesResponse]. |
| 1661 * | 1657 * |
| 1662 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1658 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 1663 * error. | 1659 * error. |
| 1664 * | 1660 * |
| 1665 * If the used [http.Client] completes with an error when making a REST call, | 1661 * If the used [http.Client] completes with an error when making a REST call, |
| 1666 * this method will complete with the same error. | 1662 * this method will complete with the same error. |
| 1667 */ | 1663 */ |
| 1668 async.Future<ListVariablesResponse> list(core.String accountId, core.String co
ntainerId) { | 1664 async.Future<ListVariablesResponse> list(core.String accountId, core.String co
ntainerId) { |
| 1669 var _url = null; | 1665 var _url = null; |
| 1670 var _queryParams = new core.Map(); | 1666 var _queryParams = new core.Map(); |
| 1671 var _uploadMedia = null; | 1667 var _uploadMedia = null; |
| 1672 var _uploadOptions = null; | 1668 var _uploadOptions = null; |
| 1673 var _downloadOptions = common.DownloadOptions.Metadata; | 1669 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1674 var _body = null; | 1670 var _body = null; |
| 1675 | 1671 |
| 1676 if (accountId == null) { | 1672 if (accountId == null) { |
| 1677 throw new core.ArgumentError("Parameter accountId is required."); | 1673 throw new core.ArgumentError("Parameter accountId is required."); |
| 1678 } | 1674 } |
| 1679 if (containerId == null) { | 1675 if (containerId == null) { |
| 1680 throw new core.ArgumentError("Parameter containerId is required."); | 1676 throw new core.ArgumentError("Parameter containerId is required."); |
| 1681 } | 1677 } |
| 1682 | 1678 |
| 1683 | 1679 |
| 1684 _url = 'accounts/' + common_internal.Escaper.ecapeVariable('$accountId') + '
/containers/' + common_internal.Escaper.ecapeVariable('$containerId') + '/variab
les'; | 1680 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/variables'; |
| 1685 | 1681 |
| 1686 var _response = _requester.request(_url, | 1682 var _response = _requester.request(_url, |
| 1687 "GET", | 1683 "GET", |
| 1688 body: _body, | 1684 body: _body, |
| 1689 queryParams: _queryParams, | 1685 queryParams: _queryParams, |
| 1690 uploadOptions: _uploadOptions, | 1686 uploadOptions: _uploadOptions, |
| 1691 uploadMedia: _uploadMedia, | 1687 uploadMedia: _uploadMedia, |
| 1692 downloadOptions: _downloadOptions); | 1688 downloadOptions: _downloadOptions); |
| 1693 return _response.then((data) => new ListVariablesResponse.fromJson(data)); | 1689 return _response.then((data) => new ListVariablesResponse.fromJson(data)); |
| 1694 } | 1690 } |
| 1695 | 1691 |
| 1696 /** | 1692 /** |
| 1697 * Updates a GTM Variable. | 1693 * Updates a GTM Variable. |
| 1698 * | 1694 * |
| 1699 * [request] - The metadata request object. | 1695 * [request] - The metadata request object. |
| 1700 * | 1696 * |
| 1701 * Request parameters: | 1697 * Request parameters: |
| 1702 * | 1698 * |
| 1703 * [accountId] - The GTM Account ID. | 1699 * [accountId] - The GTM Account ID. |
| 1704 * | 1700 * |
| 1705 * [containerId] - The GTM Container ID. | 1701 * [containerId] - The GTM Container ID. |
| 1706 * | 1702 * |
| 1707 * [variableId] - The GTM Variable ID. | 1703 * [variableId] - The GTM Variable ID. |
| 1708 * | 1704 * |
| 1709 * [fingerprint] - When provided, this fingerprint must match the fingerprint | 1705 * [fingerprint] - When provided, this fingerprint must match the fingerprint |
| 1710 * of the variable in storage. | 1706 * of the variable in storage. |
| 1711 * | 1707 * |
| 1712 * Completes with a [Variable]. | 1708 * Completes with a [Variable]. |
| 1713 * | 1709 * |
| 1714 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1710 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 1715 * error. | 1711 * error. |
| 1716 * | 1712 * |
| 1717 * If the used [http.Client] completes with an error when making a REST call, | 1713 * If the used [http.Client] completes with an error when making a REST call, |
| 1718 * this method will complete with the same error. | 1714 * this method will complete with the same error. |
| 1719 */ | 1715 */ |
| 1720 async.Future<Variable> update(Variable request, core.String accountId, core.St
ring containerId, core.String variableId, {core.String fingerprint}) { | 1716 async.Future<Variable> update(Variable request, core.String accountId, core.St
ring containerId, core.String variableId, {core.String fingerprint}) { |
| 1721 var _url = null; | 1717 var _url = null; |
| 1722 var _queryParams = new core.Map(); | 1718 var _queryParams = new core.Map(); |
| 1723 var _uploadMedia = null; | 1719 var _uploadMedia = null; |
| 1724 var _uploadOptions = null; | 1720 var _uploadOptions = null; |
| 1725 var _downloadOptions = common.DownloadOptions.Metadata; | 1721 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1726 var _body = null; | 1722 var _body = null; |
| 1727 | 1723 |
| 1728 if (request != null) { | 1724 if (request != null) { |
| 1729 _body = convert.JSON.encode((request).toJson()); | 1725 _body = convert.JSON.encode((request).toJson()); |
| 1730 } | 1726 } |
| 1731 if (accountId == null) { | 1727 if (accountId == null) { |
| 1732 throw new core.ArgumentError("Parameter accountId is required."); | 1728 throw new core.ArgumentError("Parameter accountId is required."); |
| 1733 } | 1729 } |
| 1734 if (containerId == null) { | 1730 if (containerId == null) { |
| 1735 throw new core.ArgumentError("Parameter containerId is required."); | 1731 throw new core.ArgumentError("Parameter containerId is required."); |
| 1736 } | 1732 } |
| 1737 if (variableId == null) { | 1733 if (variableId == null) { |
| 1738 throw new core.ArgumentError("Parameter variableId is required."); | 1734 throw new core.ArgumentError("Parameter variableId is required."); |
| 1739 } | 1735 } |
| 1740 if (fingerprint != null) { | 1736 if (fingerprint != null) { |
| 1741 _queryParams["fingerprint"] = [fingerprint]; | 1737 _queryParams["fingerprint"] = [fingerprint]; |
| 1742 } | 1738 } |
| 1743 | 1739 |
| 1744 | 1740 |
| 1745 _url = 'accounts/' + common_internal.Escaper.ecapeVariable('$accountId') + '
/containers/' + common_internal.Escaper.ecapeVariable('$containerId') + '/variab
les/' + common_internal.Escaper.ecapeVariable('$variableId'); | 1741 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/variables/' + commons.
Escaper.ecapeVariable('$variableId'); |
| 1746 | 1742 |
| 1747 var _response = _requester.request(_url, | 1743 var _response = _requester.request(_url, |
| 1748 "PUT", | 1744 "PUT", |
| 1749 body: _body, | 1745 body: _body, |
| 1750 queryParams: _queryParams, | 1746 queryParams: _queryParams, |
| 1751 uploadOptions: _uploadOptions, | 1747 uploadOptions: _uploadOptions, |
| 1752 uploadMedia: _uploadMedia, | 1748 uploadMedia: _uploadMedia, |
| 1753 downloadOptions: _downloadOptions); | 1749 downloadOptions: _downloadOptions); |
| 1754 return _response.then((data) => new Variable.fromJson(data)); | 1750 return _response.then((data) => new Variable.fromJson(data)); |
| 1755 } | 1751 } |
| 1756 | 1752 |
| 1757 } | 1753 } |
| 1758 | 1754 |
| 1759 | 1755 |
| 1760 /** Not documented yet. */ | |
| 1761 class AccountsContainersVersionsResourceApi { | 1756 class AccountsContainersVersionsResourceApi { |
| 1762 final common_internal.ApiRequester _requester; | 1757 final commons.ApiRequester _requester; |
| 1763 | 1758 |
| 1764 AccountsContainersVersionsResourceApi(common_internal.ApiRequester client) : | 1759 AccountsContainersVersionsResourceApi(commons.ApiRequester client) : |
| 1765 _requester = client; | 1760 _requester = client; |
| 1766 | 1761 |
| 1767 /** | 1762 /** |
| 1768 * Creates a Container Version. | 1763 * Creates a Container Version. |
| 1769 * | 1764 * |
| 1770 * [request] - The metadata request object. | 1765 * [request] - The metadata request object. |
| 1771 * | 1766 * |
| 1772 * Request parameters: | 1767 * Request parameters: |
| 1773 * | 1768 * |
| 1774 * [accountId] - The GTM Account ID. | 1769 * [accountId] - The GTM Account ID. |
| 1775 * | 1770 * |
| 1776 * [containerId] - The GTM Container ID. | 1771 * [containerId] - The GTM Container ID. |
| 1777 * | 1772 * |
| 1778 * Completes with a [CreateContainerVersionResponse]. | 1773 * Completes with a [CreateContainerVersionResponse]. |
| 1779 * | 1774 * |
| 1780 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1775 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 1781 * error. | 1776 * error. |
| 1782 * | 1777 * |
| 1783 * If the used [http.Client] completes with an error when making a REST call, | 1778 * If the used [http.Client] completes with an error when making a REST call, |
| 1784 * this method will complete with the same error. | 1779 * this method will complete with the same error. |
| 1785 */ | 1780 */ |
| 1786 async.Future<CreateContainerVersionResponse> create(CreateContainerVersionRequ
estVersionOptions request, core.String accountId, core.String containerId) { | 1781 async.Future<CreateContainerVersionResponse> create(CreateContainerVersionRequ
estVersionOptions request, core.String accountId, core.String containerId) { |
| 1787 var _url = null; | 1782 var _url = null; |
| 1788 var _queryParams = new core.Map(); | 1783 var _queryParams = new core.Map(); |
| 1789 var _uploadMedia = null; | 1784 var _uploadMedia = null; |
| 1790 var _uploadOptions = null; | 1785 var _uploadOptions = null; |
| 1791 var _downloadOptions = common.DownloadOptions.Metadata; | 1786 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1792 var _body = null; | 1787 var _body = null; |
| 1793 | 1788 |
| 1794 if (request != null) { | 1789 if (request != null) { |
| 1795 _body = convert.JSON.encode((request).toJson()); | 1790 _body = convert.JSON.encode((request).toJson()); |
| 1796 } | 1791 } |
| 1797 if (accountId == null) { | 1792 if (accountId == null) { |
| 1798 throw new core.ArgumentError("Parameter accountId is required."); | 1793 throw new core.ArgumentError("Parameter accountId is required."); |
| 1799 } | 1794 } |
| 1800 if (containerId == null) { | 1795 if (containerId == null) { |
| 1801 throw new core.ArgumentError("Parameter containerId is required."); | 1796 throw new core.ArgumentError("Parameter containerId is required."); |
| 1802 } | 1797 } |
| 1803 | 1798 |
| 1804 | 1799 |
| 1805 _url = 'accounts/' + common_internal.Escaper.ecapeVariable('$accountId') + '
/containers/' + common_internal.Escaper.ecapeVariable('$containerId') + '/versio
ns'; | 1800 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/versions'; |
| 1806 | 1801 |
| 1807 var _response = _requester.request(_url, | 1802 var _response = _requester.request(_url, |
| 1808 "POST", | 1803 "POST", |
| 1809 body: _body, | 1804 body: _body, |
| 1810 queryParams: _queryParams, | 1805 queryParams: _queryParams, |
| 1811 uploadOptions: _uploadOptions, | 1806 uploadOptions: _uploadOptions, |
| 1812 uploadMedia: _uploadMedia, | 1807 uploadMedia: _uploadMedia, |
| 1813 downloadOptions: _downloadOptions); | 1808 downloadOptions: _downloadOptions); |
| 1814 return _response.then((data) => new CreateContainerVersionResponse.fromJson(
data)); | 1809 return _response.then((data) => new CreateContainerVersionResponse.fromJson(
data)); |
| 1815 } | 1810 } |
| 1816 | 1811 |
| 1817 /** | 1812 /** |
| 1818 * Deletes a Container Version. | 1813 * Deletes a Container Version. |
| 1819 * | 1814 * |
| 1820 * Request parameters: | 1815 * Request parameters: |
| 1821 * | 1816 * |
| 1822 * [accountId] - The GTM Account ID. | 1817 * [accountId] - The GTM Account ID. |
| 1823 * | 1818 * |
| 1824 * [containerId] - The GTM Container ID. | 1819 * [containerId] - The GTM Container ID. |
| 1825 * | 1820 * |
| 1826 * [containerVersionId] - The GTM Container Version ID. | 1821 * [containerVersionId] - The GTM Container Version ID. |
| 1827 * | 1822 * |
| 1828 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1823 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 1829 * error. | 1824 * error. |
| 1830 * | 1825 * |
| 1831 * If the used [http.Client] completes with an error when making a REST call, | 1826 * If the used [http.Client] completes with an error when making a REST call, |
| 1832 * this method will complete with the same error. | 1827 * this method will complete with the same error. |
| 1833 */ | 1828 */ |
| 1834 async.Future delete(core.String accountId, core.String containerId, core.Strin
g containerVersionId) { | 1829 async.Future delete(core.String accountId, core.String containerId, core.Strin
g containerVersionId) { |
| 1835 var _url = null; | 1830 var _url = null; |
| 1836 var _queryParams = new core.Map(); | 1831 var _queryParams = new core.Map(); |
| 1837 var _uploadMedia = null; | 1832 var _uploadMedia = null; |
| 1838 var _uploadOptions = null; | 1833 var _uploadOptions = null; |
| 1839 var _downloadOptions = common.DownloadOptions.Metadata; | 1834 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1840 var _body = null; | 1835 var _body = null; |
| 1841 | 1836 |
| 1842 if (accountId == null) { | 1837 if (accountId == null) { |
| 1843 throw new core.ArgumentError("Parameter accountId is required."); | 1838 throw new core.ArgumentError("Parameter accountId is required."); |
| 1844 } | 1839 } |
| 1845 if (containerId == null) { | 1840 if (containerId == null) { |
| 1846 throw new core.ArgumentError("Parameter containerId is required."); | 1841 throw new core.ArgumentError("Parameter containerId is required."); |
| 1847 } | 1842 } |
| 1848 if (containerVersionId == null) { | 1843 if (containerVersionId == null) { |
| 1849 throw new core.ArgumentError("Parameter containerVersionId is required."); | 1844 throw new core.ArgumentError("Parameter containerVersionId is required."); |
| 1850 } | 1845 } |
| 1851 | 1846 |
| 1852 _downloadOptions = null; | 1847 _downloadOptions = null; |
| 1853 | 1848 |
| 1854 _url = 'accounts/' + common_internal.Escaper.ecapeVariable('$accountId') + '
/containers/' + common_internal.Escaper.ecapeVariable('$containerId') + '/versio
ns/' + common_internal.Escaper.ecapeVariable('$containerVersionId'); | 1849 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/versions/' + commons.E
scaper.ecapeVariable('$containerVersionId'); |
| 1855 | 1850 |
| 1856 var _response = _requester.request(_url, | 1851 var _response = _requester.request(_url, |
| 1857 "DELETE", | 1852 "DELETE", |
| 1858 body: _body, | 1853 body: _body, |
| 1859 queryParams: _queryParams, | 1854 queryParams: _queryParams, |
| 1860 uploadOptions: _uploadOptions, | 1855 uploadOptions: _uploadOptions, |
| 1861 uploadMedia: _uploadMedia, | 1856 uploadMedia: _uploadMedia, |
| 1862 downloadOptions: _downloadOptions); | 1857 downloadOptions: _downloadOptions); |
| 1863 return _response.then((data) => null); | 1858 return _response.then((data) => null); |
| 1864 } | 1859 } |
| 1865 | 1860 |
| 1866 /** | 1861 /** |
| 1867 * Gets a Container Version. | 1862 * Gets a Container Version. |
| 1868 * | 1863 * |
| 1869 * Request parameters: | 1864 * Request parameters: |
| 1870 * | 1865 * |
| 1871 * [accountId] - The GTM Account ID. | 1866 * [accountId] - The GTM Account ID. |
| 1872 * | 1867 * |
| 1873 * [containerId] - The GTM Container ID. | 1868 * [containerId] - The GTM Container ID. |
| 1874 * | 1869 * |
| 1875 * [containerVersionId] - The GTM Container Version ID. Specify published to | 1870 * [containerVersionId] - The GTM Container Version ID. Specify published to |
| 1876 * retrieve the currently published version. | 1871 * retrieve the currently published version. |
| 1877 * | 1872 * |
| 1878 * Completes with a [ContainerVersion]. | 1873 * Completes with a [ContainerVersion]. |
| 1879 * | 1874 * |
| 1880 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1875 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 1881 * error. | 1876 * error. |
| 1882 * | 1877 * |
| 1883 * If the used [http.Client] completes with an error when making a REST call, | 1878 * If the used [http.Client] completes with an error when making a REST call, |
| 1884 * this method will complete with the same error. | 1879 * this method will complete with the same error. |
| 1885 */ | 1880 */ |
| 1886 async.Future<ContainerVersion> get(core.String accountId, core.String containe
rId, core.String containerVersionId) { | 1881 async.Future<ContainerVersion> get(core.String accountId, core.String containe
rId, core.String containerVersionId) { |
| 1887 var _url = null; | 1882 var _url = null; |
| 1888 var _queryParams = new core.Map(); | 1883 var _queryParams = new core.Map(); |
| 1889 var _uploadMedia = null; | 1884 var _uploadMedia = null; |
| 1890 var _uploadOptions = null; | 1885 var _uploadOptions = null; |
| 1891 var _downloadOptions = common.DownloadOptions.Metadata; | 1886 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1892 var _body = null; | 1887 var _body = null; |
| 1893 | 1888 |
| 1894 if (accountId == null) { | 1889 if (accountId == null) { |
| 1895 throw new core.ArgumentError("Parameter accountId is required."); | 1890 throw new core.ArgumentError("Parameter accountId is required."); |
| 1896 } | 1891 } |
| 1897 if (containerId == null) { | 1892 if (containerId == null) { |
| 1898 throw new core.ArgumentError("Parameter containerId is required."); | 1893 throw new core.ArgumentError("Parameter containerId is required."); |
| 1899 } | 1894 } |
| 1900 if (containerVersionId == null) { | 1895 if (containerVersionId == null) { |
| 1901 throw new core.ArgumentError("Parameter containerVersionId is required."); | 1896 throw new core.ArgumentError("Parameter containerVersionId is required."); |
| 1902 } | 1897 } |
| 1903 | 1898 |
| 1904 | 1899 |
| 1905 _url = 'accounts/' + common_internal.Escaper.ecapeVariable('$accountId') + '
/containers/' + common_internal.Escaper.ecapeVariable('$containerId') + '/versio
ns/' + common_internal.Escaper.ecapeVariable('$containerVersionId'); | 1900 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/versions/' + commons.E
scaper.ecapeVariable('$containerVersionId'); |
| 1906 | 1901 |
| 1907 var _response = _requester.request(_url, | 1902 var _response = _requester.request(_url, |
| 1908 "GET", | 1903 "GET", |
| 1909 body: _body, | 1904 body: _body, |
| 1910 queryParams: _queryParams, | 1905 queryParams: _queryParams, |
| 1911 uploadOptions: _uploadOptions, | 1906 uploadOptions: _uploadOptions, |
| 1912 uploadMedia: _uploadMedia, | 1907 uploadMedia: _uploadMedia, |
| 1913 downloadOptions: _downloadOptions); | 1908 downloadOptions: _downloadOptions); |
| 1914 return _response.then((data) => new ContainerVersion.fromJson(data)); | 1909 return _response.then((data) => new ContainerVersion.fromJson(data)); |
| 1915 } | 1910 } |
| 1916 | 1911 |
| 1917 /** | 1912 /** |
| 1918 * Lists all Container Versions of a GTM Container. | 1913 * Lists all Container Versions of a GTM Container. |
| 1919 * | 1914 * |
| 1920 * Request parameters: | 1915 * Request parameters: |
| 1921 * | 1916 * |
| 1922 * [accountId] - The GTM Account ID. | 1917 * [accountId] - The GTM Account ID. |
| 1923 * | 1918 * |
| 1924 * [containerId] - The GTM Container ID. | 1919 * [containerId] - The GTM Container ID. |
| 1925 * | 1920 * |
| 1926 * [headers] - Retrieve headers only when true. | 1921 * [headers] - Retrieve headers only when true. |
| 1927 * | 1922 * |
| 1928 * Completes with a [ListContainerVersionsResponse]. | 1923 * Completes with a [ListContainerVersionsResponse]. |
| 1929 * | 1924 * |
| 1930 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1925 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 1931 * error. | 1926 * error. |
| 1932 * | 1927 * |
| 1933 * If the used [http.Client] completes with an error when making a REST call, | 1928 * If the used [http.Client] completes with an error when making a REST call, |
| 1934 * this method will complete with the same error. | 1929 * this method will complete with the same error. |
| 1935 */ | 1930 */ |
| 1936 async.Future<ListContainerVersionsResponse> list(core.String accountId, core.S
tring containerId, {core.bool headers}) { | 1931 async.Future<ListContainerVersionsResponse> list(core.String accountId, core.S
tring containerId, {core.bool headers}) { |
| 1937 var _url = null; | 1932 var _url = null; |
| 1938 var _queryParams = new core.Map(); | 1933 var _queryParams = new core.Map(); |
| 1939 var _uploadMedia = null; | 1934 var _uploadMedia = null; |
| 1940 var _uploadOptions = null; | 1935 var _uploadOptions = null; |
| 1941 var _downloadOptions = common.DownloadOptions.Metadata; | 1936 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1942 var _body = null; | 1937 var _body = null; |
| 1943 | 1938 |
| 1944 if (accountId == null) { | 1939 if (accountId == null) { |
| 1945 throw new core.ArgumentError("Parameter accountId is required."); | 1940 throw new core.ArgumentError("Parameter accountId is required."); |
| 1946 } | 1941 } |
| 1947 if (containerId == null) { | 1942 if (containerId == null) { |
| 1948 throw new core.ArgumentError("Parameter containerId is required."); | 1943 throw new core.ArgumentError("Parameter containerId is required."); |
| 1949 } | 1944 } |
| 1950 if (headers != null) { | 1945 if (headers != null) { |
| 1951 _queryParams["headers"] = ["${headers}"]; | 1946 _queryParams["headers"] = ["${headers}"]; |
| 1952 } | 1947 } |
| 1953 | 1948 |
| 1954 | 1949 |
| 1955 _url = 'accounts/' + common_internal.Escaper.ecapeVariable('$accountId') + '
/containers/' + common_internal.Escaper.ecapeVariable('$containerId') + '/versio
ns'; | 1950 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/versions'; |
| 1956 | 1951 |
| 1957 var _response = _requester.request(_url, | 1952 var _response = _requester.request(_url, |
| 1958 "GET", | 1953 "GET", |
| 1959 body: _body, | 1954 body: _body, |
| 1960 queryParams: _queryParams, | 1955 queryParams: _queryParams, |
| 1961 uploadOptions: _uploadOptions, | 1956 uploadOptions: _uploadOptions, |
| 1962 uploadMedia: _uploadMedia, | 1957 uploadMedia: _uploadMedia, |
| 1963 downloadOptions: _downloadOptions); | 1958 downloadOptions: _downloadOptions); |
| 1964 return _response.then((data) => new ListContainerVersionsResponse.fromJson(d
ata)); | 1959 return _response.then((data) => new ListContainerVersionsResponse.fromJson(d
ata)); |
| 1965 } | 1960 } |
| 1966 | 1961 |
| 1967 /** | 1962 /** |
| 1968 * Publishes a Container Version. | 1963 * Publishes a Container Version. |
| 1969 * | 1964 * |
| 1970 * Request parameters: | 1965 * Request parameters: |
| 1971 * | 1966 * |
| 1972 * [accountId] - The GTM Account ID. | 1967 * [accountId] - The GTM Account ID. |
| 1973 * | 1968 * |
| 1974 * [containerId] - The GTM Container ID. | 1969 * [containerId] - The GTM Container ID. |
| 1975 * | 1970 * |
| 1976 * [containerVersionId] - The GTM Container Version ID. | 1971 * [containerVersionId] - The GTM Container Version ID. |
| 1977 * | 1972 * |
| 1978 * [fingerprint] - When provided, this fingerprint must match the fingerprint | 1973 * [fingerprint] - When provided, this fingerprint must match the fingerprint |
| 1979 * of the container version in storage. | 1974 * of the container version in storage. |
| 1980 * | 1975 * |
| 1981 * Completes with a [PublishContainerVersionResponse]. | 1976 * Completes with a [PublishContainerVersionResponse]. |
| 1982 * | 1977 * |
| 1983 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1978 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 1984 * error. | 1979 * error. |
| 1985 * | 1980 * |
| 1986 * If the used [http.Client] completes with an error when making a REST call, | 1981 * If the used [http.Client] completes with an error when making a REST call, |
| 1987 * this method will complete with the same error. | 1982 * this method will complete with the same error. |
| 1988 */ | 1983 */ |
| 1989 async.Future<PublishContainerVersionResponse> publish(core.String accountId, c
ore.String containerId, core.String containerVersionId, {core.String fingerprint
}) { | 1984 async.Future<PublishContainerVersionResponse> publish(core.String accountId, c
ore.String containerId, core.String containerVersionId, {core.String fingerprint
}) { |
| 1990 var _url = null; | 1985 var _url = null; |
| 1991 var _queryParams = new core.Map(); | 1986 var _queryParams = new core.Map(); |
| 1992 var _uploadMedia = null; | 1987 var _uploadMedia = null; |
| 1993 var _uploadOptions = null; | 1988 var _uploadOptions = null; |
| 1994 var _downloadOptions = common.DownloadOptions.Metadata; | 1989 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1995 var _body = null; | 1990 var _body = null; |
| 1996 | 1991 |
| 1997 if (accountId == null) { | 1992 if (accountId == null) { |
| 1998 throw new core.ArgumentError("Parameter accountId is required."); | 1993 throw new core.ArgumentError("Parameter accountId is required."); |
| 1999 } | 1994 } |
| 2000 if (containerId == null) { | 1995 if (containerId == null) { |
| 2001 throw new core.ArgumentError("Parameter containerId is required."); | 1996 throw new core.ArgumentError("Parameter containerId is required."); |
| 2002 } | 1997 } |
| 2003 if (containerVersionId == null) { | 1998 if (containerVersionId == null) { |
| 2004 throw new core.ArgumentError("Parameter containerVersionId is required."); | 1999 throw new core.ArgumentError("Parameter containerVersionId is required."); |
| 2005 } | 2000 } |
| 2006 if (fingerprint != null) { | 2001 if (fingerprint != null) { |
| 2007 _queryParams["fingerprint"] = [fingerprint]; | 2002 _queryParams["fingerprint"] = [fingerprint]; |
| 2008 } | 2003 } |
| 2009 | 2004 |
| 2010 | 2005 |
| 2011 _url = 'accounts/' + common_internal.Escaper.ecapeVariable('$accountId') + '
/containers/' + common_internal.Escaper.ecapeVariable('$containerId') + '/versio
ns/' + common_internal.Escaper.ecapeVariable('$containerVersionId') + '/publish'
; | 2006 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/versions/' + commons.E
scaper.ecapeVariable('$containerVersionId') + '/publish'; |
| 2012 | 2007 |
| 2013 var _response = _requester.request(_url, | 2008 var _response = _requester.request(_url, |
| 2014 "POST", | 2009 "POST", |
| 2015 body: _body, | 2010 body: _body, |
| 2016 queryParams: _queryParams, | 2011 queryParams: _queryParams, |
| 2017 uploadOptions: _uploadOptions, | 2012 uploadOptions: _uploadOptions, |
| 2018 uploadMedia: _uploadMedia, | 2013 uploadMedia: _uploadMedia, |
| 2019 downloadOptions: _downloadOptions); | 2014 downloadOptions: _downloadOptions); |
| 2020 return _response.then((data) => new PublishContainerVersionResponse.fromJson
(data)); | 2015 return _response.then((data) => new PublishContainerVersionResponse.fromJson
(data)); |
| 2021 } | 2016 } |
| 2022 | 2017 |
| 2023 /** | 2018 /** |
| 2024 * Restores a Container Version. This will overwrite the container's current | 2019 * Restores a Container Version. This will overwrite the container's current |
| 2025 * configuration (including its macros, rules and tags). The operation will | 2020 * configuration (including its macros, rules and tags). The operation will |
| 2026 * not have any effect on the version that is being served (i.e. the published | 2021 * not have any effect on the version that is being served (i.e. the published |
| 2027 * version). | 2022 * version). |
| 2028 * | 2023 * |
| 2029 * Request parameters: | 2024 * Request parameters: |
| 2030 * | 2025 * |
| 2031 * [accountId] - The GTM Account ID. | 2026 * [accountId] - The GTM Account ID. |
| 2032 * | 2027 * |
| 2033 * [containerId] - The GTM Container ID. | 2028 * [containerId] - The GTM Container ID. |
| 2034 * | 2029 * |
| 2035 * [containerVersionId] - The GTM Container Version ID. | 2030 * [containerVersionId] - The GTM Container Version ID. |
| 2036 * | 2031 * |
| 2037 * Completes with a [ContainerVersion]. | 2032 * Completes with a [ContainerVersion]. |
| 2038 * | 2033 * |
| 2039 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 2034 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 2040 * error. | 2035 * error. |
| 2041 * | 2036 * |
| 2042 * If the used [http.Client] completes with an error when making a REST call, | 2037 * If the used [http.Client] completes with an error when making a REST call, |
| 2043 * this method will complete with the same error. | 2038 * this method will complete with the same error. |
| 2044 */ | 2039 */ |
| 2045 async.Future<ContainerVersion> restore(core.String accountId, core.String cont
ainerId, core.String containerVersionId) { | 2040 async.Future<ContainerVersion> restore(core.String accountId, core.String cont
ainerId, core.String containerVersionId) { |
| 2046 var _url = null; | 2041 var _url = null; |
| 2047 var _queryParams = new core.Map(); | 2042 var _queryParams = new core.Map(); |
| 2048 var _uploadMedia = null; | 2043 var _uploadMedia = null; |
| 2049 var _uploadOptions = null; | 2044 var _uploadOptions = null; |
| 2050 var _downloadOptions = common.DownloadOptions.Metadata; | 2045 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 2051 var _body = null; | 2046 var _body = null; |
| 2052 | 2047 |
| 2053 if (accountId == null) { | 2048 if (accountId == null) { |
| 2054 throw new core.ArgumentError("Parameter accountId is required."); | 2049 throw new core.ArgumentError("Parameter accountId is required."); |
| 2055 } | 2050 } |
| 2056 if (containerId == null) { | 2051 if (containerId == null) { |
| 2057 throw new core.ArgumentError("Parameter containerId is required."); | 2052 throw new core.ArgumentError("Parameter containerId is required."); |
| 2058 } | 2053 } |
| 2059 if (containerVersionId == null) { | 2054 if (containerVersionId == null) { |
| 2060 throw new core.ArgumentError("Parameter containerVersionId is required."); | 2055 throw new core.ArgumentError("Parameter containerVersionId is required."); |
| 2061 } | 2056 } |
| 2062 | 2057 |
| 2063 | 2058 |
| 2064 _url = 'accounts/' + common_internal.Escaper.ecapeVariable('$accountId') + '
/containers/' + common_internal.Escaper.ecapeVariable('$containerId') + '/versio
ns/' + common_internal.Escaper.ecapeVariable('$containerVersionId') + '/restore'
; | 2059 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/versions/' + commons.E
scaper.ecapeVariable('$containerVersionId') + '/restore'; |
| 2065 | 2060 |
| 2066 var _response = _requester.request(_url, | 2061 var _response = _requester.request(_url, |
| 2067 "POST", | 2062 "POST", |
| 2068 body: _body, | 2063 body: _body, |
| 2069 queryParams: _queryParams, | 2064 queryParams: _queryParams, |
| 2070 uploadOptions: _uploadOptions, | 2065 uploadOptions: _uploadOptions, |
| 2071 uploadMedia: _uploadMedia, | 2066 uploadMedia: _uploadMedia, |
| 2072 downloadOptions: _downloadOptions); | 2067 downloadOptions: _downloadOptions); |
| 2073 return _response.then((data) => new ContainerVersion.fromJson(data)); | 2068 return _response.then((data) => new ContainerVersion.fromJson(data)); |
| 2074 } | 2069 } |
| 2075 | 2070 |
| 2076 /** | 2071 /** |
| 2077 * Undeletes a Container Version. | 2072 * Undeletes a Container Version. |
| 2078 * | 2073 * |
| 2079 * Request parameters: | 2074 * Request parameters: |
| 2080 * | 2075 * |
| 2081 * [accountId] - The GTM Account ID. | 2076 * [accountId] - The GTM Account ID. |
| 2082 * | 2077 * |
| 2083 * [containerId] - The GTM Container ID. | 2078 * [containerId] - The GTM Container ID. |
| 2084 * | 2079 * |
| 2085 * [containerVersionId] - The GTM Container Version ID. | 2080 * [containerVersionId] - The GTM Container Version ID. |
| 2086 * | 2081 * |
| 2087 * Completes with a [ContainerVersion]. | 2082 * Completes with a [ContainerVersion]. |
| 2088 * | 2083 * |
| 2089 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 2084 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 2090 * error. | 2085 * error. |
| 2091 * | 2086 * |
| 2092 * If the used [http.Client] completes with an error when making a REST call, | 2087 * If the used [http.Client] completes with an error when making a REST call, |
| 2093 * this method will complete with the same error. | 2088 * this method will complete with the same error. |
| 2094 */ | 2089 */ |
| 2095 async.Future<ContainerVersion> undelete(core.String accountId, core.String con
tainerId, core.String containerVersionId) { | 2090 async.Future<ContainerVersion> undelete(core.String accountId, core.String con
tainerId, core.String containerVersionId) { |
| 2096 var _url = null; | 2091 var _url = null; |
| 2097 var _queryParams = new core.Map(); | 2092 var _queryParams = new core.Map(); |
| 2098 var _uploadMedia = null; | 2093 var _uploadMedia = null; |
| 2099 var _uploadOptions = null; | 2094 var _uploadOptions = null; |
| 2100 var _downloadOptions = common.DownloadOptions.Metadata; | 2095 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 2101 var _body = null; | 2096 var _body = null; |
| 2102 | 2097 |
| 2103 if (accountId == null) { | 2098 if (accountId == null) { |
| 2104 throw new core.ArgumentError("Parameter accountId is required."); | 2099 throw new core.ArgumentError("Parameter accountId is required."); |
| 2105 } | 2100 } |
| 2106 if (containerId == null) { | 2101 if (containerId == null) { |
| 2107 throw new core.ArgumentError("Parameter containerId is required."); | 2102 throw new core.ArgumentError("Parameter containerId is required."); |
| 2108 } | 2103 } |
| 2109 if (containerVersionId == null) { | 2104 if (containerVersionId == null) { |
| 2110 throw new core.ArgumentError("Parameter containerVersionId is required."); | 2105 throw new core.ArgumentError("Parameter containerVersionId is required."); |
| 2111 } | 2106 } |
| 2112 | 2107 |
| 2113 | 2108 |
| 2114 _url = 'accounts/' + common_internal.Escaper.ecapeVariable('$accountId') + '
/containers/' + common_internal.Escaper.ecapeVariable('$containerId') + '/versio
ns/' + common_internal.Escaper.ecapeVariable('$containerVersionId') + '/undelete
'; | 2109 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/versions/' + commons.E
scaper.ecapeVariable('$containerVersionId') + '/undelete'; |
| 2115 | 2110 |
| 2116 var _response = _requester.request(_url, | 2111 var _response = _requester.request(_url, |
| 2117 "POST", | 2112 "POST", |
| 2118 body: _body, | 2113 body: _body, |
| 2119 queryParams: _queryParams, | 2114 queryParams: _queryParams, |
| 2120 uploadOptions: _uploadOptions, | 2115 uploadOptions: _uploadOptions, |
| 2121 uploadMedia: _uploadMedia, | 2116 uploadMedia: _uploadMedia, |
| 2122 downloadOptions: _downloadOptions); | 2117 downloadOptions: _downloadOptions); |
| 2123 return _response.then((data) => new ContainerVersion.fromJson(data)); | 2118 return _response.then((data) => new ContainerVersion.fromJson(data)); |
| 2124 } | 2119 } |
| 2125 | 2120 |
| 2126 /** | 2121 /** |
| 2127 * Updates a Container Version. | 2122 * Updates a Container Version. |
| 2128 * | 2123 * |
| 2129 * [request] - The metadata request object. | 2124 * [request] - The metadata request object. |
| 2130 * | 2125 * |
| 2131 * Request parameters: | 2126 * Request parameters: |
| 2132 * | 2127 * |
| 2133 * [accountId] - The GTM Account ID. | 2128 * [accountId] - The GTM Account ID. |
| 2134 * | 2129 * |
| 2135 * [containerId] - The GTM Container ID. | 2130 * [containerId] - The GTM Container ID. |
| 2136 * | 2131 * |
| 2137 * [containerVersionId] - The GTM Container Version ID. | 2132 * [containerVersionId] - The GTM Container Version ID. |
| 2138 * | 2133 * |
| 2139 * [fingerprint] - When provided, this fingerprint must match the fingerprint | 2134 * [fingerprint] - When provided, this fingerprint must match the fingerprint |
| 2140 * of the container version in storage. | 2135 * of the container version in storage. |
| 2141 * | 2136 * |
| 2142 * Completes with a [ContainerVersion]. | 2137 * Completes with a [ContainerVersion]. |
| 2143 * | 2138 * |
| 2144 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 2139 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 2145 * error. | 2140 * error. |
| 2146 * | 2141 * |
| 2147 * If the used [http.Client] completes with an error when making a REST call, | 2142 * If the used [http.Client] completes with an error when making a REST call, |
| 2148 * this method will complete with the same error. | 2143 * this method will complete with the same error. |
| 2149 */ | 2144 */ |
| 2150 async.Future<ContainerVersion> update(ContainerVersion request, core.String ac
countId, core.String containerId, core.String containerVersionId, {core.String f
ingerprint}) { | 2145 async.Future<ContainerVersion> update(ContainerVersion request, core.String ac
countId, core.String containerId, core.String containerVersionId, {core.String f
ingerprint}) { |
| 2151 var _url = null; | 2146 var _url = null; |
| 2152 var _queryParams = new core.Map(); | 2147 var _queryParams = new core.Map(); |
| 2153 var _uploadMedia = null; | 2148 var _uploadMedia = null; |
| 2154 var _uploadOptions = null; | 2149 var _uploadOptions = null; |
| 2155 var _downloadOptions = common.DownloadOptions.Metadata; | 2150 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 2156 var _body = null; | 2151 var _body = null; |
| 2157 | 2152 |
| 2158 if (request != null) { | 2153 if (request != null) { |
| 2159 _body = convert.JSON.encode((request).toJson()); | 2154 _body = convert.JSON.encode((request).toJson()); |
| 2160 } | 2155 } |
| 2161 if (accountId == null) { | 2156 if (accountId == null) { |
| 2162 throw new core.ArgumentError("Parameter accountId is required."); | 2157 throw new core.ArgumentError("Parameter accountId is required."); |
| 2163 } | 2158 } |
| 2164 if (containerId == null) { | 2159 if (containerId == null) { |
| 2165 throw new core.ArgumentError("Parameter containerId is required."); | 2160 throw new core.ArgumentError("Parameter containerId is required."); |
| 2166 } | 2161 } |
| 2167 if (containerVersionId == null) { | 2162 if (containerVersionId == null) { |
| 2168 throw new core.ArgumentError("Parameter containerVersionId is required."); | 2163 throw new core.ArgumentError("Parameter containerVersionId is required."); |
| 2169 } | 2164 } |
| 2170 if (fingerprint != null) { | 2165 if (fingerprint != null) { |
| 2171 _queryParams["fingerprint"] = [fingerprint]; | 2166 _queryParams["fingerprint"] = [fingerprint]; |
| 2172 } | 2167 } |
| 2173 | 2168 |
| 2174 | 2169 |
| 2175 _url = 'accounts/' + common_internal.Escaper.ecapeVariable('$accountId') + '
/containers/' + common_internal.Escaper.ecapeVariable('$containerId') + '/versio
ns/' + common_internal.Escaper.ecapeVariable('$containerVersionId'); | 2170 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/versions/' + commons.E
scaper.ecapeVariable('$containerVersionId'); |
| 2176 | 2171 |
| 2177 var _response = _requester.request(_url, | 2172 var _response = _requester.request(_url, |
| 2178 "PUT", | 2173 "PUT", |
| 2179 body: _body, | 2174 body: _body, |
| 2180 queryParams: _queryParams, | 2175 queryParams: _queryParams, |
| 2181 uploadOptions: _uploadOptions, | 2176 uploadOptions: _uploadOptions, |
| 2182 uploadMedia: _uploadMedia, | 2177 uploadMedia: _uploadMedia, |
| 2183 downloadOptions: _downloadOptions); | 2178 downloadOptions: _downloadOptions); |
| 2184 return _response.then((data) => new ContainerVersion.fromJson(data)); | 2179 return _response.then((data) => new ContainerVersion.fromJson(data)); |
| 2185 } | 2180 } |
| 2186 | 2181 |
| 2187 } | 2182 } |
| 2188 | 2183 |
| 2189 | 2184 |
| 2190 /** Not documented yet. */ | |
| 2191 class AccountsPermissionsResourceApi { | 2185 class AccountsPermissionsResourceApi { |
| 2192 final common_internal.ApiRequester _requester; | 2186 final commons.ApiRequester _requester; |
| 2193 | 2187 |
| 2194 AccountsPermissionsResourceApi(common_internal.ApiRequester client) : | 2188 AccountsPermissionsResourceApi(commons.ApiRequester client) : |
| 2195 _requester = client; | 2189 _requester = client; |
| 2196 | 2190 |
| 2197 /** | 2191 /** |
| 2198 * Creates a user's Account & Container Permissions. | 2192 * Creates a user's Account & Container Permissions. |
| 2199 * | 2193 * |
| 2200 * [request] - The metadata request object. | 2194 * [request] - The metadata request object. |
| 2201 * | 2195 * |
| 2202 * Request parameters: | 2196 * Request parameters: |
| 2203 * | 2197 * |
| 2204 * [accountId] - The GTM Account ID. | 2198 * [accountId] - The GTM Account ID. |
| 2205 * | 2199 * |
| 2206 * Completes with a [UserAccess]. | 2200 * Completes with a [UserAccess]. |
| 2207 * | 2201 * |
| 2208 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 2202 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 2209 * error. | 2203 * error. |
| 2210 * | 2204 * |
| 2211 * If the used [http.Client] completes with an error when making a REST call, | 2205 * If the used [http.Client] completes with an error when making a REST call, |
| 2212 * this method will complete with the same error. | 2206 * this method will complete with the same error. |
| 2213 */ | 2207 */ |
| 2214 async.Future<UserAccess> create(UserAccess request, core.String accountId) { | 2208 async.Future<UserAccess> create(UserAccess request, core.String accountId) { |
| 2215 var _url = null; | 2209 var _url = null; |
| 2216 var _queryParams = new core.Map(); | 2210 var _queryParams = new core.Map(); |
| 2217 var _uploadMedia = null; | 2211 var _uploadMedia = null; |
| 2218 var _uploadOptions = null; | 2212 var _uploadOptions = null; |
| 2219 var _downloadOptions = common.DownloadOptions.Metadata; | 2213 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 2220 var _body = null; | 2214 var _body = null; |
| 2221 | 2215 |
| 2222 if (request != null) { | 2216 if (request != null) { |
| 2223 _body = convert.JSON.encode((request).toJson()); | 2217 _body = convert.JSON.encode((request).toJson()); |
| 2224 } | 2218 } |
| 2225 if (accountId == null) { | 2219 if (accountId == null) { |
| 2226 throw new core.ArgumentError("Parameter accountId is required."); | 2220 throw new core.ArgumentError("Parameter accountId is required."); |
| 2227 } | 2221 } |
| 2228 | 2222 |
| 2229 | 2223 |
| 2230 _url = 'accounts/' + common_internal.Escaper.ecapeVariable('$accountId') + '
/permissions'; | 2224 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/permiss
ions'; |
| 2231 | 2225 |
| 2232 var _response = _requester.request(_url, | 2226 var _response = _requester.request(_url, |
| 2233 "POST", | 2227 "POST", |
| 2234 body: _body, | 2228 body: _body, |
| 2235 queryParams: _queryParams, | 2229 queryParams: _queryParams, |
| 2236 uploadOptions: _uploadOptions, | 2230 uploadOptions: _uploadOptions, |
| 2237 uploadMedia: _uploadMedia, | 2231 uploadMedia: _uploadMedia, |
| 2238 downloadOptions: _downloadOptions); | 2232 downloadOptions: _downloadOptions); |
| 2239 return _response.then((data) => new UserAccess.fromJson(data)); | 2233 return _response.then((data) => new UserAccess.fromJson(data)); |
| 2240 } | 2234 } |
| 2241 | 2235 |
| 2242 /** | 2236 /** |
| 2243 * Removes a user from the account, revoking access to it and all of its | 2237 * Removes a user from the account, revoking access to it and all of its |
| 2244 * containers. | 2238 * containers. |
| 2245 * | 2239 * |
| 2246 * Request parameters: | 2240 * Request parameters: |
| 2247 * | 2241 * |
| 2248 * [accountId] - The GTM Account ID. | 2242 * [accountId] - The GTM Account ID. |
| 2249 * | 2243 * |
| 2250 * [permissionId] - The GTM User ID. | 2244 * [permissionId] - The GTM User ID. |
| 2251 * | 2245 * |
| 2252 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 2246 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 2253 * error. | 2247 * error. |
| 2254 * | 2248 * |
| 2255 * If the used [http.Client] completes with an error when making a REST call, | 2249 * If the used [http.Client] completes with an error when making a REST call, |
| 2256 * this method will complete with the same error. | 2250 * this method will complete with the same error. |
| 2257 */ | 2251 */ |
| 2258 async.Future delete(core.String accountId, core.String permissionId) { | 2252 async.Future delete(core.String accountId, core.String permissionId) { |
| 2259 var _url = null; | 2253 var _url = null; |
| 2260 var _queryParams = new core.Map(); | 2254 var _queryParams = new core.Map(); |
| 2261 var _uploadMedia = null; | 2255 var _uploadMedia = null; |
| 2262 var _uploadOptions = null; | 2256 var _uploadOptions = null; |
| 2263 var _downloadOptions = common.DownloadOptions.Metadata; | 2257 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 2264 var _body = null; | 2258 var _body = null; |
| 2265 | 2259 |
| 2266 if (accountId == null) { | 2260 if (accountId == null) { |
| 2267 throw new core.ArgumentError("Parameter accountId is required."); | 2261 throw new core.ArgumentError("Parameter accountId is required."); |
| 2268 } | 2262 } |
| 2269 if (permissionId == null) { | 2263 if (permissionId == null) { |
| 2270 throw new core.ArgumentError("Parameter permissionId is required."); | 2264 throw new core.ArgumentError("Parameter permissionId is required."); |
| 2271 } | 2265 } |
| 2272 | 2266 |
| 2273 _downloadOptions = null; | 2267 _downloadOptions = null; |
| 2274 | 2268 |
| 2275 _url = 'accounts/' + common_internal.Escaper.ecapeVariable('$accountId') + '
/permissions/' + common_internal.Escaper.ecapeVariable('$permissionId'); | 2269 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/permiss
ions/' + commons.Escaper.ecapeVariable('$permissionId'); |
| 2276 | 2270 |
| 2277 var _response = _requester.request(_url, | 2271 var _response = _requester.request(_url, |
| 2278 "DELETE", | 2272 "DELETE", |
| 2279 body: _body, | 2273 body: _body, |
| 2280 queryParams: _queryParams, | 2274 queryParams: _queryParams, |
| 2281 uploadOptions: _uploadOptions, | 2275 uploadOptions: _uploadOptions, |
| 2282 uploadMedia: _uploadMedia, | 2276 uploadMedia: _uploadMedia, |
| 2283 downloadOptions: _downloadOptions); | 2277 downloadOptions: _downloadOptions); |
| 2284 return _response.then((data) => null); | 2278 return _response.then((data) => null); |
| 2285 } | 2279 } |
| 2286 | 2280 |
| 2287 /** | 2281 /** |
| 2288 * Gets a user's Account & Container Permissions. | 2282 * Gets a user's Account & Container Permissions. |
| 2289 * | 2283 * |
| 2290 * Request parameters: | 2284 * Request parameters: |
| 2291 * | 2285 * |
| 2292 * [accountId] - The GTM Account ID. | 2286 * [accountId] - The GTM Account ID. |
| 2293 * | 2287 * |
| 2294 * [permissionId] - The GTM User ID. | 2288 * [permissionId] - The GTM User ID. |
| 2295 * | 2289 * |
| 2296 * Completes with a [UserAccess]. | 2290 * Completes with a [UserAccess]. |
| 2297 * | 2291 * |
| 2298 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 2292 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 2299 * error. | 2293 * error. |
| 2300 * | 2294 * |
| 2301 * If the used [http.Client] completes with an error when making a REST call, | 2295 * If the used [http.Client] completes with an error when making a REST call, |
| 2302 * this method will complete with the same error. | 2296 * this method will complete with the same error. |
| 2303 */ | 2297 */ |
| 2304 async.Future<UserAccess> get(core.String accountId, core.String permissionId)
{ | 2298 async.Future<UserAccess> get(core.String accountId, core.String permissionId)
{ |
| 2305 var _url = null; | 2299 var _url = null; |
| 2306 var _queryParams = new core.Map(); | 2300 var _queryParams = new core.Map(); |
| 2307 var _uploadMedia = null; | 2301 var _uploadMedia = null; |
| 2308 var _uploadOptions = null; | 2302 var _uploadOptions = null; |
| 2309 var _downloadOptions = common.DownloadOptions.Metadata; | 2303 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 2310 var _body = null; | 2304 var _body = null; |
| 2311 | 2305 |
| 2312 if (accountId == null) { | 2306 if (accountId == null) { |
| 2313 throw new core.ArgumentError("Parameter accountId is required."); | 2307 throw new core.ArgumentError("Parameter accountId is required."); |
| 2314 } | 2308 } |
| 2315 if (permissionId == null) { | 2309 if (permissionId == null) { |
| 2316 throw new core.ArgumentError("Parameter permissionId is required."); | 2310 throw new core.ArgumentError("Parameter permissionId is required."); |
| 2317 } | 2311 } |
| 2318 | 2312 |
| 2319 | 2313 |
| 2320 _url = 'accounts/' + common_internal.Escaper.ecapeVariable('$accountId') + '
/permissions/' + common_internal.Escaper.ecapeVariable('$permissionId'); | 2314 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/permiss
ions/' + commons.Escaper.ecapeVariable('$permissionId'); |
| 2321 | 2315 |
| 2322 var _response = _requester.request(_url, | 2316 var _response = _requester.request(_url, |
| 2323 "GET", | 2317 "GET", |
| 2324 body: _body, | 2318 body: _body, |
| 2325 queryParams: _queryParams, | 2319 queryParams: _queryParams, |
| 2326 uploadOptions: _uploadOptions, | 2320 uploadOptions: _uploadOptions, |
| 2327 uploadMedia: _uploadMedia, | 2321 uploadMedia: _uploadMedia, |
| 2328 downloadOptions: _downloadOptions); | 2322 downloadOptions: _downloadOptions); |
| 2329 return _response.then((data) => new UserAccess.fromJson(data)); | 2323 return _response.then((data) => new UserAccess.fromJson(data)); |
| 2330 } | 2324 } |
| 2331 | 2325 |
| 2332 /** | 2326 /** |
| 2333 * List all users that have access to the account along with Account and | 2327 * List all users that have access to the account along with Account and |
| 2334 * Container Permissions granted to each of them. | 2328 * Container Permissions granted to each of them. |
| 2335 * | 2329 * |
| 2336 * Request parameters: | 2330 * Request parameters: |
| 2337 * | 2331 * |
| 2338 * [accountId] - The GTM Account ID. @required | 2332 * [accountId] - The GTM Account ID. @required |
| 2339 * tagmanager.accounts.permissions.list | 2333 * tagmanager.accounts.permissions.list |
| 2340 * | 2334 * |
| 2341 * Completes with a [ListAccountUsersResponse]. | 2335 * Completes with a [ListAccountUsersResponse]. |
| 2342 * | 2336 * |
| 2343 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 2337 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 2344 * error. | 2338 * error. |
| 2345 * | 2339 * |
| 2346 * If the used [http.Client] completes with an error when making a REST call, | 2340 * If the used [http.Client] completes with an error when making a REST call, |
| 2347 * this method will complete with the same error. | 2341 * this method will complete with the same error. |
| 2348 */ | 2342 */ |
| 2349 async.Future<ListAccountUsersResponse> list(core.String accountId) { | 2343 async.Future<ListAccountUsersResponse> list(core.String accountId) { |
| 2350 var _url = null; | 2344 var _url = null; |
| 2351 var _queryParams = new core.Map(); | 2345 var _queryParams = new core.Map(); |
| 2352 var _uploadMedia = null; | 2346 var _uploadMedia = null; |
| 2353 var _uploadOptions = null; | 2347 var _uploadOptions = null; |
| 2354 var _downloadOptions = common.DownloadOptions.Metadata; | 2348 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 2355 var _body = null; | 2349 var _body = null; |
| 2356 | 2350 |
| 2357 if (accountId == null) { | 2351 if (accountId == null) { |
| 2358 throw new core.ArgumentError("Parameter accountId is required."); | 2352 throw new core.ArgumentError("Parameter accountId is required."); |
| 2359 } | 2353 } |
| 2360 | 2354 |
| 2361 | 2355 |
| 2362 _url = 'accounts/' + common_internal.Escaper.ecapeVariable('$accountId') + '
/permissions'; | 2356 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/permiss
ions'; |
| 2363 | 2357 |
| 2364 var _response = _requester.request(_url, | 2358 var _response = _requester.request(_url, |
| 2365 "GET", | 2359 "GET", |
| 2366 body: _body, | 2360 body: _body, |
| 2367 queryParams: _queryParams, | 2361 queryParams: _queryParams, |
| 2368 uploadOptions: _uploadOptions, | 2362 uploadOptions: _uploadOptions, |
| 2369 uploadMedia: _uploadMedia, | 2363 uploadMedia: _uploadMedia, |
| 2370 downloadOptions: _downloadOptions); | 2364 downloadOptions: _downloadOptions); |
| 2371 return _response.then((data) => new ListAccountUsersResponse.fromJson(data))
; | 2365 return _response.then((data) => new ListAccountUsersResponse.fromJson(data))
; |
| 2372 } | 2366 } |
| 2373 | 2367 |
| 2374 /** | 2368 /** |
| 2375 * Updates a user's Account & Container Permissions. | 2369 * Updates a user's Account & Container Permissions. |
| 2376 * | 2370 * |
| 2377 * [request] - The metadata request object. | 2371 * [request] - The metadata request object. |
| 2378 * | 2372 * |
| 2379 * Request parameters: | 2373 * Request parameters: |
| 2380 * | 2374 * |
| 2381 * [accountId] - The GTM Account ID. | 2375 * [accountId] - The GTM Account ID. |
| 2382 * | 2376 * |
| 2383 * [permissionId] - The GTM User ID. | 2377 * [permissionId] - The GTM User ID. |
| 2384 * | 2378 * |
| 2385 * Completes with a [UserAccess]. | 2379 * Completes with a [UserAccess]. |
| 2386 * | 2380 * |
| 2387 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 2381 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 2388 * error. | 2382 * error. |
| 2389 * | 2383 * |
| 2390 * If the used [http.Client] completes with an error when making a REST call, | 2384 * If the used [http.Client] completes with an error when making a REST call, |
| 2391 * this method will complete with the same error. | 2385 * this method will complete with the same error. |
| 2392 */ | 2386 */ |
| 2393 async.Future<UserAccess> update(UserAccess request, core.String accountId, cor
e.String permissionId) { | 2387 async.Future<UserAccess> update(UserAccess request, core.String accountId, cor
e.String permissionId) { |
| 2394 var _url = null; | 2388 var _url = null; |
| 2395 var _queryParams = new core.Map(); | 2389 var _queryParams = new core.Map(); |
| 2396 var _uploadMedia = null; | 2390 var _uploadMedia = null; |
| 2397 var _uploadOptions = null; | 2391 var _uploadOptions = null; |
| 2398 var _downloadOptions = common.DownloadOptions.Metadata; | 2392 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 2399 var _body = null; | 2393 var _body = null; |
| 2400 | 2394 |
| 2401 if (request != null) { | 2395 if (request != null) { |
| 2402 _body = convert.JSON.encode((request).toJson()); | 2396 _body = convert.JSON.encode((request).toJson()); |
| 2403 } | 2397 } |
| 2404 if (accountId == null) { | 2398 if (accountId == null) { |
| 2405 throw new core.ArgumentError("Parameter accountId is required."); | 2399 throw new core.ArgumentError("Parameter accountId is required."); |
| 2406 } | 2400 } |
| 2407 if (permissionId == null) { | 2401 if (permissionId == null) { |
| 2408 throw new core.ArgumentError("Parameter permissionId is required."); | 2402 throw new core.ArgumentError("Parameter permissionId is required."); |
| 2409 } | 2403 } |
| 2410 | 2404 |
| 2411 | 2405 |
| 2412 _url = 'accounts/' + common_internal.Escaper.ecapeVariable('$accountId') + '
/permissions/' + common_internal.Escaper.ecapeVariable('$permissionId'); | 2406 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/permiss
ions/' + commons.Escaper.ecapeVariable('$permissionId'); |
| 2413 | 2407 |
| 2414 var _response = _requester.request(_url, | 2408 var _response = _requester.request(_url, |
| 2415 "PUT", | 2409 "PUT", |
| 2416 body: _body, | 2410 body: _body, |
| 2417 queryParams: _queryParams, | 2411 queryParams: _queryParams, |
| 2418 uploadOptions: _uploadOptions, | 2412 uploadOptions: _uploadOptions, |
| 2419 uploadMedia: _uploadMedia, | 2413 uploadMedia: _uploadMedia, |
| 2420 downloadOptions: _downloadOptions); | 2414 downloadOptions: _downloadOptions); |
| 2421 return _response.then((data) => new UserAccess.fromJson(data)); | 2415 return _response.then((data) => new UserAccess.fromJson(data)); |
| 2422 } | 2416 } |
| (...skipping 1777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4200 } | 4194 } |
| 4201 if (type != null) { | 4195 if (type != null) { |
| 4202 _json["type"] = type; | 4196 _json["type"] = type; |
| 4203 } | 4197 } |
| 4204 if (variableId != null) { | 4198 if (variableId != null) { |
| 4205 _json["variableId"] = variableId; | 4199 _json["variableId"] = variableId; |
| 4206 } | 4200 } |
| 4207 return _json; | 4201 return _json; |
| 4208 } | 4202 } |
| 4209 } | 4203 } |
| 4210 | |
| 4211 | |
| OLD | NEW |