UNPKG

googleapis

Version:
1,435 lines 203 kB
/** * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import { OAuth2Client, JWT, Compute, UserRefreshClient } from 'google-auth-library'; import { GoogleConfigurable, MethodOptions, GlobalOptions, BodyResponseCallback, APIRequestContext } from 'googleapis-common'; import { GaxiosPromise } from 'gaxios'; export declare namespace tagmanager_v2 { interface Options extends GlobalOptions { version: 'v2'; } interface StandardParameters { /** * Data format for the response. */ alt?: string; /** * Selector specifying which fields to include in a partial response. */ fields?: string; /** * API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ key?: string; /** * OAuth 2.0 token for the current user. */ oauth_token?: string; /** * Returns response with indentations and line breaks. */ prettyPrint?: boolean; /** * An opaque string that represents a user for quota purposes. Must not exceed 40 characters. */ quotaUser?: string; /** * Deprecated. Please use quotaUser instead. */ userIp?: string; } /** * Tag Manager API * * Accesses Tag Manager accounts and containers. * * @example * const {google} = require('googleapis'); * const tagmanager = google.tagmanager('v2'); * * @namespace tagmanager * @type {Function} * @version v2 * @variation v2 * @param {object=} options Options for Tagmanager */ class Tagmanager { context: APIRequestContext; accounts: Resource$Accounts; constructor(options: GlobalOptions, google?: GoogleConfigurable); } /** * Represents a Google Tag Manager Account. */ interface Schema$Account { /** * The Account ID uniquely identifies the GTM Account. */ accountId?: string; /** * The fingerprint of the GTM Account as computed at storage time. This value is recomputed whenever the account is modified. */ fingerprint?: string; /** * Account display name. */ name?: string; /** * GTM Account's API relative path. */ path?: string; /** * Whether the account shares data anonymously with Google and others. This flag enables benchmarking by sharing your data in an anonymous form. Google will remove all identifiable information about your website, combine the data with hundreds of other anonymous sites and report aggregate trends in the benchmarking service. */ shareData?: boolean; /** * Auto generated link to the tag manager UI */ tagManagerUrl?: string; } /** * Defines the Google Tag Manager Account access permissions. */ interface Schema$AccountAccess { /** * Whether the user has no access, user access, or admin access to an account. */ permission?: string; } /** * Built-in variables are a special category of variables that are pre-created and non-customizable. They provide common functionality like accessing propeties of the gtm data layer, monitoring clicks, or accessing elements of a page URL. */ interface Schema$BuiltInVariable { /** * GTM Account ID. */ accountId?: string; /** * GTM Container ID. */ containerId?: string; /** * Name of the built-in variable to be used to refer to the built-in variable. */ name?: string; /** * GTM BuiltInVariable's API relative path. */ path?: string; /** * Type of built-in variable. */ type?: string; /** * GTM Workspace ID. */ workspaceId?: string; } /** * Represents a predicate. */ interface Schema$Condition { /** * A list of named parameters (key/value), depending on the condition's type. Notes: - For binary operators, include parameters named arg0 and arg1 for specifying the left and right operands, respectively. - At this time, the left operand (arg0) must be a reference to a variable. - For case-insensitive Regex matching, include a boolean parameter named ignore_case that is set to true. If not specified or set to any other value, the matching will be case sensitive. - To negate an operator, include a boolean parameter named negate boolean parameter that is set to true. */ parameter?: Schema$Parameter[]; /** * The type of operator for this condition. */ type?: string; } /** * Represents a Google Tag Manager Container, which specifies the platform tags will run on, manages workspaces, and retains container versions. */ interface Schema$Container { /** * GTM Account ID. */ accountId?: string; /** * The Container ID uniquely identifies the GTM Container. */ containerId?: string; /** * List of domain names associated with the Container. */ domainName?: string[]; /** * The fingerprint of the GTM Container as computed at storage time. This value is recomputed whenever the account is modified. */ fingerprint?: string; /** * Container display name. */ name?: string; /** * Container Notes. */ notes?: string; /** * GTM Container's API relative path. */ path?: string; /** * Container Public ID. */ publicId?: string; /** * Auto generated link to the tag manager UI */ tagManagerUrl?: string; /** * List of Usage Contexts for the Container. Valid values include: web, android, or ios. */ usageContext?: string[]; } /** * Defines the Google Tag Manager Container access permissions. */ interface Schema$ContainerAccess { /** * GTM Container ID. */ containerId?: string; /** * List of Container permissions. */ permission?: string; } /** * Represents a Google Tag Manager Container Version. */ interface Schema$ContainerVersion { /** * GTM Account ID. */ accountId?: string; /** * The built-in variables in the container that this version was taken from. */ builtInVariable?: Schema$BuiltInVariable[]; /** * The container that this version was taken from. */ container?: Schema$Container; /** * GTM Container ID. */ containerId?: string; /** * The Container Version ID uniquely identifies the GTM Container Version. */ containerVersionId?: string; /** * The custom templates in the container that this version was taken from. */ customTemplate?: Schema$CustomTemplate[]; /** * A value of true indicates this container version has been deleted. */ deleted?: boolean; /** * Container version description. */ description?: string; /** * The fingerprint of the GTM Container Version as computed at storage time. This value is recomputed whenever the container version is modified. */ fingerprint?: string; /** * The folders in the container that this version was taken from. */ folder?: Schema$Folder[]; /** * Container version display name. */ name?: string; /** * GTM ContainerVersions's API relative path. */ path?: string; /** * The tags in the container that this version was taken from. */ tag?: Schema$Tag[]; /** * Auto generated link to the tag manager UI */ tagManagerUrl?: string; /** * The triggers in the container that this version was taken from. */ trigger?: Schema$Trigger[]; /** * The variables in the container that this version was taken from. */ variable?: Schema$Variable[]; /** * The zones in the container that this version was taken from. */ zone?: Schema$Zone[]; } /** * Represents a Google Tag Manager Container Version Header. */ interface Schema$ContainerVersionHeader { /** * GTM Account ID. */ accountId?: string; /** * GTM Container ID. */ containerId?: string; /** * The Container Version ID uniquely identifies the GTM Container Version. */ containerVersionId?: string; /** * A value of true indicates this container version has been deleted. */ deleted?: boolean; /** * Container version display name. */ name?: string; /** * Number of custom templates in the container version. */ numCustomTemplates?: string; /** * Number of macros in the container version. */ numMacros?: string; /** * Number of rules in the container version. */ numRules?: string; /** * Number of tags in the container version. */ numTags?: string; /** * Number of triggers in the container version. */ numTriggers?: string; /** * Number of variables in the container version. */ numVariables?: string; /** * Number of zones in the container version. */ numZones?: string; /** * GTM Container Versions's API relative path. */ path?: string; } interface Schema$CreateBuiltInVariableResponse { /** * List of created built-in variables. */ builtInVariable?: Schema$BuiltInVariable[]; } /** * Options for new container versions. */ interface Schema$CreateContainerVersionRequestVersionOptions { /** * The name of the container version to be created. */ name?: string; /** * The notes of the container version to be created. */ notes?: string; } /** * Create container versions response. */ interface Schema$CreateContainerVersionResponse { /** * Compiler errors or not. */ compilerError?: boolean; /** * The container version created. */ containerVersion?: Schema$ContainerVersion; /** * Auto generated workspace path created as a result of version creation. This field should only be populated if the created version was not a quick preview. */ newWorkspacePath?: string; /** * Whether version creation failed when syncing the workspace to the latest container version. */ syncStatus?: Schema$SyncStatus; } /** * Represents a Google Tag Manager Custom Template's contents. */ interface Schema$CustomTemplate { /** * GTM Account ID. */ accountId?: string; /** * GTM Container ID. */ containerId?: string; /** * The fingerprint of the GTM Custom Template as computed at storage time. This value is recomputed whenever the template is modified. */ fingerprint?: string; /** * Custom Template display name. */ name?: string; /** * GTM Custom Template's API relative path. */ path?: string; /** * Auto generated link to the tag manager UI */ tagManagerUrl?: string; /** * The custom template in text format. */ templateData?: string; /** * The Custom Template ID uniquely identifies the GTM custom template. */ templateId?: string; /** * GTM Workspace ID. */ workspaceId?: string; } /** * A workspace entity that may represent a tag, trigger, variable, or folder in addition to its status in the workspace. */ interface Schema$Entity { /** * Represents how the entity has been changed in the workspace. */ changeStatus?: string; /** * The Folder being represented by the entity. */ folder?: Schema$Folder; /** * The tag being represented by the entity. */ tag?: Schema$Tag; /** * The trigger being represented by the entity. */ trigger?: Schema$Trigger; /** * The variable being represented by the entity. */ variable?: Schema$Variable; } /** * Represents a Google Tag Manager Environment. Note that a user can create, delete and update environments of type USER, but can only update the enable_debug and url fields of environments of other types. */ interface Schema$Environment { /** * GTM Account ID. */ accountId?: string; /** * The environment authorization code. */ authorizationCode?: string; /** * The last update time-stamp for the authorization code. */ authorizationTimestamp?: Schema$Timestamp; /** * GTM Container ID. */ containerId?: string; /** * Represents a link to a container version. */ containerVersionId?: string; /** * The environment description. Can be set or changed only on USER type environments. */ description?: string; /** * Whether or not to enable debug by default for the environment. */ enableDebug?: boolean; /** * GTM Environment ID uniquely identifies the GTM Environment. */ environmentId?: string; /** * The fingerprint of the GTM environment as computed at storage time. This value is recomputed whenever the environment is modified. */ fingerprint?: string; /** * The environment display name. Can be set or changed only on USER type environments. */ name?: string; /** * GTM Environment's API relative path. */ path?: string; /** * Auto generated link to the tag manager UI */ tagManagerUrl?: string; /** * The type of this environment. */ type?: string; /** * Default preview page url for the environment. */ url?: string; /** * Represents a link to a quick preview of a workspace. */ workspaceId?: string; } /** * Represents a Google Tag Manager Folder. */ interface Schema$Folder { /** * GTM Account ID. */ accountId?: string; /** * GTM Container ID. */ containerId?: string; /** * The fingerprint of the GTM Folder as computed at storage time. This value is recomputed whenever the folder is modified. */ fingerprint?: string; /** * The Folder ID uniquely identifies the GTM Folder. */ folderId?: string; /** * Folder display name. */ name?: string; /** * User notes on how to apply this folder in the container. */ notes?: string; /** * GTM Folder's API relative path. */ path?: string; /** * Auto generated link to the tag manager UI */ tagManagerUrl?: string; /** * GTM Workspace ID. */ workspaceId?: string; } /** * Represents a Google Tag Manager Folder's contents. */ interface Schema$FolderEntities { /** * Continuation token for fetching the next page of results. */ nextPageToken?: string; /** * The list of tags inside the folder. */ tag?: Schema$Tag[]; /** * The list of triggers inside the folder. */ trigger?: Schema$Trigger[]; /** * The list of variables inside the folder. */ variable?: Schema$Variable[]; } /** * The changes that have occurred in the workspace since the base container version. */ interface Schema$GetWorkspaceStatusResponse { /** * The merge conflict after sync. */ mergeConflict?: Schema$MergeConflict[]; /** * Entities that have been changed in the workspace. */ workspaceChange?: Schema$Entity[]; } /** * List Accounts Response. */ interface Schema$ListAccountsResponse { /** * List of GTM Accounts that a user has access to. */ account?: Schema$Account[]; /** * Continuation token for fetching the next page of results. */ nextPageToken?: string; } /** * List Containers Response. */ interface Schema$ListContainersResponse { /** * All Containers of a GTM Account. */ container?: Schema$Container[]; /** * Continuation token for fetching the next page of results. */ nextPageToken?: string; } /** * List container versions response. */ interface Schema$ListContainerVersionsResponse { /** * All container version headers of a GTM Container. */ containerVersionHeader?: Schema$ContainerVersionHeader[]; /** * Continuation token for fetching the next page of results. */ nextPageToken?: string; } /** * A list of enabled built-in variables. */ interface Schema$ListEnabledBuiltInVariablesResponse { /** * All GTM BuiltInVariables of a GTM container. */ builtInVariable?: Schema$BuiltInVariable[]; /** * Continuation token for fetching the next page of results. */ nextPageToken?: string; } /** * List Environments Response. */ interface Schema$ListEnvironmentsResponse { /** * All Environments of a GTM Container. */ environment?: Schema$Environment[]; /** * Continuation token for fetching the next page of results. */ nextPageToken?: string; } /** * List Folders Response. */ interface Schema$ListFoldersResponse { /** * All GTM Folders of a GTM Container. */ folder?: Schema$Folder[]; /** * Continuation token for fetching the next page of results. */ nextPageToken?: string; } /** * List Tags Response. */ interface Schema$ListTagsResponse { /** * Continuation token for fetching the next page of results. */ nextPageToken?: string; /** * All GTM Tags of a GTM Container. */ tag?: Schema$Tag[]; } interface Schema$ListTemplatesResponse { /** * Continuation token for fetching the next page of results. */ nextPageToken?: string; /** * All GTM Custom Templates of a GTM Container. */ template?: Schema$CustomTemplate[]; } /** * List triggers response. */ interface Schema$ListTriggersResponse { /** * Continuation token for fetching the next page of results. */ nextPageToken?: string; /** * All GTM Triggers of a GTM Container. */ trigger?: Schema$Trigger[]; } /** * List user permissions response. */ interface Schema$ListUserPermissionsResponse { /** * Continuation token for fetching the next page of results. */ nextPageToken?: string; /** * All GTM UserPermissions of a GTM Account. */ userPermission?: Schema$UserPermission[]; } /** * List Variables Response. */ interface Schema$ListVariablesResponse { /** * Continuation token for fetching the next page of results. */ nextPageToken?: string; /** * All GTM Variables of a GTM Container. */ variable?: Schema$Variable[]; } /** * A list of workspaces in a container. */ interface Schema$ListWorkspacesResponse { /** * Continuation token for fetching the next page of results. */ nextPageToken?: string; /** * All Workspaces of a GTM Container. */ workspace?: Schema$Workspace[]; } interface Schema$ListZonesResponse { /** * Continuation token for fetching the next page of results. */ nextPageToken?: string; /** * All GTM Zones of a GTM Container. */ zone?: Schema$Zone[]; } /** * Represents a merge conflict. */ interface Schema$MergeConflict { /** * The base version entity (since the latest sync operation) that has conflicting changes compared to the workspace. If this field is missing, it means the workspace entity is deleted from the base version. */ entityInBaseVersion?: Schema$Entity; /** * The workspace entity that has conflicting changes compared to the base version. If an entity is deleted in a workspace, it will still appear with a deleted change status. */ entityInWorkspace?: Schema$Entity; } /** * Represents a Google Tag Manager Parameter. */ interface Schema$Parameter { /** * The named key that uniquely identifies a parameter. Required for top-level parameters, as well as map values. Ignored for list values. */ key?: string; /** * This list parameter's parameters (keys will be ignored). */ list?: Schema$Parameter[]; /** * This map parameter's parameters (must have keys; keys must be unique). */ map?: Schema$Parameter[]; /** * The parameter type. Valid values are: - boolean: The value represents a boolean, represented as 'true' or 'false' - integer: The value represents a 64-bit signed integer value, in base 10 - list: A list of parameters should be specified - map: A map of parameters should be specified - template: The value represents any text; this can include variable references (even variable references that might return non-string types) - trigger_reference: The value represents a trigger, represented as the trigger id */ type?: string; /** * A parameter's value (may contain variable references such as "{{myVariable}}") as appropriate to the specified type. */ value?: string; } /** * Publish container version response. */ interface Schema$PublishContainerVersionResponse { /** * Compiler errors or not. */ compilerError?: boolean; /** * The container version created. */ containerVersion?: Schema$ContainerVersion; } /** * Response to quick previewing a workspace. */ interface Schema$QuickPreviewResponse { /** * Were there compiler errors or not. */ compilerError?: boolean; /** * The quick previewed container version. */ containerVersion?: Schema$ContainerVersion; /** * Whether quick previewing failed when syncing the workspace to the latest container version. */ syncStatus?: Schema$SyncStatus; } /** * The result of reverting a built-in variable in a workspace. */ interface Schema$RevertBuiltInVariableResponse { /** * Whether the built-in variable is enabled after reversion. */ enabled?: boolean; } /** * The result of reverting folder changes in a workspace. */ interface Schema$RevertFolderResponse { /** * Folder as it appears in the latest container version since the last workspace synchronization operation. If no folder is present, that means the folder was deleted in the latest container version. */ folder?: Schema$Folder; } /** * The result of reverting a tag in a workspace. */ interface Schema$RevertTagResponse { /** * Tag as it appears in the latest container version since the last workspace synchronization operation. If no tag is present, that means the tag was deleted in the latest container version. */ tag?: Schema$Tag; } /** * The result of reverting a template in a workspace. */ interface Schema$RevertTemplateResponse { /** * Template as it appears in the latest container version since the last workspace synchronization operation. If no template is present, that means the template was deleted in the latest container version. */ template?: Schema$CustomTemplate; } /** * The result of reverting a trigger in a workspace. */ interface Schema$RevertTriggerResponse { /** * Trigger as it appears in the latest container version since the last workspace synchronization operation. If no trigger is present, that means the trigger was deleted in the latest container version. */ trigger?: Schema$Trigger; } /** * The result of reverting a variable in a workspace. */ interface Schema$RevertVariableResponse { /** * Variable as it appears in the latest container version since the last workspace synchronization operation. If no variable is present, that means the variable was deleted in the latest container version. */ variable?: Schema$Variable; } /** * The result of reverting a zone in a workspace. */ interface Schema$RevertZoneResponse { /** * Zone as it appears in the latest container version since the last workspace synchronization operation. If no zone is present, that means the zone was deleted in the latest container version. */ zone?: Schema$Zone; } /** * Represents a reference to atag that fires before another tag in order to set up dependencies. */ interface Schema$SetupTag { /** * If true, fire the main tag if and only if the setup tag fires successfully. If false, fire the main tag regardless of setup tag firing status. */ stopOnSetupFailure?: boolean; /** * The name of the setup tag. */ tagName?: string; } /** * The status of a workspace after synchronization. */ interface Schema$SyncStatus { /** * Synchornization operation detected a merge conflict. */ mergeConflict?: boolean; /** * An error occurred during the synchronization operation. */ syncError?: boolean; } /** * A response after synchronizing the workspace to the latest container version. */ interface Schema$SyncWorkspaceResponse { /** * The merge conflict after sync. If this field is not empty, the sync is still treated as successful. But a version cannot be created until all conflicts are resolved. */ mergeConflict?: Schema$MergeConflict[]; /** * Indicates whether synchronization caused a merge conflict or sync error. */ syncStatus?: Schema$SyncStatus; } /** * Represents a Google Tag Manager Tag. */ interface Schema$Tag { /** * GTM Account ID. */ accountId?: string; /** * Blocking rule IDs. If any of the listed rules evaluate to true, the tag will not fire. */ blockingRuleId?: string[]; /** * Blocking trigger IDs. If any of the listed triggers evaluate to true, the tag will not fire. */ blockingTriggerId?: string[]; /** * GTM Container ID. */ containerId?: string; /** * The fingerprint of the GTM Tag as computed at storage time. This value is recomputed whenever the tag is modified. */ fingerprint?: string; /** * Firing rule IDs. A tag will fire when any of the listed rules are true and all of its blockingRuleIds (if any specified) are false. */ firingRuleId?: string[]; /** * Firing trigger IDs. A tag will fire when any of the listed triggers are true and all of its blockingTriggerIds (if any specified) are false. */ firingTriggerId?: string[]; /** * If set to true, this tag will only fire in the live environment (e.g. not in preview or debug mode). */ liveOnly?: boolean; /** * Tag display name. */ name?: string; /** * User notes on how to apply this tag in the container. */ notes?: string; /** * The tag's parameters. */ parameter?: Schema$Parameter[]; /** * Parent folder id. */ parentFolderId?: string; /** * GTM Tag's API relative path. */ path?: string; /** * Indicates whether the tag is paused, which prevents the tag from firing. */ paused?: boolean; /** * User defined numeric priority of the tag. Tags are fired asynchronously in order of priority. Tags with higher numeric value fire first. A tag's priority can be a positive or negative value. The default value is 0. */ priority?: Schema$Parameter; /** * The end timestamp in milliseconds to schedule a tag. */ scheduleEndMs?: string; /** * The start timestamp in milliseconds to schedule a tag. */ scheduleStartMs?: string; /** * The list of setup tags. Currently we only allow one. */ setupTag?: Schema$SetupTag[]; /** * Option to fire this tag. */ tagFiringOption?: string; /** * The Tag ID uniquely identifies the GTM Tag. */ tagId?: string; /** * Auto generated link to the tag manager UI */ tagManagerUrl?: string; /** * The list of teardown tags. Currently we only allow one. */ teardownTag?: Schema$TeardownTag[]; /** * GTM Tag Type. */ type?: string; /** * GTM Workspace ID. */ workspaceId?: string; } /** * Represents a tag that fires after another tag in order to tear down dependencies. */ interface Schema$TeardownTag { /** * If true, fire the teardown tag if and only if the main tag fires successfully. If false, fire the teardown tag regardless of main tag firing status. */ stopTeardownOnFailure?: boolean; /** * The name of the teardown tag. */ tagName?: string; } /** * A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by "Z") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D ) to obtain a formatter capable of generating timestamps in this format. */ interface Schema$Timestamp { /** * Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive. */ nanos?: number; /** * Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive. */ seconds?: string; } /** * Represents a Google Tag Manager Trigger */ interface Schema$Trigger { /** * GTM Account ID. */ accountId?: string; /** * Used in the case of auto event tracking. */ autoEventFilter?: Schema$Condition[]; /** * Whether or not we should only fire tags if the form submit or link click event is not cancelled by some other event handler (e.g. because of validation). Only valid for Form Submission and Link Click triggers. */ checkValidation?: Schema$Parameter; /** * GTM Container ID. */ containerId?: string; /** * A visibility trigger minimum continuous visible time (in milliseconds). Only valid for AMP Visibility trigger. */ continuousTimeMinMilliseconds?: Schema$Parameter; /** * Used in the case of custom event, which is fired iff all Conditions are true. */ customEventFilter?: Schema$Condition[]; /** * Name of the GTM event that is fired. Only valid for Timer triggers. */ eventName?: Schema$Parameter; /** * The trigger will only fire iff all Conditions are true. */ filter?: Schema$Condition[]; /** * The fingerprint of the GTM Trigger as computed at storage time. This value is recomputed whenever the trigger is modified. */ fingerprint?: string; /** * List of integer percentage values for scroll triggers. The trigger will fire when each percentage is reached when the view is scrolled horizontally. Only valid for AMP scroll triggers. */ horizontalScrollPercentageList?: Schema$Parameter; /** * Time between triggering recurring Timer Events (in milliseconds). Only valid for Timer triggers. */ interval?: Schema$Parameter; /** * Time between Timer Events to fire (in seconds). Only valid for AMP Timer trigger. */ intervalSeconds?: Schema$Parameter; /** * Limit of the number of GTM events this Timer Trigger will fire. If no limit is set, we will continue to fire GTM events until the user leaves the page. Only valid for Timer triggers. */ limit?: Schema$Parameter; /** * Max time to fire Timer Events (in seconds). Only valid for AMP Timer trigger. */ maxTimerLengthSeconds?: Schema$Parameter; /** * Trigger display name. */ name?: string; /** * User notes on how to apply this trigger in the container. */ notes?: string; /** * Additional parameters. */ parameter?: Schema$Parameter[]; /** * Parent folder id. */ parentFolderId?: string; /** * GTM Trigger's API relative path. */ path?: string; /** * A click trigger CSS selector (i.e. "a", "button" etc.). Only valid for AMP Click trigger. */ selector?: Schema$Parameter; /** * Auto generated link to the tag manager UI */ tagManagerUrl?: string; /** * A visibility trigger minimum total visible time (in milliseconds). Only valid for AMP Visibility trigger. */ totalTimeMinMilliseconds?: Schema$Parameter; /** * The Trigger ID uniquely identifies the GTM Trigger. */ triggerId?: string; /** * Defines the data layer event that causes this trigger. */ type?: string; /** * Globally unique id of the trigger that auto-generates this (a Form Submit, Link Click or Timer listener) if any. Used to make incompatible auto-events work together with trigger filtering based on trigger ids. This value is populated during output generation since the tags implied by triggers don't exist until then. Only valid for Form Submit, Link Click and Timer triggers. */ uniqueTriggerId?: Schema$Parameter; /** * List of integer percentage values for scroll triggers. The trigger will fire when each percentage is reached when the view is scrolled vertically. Only valid for AMP scroll triggers. */ verticalScrollPercentageList?: Schema$Parameter; /** * A visibility trigger CSS selector (i.e. "#id"). Only valid for AMP Visibility trigger. */ visibilitySelector?: Schema$Parameter; /** * A visibility trigger maximum percent visibility. Only valid for AMP Visibility trigger. */ visiblePercentageMax?: Schema$Parameter; /** * A visibility trigger minimum percent visibility. Only valid for AMP Visibility trigger. */ visiblePercentageMin?: Schema$Parameter; /** * Whether or not we should delay the form submissions or link opening until all of the tags have fired (by preventing the default action and later simulating the default action). Only valid for Form Submission and Link Click triggers. */ waitForTags?: Schema$Parameter; /** * How long to wait (in milliseconds) for tags to fire when 'waits_for_tags' above evaluates to true. Only valid for Form Submission and Link Click triggers. */ waitForTagsTimeout?: Schema$Parameter; /** * GTM Workspace ID. */ workspaceId?: string; } /** * Represents a user's permissions to an account and its container. */ interface Schema$UserPermission { /** * GTM Account access permissions. */ accountAccess?: Schema$AccountAccess; /** * The Account ID uniquely identifies the GTM Account. */ accountId?: string; /** * GTM Container access permissions. */ containerAccess?: Schema$ContainerAccess[]; /** * User's email address. */ emailAddress?: string; /** * GTM UserPermission's API relative path. */ path?: string; } /** * Represents a Google Tag Manager Variable. */ interface Schema$Variable { /** * GTM Account ID. */ accountId?: string; /** * GTM Container ID. */ containerId?: string; /** * For mobile containers only: A list of trigger IDs for disabling conditional variables; the variable is enabled if one of the enabling trigger is true while all the disabling trigger are false. Treated as an unordered set. */ disablingTriggerId?: string[]; /** * For mobile containers only: A list of trigger IDs for enabling conditional variables; the variable is enabled if one of the enabling triggers is true while all the disabling triggers are false. Treated as an unordered set. */ enablingTriggerId?: string[]; /** * The fingerprint of the GTM Variable as computed at storage time. This value is recomputed whenever the variable is modified. */ fingerprint?: string; /** * Option to convert a variable value to other value. */ formatValue?: Schema$VariableFormatValue; /** * Variable display name. */ name?: string; /** * User notes on how to apply this variable in the container. */ notes?: string; /** * The variable's parameters. */ parameter?: Schema$Parameter[]; /** * Parent folder id. */ parentFolderId?: string; /** * GTM Variable's API relative path. */ path?: string; /** * The end timestamp in milliseconds to schedule a variable. */ scheduleEndMs?: string; /** * The start timestamp in milliseconds to schedule a variable. */ scheduleStartMs?: string; /** * Auto generated link to the tag manager UI */ tagManagerUrl?: string; /** * GTM Variable Type. */ type?: string; /** * The Variable ID uniquely identifies the GTM Variable. */ variableId?: string; /** * GTM Workspace ID. */ workspaceId?: string; } interface Schema$VariableFormatValue { /** * The option to convert a string-type variable value to either lowercase or uppercase. */ caseConversionType?: string; /** * The value to convert if a variable value is false. */ convertFalseToValue?: Schema$Parameter; /** * The value to convert if a variable value is null. */ convertNullToValue?: Schema$Parameter; /** * The value to convert if a variable value is true. */ convertTrueToValue?: Schema$Parameter; /** * The value to convert if a variable value is undefined. */ convertUndefinedToValue?: Schema$Parameter; } /** * Represents a Google Tag Manager Container Workspace. */ interface Schema$Workspace { /** * GTM Account ID. */ accountId?: string; /** * GTM Container ID. */ containerId?: string; /** * Workspace description. */ description?: string; /** * The fingerprint of the GTM Workspace as computed at storage time. This value is recomputed whenever the workspace is modified. */ fingerprint?: string; /** * Workspace display name. */ name?: string; /** * GTM Workspace's API relative path. */ path?: string; /** * Auto generated link to the tag manager UI */ tagManagerUrl?: string; /** * The Workspace ID uniquely identifies the GTM Workspace. */ workspaceId?: string; } /** * Represents a Google Tag Manager Zone's contents. */ interface Schema$Zone { /** * GTM Account ID. */ accountId?: string; /** * This Zone's boundary. */ boundary?: Schema$ZoneBoundary; /** * Containers that are children of this Zone. */ childContainer?: Schema$ZoneChildContainer[]; /** * GTM Container ID. */ containerId?: string; /** * The fingerprint of the GTM Zone as computed at storage time. This value is recomputed whenever the zone is modified. */ fingerprint?: string; /** * Zone display name. */ name?: string; /** * User notes on how to apply this zone in the container. */ notes?: string; /** * GTM Zone's API relative path. */ path?: string; /** * Auto generated link to the tag manager UI */ tagManagerUrl?: string; /** * This Zone's type restrictions. */ typeRestriction?: Schema$ZoneTypeRestriction; /** * GTM Workspace ID. */ workspaceId?: string; /** * The Zone ID uniquely identifies the GTM Zone. */ zoneId?: string; } /** * Represents a Zone's boundaries. */ interface Schema$ZoneBoundary { /** * The conditions that, when conjoined, make up the boundary. */ condition?: Schema$Condition[]; /** * Custom evaluation trigger IDs. A zone will evaluate its boundary conditions when any of the listed triggers are true. */ customEvaluationTriggerId?: string[]; } /** * Represents a child container of a Zone. */ interface Schema$ZoneChildContainer { /** * The zone's nickname for the child container. */ nickname?: string; /** * The child container's public id. */ publicId?: string; } /** * Represents a Zone's type restrictions. */ interface Schema$ZoneTypeRestriction { /** * True if type restrictions have been enabled for this Zone. */ enable?: boolean; /** * List of type public ids that have been whitelisted for use in this Zone. */ whitelistedTypeId?: string[]; } class Resource$Accounts { context: APIRequestContext; containers: Resource$Accounts$Containers; user_permissions: Resource$Accounts$User_permissions; constructor(context: APIRequestContext); /** * tagmanager.accoun