combine method

Future<Container> combine(
  1. String path, {
  2. bool? allowUserPermissionFeatureUpdate,
  3. String? containerId,
  4. String? settingSource,
  5. String? $fields,
})

Combines Containers.

Request parameters:

path - GTM Container's API relative path. Example: accounts/{account_id}/containers/{container_id} Value must have pattern ^accounts/\[^/\]+/containers/\[^/\]+$.

allowUserPermissionFeatureUpdate - Must be set to true to allow features.user_permissions to change from false to true. If this operation causes an update but this bit is false, the operation will fail.

containerId - ID of container that will be merged into the current container.

settingSource - Specify the source of config setting after combine Possible string values are:

  • "settingSourceUnspecified"
  • "current" : Keep the current container config setting after combine
  • "other" : Use config setting from the other tag after combine

$fields - Selector specifying which fields to include in a partial response.

Completes with a Container.

Completes with a commons.ApiRequestError if the API endpoint returned an error.

If the used http.Client completes with an error when making a REST call, this method will complete with the same error.

Implementation

async.Future<Container> combine(
  core.String path, {
  core.bool? allowUserPermissionFeatureUpdate,
  core.String? containerId,
  core.String? settingSource,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if (allowUserPermissionFeatureUpdate != null)
      'allowUserPermissionFeatureUpdate': [
        '${allowUserPermissionFeatureUpdate}'
      ],
    if (containerId != null) 'containerId': [containerId],
    if (settingSource != null) 'settingSource': [settingSource],
    if ($fields != null) 'fields': [$fields],
  };

  final url_ = 'tagmanager/v2/' + core.Uri.encodeFull('$path') + ':combine';

  final response_ = await _requester.request(
    url_,
    'POST',
    queryParams: queryParams_,
  );
  return Container.fromJson(response_ as core.Map<core.String, core.dynamic>);
}