From 5874aa5aa4188ff7e5e7e86def4111a24d1362a9 Mon Sep 17 00:00:00 2001 From: Google APIs Date: Thu, 27 Aug 2020 00:39:26 +0000 Subject: [PATCH] Autogenerated update (2020-08-27) Update: - androidenterprise_v1 - appsmarket_v2 - content_v2_1 - dlp_v2 - drive_v2 - drive_v3 - genomics_v2alpha1 - groupsmigration_v1 - osconfig_v1 - osconfig_v1beta --- api_names_out.yaml | 14 + generated/google/apis/androidenterprise_v1.rb | 2 +- generated/google/apis/appsmarket_v2.rb | 2 +- generated/google/apis/content_v2_1.rb | 2 +- generated/google/apis/content_v2_1/classes.rb | 32 +- .../apis/content_v2_1/representations.rb | 9 +- generated/google/apis/dlp_v2.rb | 2 +- generated/google/apis/drive_v2.rb | 2 +- generated/google/apis/drive_v2/service.rb | 16 +- generated/google/apis/drive_v3.rb | 2 +- generated/google/apis/drive_v3/service.rb | 16 +- generated/google/apis/genomics_v2alpha1.rb | 2 +- generated/google/apis/groupsmigration_v1.rb | 2 +- .../google/apis/groupsmigration_v1/service.rb | 4 +- generated/google/apis/osconfig_v1.rb | 2 +- generated/google/apis/osconfig_v1beta.rb | 2 +- generated/google/apis/site_verification_v1.rb | 37 + .../apis/site_verification_v1/classes.rb | 185 ++ .../site_verification_v1/representations.rb | 113 + .../apis/site_verification_v1/service.rb | 300 ++ generated/google/apis/tagmanager_v1.rb | 52 + .../google/apis/tagmanager_v1/classes.rb | 1663 ++++++++++ .../apis/tagmanager_v1/representations.rb | 630 ++++ .../google/apis/tagmanager_v1/service.rb | 1820 +++++++++++ generated/google/apis/tagmanager_v2.rb | 52 + .../google/apis/tagmanager_v2/classes.rb | 2717 ++++++++++++++++ .../apis/tagmanager_v2/representations.rb | 1092 +++++++ .../google/apis/tagmanager_v2/service.rb | 2730 +++++++++++++++++ 28 files changed, 11470 insertions(+), 32 deletions(-) create mode 100644 generated/google/apis/site_verification_v1.rb create mode 100644 generated/google/apis/site_verification_v1/classes.rb create mode 100644 generated/google/apis/site_verification_v1/representations.rb create mode 100644 generated/google/apis/site_verification_v1/service.rb create mode 100644 generated/google/apis/tagmanager_v1.rb create mode 100644 generated/google/apis/tagmanager_v1/classes.rb create mode 100644 generated/google/apis/tagmanager_v1/representations.rb create mode 100644 generated/google/apis/tagmanager_v1/service.rb create mode 100644 generated/google/apis/tagmanager_v2.rb create mode 100644 generated/google/apis/tagmanager_v2/classes.rb create mode 100644 generated/google/apis/tagmanager_v2/representations.rb create mode 100644 generated/google/apis/tagmanager_v2/service.rb diff --git a/api_names_out.yaml b/api_names_out.yaml index ed329d17b..9d21b271b 100644 --- a/api_names_out.yaml +++ b/api_names_out.yaml @@ -53963,6 +53963,8 @@ "/content:v2.1/Product/shippingLength": shipping_length "/content:v2.1/Product/shippingWeight": shipping_weight "/content:v2.1/Product/shippingWidth": shipping_width +"/content:v2.1/Product/shoppingAdsExcludedCountries": shopping_ads_excluded_countries +"/content:v2.1/Product/shoppingAdsExcludedCountries/shopping_ads_excluded_country": shopping_ads_excluded_country "/content:v2.1/Product/sizeSystem": size_system "/content:v2.1/Product/sizeType": size_type "/content:v2.1/Product/sizes": sizes @@ -54012,15 +54014,23 @@ "/content:v2.1/ProductStatus/productId": product_id "/content:v2.1/ProductStatus/title": title "/content:v2.1/ProductStatusDestinationStatus": product_status_destination_status +"/content:v2.1/ProductStatusDestinationStatus/approvedCountries": approved_countries +"/content:v2.1/ProductStatusDestinationStatus/approvedCountries/approved_country": approved_country "/content:v2.1/ProductStatusDestinationStatus/approvedCountrys": approved_countrys "/content:v2.1/ProductStatusDestinationStatus/approvedCountrys/approved_country": approved_country "/content:v2.1/ProductStatusDestinationStatus/destination": destination +"/content:v2.1/ProductStatusDestinationStatus/disapprovedCountries": disapproved_countries +"/content:v2.1/ProductStatusDestinationStatus/disapprovedCountries/disapproved_country": disapproved_country "/content:v2.1/ProductStatusDestinationStatus/disapprovedCountrys": disapproved_countrys "/content:v2.1/ProductStatusDestinationStatus/disapprovedCountrys/disapproved_country": disapproved_country +"/content:v2.1/ProductStatusDestinationStatus/pendingCountries": pending_countries +"/content:v2.1/ProductStatusDestinationStatus/pendingCountries/pending_country": pending_country "/content:v2.1/ProductStatusDestinationStatus/pendingCountrys": pending_countrys "/content:v2.1/ProductStatusDestinationStatus/pendingCountrys/pending_country": pending_country "/content:v2.1/ProductStatusDestinationStatus/status": status "/content:v2.1/ProductStatusItemLevelIssue": product_status_item_level_issue +"/content:v2.1/ProductStatusItemLevelIssue/applicableCountries": applicable_countries +"/content:v2.1/ProductStatusItemLevelIssue/applicableCountries/applicable_country": applicable_country "/content:v2.1/ProductStatusItemLevelIssue/applicableCountrys": applicable_countrys "/content:v2.1/ProductStatusItemLevelIssue/applicableCountrys/applicable_country": applicable_country "/content:v2.1/ProductStatusItemLevelIssue/attributeName": attribute_name @@ -93113,10 +93123,12 @@ "/drive:v2/drive.files.copy/timedTextTrackName": timed_text_track_name "/drive:v2/drive.files.copy/visibility": visibility "/drive:v2/drive.files.delete": delete_file +"/drive:v2/drive.files.delete/enforceSingleParent": enforce_single_parent "/drive:v2/drive.files.delete/fileId": file_id "/drive:v2/drive.files.delete/supportsAllDrives": supports_all_drives "/drive:v2/drive.files.delete/supportsTeamDrives": supports_team_drives "/drive:v2/drive.files.emptyTrash": empty_trash +"/drive:v2/drive.files.emptyTrash/enforceSingleParent": enforce_single_parent "/drive:v2/drive.files.export": export_file "/drive:v2/drive.files.export/fileId": file_id "/drive:v2/drive.files.export/mimeType": mime_type @@ -93860,10 +93872,12 @@ "/drive:v3/drive.files.create/supportsTeamDrives": supports_team_drives "/drive:v3/drive.files.create/useContentAsIndexableText": use_content_as_indexable_text "/drive:v3/drive.files.delete": delete_file +"/drive:v3/drive.files.delete/enforceSingleParent": enforce_single_parent "/drive:v3/drive.files.delete/fileId": file_id "/drive:v3/drive.files.delete/supportsAllDrives": supports_all_drives "/drive:v3/drive.files.delete/supportsTeamDrives": supports_team_drives "/drive:v3/drive.files.emptyTrash": empty_file_trash +"/drive:v3/drive.files.emptyTrash/enforceSingleParent": enforce_single_parent "/drive:v3/drive.files.export": export_file "/drive:v3/drive.files.export/fileId": file_id "/drive:v3/drive.files.export/mimeType": mime_type diff --git a/generated/google/apis/androidenterprise_v1.rb b/generated/google/apis/androidenterprise_v1.rb index db03bb95c..a75cf1b13 100644 --- a/generated/google/apis/androidenterprise_v1.rb +++ b/generated/google/apis/androidenterprise_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/android/work/play/emm-api module AndroidenterpriseV1 VERSION = 'V1' - REVISION = '20200801' + REVISION = '20200825' # Manage corporate Android devices AUTH_ANDROIDENTERPRISE = 'https://www.googleapis.com/auth/androidenterprise' diff --git a/generated/google/apis/appsmarket_v2.rb b/generated/google/apis/appsmarket_v2.rb index 1e1671f57..fdf05c6a1 100644 --- a/generated/google/apis/appsmarket_v2.rb +++ b/generated/google/apis/appsmarket_v2.rb @@ -26,7 +26,7 @@ module Google # @see https://developers.google.com/apps-marketplace module AppsmarketV2 VERSION = 'V2' - REVISION = '20200817' + REVISION = '20200824' # View your installed application's licensing information AUTH_APPSMARKETPLACE_LICENSE = 'https://www.googleapis.com/auth/appsmarketplace.license' diff --git a/generated/google/apis/content_v2_1.rb b/generated/google/apis/content_v2_1.rb index a4f3c5f3a..ae7fb61b6 100644 --- a/generated/google/apis/content_v2_1.rb +++ b/generated/google/apis/content_v2_1.rb @@ -26,7 +26,7 @@ module Google # @see https://developers.google.com/shopping-content module ContentV2_1 VERSION = 'V2_1' - REVISION = '20200805' + REVISION = '20200821' # Manage your product listings and accounts for Google Shopping AUTH_CONTENT = 'https://www.googleapis.com/auth/content' diff --git a/generated/google/apis/content_v2_1/classes.rb b/generated/google/apis/content_v2_1/classes.rb index f0e35fe94..67a96bd2a 100644 --- a/generated/google/apis/content_v2_1/classes.rb +++ b/generated/google/apis/content_v2_1/classes.rb @@ -8970,6 +8970,13 @@ module Google # @return [Google::Apis::ContentV2_1::ProductShippingDimension] attr_accessor :shipping_width + # List of country codes (ISO 3166-1 alpha-2) to exclude the offer from Shopping + # Ads destination. Countries from this list are removed from countries + # configured in MC feed settings. + # Corresponds to the JSON property `shoppingAdsExcludedCountries` + # @return [Array] + attr_accessor :shopping_ads_excluded_countries + # System in which the size is specified. Recommended for apparel items. # Corresponds to the JSON property `sizeSystem` # @return [String] @@ -9112,6 +9119,7 @@ module Google @shipping_length = args[:shipping_length] if args.key?(:shipping_length) @shipping_weight = args[:shipping_weight] if args.key?(:shipping_weight) @shipping_width = args[:shipping_width] if args.key?(:shipping_width) + @shopping_ads_excluded_countries = args[:shopping_ads_excluded_countries] if args.key?(:shopping_ads_excluded_countries) @size_system = args[:size_system] if args.key?(:size_system) @size_type = args[:size_type] if args.key?(:size_type) @sizes = args[:sizes] if args.key?(:sizes) @@ -9372,9 +9380,9 @@ module Google include Google::Apis::Core::Hashable # List of country codes (ISO 3166-1 alpha-2) where the offer is approved. - # Corresponds to the JSON property `approvedCountrys` + # Corresponds to the JSON property `approvedCountries` # @return [Array] - attr_accessor :approved_countrys + attr_accessor :approved_countries # The name of the destination # Corresponds to the JSON property `destination` @@ -9382,14 +9390,14 @@ module Google attr_accessor :destination # List of country codes (ISO 3166-1 alpha-2) where the offer is disapproved. - # Corresponds to the JSON property `disapprovedCountrys` + # Corresponds to the JSON property `disapprovedCountries` # @return [Array] - attr_accessor :disapproved_countrys + attr_accessor :disapproved_countries # List of country codes (ISO 3166-1 alpha-2) where the offer is pending approval. - # Corresponds to the JSON property `pendingCountrys` + # Corresponds to the JSON property `pendingCountries` # @return [Array] - attr_accessor :pending_countrys + attr_accessor :pending_countries # Destination approval status in `targetCountry` of the offer. # Corresponds to the JSON property `status` @@ -9402,10 +9410,10 @@ module Google # Update properties of this object def update!(**args) - @approved_countrys = args[:approved_countrys] if args.key?(:approved_countrys) + @approved_countries = args[:approved_countries] if args.key?(:approved_countries) @destination = args[:destination] if args.key?(:destination) - @disapproved_countrys = args[:disapproved_countrys] if args.key?(:disapproved_countrys) - @pending_countrys = args[:pending_countrys] if args.key?(:pending_countrys) + @disapproved_countries = args[:disapproved_countries] if args.key?(:disapproved_countries) + @pending_countries = args[:pending_countries] if args.key?(:pending_countries) @status = args[:status] if args.key?(:status) end end @@ -9415,9 +9423,9 @@ module Google include Google::Apis::Core::Hashable # List of country codes (ISO 3166-1 alpha-2) where issue applies to the offer. - # Corresponds to the JSON property `applicableCountrys` + # Corresponds to the JSON property `applicableCountries` # @return [Array] - attr_accessor :applicable_countrys + attr_accessor :applicable_countries # The attribute's name, if the issue is caused by a single attribute. # Corresponds to the JSON property `attributeName` @@ -9465,7 +9473,7 @@ module Google # Update properties of this object def update!(**args) - @applicable_countrys = args[:applicable_countrys] if args.key?(:applicable_countrys) + @applicable_countries = args[:applicable_countries] if args.key?(:applicable_countries) @attribute_name = args[:attribute_name] if args.key?(:attribute_name) @code = args[:code] if args.key?(:code) @description = args[:description] if args.key?(:description) diff --git a/generated/google/apis/content_v2_1/representations.rb b/generated/google/apis/content_v2_1/representations.rb index 1e98e59d8..768103771 100644 --- a/generated/google/apis/content_v2_1/representations.rb +++ b/generated/google/apis/content_v2_1/representations.rb @@ -4154,6 +4154,7 @@ module Google property :shipping_width, as: 'shippingWidth', class: Google::Apis::ContentV2_1::ProductShippingDimension, decorator: Google::Apis::ContentV2_1::ProductShippingDimension::Representation + collection :shopping_ads_excluded_countries, as: 'shoppingAdsExcludedCountries' property :size_system, as: 'sizeSystem' property :size_type, as: 'sizeType' collection :sizes, as: 'sizes' @@ -4244,10 +4245,10 @@ module Google class ProductStatusDestinationStatus # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :approved_countrys, as: 'approvedCountrys' + collection :approved_countries, as: 'approvedCountries' property :destination, as: 'destination' - collection :disapproved_countrys, as: 'disapprovedCountrys' - collection :pending_countrys, as: 'pendingCountrys' + collection :disapproved_countries, as: 'disapprovedCountries' + collection :pending_countries, as: 'pendingCountries' property :status, as: 'status' end end @@ -4255,7 +4256,7 @@ module Google class ProductStatusItemLevelIssue # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :applicable_countrys, as: 'applicableCountrys' + collection :applicable_countries, as: 'applicableCountries' property :attribute_name, as: 'attributeName' property :code, as: 'code' property :description, as: 'description' diff --git a/generated/google/apis/dlp_v2.rb b/generated/google/apis/dlp_v2.rb index 0e3668b5f..7a00d9c3c 100644 --- a/generated/google/apis/dlp_v2.rb +++ b/generated/google/apis/dlp_v2.rb @@ -27,7 +27,7 @@ module Google # @see https://cloud.google.com/dlp/docs/ module DlpV2 VERSION = 'V2' - REVISION = '20200809' + REVISION = '20200821' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/drive_v2.rb b/generated/google/apis/drive_v2.rb index 03fa547e8..6b326e458 100644 --- a/generated/google/apis/drive_v2.rb +++ b/generated/google/apis/drive_v2.rb @@ -26,7 +26,7 @@ module Google # @see https://developers.google.com/drive/ module DriveV2 VERSION = 'V2' - REVISION = '20200811' + REVISION = '20200813' # See, edit, create, and delete all of your Google Drive files AUTH_DRIVE = 'https://www.googleapis.com/auth/drive' diff --git a/generated/google/apis/drive_v2/service.rb b/generated/google/apis/drive_v2/service.rb index b4e6632cb..cc1e57779 100644 --- a/generated/google/apis/drive_v2/service.rb +++ b/generated/google/apis/drive_v2/service.rb @@ -1217,6 +1217,11 @@ module Google # user must own the file or be an organizer on the parent for shared drive files. # @param [String] file_id # The ID of the file to delete. + # @param [Boolean] enforce_single_parent + # Set to true to opt in to API behavior that aims for all items to have exactly + # one parent. This parameter will only take effect if the item is not in a + # shared drive. If an item's last parent is deleted but the item itself is not, + # the item will be placed under its owner's root. # @param [Boolean] supports_all_drives # Whether the requesting application supports both My Drives and shared drives. # @param [Boolean] supports_team_drives @@ -1240,9 +1245,10 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_file(file_id, supports_all_drives: nil, supports_team_drives: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + def delete_file(file_id, enforce_single_parent: nil, supports_all_drives: nil, supports_team_drives: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, 'files/{fileId}', options) command.params['fileId'] = file_id unless file_id.nil? + command.query['enforceSingleParent'] = enforce_single_parent unless enforce_single_parent.nil? command.query['supportsAllDrives'] = supports_all_drives unless supports_all_drives.nil? command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil? command.query['fields'] = fields unless fields.nil? @@ -1252,6 +1258,11 @@ module Google end # Permanently deletes all of the user's trashed files. + # @param [Boolean] enforce_single_parent + # Set to true to opt in to API behavior that aims for all items to have exactly + # one parent. This parameter will only take effect if the item is not in a + # shared drive. If an item's last parent is deleted but the item itself is not, + # the item will be placed under its owner's root. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -1271,8 +1282,9 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def empty_trash(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + def empty_trash(enforce_single_parent: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, 'files/trash', options) + command.query['enforceSingleParent'] = enforce_single_parent unless enforce_single_parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? diff --git a/generated/google/apis/drive_v3.rb b/generated/google/apis/drive_v3.rb index 36695d033..2ef6a84bc 100644 --- a/generated/google/apis/drive_v3.rb +++ b/generated/google/apis/drive_v3.rb @@ -26,7 +26,7 @@ module Google # @see https://developers.google.com/drive/ module DriveV3 VERSION = 'V3' - REVISION = '20200811' + REVISION = '20200813' # See, edit, create, and delete all of your Google Drive files AUTH_DRIVE = 'https://www.googleapis.com/auth/drive' diff --git a/generated/google/apis/drive_v3/service.rb b/generated/google/apis/drive_v3/service.rb index 7dc577bea..bbb5f069e 100644 --- a/generated/google/apis/drive_v3/service.rb +++ b/generated/google/apis/drive_v3/service.rb @@ -927,6 +927,11 @@ module Google # deleted. # @param [String] file_id # The ID of the file. + # @param [Boolean] enforce_single_parent + # Set to true to opt in to API behavior that aims for all items to have exactly + # one parent. This parameter will only take effect if the item is not in a + # shared drive. If an item's last parent is deleted but the item itself is not, + # the item will be placed under its owner's root. # @param [Boolean] supports_all_drives # Whether the requesting application supports both My Drives and shared drives. # @param [Boolean] supports_team_drives @@ -950,9 +955,10 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_file(file_id, supports_all_drives: nil, supports_team_drives: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + def delete_file(file_id, enforce_single_parent: nil, supports_all_drives: nil, supports_team_drives: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, 'files/{fileId}', options) command.params['fileId'] = file_id unless file_id.nil? + command.query['enforceSingleParent'] = enforce_single_parent unless enforce_single_parent.nil? command.query['supportsAllDrives'] = supports_all_drives unless supports_all_drives.nil? command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil? command.query['fields'] = fields unless fields.nil? @@ -962,6 +968,11 @@ module Google end # Permanently deletes all of the user's trashed files. + # @param [Boolean] enforce_single_parent + # Set to true to opt in to API behavior that aims for all items to have exactly + # one parent. This parameter will only take effect if the item is not in a + # shared drive. If an item's last parent is deleted but the item itself is not, + # the item will be placed under its owner's root. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -981,8 +992,9 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def empty_file_trash(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + def empty_file_trash(enforce_single_parent: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, 'files/trash', options) + command.query['enforceSingleParent'] = enforce_single_parent unless enforce_single_parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? diff --git a/generated/google/apis/genomics_v2alpha1.rb b/generated/google/apis/genomics_v2alpha1.rb index db6c63bc0..ac1e4da5f 100644 --- a/generated/google/apis/genomics_v2alpha1.rb +++ b/generated/google/apis/genomics_v2alpha1.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/genomics module GenomicsV2alpha1 VERSION = 'V2alpha1' - REVISION = '20200804' + REVISION = '20200825' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/groupsmigration_v1.rb b/generated/google/apis/groupsmigration_v1.rb index d10a0e3df..46de462aa 100644 --- a/generated/google/apis/groupsmigration_v1.rb +++ b/generated/google/apis/groupsmigration_v1.rb @@ -26,7 +26,7 @@ module Google # @see https://developers.google.com/google-apps/groups-migration/ module GroupsmigrationV1 VERSION = 'V1' - REVISION = '20200813' + REVISION = '20200820' # Manage messages in groups on your domain AUTH_APPS_GROUPS_MIGRATION = 'https://www.googleapis.com/auth/apps.groups.migration' diff --git a/generated/google/apis/groupsmigration_v1/service.rb b/generated/google/apis/groupsmigration_v1/service.rb index 5b726173f..03a7f6fbb 100644 --- a/generated/google/apis/groupsmigration_v1/service.rb +++ b/generated/google/apis/groupsmigration_v1/service.rb @@ -44,8 +44,8 @@ module Google attr_accessor :quota_user def initialize - super('https://www.googleapis.com/', '') - @batch_path = 'batch/groupsmigration/v1' + super('https://groupsmigration.googleapis.com/', '') + @batch_path = 'batch' end # Inserts a new mail into the archive of the Google group. diff --git a/generated/google/apis/osconfig_v1.rb b/generated/google/apis/osconfig_v1.rb index 296f0410b..bf876df47 100644 --- a/generated/google/apis/osconfig_v1.rb +++ b/generated/google/apis/osconfig_v1.rb @@ -26,7 +26,7 @@ module Google # @see https://cloud.google.com/ module OsconfigV1 VERSION = 'V1' - REVISION = '20200807' + REVISION = '20200824' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/osconfig_v1beta.rb b/generated/google/apis/osconfig_v1beta.rb index c697279ac..8eae3e167 100644 --- a/generated/google/apis/osconfig_v1beta.rb +++ b/generated/google/apis/osconfig_v1beta.rb @@ -26,7 +26,7 @@ module Google # @see https://cloud.google.com/ module OsconfigV1beta VERSION = 'V1beta' - REVISION = '20200807' + REVISION = '20200824' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/site_verification_v1.rb b/generated/google/apis/site_verification_v1.rb new file mode 100644 index 000000000..a0c90ba22 --- /dev/null +++ b/generated/google/apis/site_verification_v1.rb @@ -0,0 +1,37 @@ +# Copyright 2015 Google Inc. +# +# 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. + +require 'google/apis/site_verification_v1/service.rb' +require 'google/apis/site_verification_v1/classes.rb' +require 'google/apis/site_verification_v1/representations.rb' + +module Google + module Apis + # Google Site Verification API + # + # Verifies ownership of websites or domains with Google. + # + # @see https://developers.google.com/site-verification/ + module SiteVerificationV1 + VERSION = 'V1' + REVISION = '20191119' + + # Manage the list of sites and domains you control + AUTH_SITEVERIFICATION = 'https://www.googleapis.com/auth/siteverification' + + # Manage your new site verifications with Google + AUTH_SITEVERIFICATION_VERIFY_ONLY = 'https://www.googleapis.com/auth/siteverification.verify_only' + end + end +end diff --git a/generated/google/apis/site_verification_v1/classes.rb b/generated/google/apis/site_verification_v1/classes.rb new file mode 100644 index 000000000..924f3971c --- /dev/null +++ b/generated/google/apis/site_verification_v1/classes.rb @@ -0,0 +1,185 @@ +# Copyright 2015 Google Inc. +# +# 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. + +require 'date' +require 'google/apis/core/base_service' +require 'google/apis/core/json_representation' +require 'google/apis/core/hashable' +require 'google/apis/errors' + +module Google + module Apis + module SiteVerificationV1 + + # + class GetWebResourceTokenRequest + include Google::Apis::Core::Hashable + + # The site for which a verification token will be generated. + # Corresponds to the JSON property `site` + # @return [Google::Apis::SiteVerificationV1::GetWebResourceTokenRequest::Site] + attr_accessor :site + + # The verification method that will be used to verify this site. For sites, ' + # FILE' or 'META' methods may be used. For domains, only 'DNS' may be used. + # Corresponds to the JSON property `verificationMethod` + # @return [String] + attr_accessor :verification_method + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @site = args[:site] if args.key?(:site) + @verification_method = args[:verification_method] if args.key?(:verification_method) + end + + # The site for which a verification token will be generated. + class Site + include Google::Apis::Core::Hashable + + # The site identifier. If the type is set to SITE, the identifier is a URL. If + # the type is set to INET_DOMAIN, the site identifier is a domain name. + # Corresponds to the JSON property `identifier` + # @return [String] + attr_accessor :identifier + + # The type of resource to be verified. Can be SITE or INET_DOMAIN (domain name). + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @identifier = args[:identifier] if args.key?(:identifier) + @type = args[:type] if args.key?(:type) + end + end + end + + # + class GetWebResourceTokenResponse + include Google::Apis::Core::Hashable + + # The verification method to use in conjunction with this token. For FILE, the + # token should be placed in the top-level directory of the site, stored inside a + # file of the same name. For META, the token should be placed in the HEAD tag of + # the default page that is loaded for the site. For DNS, the token should be + # placed in a TXT record of the domain. + # Corresponds to the JSON property `method` + # @return [String] + attr_accessor :verification_method + + # The verification token. The token must be placed appropriately in order for + # verification to succeed. + # Corresponds to the JSON property `token` + # @return [String] + attr_accessor :token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @verification_method = args[:verification_method] if args.key?(:verification_method) + @token = args[:token] if args.key?(:token) + end + end + + # + class ListWebResourceResponse + include Google::Apis::Core::Hashable + + # The list of sites that are owned by the authenticated user. + # Corresponds to the JSON property `items` + # @return [Array] + attr_accessor :items + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @items = args[:items] if args.key?(:items) + end + end + + # + class SiteVerificationWebResourceResource + include Google::Apis::Core::Hashable + + # The string used to identify this site. This value should be used in the "id" + # portion of the REST URL for the Get, Update, and Delete operations. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # The email addresses of all verified owners. + # Corresponds to the JSON property `owners` + # @return [Array] + attr_accessor :owners + + # The address and type of a site that is verified or will be verified. + # Corresponds to the JSON property `site` + # @return [Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource::Site] + attr_accessor :site + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @id = args[:id] if args.key?(:id) + @owners = args[:owners] if args.key?(:owners) + @site = args[:site] if args.key?(:site) + end + + # The address and type of a site that is verified or will be verified. + class Site + include Google::Apis::Core::Hashable + + # The site identifier. If the type is set to SITE, the identifier is a URL. If + # the type is set to INET_DOMAIN, the site identifier is a domain name. + # Corresponds to the JSON property `identifier` + # @return [String] + attr_accessor :identifier + + # The site type. Can be SITE or INET_DOMAIN (domain name). + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @identifier = args[:identifier] if args.key?(:identifier) + @type = args[:type] if args.key?(:type) + end + end + end + end + end +end diff --git a/generated/google/apis/site_verification_v1/representations.rb b/generated/google/apis/site_verification_v1/representations.rb new file mode 100644 index 000000000..7deeb4a38 --- /dev/null +++ b/generated/google/apis/site_verification_v1/representations.rb @@ -0,0 +1,113 @@ +# Copyright 2015 Google Inc. +# +# 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. + +require 'date' +require 'google/apis/core/base_service' +require 'google/apis/core/json_representation' +require 'google/apis/core/hashable' +require 'google/apis/errors' + +module Google + module Apis + module SiteVerificationV1 + + class GetWebResourceTokenRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + class Site + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + include Google::Apis::Core::JsonObjectSupport + end + + class GetWebResourceTokenResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListWebResourceResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SiteVerificationWebResourceResource + class Representation < Google::Apis::Core::JsonRepresentation; end + + class Site + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + include Google::Apis::Core::JsonObjectSupport + end + + class GetWebResourceTokenRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :site, as: 'site', class: Google::Apis::SiteVerificationV1::GetWebResourceTokenRequest::Site, decorator: Google::Apis::SiteVerificationV1::GetWebResourceTokenRequest::Site::Representation + + property :verification_method, as: 'verificationMethod' + end + + class Site + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :identifier, as: 'identifier' + property :type, as: 'type' + end + end + end + + class GetWebResourceTokenResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :verification_method, as: 'method' + property :token, as: 'token' + end + end + + class ListWebResourceResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :items, as: 'items', class: Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource, decorator: Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource::Representation + + end + end + + class SiteVerificationWebResourceResource + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :id, as: 'id' + collection :owners, as: 'owners' + property :site, as: 'site', class: Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource::Site, decorator: Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource::Site::Representation + + end + + class Site + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :identifier, as: 'identifier' + property :type, as: 'type' + end + end + end + end + end +end diff --git a/generated/google/apis/site_verification_v1/service.rb b/generated/google/apis/site_verification_v1/service.rb new file mode 100644 index 000000000..f17f5e986 --- /dev/null +++ b/generated/google/apis/site_verification_v1/service.rb @@ -0,0 +1,300 @@ +# Copyright 2015 Google Inc. +# +# 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. + +require 'google/apis/core/base_service' +require 'google/apis/core/json_representation' +require 'google/apis/core/hashable' +require 'google/apis/errors' + +module Google + module Apis + module SiteVerificationV1 + # Google Site Verification API + # + # Verifies ownership of websites or domains with Google. + # + # @example + # require 'google/apis/site_verification_v1' + # + # SiteVerification = Google::Apis::SiteVerificationV1 # Alias the module + # service = SiteVerification::SiteVerificationService.new + # + # @see https://developers.google.com/site-verification/ + class SiteVerificationService < Google::Apis::Core::BaseService + # @return [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. + attr_accessor :key + + # @return [String] + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. + attr_accessor :quota_user + + # @return [String] + # Deprecated. Please use quotaUser instead. + attr_accessor :user_ip + + def initialize + super('https://www.googleapis.com/', 'siteVerification/v1/') + @batch_path = 'batch/siteVerification/v1' + end + + # Relinquish ownership of a website or domain. + # @param [String] id + # The id of a verified site or domain. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. + # @param [String] user_ip + # Deprecated. Please use quotaUser instead. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [NilClass] No result returned for this method + # @yieldparam err [StandardError] error object if request failed + # + # @return [void] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_web_resource(id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:delete, 'webResource/{id}', options) + command.params['id'] = id unless id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? + execute_or_queue_command(command, &block) + end + + # Get the most current data for a website or domain. + # @param [String] id + # The id of a verified site or domain. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. + # @param [String] user_ip + # Deprecated. Please use quotaUser instead. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_web_resource(id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:get, 'webResource/{id}', options) + command.response_representation = Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource::Representation + command.response_class = Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource + command.params['id'] = id unless id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? + execute_or_queue_command(command, &block) + end + + # Get a verification token for placing on a website or domain. + # @param [Google::Apis::SiteVerificationV1::GetWebResourceTokenRequest] get_web_resource_token_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. + # @param [String] user_ip + # Deprecated. Please use quotaUser instead. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::SiteVerificationV1::GetWebResourceTokenResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SiteVerificationV1::GetWebResourceTokenResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_web_resource_token(get_web_resource_token_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:post, 'token', options) + command.request_representation = Google::Apis::SiteVerificationV1::GetWebResourceTokenRequest::Representation + command.request_object = get_web_resource_token_request_object + command.response_representation = Google::Apis::SiteVerificationV1::GetWebResourceTokenResponse::Representation + command.response_class = Google::Apis::SiteVerificationV1::GetWebResourceTokenResponse + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? + execute_or_queue_command(command, &block) + end + + # Attempt verification of a website or domain. + # @param [String] verification_method + # The method to use for verifying a site or domain. + # @param [Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource] site_verification_web_resource_resource_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. + # @param [String] user_ip + # Deprecated. Please use quotaUser instead. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def insert_web_resource(verification_method, site_verification_web_resource_resource_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:post, 'webResource', options) + command.request_representation = Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource::Representation + command.request_object = site_verification_web_resource_resource_object + command.response_representation = Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource::Representation + command.response_class = Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource + command.query['verificationMethod'] = verification_method unless verification_method.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? + execute_or_queue_command(command, &block) + end + + # Get the list of your verified websites and domains. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. + # @param [String] user_ip + # Deprecated. Please use quotaUser instead. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::SiteVerificationV1::ListWebResourceResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SiteVerificationV1::ListWebResourceResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_web_resources(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:get, 'webResource', options) + command.response_representation = Google::Apis::SiteVerificationV1::ListWebResourceResponse::Representation + command.response_class = Google::Apis::SiteVerificationV1::ListWebResourceResponse + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? + execute_or_queue_command(command, &block) + end + + # Modify the list of owners for your website or domain. This method supports + # patch semantics. + # @param [String] id + # The id of a verified site or domain. + # @param [Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource] site_verification_web_resource_resource_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. + # @param [String] user_ip + # Deprecated. Please use quotaUser instead. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def patch_web_resource(id, site_verification_web_resource_resource_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:patch, 'webResource/{id}', options) + command.request_representation = Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource::Representation + command.request_object = site_verification_web_resource_resource_object + command.response_representation = Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource::Representation + command.response_class = Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource + command.params['id'] = id unless id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? + execute_or_queue_command(command, &block) + end + + # Modify the list of owners for your website or domain. + # @param [String] id + # The id of a verified site or domain. + # @param [Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource] site_verification_web_resource_resource_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. + # @param [String] user_ip + # Deprecated. Please use quotaUser instead. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def update_web_resource(id, site_verification_web_resource_resource_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:put, 'webResource/{id}', options) + command.request_representation = Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource::Representation + command.request_object = site_verification_web_resource_resource_object + command.response_representation = Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource::Representation + command.response_class = Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource + command.params['id'] = id unless id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? + execute_or_queue_command(command, &block) + end + + protected + + def apply_command_defaults(command) + command.query['key'] = key unless key.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? + end + end + end + end +end diff --git a/generated/google/apis/tagmanager_v1.rb b/generated/google/apis/tagmanager_v1.rb new file mode 100644 index 000000000..3a088336f --- /dev/null +++ b/generated/google/apis/tagmanager_v1.rb @@ -0,0 +1,52 @@ +# Copyright 2015 Google Inc. +# +# 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. + +require 'google/apis/tagmanager_v1/service.rb' +require 'google/apis/tagmanager_v1/classes.rb' +require 'google/apis/tagmanager_v1/representations.rb' + +module Google + module Apis + # Tag Manager API + # + # This API allows clients to access and modify container and tag configuration. + # + # @see https://developers.google.com/tag-manager + module TagmanagerV1 + VERSION = 'V1' + REVISION = '20200826' + + # Delete your Google Tag Manager containers + AUTH_TAGMANAGER_DELETE_CONTAINERS = 'https://www.googleapis.com/auth/tagmanager.delete.containers' + + # Manage your Google Tag Manager container and its subcomponents, excluding versioning and publishing + AUTH_TAGMANAGER_EDIT_CONTAINERS = 'https://www.googleapis.com/auth/tagmanager.edit.containers' + + # Manage your Google Tag Manager container versions + AUTH_TAGMANAGER_EDIT_CONTAINERVERSIONS = 'https://www.googleapis.com/auth/tagmanager.edit.containerversions' + + # View and manage your Google Tag Manager accounts + AUTH_TAGMANAGER_MANAGE_ACCOUNTS = 'https://www.googleapis.com/auth/tagmanager.manage.accounts' + + # Manage user permissions of your Google Tag Manager account and container + AUTH_TAGMANAGER_MANAGE_USERS = 'https://www.googleapis.com/auth/tagmanager.manage.users' + + # Publish your Google Tag Manager container versions + AUTH_TAGMANAGER_PUBLISH = 'https://www.googleapis.com/auth/tagmanager.publish' + + # View your Google Tag Manager container and its subcomponents + AUTH_TAGMANAGER_READONLY = 'https://www.googleapis.com/auth/tagmanager.readonly' + end + end +end diff --git a/generated/google/apis/tagmanager_v1/classes.rb b/generated/google/apis/tagmanager_v1/classes.rb new file mode 100644 index 000000000..434491200 --- /dev/null +++ b/generated/google/apis/tagmanager_v1/classes.rb @@ -0,0 +1,1663 @@ +# Copyright 2015 Google Inc. +# +# 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. + +require 'date' +require 'google/apis/core/base_service' +require 'google/apis/core/json_representation' +require 'google/apis/core/hashable' +require 'google/apis/errors' + +module Google + module Apis + module TagmanagerV1 + + # Represents a Google Tag Manager Account. + class Account + include Google::Apis::Core::Hashable + + # The Account ID uniquely identifies the GTM Account. + # Corresponds to the JSON property `accountId` + # @return [String] + attr_accessor :account_id + + # The fingerprint of the GTM Account as computed at storage time. This value is + # recomputed whenever the account is modified. + # Corresponds to the JSON property `fingerprint` + # @return [String] + attr_accessor :fingerprint + + # Account display name. @mutable tagmanager.accounts.create @mutable tagmanager. + # accounts.update + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Whether the account shares data anonymously with Google and others. @mutable + # tagmanager.accounts.create @mutable tagmanager.accounts.update + # Corresponds to the JSON property `shareData` + # @return [Boolean] + attr_accessor :share_data + alias_method :share_data?, :share_data + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @account_id = args[:account_id] if args.key?(:account_id) + @fingerprint = args[:fingerprint] if args.key?(:fingerprint) + @name = args[:name] if args.key?(:name) + @share_data = args[:share_data] if args.key?(:share_data) + end + end + + # Defines the Google Tag Manager Account access permissions. + class AccountAccess + include Google::Apis::Core::Hashable + + # List of Account permissions. Valid account permissions are read and manage. @ + # mutable tagmanager.accounts.permissions.create @mutable tagmanager.accounts. + # permissions.update + # Corresponds to the JSON property `permission` + # @return [Array] + attr_accessor :permission + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @permission = args[:permission] if args.key?(:permission) + end + end + + # Represents a predicate. + class Condition + include Google::Apis::Core::Hashable + + # 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. @mutable tagmanager.accounts.containers. + # triggers.create @mutable tagmanager.accounts.containers.triggers.update + # Corresponds to the JSON property `parameter` + # @return [Array] + attr_accessor :parameter + + # The type of operator for this condition. @mutable tagmanager.accounts. + # containers.triggers.create @mutable tagmanager.accounts.containers.triggers. + # update + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @parameter = args[:parameter] if args.key?(:parameter) + @type = args[:type] if args.key?(:type) + end + end + + # Represents a Google Tag Manager Container. + class Container + include Google::Apis::Core::Hashable + + # GTM Account ID. + # Corresponds to the JSON property `accountId` + # @return [String] + attr_accessor :account_id + + # The Container ID uniquely identifies the GTM Container. + # Corresponds to the JSON property `containerId` + # @return [String] + attr_accessor :container_id + + # Optional list of domain names associated with the Container. @mutable + # tagmanager.accounts.containers.create @mutable tagmanager.accounts.containers. + # update + # Corresponds to the JSON property `domainName` + # @return [Array] + attr_accessor :domain_name + + # List of enabled built-in variables. Valid values include: pageUrl, + # pageHostname, pagePath, referrer, event, clickElement, clickClasses, clickId, + # clickTarget, clickUrl, clickText, formElement, formClasses, formId, formTarget, + # formUrl, formText, errorMessage, errorUrl, errorLine, newHistoryFragment, + # oldHistoryFragment, newHistoryState, oldHistoryState, historySource, + # containerVersion, debugMode, randomNumber, containerId. @mutable tagmanager. + # accounts.containers.create @mutable tagmanager.accounts.containers.update + # Corresponds to the JSON property `enabledBuiltInVariable` + # @return [Array] + attr_accessor :enabled_built_in_variable + + # The fingerprint of the GTM Container as computed at storage time. This value + # is recomputed whenever the account is modified. + # Corresponds to the JSON property `fingerprint` + # @return [String] + attr_accessor :fingerprint + + # Container display name. @mutable tagmanager.accounts.containers.create @ + # mutable tagmanager.accounts.containers.update + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Container Notes. @mutable tagmanager.accounts.containers.create @mutable + # tagmanager.accounts.containers.update + # Corresponds to the JSON property `notes` + # @return [String] + attr_accessor :notes + + # Container Public ID. + # Corresponds to the JSON property `publicId` + # @return [String] + attr_accessor :public_id + + # Container Country ID. @mutable tagmanager.accounts.containers.create @mutable + # tagmanager.accounts.containers.update + # Corresponds to the JSON property `timeZoneCountryId` + # @return [String] + attr_accessor :time_zone_country_id + + # Container Time Zone ID. @mutable tagmanager.accounts.containers.create @ + # mutable tagmanager.accounts.containers.update + # Corresponds to the JSON property `timeZoneId` + # @return [String] + attr_accessor :time_zone_id + + # List of Usage Contexts for the Container. Valid values include: web, android, + # ios. @mutable tagmanager.accounts.containers.create @mutable tagmanager. + # accounts.containers.update + # Corresponds to the JSON property `usageContext` + # @return [Array] + attr_accessor :usage_context + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @account_id = args[:account_id] if args.key?(:account_id) + @container_id = args[:container_id] if args.key?(:container_id) + @domain_name = args[:domain_name] if args.key?(:domain_name) + @enabled_built_in_variable = args[:enabled_built_in_variable] if args.key?(:enabled_built_in_variable) + @fingerprint = args[:fingerprint] if args.key?(:fingerprint) + @name = args[:name] if args.key?(:name) + @notes = args[:notes] if args.key?(:notes) + @public_id = args[:public_id] if args.key?(:public_id) + @time_zone_country_id = args[:time_zone_country_id] if args.key?(:time_zone_country_id) + @time_zone_id = args[:time_zone_id] if args.key?(:time_zone_id) + @usage_context = args[:usage_context] if args.key?(:usage_context) + end + end + + # Defines the Google Tag Manager Container access permissions. + class ContainerAccess + include Google::Apis::Core::Hashable + + # GTM Container ID. @mutable tagmanager.accounts.permissions.create @mutable + # tagmanager.accounts.permissions.update + # Corresponds to the JSON property `containerId` + # @return [String] + attr_accessor :container_id + + # List of Container permissions. Valid container permissions are: read, edit, + # delete, publish. @mutable tagmanager.accounts.permissions.create @mutable + # tagmanager.accounts.permissions.update + # Corresponds to the JSON property `permission` + # @return [Array] + attr_accessor :permission + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @container_id = args[:container_id] if args.key?(:container_id) + @permission = args[:permission] if args.key?(:permission) + end + end + + # Represents a Google Tag Manager Container Version. + class ContainerVersion + include Google::Apis::Core::Hashable + + # GTM Account ID. + # Corresponds to the JSON property `accountId` + # @return [String] + attr_accessor :account_id + + # Represents a Google Tag Manager Container. + # Corresponds to the JSON property `container` + # @return [Google::Apis::TagmanagerV1::Container] + attr_accessor :container + + # GTM Container ID. + # Corresponds to the JSON property `containerId` + # @return [String] + attr_accessor :container_id + + # The Container Version ID uniquely identifies the GTM Container Version. + # Corresponds to the JSON property `containerVersionId` + # @return [String] + attr_accessor :container_version_id + + # A value of true indicates this container version has been deleted. + # Corresponds to the JSON property `deleted` + # @return [Boolean] + attr_accessor :deleted + alias_method :deleted?, :deleted + + # The fingerprint of the GTM Container Version as computed at storage time. This + # value is recomputed whenever the container version is modified. + # Corresponds to the JSON property `fingerprint` + # @return [String] + attr_accessor :fingerprint + + # The folders in the container that this version was taken from. + # Corresponds to the JSON property `folder` + # @return [Array] + attr_accessor :folder + + # The macros in the container that this version was taken from. + # Corresponds to the JSON property `macro` + # @return [Array] + attr_accessor :macro + + # Container version display name. @mutable tagmanager.accounts.containers. + # versions.update + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # User notes on how to apply this container version in the container. @mutable + # tagmanager.accounts.containers.versions.update + # Corresponds to the JSON property `notes` + # @return [String] + attr_accessor :notes + + # The rules in the container that this version was taken from. + # Corresponds to the JSON property `rule` + # @return [Array] + attr_accessor :rule + + # The tags in the container that this version was taken from. + # Corresponds to the JSON property `tag` + # @return [Array] + attr_accessor :tag + + # The triggers in the container that this version was taken from. + # Corresponds to the JSON property `trigger` + # @return [Array] + attr_accessor :trigger + + # The variables in the container that this version was taken from. + # Corresponds to the JSON property `variable` + # @return [Array] + attr_accessor :variable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @account_id = args[:account_id] if args.key?(:account_id) + @container = args[:container] if args.key?(:container) + @container_id = args[:container_id] if args.key?(:container_id) + @container_version_id = args[:container_version_id] if args.key?(:container_version_id) + @deleted = args[:deleted] if args.key?(:deleted) + @fingerprint = args[:fingerprint] if args.key?(:fingerprint) + @folder = args[:folder] if args.key?(:folder) + @macro = args[:macro] if args.key?(:macro) + @name = args[:name] if args.key?(:name) + @notes = args[:notes] if args.key?(:notes) + @rule = args[:rule] if args.key?(:rule) + @tag = args[:tag] if args.key?(:tag) + @trigger = args[:trigger] if args.key?(:trigger) + @variable = args[:variable] if args.key?(:variable) + end + end + + # Represents a Google Tag Manager Container Version Header. + class ContainerVersionHeader + include Google::Apis::Core::Hashable + + # GTM Account ID. + # Corresponds to the JSON property `accountId` + # @return [String] + attr_accessor :account_id + + # GTM Container ID. + # Corresponds to the JSON property `containerId` + # @return [String] + attr_accessor :container_id + + # The Container Version ID uniquely identifies the GTM Container Version. + # Corresponds to the JSON property `containerVersionId` + # @return [String] + attr_accessor :container_version_id + + # A value of true indicates this container version has been deleted. + # Corresponds to the JSON property `deleted` + # @return [Boolean] + attr_accessor :deleted + alias_method :deleted?, :deleted + + # Container version display name. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Number of macros in the container version. + # Corresponds to the JSON property `numMacros` + # @return [String] + attr_accessor :num_macros + + # Number of rules in the container version. + # Corresponds to the JSON property `numRules` + # @return [String] + attr_accessor :num_rules + + # Number of tags in the container version. + # Corresponds to the JSON property `numTags` + # @return [String] + attr_accessor :num_tags + + # Number of triggers in the container version. + # Corresponds to the JSON property `numTriggers` + # @return [String] + attr_accessor :num_triggers + + # Number of variables in the container version. + # Corresponds to the JSON property `numVariables` + # @return [String] + attr_accessor :num_variables + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @account_id = args[:account_id] if args.key?(:account_id) + @container_id = args[:container_id] if args.key?(:container_id) + @container_version_id = args[:container_version_id] if args.key?(:container_version_id) + @deleted = args[:deleted] if args.key?(:deleted) + @name = args[:name] if args.key?(:name) + @num_macros = args[:num_macros] if args.key?(:num_macros) + @num_rules = args[:num_rules] if args.key?(:num_rules) + @num_tags = args[:num_tags] if args.key?(:num_tags) + @num_triggers = args[:num_triggers] if args.key?(:num_triggers) + @num_variables = args[:num_variables] if args.key?(:num_variables) + end + end + + # Options for new container versions. + class CreateContainerVersionRequestVersionOptions + include Google::Apis::Core::Hashable + + # The name of the container version to be created. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The notes of the container version to be created. + # Corresponds to the JSON property `notes` + # @return [String] + attr_accessor :notes + + # The creation of this version may be for quick preview and shouldn't be saved. + # Corresponds to the JSON property `quickPreview` + # @return [Boolean] + attr_accessor :quick_preview + alias_method :quick_preview?, :quick_preview + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @name = args[:name] if args.key?(:name) + @notes = args[:notes] if args.key?(:notes) + @quick_preview = args[:quick_preview] if args.key?(:quick_preview) + end + end + + # Create container versions response. + class CreateContainerVersionResponse + include Google::Apis::Core::Hashable + + # Compiler errors or not. + # Corresponds to the JSON property `compilerError` + # @return [Boolean] + attr_accessor :compiler_error + alias_method :compiler_error?, :compiler_error + + # Represents a Google Tag Manager Container Version. + # Corresponds to the JSON property `containerVersion` + # @return [Google::Apis::TagmanagerV1::ContainerVersion] + attr_accessor :container_version + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @compiler_error = args[:compiler_error] if args.key?(:compiler_error) + @container_version = args[:container_version] if args.key?(:container_version) + end + end + + # 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. + class Environment + include Google::Apis::Core::Hashable + + # GTM Account ID. + # Corresponds to the JSON property `accountId` + # @return [String] + attr_accessor :account_id + + # The environment authorization code. + # Corresponds to the JSON property `authorizationCode` + # @return [String] + attr_accessor :authorization_code + + # The last update time-stamp for the authorization code. + # Corresponds to the JSON property `authorizationTimestampMs` + # @return [Fixnum] + attr_accessor :authorization_timestamp_ms + + # GTM Container ID. + # Corresponds to the JSON property `containerId` + # @return [String] + attr_accessor :container_id + + # + # Corresponds to the JSON property `containerVersionId` + # @return [String] + attr_accessor :container_version_id + + # The environment description. Can be set or changed only on USER type + # environments. @mutable tagmanager.accounts.containers.environments.create @ + # mutable tagmanager.accounts.containers.environments.update + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # Whether or not to enable debug by default on for the environment. @mutable + # tagmanager.accounts.containers.environments.create @mutable tagmanager. + # accounts.containers.environments.update + # Corresponds to the JSON property `enableDebug` + # @return [Boolean] + attr_accessor :enable_debug + alias_method :enable_debug?, :enable_debug + + # GTM Environment ID uniquely identifies the GTM Environment. + # Corresponds to the JSON property `environmentId` + # @return [String] + attr_accessor :environment_id + + # The fingerprint of the GTM environment as computed at storage time. This value + # is recomputed whenever the environment is modified. + # Corresponds to the JSON property `fingerprint` + # @return [String] + attr_accessor :fingerprint + + # The environment display name. Can be set or changed only on USER type + # environments. @mutable tagmanager.accounts.containers.environments.create @ + # mutable tagmanager.accounts.containers.environments.update + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The type of this environment. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # Default preview page url for the environment. @mutable tagmanager.accounts. + # containers.environments.create @mutable tagmanager.accounts.containers. + # environments.update + # Corresponds to the JSON property `url` + # @return [String] + attr_accessor :url + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @account_id = args[:account_id] if args.key?(:account_id) + @authorization_code = args[:authorization_code] if args.key?(:authorization_code) + @authorization_timestamp_ms = args[:authorization_timestamp_ms] if args.key?(:authorization_timestamp_ms) + @container_id = args[:container_id] if args.key?(:container_id) + @container_version_id = args[:container_version_id] if args.key?(:container_version_id) + @description = args[:description] if args.key?(:description) + @enable_debug = args[:enable_debug] if args.key?(:enable_debug) + @environment_id = args[:environment_id] if args.key?(:environment_id) + @fingerprint = args[:fingerprint] if args.key?(:fingerprint) + @name = args[:name] if args.key?(:name) + @type = args[:type] if args.key?(:type) + @url = args[:url] if args.key?(:url) + end + end + + # Represents a Google Tag Manager Folder. + class Folder + include Google::Apis::Core::Hashable + + # GTM Account ID. + # Corresponds to the JSON property `accountId` + # @return [String] + attr_accessor :account_id + + # GTM Container ID. + # Corresponds to the JSON property `containerId` + # @return [String] + attr_accessor :container_id + + # The fingerprint of the GTM Folder as computed at storage time. This value is + # recomputed whenever the folder is modified. + # Corresponds to the JSON property `fingerprint` + # @return [String] + attr_accessor :fingerprint + + # The Folder ID uniquely identifies the GTM Folder. + # Corresponds to the JSON property `folderId` + # @return [String] + attr_accessor :folder_id + + # Folder display name. @mutable tagmanager.accounts.containers.folders.create @ + # mutable tagmanager.accounts.containers.folders.update + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @account_id = args[:account_id] if args.key?(:account_id) + @container_id = args[:container_id] if args.key?(:container_id) + @fingerprint = args[:fingerprint] if args.key?(:fingerprint) + @folder_id = args[:folder_id] if args.key?(:folder_id) + @name = args[:name] if args.key?(:name) + end + end + + # Represents a Google Tag Manager Folder's contents. + class FolderEntities + include Google::Apis::Core::Hashable + + # The list of tags inside the folder. + # Corresponds to the JSON property `tag` + # @return [Array] + attr_accessor :tag + + # The list of triggers inside the folder. + # Corresponds to the JSON property `trigger` + # @return [Array] + attr_accessor :trigger + + # The list of variables inside the folder. + # Corresponds to the JSON property `variable` + # @return [Array] + attr_accessor :variable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @tag = args[:tag] if args.key?(:tag) + @trigger = args[:trigger] if args.key?(:trigger) + @variable = args[:variable] if args.key?(:variable) + end + end + + # List AccountUsers Response. + class ListAccountUsersResponse + include Google::Apis::Core::Hashable + + # All GTM AccountUsers of a GTM Account. + # Corresponds to the JSON property `userAccess` + # @return [Array] + attr_accessor :user_access + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @user_access = args[:user_access] if args.key?(:user_access) + end + end + + # List Accounts Response. + class ListAccountsResponse + include Google::Apis::Core::Hashable + + # List of GTM Accounts that a user has access to. + # Corresponds to the JSON property `accounts` + # @return [Array] + attr_accessor :accounts + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @accounts = args[:accounts] if args.key?(:accounts) + end + end + + # List container versions response. + class ListContainerVersionsResponse + include Google::Apis::Core::Hashable + + # All versions of a GTM Container. + # Corresponds to the JSON property `containerVersion` + # @return [Array] + attr_accessor :container_version + + # All container version headers of a GTM Container. + # Corresponds to the JSON property `containerVersionHeader` + # @return [Array] + attr_accessor :container_version_header + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @container_version = args[:container_version] if args.key?(:container_version) + @container_version_header = args[:container_version_header] if args.key?(:container_version_header) + end + end + + # List Containers Response. + class ListContainersResponse + include Google::Apis::Core::Hashable + + # All Containers of a GTM Account. + # Corresponds to the JSON property `containers` + # @return [Array] + attr_accessor :containers + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @containers = args[:containers] if args.key?(:containers) + end + end + + # List Environments Response. + class ListEnvironmentsResponse + include Google::Apis::Core::Hashable + + # All Environments of a GTM Container. + # Corresponds to the JSON property `environments` + # @return [Array] + attr_accessor :environments + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @environments = args[:environments] if args.key?(:environments) + end + end + + # List Folders Response. + class ListFoldersResponse + include Google::Apis::Core::Hashable + + # All GTM Folders of a GTM Container. + # Corresponds to the JSON property `folders` + # @return [Array] + attr_accessor :folders + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @folders = args[:folders] if args.key?(:folders) + end + end + + # List Tags Response. + class ListTagsResponse + include Google::Apis::Core::Hashable + + # All GTM Tags of a GTM Container. + # Corresponds to the JSON property `tags` + # @return [Array] + attr_accessor :tags + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @tags = args[:tags] if args.key?(:tags) + end + end + + # List triggers response. + class ListTriggersResponse + include Google::Apis::Core::Hashable + + # All GTM Triggers of a GTM Container. + # Corresponds to the JSON property `triggers` + # @return [Array] + attr_accessor :triggers + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @triggers = args[:triggers] if args.key?(:triggers) + end + end + + # List Variables Response. + class ListVariablesResponse + include Google::Apis::Core::Hashable + + # All GTM Variables of a GTM Container. + # Corresponds to the JSON property `variables` + # @return [Array] + attr_accessor :variables + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @variables = args[:variables] if args.key?(:variables) + end + end + + # Represents a Google Tag Manager Macro. + class Macro + include Google::Apis::Core::Hashable + + # GTM Account ID. + # Corresponds to the JSON property `accountId` + # @return [String] + attr_accessor :account_id + + # GTM Container ID. + # Corresponds to the JSON property `containerId` + # @return [String] + attr_accessor :container_id + + # For mobile containers only: A list of rule IDs for disabling conditional + # macros; the macro is enabled if one of the enabling rules is true while all + # the disabling rules are false. Treated as an unordered set. @mutable + # tagmanager.accounts.containers.macros.create @mutable tagmanager.accounts. + # containers.macros.update + # Corresponds to the JSON property `disablingRuleId` + # @return [Array] + attr_accessor :disabling_rule_id + + # For mobile containers only: A list of rule IDs for enabling conditional macros; + # the macro is enabled if one of the enabling rules is true while all the + # disabling rules are false. Treated as an unordered set. @mutable tagmanager. + # accounts.containers.macros.create @mutable tagmanager.accounts.containers. + # macros.update + # Corresponds to the JSON property `enablingRuleId` + # @return [Array] + attr_accessor :enabling_rule_id + + # The fingerprint of the GTM Macro as computed at storage time. This value is + # recomputed whenever the macro is modified. + # Corresponds to the JSON property `fingerprint` + # @return [String] + attr_accessor :fingerprint + + # The Macro ID uniquely identifies the GTM Macro. + # Corresponds to the JSON property `macroId` + # @return [String] + attr_accessor :macro_id + + # Macro display name. @mutable tagmanager.accounts.containers.macros.create @ + # mutable tagmanager.accounts.containers.macros.update + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # User notes on how to apply this macro in the container. @mutable tagmanager. + # accounts.containers.macros.create @mutable tagmanager.accounts.containers. + # macros.update + # Corresponds to the JSON property `notes` + # @return [String] + attr_accessor :notes + + # The macro's parameters. @mutable tagmanager.accounts.containers.macros.create @ + # mutable tagmanager.accounts.containers.macros.update + # Corresponds to the JSON property `parameter` + # @return [Array] + attr_accessor :parameter + + # Parent folder id. + # Corresponds to the JSON property `parentFolderId` + # @return [String] + attr_accessor :parent_folder_id + + # The end timestamp in milliseconds to schedule a macro. @mutable tagmanager. + # accounts.containers.macros.create @mutable tagmanager.accounts.containers. + # macros.update + # Corresponds to the JSON property `scheduleEndMs` + # @return [Fixnum] + attr_accessor :schedule_end_ms + + # The start timestamp in milliseconds to schedule a macro. @mutable tagmanager. + # accounts.containers.macros.create @mutable tagmanager.accounts.containers. + # macros.update + # Corresponds to the JSON property `scheduleStartMs` + # @return [Fixnum] + attr_accessor :schedule_start_ms + + # GTM Macro Type. @mutable tagmanager.accounts.containers.macros.create @mutable + # tagmanager.accounts.containers.macros.update + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @account_id = args[:account_id] if args.key?(:account_id) + @container_id = args[:container_id] if args.key?(:container_id) + @disabling_rule_id = args[:disabling_rule_id] if args.key?(:disabling_rule_id) + @enabling_rule_id = args[:enabling_rule_id] if args.key?(:enabling_rule_id) + @fingerprint = args[:fingerprint] if args.key?(:fingerprint) + @macro_id = args[:macro_id] if args.key?(:macro_id) + @name = args[:name] if args.key?(:name) + @notes = args[:notes] if args.key?(:notes) + @parameter = args[:parameter] if args.key?(:parameter) + @parent_folder_id = args[:parent_folder_id] if args.key?(:parent_folder_id) + @schedule_end_ms = args[:schedule_end_ms] if args.key?(:schedule_end_ms) + @schedule_start_ms = args[:schedule_start_ms] if args.key?(:schedule_start_ms) + @type = args[:type] if args.key?(:type) + end + end + + # Represents a Google Tag Manager Parameter. + class Parameter + include Google::Apis::Core::Hashable + + # The named key that uniquely identifies a parameter. Required for top-level + # parameters, as well as map values. Ignored for list values. @mutable + # tagmanager.accounts.containers.variables.create @mutable tagmanager.accounts. + # containers.variables.update @mutable tagmanager.accounts.containers.triggers. + # create @mutable tagmanager.accounts.containers.triggers.update @mutable + # tagmanager.accounts.containers.tags.create @mutable tagmanager.accounts. + # containers.tags.update + # Corresponds to the JSON property `key` + # @return [String] + attr_accessor :key + + # This list parameter's parameters (keys will be ignored). @mutable tagmanager. + # accounts.containers.variables.create @mutable tagmanager.accounts.containers. + # variables.update @mutable tagmanager.accounts.containers.triggers.create @ + # mutable tagmanager.accounts.containers.triggers.update @mutable tagmanager. + # accounts.containers.tags.create @mutable tagmanager.accounts.containers.tags. + # update + # Corresponds to the JSON property `list` + # @return [Array] + attr_accessor :list + + # This map parameter's parameters (must have keys; keys must be unique). @ + # mutable tagmanager.accounts.containers.variables.create @mutable tagmanager. + # accounts.containers.variables.update @mutable tagmanager.accounts.containers. + # triggers.create @mutable tagmanager.accounts.containers.triggers.update @ + # mutable tagmanager.accounts.containers.tags.create @mutable tagmanager. + # accounts.containers.tags.update + # Corresponds to the JSON property `map` + # @return [Array] + attr_accessor :map + + # 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 - tag_reference: The value + # represents a tag, represented as the tag name @mutable tagmanager.accounts. + # containers.variables.create @mutable tagmanager.accounts.containers.variables. + # update @mutable tagmanager.accounts.containers.triggers.create @mutable + # tagmanager.accounts.containers.triggers.update @mutable tagmanager.accounts. + # containers.tags.create @mutable tagmanager.accounts.containers.tags.update + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # A parameter's value (may contain variable references such as "``myVariable``") + # as appropriate to the specified type. @mutable tagmanager.accounts.containers. + # variables.create @mutable tagmanager.accounts.containers.variables.update @ + # mutable tagmanager.accounts.containers.triggers.create @mutable tagmanager. + # accounts.containers.triggers.update @mutable tagmanager.accounts.containers. + # tags.create @mutable tagmanager.accounts.containers.tags.update + # Corresponds to the JSON property `value` + # @return [String] + attr_accessor :value + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @key = args[:key] if args.key?(:key) + @list = args[:list] if args.key?(:list) + @map = args[:map] if args.key?(:map) + @type = args[:type] if args.key?(:type) + @value = args[:value] if args.key?(:value) + end + end + + # Publish container version response. + class PublishContainerVersionResponse + include Google::Apis::Core::Hashable + + # Compiler errors or not. + # Corresponds to the JSON property `compilerError` + # @return [Boolean] + attr_accessor :compiler_error + alias_method :compiler_error?, :compiler_error + + # Represents a Google Tag Manager Container Version. + # Corresponds to the JSON property `containerVersion` + # @return [Google::Apis::TagmanagerV1::ContainerVersion] + attr_accessor :container_version + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @compiler_error = args[:compiler_error] if args.key?(:compiler_error) + @container_version = args[:container_version] if args.key?(:container_version) + end + end + + # Represents a Google Tag Manager Rule. + class Rule + include Google::Apis::Core::Hashable + + # GTM Account ID. + # Corresponds to the JSON property `accountId` + # @return [String] + attr_accessor :account_id + + # The list of conditions that make up this rule (implicit AND between them). @ + # mutable tagmanager.accounts.containers.rules.create @mutable tagmanager. + # accounts.containers.rules.update + # Corresponds to the JSON property `condition` + # @return [Array] + attr_accessor :condition + + # GTM Container ID. + # Corresponds to the JSON property `containerId` + # @return [String] + attr_accessor :container_id + + # The fingerprint of the GTM Rule as computed at storage time. This value is + # recomputed whenever the rule is modified. + # Corresponds to the JSON property `fingerprint` + # @return [String] + attr_accessor :fingerprint + + # Rule display name. @mutable tagmanager.accounts.containers.rules.create @ + # mutable tagmanager.accounts.containers.rules.update + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # User notes on how to apply this rule in the container. @mutable tagmanager. + # accounts.containers.rules.create @mutable tagmanager.accounts.containers.rules. + # update + # Corresponds to the JSON property `notes` + # @return [String] + attr_accessor :notes + + # The Rule ID uniquely identifies the GTM Rule. + # Corresponds to the JSON property `ruleId` + # @return [String] + attr_accessor :rule_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @account_id = args[:account_id] if args.key?(:account_id) + @condition = args[:condition] if args.key?(:condition) + @container_id = args[:container_id] if args.key?(:container_id) + @fingerprint = args[:fingerprint] if args.key?(:fingerprint) + @name = args[:name] if args.key?(:name) + @notes = args[:notes] if args.key?(:notes) + @rule_id = args[:rule_id] if args.key?(:rule_id) + end + end + + # + class SetupTag + include Google::Apis::Core::Hashable + + # 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. + # Corresponds to the JSON property `stopOnSetupFailure` + # @return [Boolean] + attr_accessor :stop_on_setup_failure + alias_method :stop_on_setup_failure?, :stop_on_setup_failure + + # The name of the setup tag. + # Corresponds to the JSON property `tagName` + # @return [String] + attr_accessor :tag_name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @stop_on_setup_failure = args[:stop_on_setup_failure] if args.key?(:stop_on_setup_failure) + @tag_name = args[:tag_name] if args.key?(:tag_name) + end + end + + # Represents a Google Tag Manager Tag. + class Tag + include Google::Apis::Core::Hashable + + # GTM Account ID. + # Corresponds to the JSON property `accountId` + # @return [String] + attr_accessor :account_id + + # Blocking rule IDs. If any of the listed rules evaluate to true, the tag will + # not fire. @mutable tagmanager.accounts.containers.tags.create @mutable + # tagmanager.accounts.containers.tags.update + # Corresponds to the JSON property `blockingRuleId` + # @return [Array] + attr_accessor :blocking_rule_id + + # Blocking trigger IDs. If any of the listed triggers evaluate to true, the tag + # will not fire. @mutable tagmanager.accounts.containers.tags.create @mutable + # tagmanager.accounts.containers.tags.update + # Corresponds to the JSON property `blockingTriggerId` + # @return [Array] + attr_accessor :blocking_trigger_id + + # GTM Container ID. + # Corresponds to the JSON property `containerId` + # @return [String] + attr_accessor :container_id + + # The fingerprint of the GTM Tag as computed at storage time. This value is + # recomputed whenever the tag is modified. + # Corresponds to the JSON property `fingerprint` + # @return [String] + attr_accessor :fingerprint + + # 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. @mutable tagmanager. + # accounts.containers.tags.create @mutable tagmanager.accounts.containers.tags. + # update + # Corresponds to the JSON property `firingRuleId` + # @return [Array] + attr_accessor :firing_rule_id + + # 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. @mutable + # tagmanager.accounts.containers.tags.create @mutable tagmanager.accounts. + # containers.tags.update + # Corresponds to the JSON property `firingTriggerId` + # @return [Array] + attr_accessor :firing_trigger_id + + # If set to true, this tag will only fire in the live environment (e.g. not in + # preview or debug mode). @mutable tagmanager.accounts.containers.tags.create @ + # mutable tagmanager.accounts.containers.tags.update + # Corresponds to the JSON property `liveOnly` + # @return [Boolean] + attr_accessor :live_only + alias_method :live_only?, :live_only + + # Tag display name. @mutable tagmanager.accounts.containers.tags.create @mutable + # tagmanager.accounts.containers.tags.update + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # User notes on how to apply this tag in the container. @mutable tagmanager. + # accounts.containers.tags.create @mutable tagmanager.accounts.containers.tags. + # update + # Corresponds to the JSON property `notes` + # @return [String] + attr_accessor :notes + + # The tag's parameters. @mutable tagmanager.accounts.containers.tags.create @ + # mutable tagmanager.accounts.containers.tags.update + # Corresponds to the JSON property `parameter` + # @return [Array] + attr_accessor :parameter + + # Parent folder id. + # Corresponds to the JSON property `parentFolderId` + # @return [String] + attr_accessor :parent_folder_id + + # True if the tag is paused. @mutable tagmanager.accounts.containers.tags.create + # @mutable tagmanager.accounts.containers.tags.update + # Corresponds to the JSON property `paused` + # @return [Boolean] + attr_accessor :paused + alias_method :paused?, :paused + + # Represents a Google Tag Manager Parameter. + # Corresponds to the JSON property `priority` + # @return [Google::Apis::TagmanagerV1::Parameter] + attr_accessor :priority + + # The end timestamp in milliseconds to schedule a tag. @mutable tagmanager. + # accounts.containers.tags.create @mutable tagmanager.accounts.containers.tags. + # update + # Corresponds to the JSON property `scheduleEndMs` + # @return [Fixnum] + attr_accessor :schedule_end_ms + + # The start timestamp in milliseconds to schedule a tag. @mutable tagmanager. + # accounts.containers.tags.create @mutable tagmanager.accounts.containers.tags. + # update + # Corresponds to the JSON property `scheduleStartMs` + # @return [Fixnum] + attr_accessor :schedule_start_ms + + # The list of setup tags. Currently we only allow one. + # Corresponds to the JSON property `setupTag` + # @return [Array] + attr_accessor :setup_tag + + # Option to fire this tag. + # Corresponds to the JSON property `tagFiringOption` + # @return [String] + attr_accessor :tag_firing_option + + # The Tag ID uniquely identifies the GTM Tag. + # Corresponds to the JSON property `tagId` + # @return [String] + attr_accessor :tag_id + + # The list of teardown tags. Currently we only allow one. + # Corresponds to the JSON property `teardownTag` + # @return [Array] + attr_accessor :teardown_tag + + # GTM Tag Type. @mutable tagmanager.accounts.containers.tags.create @mutable + # tagmanager.accounts.containers.tags.update + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @account_id = args[:account_id] if args.key?(:account_id) + @blocking_rule_id = args[:blocking_rule_id] if args.key?(:blocking_rule_id) + @blocking_trigger_id = args[:blocking_trigger_id] if args.key?(:blocking_trigger_id) + @container_id = args[:container_id] if args.key?(:container_id) + @fingerprint = args[:fingerprint] if args.key?(:fingerprint) + @firing_rule_id = args[:firing_rule_id] if args.key?(:firing_rule_id) + @firing_trigger_id = args[:firing_trigger_id] if args.key?(:firing_trigger_id) + @live_only = args[:live_only] if args.key?(:live_only) + @name = args[:name] if args.key?(:name) + @notes = args[:notes] if args.key?(:notes) + @parameter = args[:parameter] if args.key?(:parameter) + @parent_folder_id = args[:parent_folder_id] if args.key?(:parent_folder_id) + @paused = args[:paused] if args.key?(:paused) + @priority = args[:priority] if args.key?(:priority) + @schedule_end_ms = args[:schedule_end_ms] if args.key?(:schedule_end_ms) + @schedule_start_ms = args[:schedule_start_ms] if args.key?(:schedule_start_ms) + @setup_tag = args[:setup_tag] if args.key?(:setup_tag) + @tag_firing_option = args[:tag_firing_option] if args.key?(:tag_firing_option) + @tag_id = args[:tag_id] if args.key?(:tag_id) + @teardown_tag = args[:teardown_tag] if args.key?(:teardown_tag) + @type = args[:type] if args.key?(:type) + end + end + + # + class TeardownTag + include Google::Apis::Core::Hashable + + # 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. + # Corresponds to the JSON property `stopTeardownOnFailure` + # @return [Boolean] + attr_accessor :stop_teardown_on_failure + alias_method :stop_teardown_on_failure?, :stop_teardown_on_failure + + # The name of the teardown tag. + # Corresponds to the JSON property `tagName` + # @return [String] + attr_accessor :tag_name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @stop_teardown_on_failure = args[:stop_teardown_on_failure] if args.key?(:stop_teardown_on_failure) + @tag_name = args[:tag_name] if args.key?(:tag_name) + end + end + + # Represents a Google Tag Manager Trigger + class Trigger + include Google::Apis::Core::Hashable + + # GTM Account ID. + # Corresponds to the JSON property `accountId` + # @return [String] + attr_accessor :account_id + + # Used in the case of auto event tracking. @mutable tagmanager.accounts. + # containers.triggers.create @mutable tagmanager.accounts.containers.triggers. + # update + # Corresponds to the JSON property `autoEventFilter` + # @return [Array] + attr_accessor :auto_event_filter + + # Represents a Google Tag Manager Parameter. + # Corresponds to the JSON property `checkValidation` + # @return [Google::Apis::TagmanagerV1::Parameter] + attr_accessor :check_validation + + # GTM Container ID. + # Corresponds to the JSON property `containerId` + # @return [String] + attr_accessor :container_id + + # Represents a Google Tag Manager Parameter. + # Corresponds to the JSON property `continuousTimeMinMilliseconds` + # @return [Google::Apis::TagmanagerV1::Parameter] + attr_accessor :continuous_time_min_milliseconds + + # Used in the case of custom event, which is fired iff all Conditions are true. @ + # mutable tagmanager.accounts.containers.triggers.create @mutable tagmanager. + # accounts.containers.triggers.update + # Corresponds to the JSON property `customEventFilter` + # @return [Array] + attr_accessor :custom_event_filter + + # Represents a Google Tag Manager Parameter. + # Corresponds to the JSON property `eventName` + # @return [Google::Apis::TagmanagerV1::Parameter] + attr_accessor :event_name + + # The trigger will only fire iff all Conditions are true. @mutable tagmanager. + # accounts.containers.triggers.create @mutable tagmanager.accounts.containers. + # triggers.update + # Corresponds to the JSON property `filter` + # @return [Array] + attr_accessor :filter + + # The fingerprint of the GTM Trigger as computed at storage time. This value is + # recomputed whenever the trigger is modified. + # Corresponds to the JSON property `fingerprint` + # @return [String] + attr_accessor :fingerprint + + # Represents a Google Tag Manager Parameter. + # Corresponds to the JSON property `horizontalScrollPercentageList` + # @return [Google::Apis::TagmanagerV1::Parameter] + attr_accessor :horizontal_scroll_percentage_list + + # Represents a Google Tag Manager Parameter. + # Corresponds to the JSON property `interval` + # @return [Google::Apis::TagmanagerV1::Parameter] + attr_accessor :interval + + # Represents a Google Tag Manager Parameter. + # Corresponds to the JSON property `intervalSeconds` + # @return [Google::Apis::TagmanagerV1::Parameter] + attr_accessor :interval_seconds + + # Represents a Google Tag Manager Parameter. + # Corresponds to the JSON property `limit` + # @return [Google::Apis::TagmanagerV1::Parameter] + attr_accessor :limit + + # Represents a Google Tag Manager Parameter. + # Corresponds to the JSON property `maxTimerLengthSeconds` + # @return [Google::Apis::TagmanagerV1::Parameter] + attr_accessor :max_timer_length_seconds + + # Trigger display name. @mutable tagmanager.accounts.containers.triggers.create @ + # mutable tagmanager.accounts.containers.triggers.update + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Additional parameters. @mutable tagmanager.accounts.containers.workspaces. + # triggers.create @mutable tagmanager.accounts.containers.workspaces.triggers. + # update + # Corresponds to the JSON property `parameter` + # @return [Array] + attr_accessor :parameter + + # Parent folder id. + # Corresponds to the JSON property `parentFolderId` + # @return [String] + attr_accessor :parent_folder_id + + # Represents a Google Tag Manager Parameter. + # Corresponds to the JSON property `selector` + # @return [Google::Apis::TagmanagerV1::Parameter] + attr_accessor :selector + + # Represents a Google Tag Manager Parameter. + # Corresponds to the JSON property `totalTimeMinMilliseconds` + # @return [Google::Apis::TagmanagerV1::Parameter] + attr_accessor :total_time_min_milliseconds + + # The Trigger ID uniquely identifies the GTM Trigger. + # Corresponds to the JSON property `triggerId` + # @return [String] + attr_accessor :trigger_id + + # Defines the data layer event that causes this trigger. @mutable tagmanager. + # accounts.containers.triggers.create @mutable tagmanager.accounts.containers. + # triggers.update + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # Represents a Google Tag Manager Parameter. + # Corresponds to the JSON property `uniqueTriggerId` + # @return [Google::Apis::TagmanagerV1::Parameter] + attr_accessor :unique_trigger_id + + # Represents a Google Tag Manager Parameter. + # Corresponds to the JSON property `verticalScrollPercentageList` + # @return [Google::Apis::TagmanagerV1::Parameter] + attr_accessor :vertical_scroll_percentage_list + + # Represents a Google Tag Manager Parameter. + # Corresponds to the JSON property `visibilitySelector` + # @return [Google::Apis::TagmanagerV1::Parameter] + attr_accessor :visibility_selector + + # Represents a Google Tag Manager Parameter. + # Corresponds to the JSON property `visiblePercentageMax` + # @return [Google::Apis::TagmanagerV1::Parameter] + attr_accessor :visible_percentage_max + + # Represents a Google Tag Manager Parameter. + # Corresponds to the JSON property `visiblePercentageMin` + # @return [Google::Apis::TagmanagerV1::Parameter] + attr_accessor :visible_percentage_min + + # Represents a Google Tag Manager Parameter. + # Corresponds to the JSON property `waitForTags` + # @return [Google::Apis::TagmanagerV1::Parameter] + attr_accessor :wait_for_tags + + # Represents a Google Tag Manager Parameter. + # Corresponds to the JSON property `waitForTagsTimeout` + # @return [Google::Apis::TagmanagerV1::Parameter] + attr_accessor :wait_for_tags_timeout + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @account_id = args[:account_id] if args.key?(:account_id) + @auto_event_filter = args[:auto_event_filter] if args.key?(:auto_event_filter) + @check_validation = args[:check_validation] if args.key?(:check_validation) + @container_id = args[:container_id] if args.key?(:container_id) + @continuous_time_min_milliseconds = args[:continuous_time_min_milliseconds] if args.key?(:continuous_time_min_milliseconds) + @custom_event_filter = args[:custom_event_filter] if args.key?(:custom_event_filter) + @event_name = args[:event_name] if args.key?(:event_name) + @filter = args[:filter] if args.key?(:filter) + @fingerprint = args[:fingerprint] if args.key?(:fingerprint) + @horizontal_scroll_percentage_list = args[:horizontal_scroll_percentage_list] if args.key?(:horizontal_scroll_percentage_list) + @interval = args[:interval] if args.key?(:interval) + @interval_seconds = args[:interval_seconds] if args.key?(:interval_seconds) + @limit = args[:limit] if args.key?(:limit) + @max_timer_length_seconds = args[:max_timer_length_seconds] if args.key?(:max_timer_length_seconds) + @name = args[:name] if args.key?(:name) + @parameter = args[:parameter] if args.key?(:parameter) + @parent_folder_id = args[:parent_folder_id] if args.key?(:parent_folder_id) + @selector = args[:selector] if args.key?(:selector) + @total_time_min_milliseconds = args[:total_time_min_milliseconds] if args.key?(:total_time_min_milliseconds) + @trigger_id = args[:trigger_id] if args.key?(:trigger_id) + @type = args[:type] if args.key?(:type) + @unique_trigger_id = args[:unique_trigger_id] if args.key?(:unique_trigger_id) + @vertical_scroll_percentage_list = args[:vertical_scroll_percentage_list] if args.key?(:vertical_scroll_percentage_list) + @visibility_selector = args[:visibility_selector] if args.key?(:visibility_selector) + @visible_percentage_max = args[:visible_percentage_max] if args.key?(:visible_percentage_max) + @visible_percentage_min = args[:visible_percentage_min] if args.key?(:visible_percentage_min) + @wait_for_tags = args[:wait_for_tags] if args.key?(:wait_for_tags) + @wait_for_tags_timeout = args[:wait_for_tags_timeout] if args.key?(:wait_for_tags_timeout) + end + end + + # Represents a user's permissions to an account and its container. + class UserAccess + include Google::Apis::Core::Hashable + + # Defines the Google Tag Manager Account access permissions. + # Corresponds to the JSON property `accountAccess` + # @return [Google::Apis::TagmanagerV1::AccountAccess] + attr_accessor :account_access + + # GTM Account ID. + # Corresponds to the JSON property `accountId` + # @return [String] + attr_accessor :account_id + + # GTM Container access permissions. @mutable tagmanager.accounts.permissions. + # create @mutable tagmanager.accounts.permissions.update + # Corresponds to the JSON property `containerAccess` + # @return [Array] + attr_accessor :container_access + + # User's email address. @mutable tagmanager.accounts.permissions.create + # Corresponds to the JSON property `emailAddress` + # @return [String] + attr_accessor :email_address + + # Account Permission ID. + # Corresponds to the JSON property `permissionId` + # @return [String] + attr_accessor :permission_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @account_access = args[:account_access] if args.key?(:account_access) + @account_id = args[:account_id] if args.key?(:account_id) + @container_access = args[:container_access] if args.key?(:container_access) + @email_address = args[:email_address] if args.key?(:email_address) + @permission_id = args[:permission_id] if args.key?(:permission_id) + end + end + + # Represents a Google Tag Manager Variable. + class Variable + include Google::Apis::Core::Hashable + + # GTM Account ID. + # Corresponds to the JSON property `accountId` + # @return [String] + attr_accessor :account_id + + # GTM Container ID. + # Corresponds to the JSON property `containerId` + # @return [String] + attr_accessor :container_id + + # 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. @ + # mutable tagmanager.accounts.containers.variables.create @mutable tagmanager. + # accounts.containers.variables.update + # Corresponds to the JSON property `disablingTriggerId` + # @return [Array] + attr_accessor :disabling_trigger_id + + # 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. @ + # mutable tagmanager.accounts.containers.variables.create @mutable tagmanager. + # accounts.containers.variables.update + # Corresponds to the JSON property `enablingTriggerId` + # @return [Array] + attr_accessor :enabling_trigger_id + + # The fingerprint of the GTM Variable as computed at storage time. This value is + # recomputed whenever the variable is modified. + # Corresponds to the JSON property `fingerprint` + # @return [String] + attr_accessor :fingerprint + + # Variable display name. @mutable tagmanager.accounts.containers.variables. + # create @mutable tagmanager.accounts.containers.variables.update + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # User notes on how to apply this variable in the container. @mutable tagmanager. + # accounts.containers.variables.create @mutable tagmanager.accounts.containers. + # variables.update + # Corresponds to the JSON property `notes` + # @return [String] + attr_accessor :notes + + # The variable's parameters. @mutable tagmanager.accounts.containers.variables. + # create @mutable tagmanager.accounts.containers.variables.update + # Corresponds to the JSON property `parameter` + # @return [Array] + attr_accessor :parameter + + # Parent folder id. + # Corresponds to the JSON property `parentFolderId` + # @return [String] + attr_accessor :parent_folder_id + + # The end timestamp in milliseconds to schedule a variable. @mutable tagmanager. + # accounts.containers.variables.create @mutable tagmanager.accounts.containers. + # variables.update + # Corresponds to the JSON property `scheduleEndMs` + # @return [Fixnum] + attr_accessor :schedule_end_ms + + # The start timestamp in milliseconds to schedule a variable. @mutable + # tagmanager.accounts.containers.variables.create @mutable tagmanager.accounts. + # containers.variables.update + # Corresponds to the JSON property `scheduleStartMs` + # @return [Fixnum] + attr_accessor :schedule_start_ms + + # GTM Variable Type. @mutable tagmanager.accounts.containers.variables.create @ + # mutable tagmanager.accounts.containers.variables.update + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # The Variable ID uniquely identifies the GTM Variable. + # Corresponds to the JSON property `variableId` + # @return [String] + attr_accessor :variable_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @account_id = args[:account_id] if args.key?(:account_id) + @container_id = args[:container_id] if args.key?(:container_id) + @disabling_trigger_id = args[:disabling_trigger_id] if args.key?(:disabling_trigger_id) + @enabling_trigger_id = args[:enabling_trigger_id] if args.key?(:enabling_trigger_id) + @fingerprint = args[:fingerprint] if args.key?(:fingerprint) + @name = args[:name] if args.key?(:name) + @notes = args[:notes] if args.key?(:notes) + @parameter = args[:parameter] if args.key?(:parameter) + @parent_folder_id = args[:parent_folder_id] if args.key?(:parent_folder_id) + @schedule_end_ms = args[:schedule_end_ms] if args.key?(:schedule_end_ms) + @schedule_start_ms = args[:schedule_start_ms] if args.key?(:schedule_start_ms) + @type = args[:type] if args.key?(:type) + @variable_id = args[:variable_id] if args.key?(:variable_id) + end + end + end + end +end diff --git a/generated/google/apis/tagmanager_v1/representations.rb b/generated/google/apis/tagmanager_v1/representations.rb new file mode 100644 index 000000000..ddb9637e3 --- /dev/null +++ b/generated/google/apis/tagmanager_v1/representations.rb @@ -0,0 +1,630 @@ +# Copyright 2015 Google Inc. +# +# 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. + +require 'date' +require 'google/apis/core/base_service' +require 'google/apis/core/json_representation' +require 'google/apis/core/hashable' +require 'google/apis/errors' + +module Google + module Apis + module TagmanagerV1 + + class Account + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AccountAccess + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Condition + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Container + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ContainerAccess + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ContainerVersion + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ContainerVersionHeader + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CreateContainerVersionRequestVersionOptions + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CreateContainerVersionResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Environment + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Folder + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class FolderEntities + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListAccountUsersResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListAccountsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListContainerVersionsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListContainersResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListEnvironmentsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListFoldersResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListTagsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListTriggersResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListVariablesResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Macro + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Parameter + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class PublishContainerVersionResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Rule + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SetupTag + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Tag + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TeardownTag + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Trigger + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class UserAccess + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Variable + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Account + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :account_id, as: 'accountId' + property :fingerprint, as: 'fingerprint' + property :name, as: 'name' + property :share_data, as: 'shareData' + end + end + + class AccountAccess + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :permission, as: 'permission' + end + end + + class Condition + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :parameter, as: 'parameter', class: Google::Apis::TagmanagerV1::Parameter, decorator: Google::Apis::TagmanagerV1::Parameter::Representation + + property :type, as: 'type' + end + end + + class Container + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :account_id, as: 'accountId' + property :container_id, as: 'containerId' + collection :domain_name, as: 'domainName' + collection :enabled_built_in_variable, as: 'enabledBuiltInVariable' + property :fingerprint, as: 'fingerprint' + property :name, as: 'name' + property :notes, as: 'notes' + property :public_id, as: 'publicId' + property :time_zone_country_id, as: 'timeZoneCountryId' + property :time_zone_id, as: 'timeZoneId' + collection :usage_context, as: 'usageContext' + end + end + + class ContainerAccess + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :container_id, as: 'containerId' + collection :permission, as: 'permission' + end + end + + class ContainerVersion + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :account_id, as: 'accountId' + property :container, as: 'container', class: Google::Apis::TagmanagerV1::Container, decorator: Google::Apis::TagmanagerV1::Container::Representation + + property :container_id, as: 'containerId' + property :container_version_id, as: 'containerVersionId' + property :deleted, as: 'deleted' + property :fingerprint, as: 'fingerprint' + collection :folder, as: 'folder', class: Google::Apis::TagmanagerV1::Folder, decorator: Google::Apis::TagmanagerV1::Folder::Representation + + collection :macro, as: 'macro', class: Google::Apis::TagmanagerV1::Macro, decorator: Google::Apis::TagmanagerV1::Macro::Representation + + property :name, as: 'name' + property :notes, as: 'notes' + collection :rule, as: 'rule', class: Google::Apis::TagmanagerV1::Rule, decorator: Google::Apis::TagmanagerV1::Rule::Representation + + collection :tag, as: 'tag', class: Google::Apis::TagmanagerV1::Tag, decorator: Google::Apis::TagmanagerV1::Tag::Representation + + collection :trigger, as: 'trigger', class: Google::Apis::TagmanagerV1::Trigger, decorator: Google::Apis::TagmanagerV1::Trigger::Representation + + collection :variable, as: 'variable', class: Google::Apis::TagmanagerV1::Variable, decorator: Google::Apis::TagmanagerV1::Variable::Representation + + end + end + + class ContainerVersionHeader + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :account_id, as: 'accountId' + property :container_id, as: 'containerId' + property :container_version_id, as: 'containerVersionId' + property :deleted, as: 'deleted' + property :name, as: 'name' + property :num_macros, as: 'numMacros' + property :num_rules, as: 'numRules' + property :num_tags, as: 'numTags' + property :num_triggers, as: 'numTriggers' + property :num_variables, as: 'numVariables' + end + end + + class CreateContainerVersionRequestVersionOptions + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :name, as: 'name' + property :notes, as: 'notes' + property :quick_preview, as: 'quickPreview' + end + end + + class CreateContainerVersionResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :compiler_error, as: 'compilerError' + property :container_version, as: 'containerVersion', class: Google::Apis::TagmanagerV1::ContainerVersion, decorator: Google::Apis::TagmanagerV1::ContainerVersion::Representation + + end + end + + class Environment + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :account_id, as: 'accountId' + property :authorization_code, as: 'authorizationCode' + property :authorization_timestamp_ms, :numeric_string => true, as: 'authorizationTimestampMs' + property :container_id, as: 'containerId' + property :container_version_id, as: 'containerVersionId' + property :description, as: 'description' + property :enable_debug, as: 'enableDebug' + property :environment_id, as: 'environmentId' + property :fingerprint, as: 'fingerprint' + property :name, as: 'name' + property :type, as: 'type' + property :url, as: 'url' + end + end + + class Folder + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :account_id, as: 'accountId' + property :container_id, as: 'containerId' + property :fingerprint, as: 'fingerprint' + property :folder_id, as: 'folderId' + property :name, as: 'name' + end + end + + class FolderEntities + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :tag, as: 'tag', class: Google::Apis::TagmanagerV1::Tag, decorator: Google::Apis::TagmanagerV1::Tag::Representation + + collection :trigger, as: 'trigger', class: Google::Apis::TagmanagerV1::Trigger, decorator: Google::Apis::TagmanagerV1::Trigger::Representation + + collection :variable, as: 'variable', class: Google::Apis::TagmanagerV1::Variable, decorator: Google::Apis::TagmanagerV1::Variable::Representation + + end + end + + class ListAccountUsersResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :user_access, as: 'userAccess', class: Google::Apis::TagmanagerV1::UserAccess, decorator: Google::Apis::TagmanagerV1::UserAccess::Representation + + end + end + + class ListAccountsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :accounts, as: 'accounts', class: Google::Apis::TagmanagerV1::Account, decorator: Google::Apis::TagmanagerV1::Account::Representation + + end + end + + class ListContainerVersionsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :container_version, as: 'containerVersion', class: Google::Apis::TagmanagerV1::ContainerVersion, decorator: Google::Apis::TagmanagerV1::ContainerVersion::Representation + + collection :container_version_header, as: 'containerVersionHeader', class: Google::Apis::TagmanagerV1::ContainerVersionHeader, decorator: Google::Apis::TagmanagerV1::ContainerVersionHeader::Representation + + end + end + + class ListContainersResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :containers, as: 'containers', class: Google::Apis::TagmanagerV1::Container, decorator: Google::Apis::TagmanagerV1::Container::Representation + + end + end + + class ListEnvironmentsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :environments, as: 'environments', class: Google::Apis::TagmanagerV1::Environment, decorator: Google::Apis::TagmanagerV1::Environment::Representation + + end + end + + class ListFoldersResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :folders, as: 'folders', class: Google::Apis::TagmanagerV1::Folder, decorator: Google::Apis::TagmanagerV1::Folder::Representation + + end + end + + class ListTagsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :tags, as: 'tags', class: Google::Apis::TagmanagerV1::Tag, decorator: Google::Apis::TagmanagerV1::Tag::Representation + + end + end + + class ListTriggersResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :triggers, as: 'triggers', class: Google::Apis::TagmanagerV1::Trigger, decorator: Google::Apis::TagmanagerV1::Trigger::Representation + + end + end + + class ListVariablesResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :variables, as: 'variables', class: Google::Apis::TagmanagerV1::Variable, decorator: Google::Apis::TagmanagerV1::Variable::Representation + + end + end + + class Macro + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :account_id, as: 'accountId' + property :container_id, as: 'containerId' + collection :disabling_rule_id, as: 'disablingRuleId' + collection :enabling_rule_id, as: 'enablingRuleId' + property :fingerprint, as: 'fingerprint' + property :macro_id, as: 'macroId' + property :name, as: 'name' + property :notes, as: 'notes' + collection :parameter, as: 'parameter', class: Google::Apis::TagmanagerV1::Parameter, decorator: Google::Apis::TagmanagerV1::Parameter::Representation + + property :parent_folder_id, as: 'parentFolderId' + property :schedule_end_ms, :numeric_string => true, as: 'scheduleEndMs' + property :schedule_start_ms, :numeric_string => true, as: 'scheduleStartMs' + property :type, as: 'type' + end + end + + class Parameter + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :key, as: 'key' + collection :list, as: 'list', class: Google::Apis::TagmanagerV1::Parameter, decorator: Google::Apis::TagmanagerV1::Parameter::Representation + + collection :map, as: 'map', class: Google::Apis::TagmanagerV1::Parameter, decorator: Google::Apis::TagmanagerV1::Parameter::Representation + + property :type, as: 'type' + property :value, as: 'value' + end + end + + class PublishContainerVersionResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :compiler_error, as: 'compilerError' + property :container_version, as: 'containerVersion', class: Google::Apis::TagmanagerV1::ContainerVersion, decorator: Google::Apis::TagmanagerV1::ContainerVersion::Representation + + end + end + + class Rule + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :account_id, as: 'accountId' + collection :condition, as: 'condition', class: Google::Apis::TagmanagerV1::Condition, decorator: Google::Apis::TagmanagerV1::Condition::Representation + + property :container_id, as: 'containerId' + property :fingerprint, as: 'fingerprint' + property :name, as: 'name' + property :notes, as: 'notes' + property :rule_id, as: 'ruleId' + end + end + + class SetupTag + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :stop_on_setup_failure, as: 'stopOnSetupFailure' + property :tag_name, as: 'tagName' + end + end + + class Tag + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :account_id, as: 'accountId' + collection :blocking_rule_id, as: 'blockingRuleId' + collection :blocking_trigger_id, as: 'blockingTriggerId' + property :container_id, as: 'containerId' + property :fingerprint, as: 'fingerprint' + collection :firing_rule_id, as: 'firingRuleId' + collection :firing_trigger_id, as: 'firingTriggerId' + property :live_only, as: 'liveOnly' + property :name, as: 'name' + property :notes, as: 'notes' + collection :parameter, as: 'parameter', class: Google::Apis::TagmanagerV1::Parameter, decorator: Google::Apis::TagmanagerV1::Parameter::Representation + + property :parent_folder_id, as: 'parentFolderId' + property :paused, as: 'paused' + property :priority, as: 'priority', class: Google::Apis::TagmanagerV1::Parameter, decorator: Google::Apis::TagmanagerV1::Parameter::Representation + + property :schedule_end_ms, :numeric_string => true, as: 'scheduleEndMs' + property :schedule_start_ms, :numeric_string => true, as: 'scheduleStartMs' + collection :setup_tag, as: 'setupTag', class: Google::Apis::TagmanagerV1::SetupTag, decorator: Google::Apis::TagmanagerV1::SetupTag::Representation + + property :tag_firing_option, as: 'tagFiringOption' + property :tag_id, as: 'tagId' + collection :teardown_tag, as: 'teardownTag', class: Google::Apis::TagmanagerV1::TeardownTag, decorator: Google::Apis::TagmanagerV1::TeardownTag::Representation + + property :type, as: 'type' + end + end + + class TeardownTag + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :stop_teardown_on_failure, as: 'stopTeardownOnFailure' + property :tag_name, as: 'tagName' + end + end + + class Trigger + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :account_id, as: 'accountId' + collection :auto_event_filter, as: 'autoEventFilter', class: Google::Apis::TagmanagerV1::Condition, decorator: Google::Apis::TagmanagerV1::Condition::Representation + + property :check_validation, as: 'checkValidation', class: Google::Apis::TagmanagerV1::Parameter, decorator: Google::Apis::TagmanagerV1::Parameter::Representation + + property :container_id, as: 'containerId' + property :continuous_time_min_milliseconds, as: 'continuousTimeMinMilliseconds', class: Google::Apis::TagmanagerV1::Parameter, decorator: Google::Apis::TagmanagerV1::Parameter::Representation + + collection :custom_event_filter, as: 'customEventFilter', class: Google::Apis::TagmanagerV1::Condition, decorator: Google::Apis::TagmanagerV1::Condition::Representation + + property :event_name, as: 'eventName', class: Google::Apis::TagmanagerV1::Parameter, decorator: Google::Apis::TagmanagerV1::Parameter::Representation + + collection :filter, as: 'filter', class: Google::Apis::TagmanagerV1::Condition, decorator: Google::Apis::TagmanagerV1::Condition::Representation + + property :fingerprint, as: 'fingerprint' + property :horizontal_scroll_percentage_list, as: 'horizontalScrollPercentageList', class: Google::Apis::TagmanagerV1::Parameter, decorator: Google::Apis::TagmanagerV1::Parameter::Representation + + property :interval, as: 'interval', class: Google::Apis::TagmanagerV1::Parameter, decorator: Google::Apis::TagmanagerV1::Parameter::Representation + + property :interval_seconds, as: 'intervalSeconds', class: Google::Apis::TagmanagerV1::Parameter, decorator: Google::Apis::TagmanagerV1::Parameter::Representation + + property :limit, as: 'limit', class: Google::Apis::TagmanagerV1::Parameter, decorator: Google::Apis::TagmanagerV1::Parameter::Representation + + property :max_timer_length_seconds, as: 'maxTimerLengthSeconds', class: Google::Apis::TagmanagerV1::Parameter, decorator: Google::Apis::TagmanagerV1::Parameter::Representation + + property :name, as: 'name' + collection :parameter, as: 'parameter', class: Google::Apis::TagmanagerV1::Parameter, decorator: Google::Apis::TagmanagerV1::Parameter::Representation + + property :parent_folder_id, as: 'parentFolderId' + property :selector, as: 'selector', class: Google::Apis::TagmanagerV1::Parameter, decorator: Google::Apis::TagmanagerV1::Parameter::Representation + + property :total_time_min_milliseconds, as: 'totalTimeMinMilliseconds', class: Google::Apis::TagmanagerV1::Parameter, decorator: Google::Apis::TagmanagerV1::Parameter::Representation + + property :trigger_id, as: 'triggerId' + property :type, as: 'type' + property :unique_trigger_id, as: 'uniqueTriggerId', class: Google::Apis::TagmanagerV1::Parameter, decorator: Google::Apis::TagmanagerV1::Parameter::Representation + + property :vertical_scroll_percentage_list, as: 'verticalScrollPercentageList', class: Google::Apis::TagmanagerV1::Parameter, decorator: Google::Apis::TagmanagerV1::Parameter::Representation + + property :visibility_selector, as: 'visibilitySelector', class: Google::Apis::TagmanagerV1::Parameter, decorator: Google::Apis::TagmanagerV1::Parameter::Representation + + property :visible_percentage_max, as: 'visiblePercentageMax', class: Google::Apis::TagmanagerV1::Parameter, decorator: Google::Apis::TagmanagerV1::Parameter::Representation + + property :visible_percentage_min, as: 'visiblePercentageMin', class: Google::Apis::TagmanagerV1::Parameter, decorator: Google::Apis::TagmanagerV1::Parameter::Representation + + property :wait_for_tags, as: 'waitForTags', class: Google::Apis::TagmanagerV1::Parameter, decorator: Google::Apis::TagmanagerV1::Parameter::Representation + + property :wait_for_tags_timeout, as: 'waitForTagsTimeout', class: Google::Apis::TagmanagerV1::Parameter, decorator: Google::Apis::TagmanagerV1::Parameter::Representation + + end + end + + class UserAccess + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :account_access, as: 'accountAccess', class: Google::Apis::TagmanagerV1::AccountAccess, decorator: Google::Apis::TagmanagerV1::AccountAccess::Representation + + property :account_id, as: 'accountId' + collection :container_access, as: 'containerAccess', class: Google::Apis::TagmanagerV1::ContainerAccess, decorator: Google::Apis::TagmanagerV1::ContainerAccess::Representation + + property :email_address, as: 'emailAddress' + property :permission_id, as: 'permissionId' + end + end + + class Variable + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :account_id, as: 'accountId' + property :container_id, as: 'containerId' + collection :disabling_trigger_id, as: 'disablingTriggerId' + collection :enabling_trigger_id, as: 'enablingTriggerId' + property :fingerprint, as: 'fingerprint' + property :name, as: 'name' + property :notes, as: 'notes' + collection :parameter, as: 'parameter', class: Google::Apis::TagmanagerV1::Parameter, decorator: Google::Apis::TagmanagerV1::Parameter::Representation + + property :parent_folder_id, as: 'parentFolderId' + property :schedule_end_ms, :numeric_string => true, as: 'scheduleEndMs' + property :schedule_start_ms, :numeric_string => true, as: 'scheduleStartMs' + property :type, as: 'type' + property :variable_id, as: 'variableId' + end + end + end + end +end diff --git a/generated/google/apis/tagmanager_v1/service.rb b/generated/google/apis/tagmanager_v1/service.rb new file mode 100644 index 000000000..4cb70aaaf --- /dev/null +++ b/generated/google/apis/tagmanager_v1/service.rb @@ -0,0 +1,1820 @@ +# Copyright 2015 Google Inc. +# +# 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. + +require 'google/apis/core/base_service' +require 'google/apis/core/json_representation' +require 'google/apis/core/hashable' +require 'google/apis/errors' + +module Google + module Apis + module TagmanagerV1 + # Tag Manager API + # + # This API allows clients to access and modify container and tag configuration. + # + # @example + # require 'google/apis/tagmanager_v1' + # + # Tagmanager = Google::Apis::TagmanagerV1 # Alias the module + # service = Tagmanager::TagManagerService.new + # + # @see https://developers.google.com/tag-manager + class TagManagerService < Google::Apis::Core::BaseService + # @return [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. + attr_accessor :key + + # @return [String] + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + attr_accessor :quota_user + + def initialize + super('https://tagmanager.googleapis.com/', '') + @batch_path = 'batch' + end + + # Gets a GTM Account. + # @param [String] account_id + # The GTM Account ID. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV1::Account] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV1::Account] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_account(account_id, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'tagmanager/v1/accounts/{accountId}', options) + command.response_representation = Google::Apis::TagmanagerV1::Account::Representation + command.response_class = Google::Apis::TagmanagerV1::Account + command.params['accountId'] = account_id unless account_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists all GTM Accounts that a user has access to. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV1::ListAccountsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV1::ListAccountsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_accounts(fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'tagmanager/v1/accounts', options) + command.response_representation = Google::Apis::TagmanagerV1::ListAccountsResponse::Representation + command.response_class = Google::Apis::TagmanagerV1::ListAccountsResponse + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Updates a GTM Account. + # @param [String] account_id + # The GTM Account ID. + # @param [Google::Apis::TagmanagerV1::Account] account_object + # @param [String] fingerprint + # When provided, this fingerprint must match the fingerprint of the account in + # storage. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV1::Account] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV1::Account] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def update_account(account_id, account_object = nil, fingerprint: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:put, 'tagmanager/v1/accounts/{accountId}', options) + command.request_representation = Google::Apis::TagmanagerV1::Account::Representation + command.request_object = account_object + command.response_representation = Google::Apis::TagmanagerV1::Account::Representation + command.response_class = Google::Apis::TagmanagerV1::Account + command.params['accountId'] = account_id unless account_id.nil? + command.query['fingerprint'] = fingerprint unless fingerprint.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates a Container. + # @param [String] account_id + # The GTM Account ID. + # @param [Google::Apis::TagmanagerV1::Container] container_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV1::Container] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV1::Container] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_container(account_id, container_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'tagmanager/v1/accounts/{accountId}/containers', options) + command.request_representation = Google::Apis::TagmanagerV1::Container::Representation + command.request_object = container_object + command.response_representation = Google::Apis::TagmanagerV1::Container::Representation + command.response_class = Google::Apis::TagmanagerV1::Container + command.params['accountId'] = account_id unless account_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a Container. + # @param [String] account_id + # The GTM Account ID. + # @param [String] container_id + # The GTM Container ID. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [NilClass] No result returned for this method + # @yieldparam err [StandardError] error object if request failed + # + # @return [void] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_container(account_id, container_id, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}', options) + command.params['accountId'] = account_id unless account_id.nil? + command.params['containerId'] = container_id unless container_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets a Container. + # @param [String] account_id + # The GTM Account ID. + # @param [String] container_id + # The GTM Container ID. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV1::Container] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV1::Container] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_container(account_id, container_id, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}', options) + command.response_representation = Google::Apis::TagmanagerV1::Container::Representation + command.response_class = Google::Apis::TagmanagerV1::Container + command.params['accountId'] = account_id unless account_id.nil? + command.params['containerId'] = container_id unless container_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists all Containers that belongs to a GTM Account. + # @param [String] account_id + # The GTM Account ID. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV1::ListContainersResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV1::ListContainersResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_containers(account_id, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'tagmanager/v1/accounts/{accountId}/containers', options) + command.response_representation = Google::Apis::TagmanagerV1::ListContainersResponse::Representation + command.response_class = Google::Apis::TagmanagerV1::ListContainersResponse + command.params['accountId'] = account_id unless account_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Updates a Container. + # @param [String] account_id + # The GTM Account ID. + # @param [String] container_id + # The GTM Container ID. + # @param [Google::Apis::TagmanagerV1::Container] container_object + # @param [String] fingerprint + # When provided, this fingerprint must match the fingerprint of the container in + # storage. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV1::Container] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV1::Container] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def update_container(account_id, container_id, container_object = nil, fingerprint: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:put, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}', options) + command.request_representation = Google::Apis::TagmanagerV1::Container::Representation + command.request_object = container_object + command.response_representation = Google::Apis::TagmanagerV1::Container::Representation + command.response_class = Google::Apis::TagmanagerV1::Container + command.params['accountId'] = account_id unless account_id.nil? + command.params['containerId'] = container_id unless container_id.nil? + command.query['fingerprint'] = fingerprint unless fingerprint.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates a GTM Environment. + # @param [String] account_id + # The GTM Account ID. + # @param [String] container_id + # The GTM Container ID. + # @param [Google::Apis::TagmanagerV1::Environment] environment_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV1::Environment] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV1::Environment] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_account_container_environment(account_id, container_id, environment_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/environments', options) + command.request_representation = Google::Apis::TagmanagerV1::Environment::Representation + command.request_object = environment_object + command.response_representation = Google::Apis::TagmanagerV1::Environment::Representation + command.response_class = Google::Apis::TagmanagerV1::Environment + command.params['accountId'] = account_id unless account_id.nil? + command.params['containerId'] = container_id unless container_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a GTM Environment. + # @param [String] account_id + # The GTM Account ID. + # @param [String] container_id + # The GTM Container ID. + # @param [String] environment_id + # The GTM Environment ID. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [NilClass] No result returned for this method + # @yieldparam err [StandardError] error object if request failed + # + # @return [void] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_account_container_environment(account_id, container_id, environment_id, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/environments/{environmentId}', options) + command.params['accountId'] = account_id unless account_id.nil? + command.params['containerId'] = container_id unless container_id.nil? + command.params['environmentId'] = environment_id unless environment_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets a GTM Environment. + # @param [String] account_id + # The GTM Account ID. + # @param [String] container_id + # The GTM Container ID. + # @param [String] environment_id + # The GTM Environment ID. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV1::Environment] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV1::Environment] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_account_container_environment(account_id, container_id, environment_id, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/environments/{environmentId}', options) + command.response_representation = Google::Apis::TagmanagerV1::Environment::Representation + command.response_class = Google::Apis::TagmanagerV1::Environment + command.params['accountId'] = account_id unless account_id.nil? + command.params['containerId'] = container_id unless container_id.nil? + command.params['environmentId'] = environment_id unless environment_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists all GTM Environments of a GTM Container. + # @param [String] account_id + # The GTM Account ID. + # @param [String] container_id + # The GTM Container ID. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV1::ListEnvironmentsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV1::ListEnvironmentsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_account_container_environments(account_id, container_id, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/environments', options) + command.response_representation = Google::Apis::TagmanagerV1::ListEnvironmentsResponse::Representation + command.response_class = Google::Apis::TagmanagerV1::ListEnvironmentsResponse + command.params['accountId'] = account_id unless account_id.nil? + command.params['containerId'] = container_id unless container_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Updates a GTM Environment. + # @param [String] account_id + # The GTM Account ID. + # @param [String] container_id + # The GTM Container ID. + # @param [String] environment_id + # The GTM Environment ID. + # @param [Google::Apis::TagmanagerV1::Environment] environment_object + # @param [String] fingerprint + # When provided, this fingerprint must match the fingerprint of the environment + # in storage. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV1::Environment] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV1::Environment] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def update_account_container_environment(account_id, container_id, environment_id, environment_object = nil, fingerprint: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:put, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/environments/{environmentId}', options) + command.request_representation = Google::Apis::TagmanagerV1::Environment::Representation + command.request_object = environment_object + command.response_representation = Google::Apis::TagmanagerV1::Environment::Representation + command.response_class = Google::Apis::TagmanagerV1::Environment + command.params['accountId'] = account_id unless account_id.nil? + command.params['containerId'] = container_id unless container_id.nil? + command.params['environmentId'] = environment_id unless environment_id.nil? + command.query['fingerprint'] = fingerprint unless fingerprint.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates a GTM Folder. + # @param [String] account_id + # The GTM Account ID. + # @param [String] container_id + # The GTM Container ID. + # @param [Google::Apis::TagmanagerV1::Folder] folder_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV1::Folder] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV1::Folder] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_account_container_folder(account_id, container_id, folder_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/folders', options) + command.request_representation = Google::Apis::TagmanagerV1::Folder::Representation + command.request_object = folder_object + command.response_representation = Google::Apis::TagmanagerV1::Folder::Representation + command.response_class = Google::Apis::TagmanagerV1::Folder + command.params['accountId'] = account_id unless account_id.nil? + command.params['containerId'] = container_id unless container_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a GTM Folder. + # @param [String] account_id + # The GTM Account ID. + # @param [String] container_id + # The GTM Container ID. + # @param [String] folder_id + # The GTM Folder ID. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [NilClass] No result returned for this method + # @yieldparam err [StandardError] error object if request failed + # + # @return [void] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_account_container_folder(account_id, container_id, folder_id, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/folders/{folderId}', options) + command.params['accountId'] = account_id unless account_id.nil? + command.params['containerId'] = container_id unless container_id.nil? + command.params['folderId'] = folder_id unless folder_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets a GTM Folder. + # @param [String] account_id + # The GTM Account ID. + # @param [String] container_id + # The GTM Container ID. + # @param [String] folder_id + # The GTM Folder ID. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV1::Folder] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV1::Folder] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_account_container_folder(account_id, container_id, folder_id, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/folders/{folderId}', options) + command.response_representation = Google::Apis::TagmanagerV1::Folder::Representation + command.response_class = Google::Apis::TagmanagerV1::Folder + command.params['accountId'] = account_id unless account_id.nil? + command.params['containerId'] = container_id unless container_id.nil? + command.params['folderId'] = folder_id unless folder_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists all GTM Folders of a Container. + # @param [String] account_id + # The GTM Account ID. + # @param [String] container_id + # The GTM Container ID. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV1::ListFoldersResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV1::ListFoldersResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_account_container_folders(account_id, container_id, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/folders', options) + command.response_representation = Google::Apis::TagmanagerV1::ListFoldersResponse::Representation + command.response_class = Google::Apis::TagmanagerV1::ListFoldersResponse + command.params['accountId'] = account_id unless account_id.nil? + command.params['containerId'] = container_id unless container_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Updates a GTM Folder. + # @param [String] account_id + # The GTM Account ID. + # @param [String] container_id + # The GTM Container ID. + # @param [String] folder_id + # The GTM Folder ID. + # @param [Google::Apis::TagmanagerV1::Folder] folder_object + # @param [String] fingerprint + # When provided, this fingerprint must match the fingerprint of the folder in + # storage. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV1::Folder] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV1::Folder] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def update_account_container_folder(account_id, container_id, folder_id, folder_object = nil, fingerprint: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:put, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/folders/{folderId}', options) + command.request_representation = Google::Apis::TagmanagerV1::Folder::Representation + command.request_object = folder_object + command.response_representation = Google::Apis::TagmanagerV1::Folder::Representation + command.response_class = Google::Apis::TagmanagerV1::Folder + command.params['accountId'] = account_id unless account_id.nil? + command.params['containerId'] = container_id unless container_id.nil? + command.params['folderId'] = folder_id unless folder_id.nil? + command.query['fingerprint'] = fingerprint unless fingerprint.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # List all entities in a GTM Folder. + # @param [String] account_id + # The GTM Account ID. + # @param [String] container_id + # The GTM Container ID. + # @param [String] folder_id + # The GTM Folder ID. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV1::FolderEntities] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV1::FolderEntities] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_account_container_folder_entities(account_id, container_id, folder_id, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/folders/{folderId}/entities', options) + command.response_representation = Google::Apis::TagmanagerV1::FolderEntities::Representation + command.response_class = Google::Apis::TagmanagerV1::FolderEntities + command.params['accountId'] = account_id unless account_id.nil? + command.params['containerId'] = container_id unless container_id.nil? + command.params['folderId'] = folder_id unless folder_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Moves entities to a GTM Folder. + # @param [String] account_id + # The GTM Account ID. + # @param [String] container_id + # The GTM Container ID. + # @param [String] folder_id + # The GTM Folder ID. + # @param [Google::Apis::TagmanagerV1::Folder] folder_object + # @param [Array, String] tag_id + # The tags to be moved to the folder. + # @param [Array, String] trigger_id + # The triggers to be moved to the folder. + # @param [Array, String] variable_id + # The variables to be moved to the folder. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [NilClass] No result returned for this method + # @yieldparam err [StandardError] error object if request failed + # + # @return [void] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def update_account_container_move_folder(account_id, container_id, folder_id, folder_object = nil, tag_id: nil, trigger_id: nil, variable_id: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:put, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/move_folders/{folderId}', options) + command.request_representation = Google::Apis::TagmanagerV1::Folder::Representation + command.request_object = folder_object + command.params['accountId'] = account_id unless account_id.nil? + command.params['containerId'] = container_id unless container_id.nil? + command.params['folderId'] = folder_id unless folder_id.nil? + command.query['tagId'] = tag_id unless tag_id.nil? + command.query['triggerId'] = trigger_id unless trigger_id.nil? + command.query['variableId'] = variable_id unless variable_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Re-generates the authorization code for a GTM Environment. + # @param [String] account_id + # The GTM Account ID. + # @param [String] container_id + # The GTM Container ID. + # @param [String] environment_id + # The GTM Environment ID. + # @param [Google::Apis::TagmanagerV1::Environment] environment_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV1::Environment] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV1::Environment] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def update_account_container_reauthorize_environment(account_id, container_id, environment_id, environment_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:put, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/reauthorize_environments/{environmentId}', options) + command.request_representation = Google::Apis::TagmanagerV1::Environment::Representation + command.request_object = environment_object + command.response_representation = Google::Apis::TagmanagerV1::Environment::Representation + command.response_class = Google::Apis::TagmanagerV1::Environment + command.params['accountId'] = account_id unless account_id.nil? + command.params['containerId'] = container_id unless container_id.nil? + command.params['environmentId'] = environment_id unless environment_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates a GTM Tag. + # @param [String] account_id + # The GTM Account ID. + # @param [String] container_id + # The GTM Container ID. + # @param [Google::Apis::TagmanagerV1::Tag] tag_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV1::Tag] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV1::Tag] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_tag(account_id, container_id, tag_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/tags', options) + command.request_representation = Google::Apis::TagmanagerV1::Tag::Representation + command.request_object = tag_object + command.response_representation = Google::Apis::TagmanagerV1::Tag::Representation + command.response_class = Google::Apis::TagmanagerV1::Tag + command.params['accountId'] = account_id unless account_id.nil? + command.params['containerId'] = container_id unless container_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a GTM Tag. + # @param [String] account_id + # The GTM Account ID. + # @param [String] container_id + # The GTM Container ID. + # @param [String] tag_id + # The GTM Tag ID. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [NilClass] No result returned for this method + # @yieldparam err [StandardError] error object if request failed + # + # @return [void] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_tag(account_id, container_id, tag_id, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/tags/{tagId}', options) + command.params['accountId'] = account_id unless account_id.nil? + command.params['containerId'] = container_id unless container_id.nil? + command.params['tagId'] = tag_id unless tag_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets a GTM Tag. + # @param [String] account_id + # The GTM Account ID. + # @param [String] container_id + # The GTM Container ID. + # @param [String] tag_id + # The GTM Tag ID. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV1::Tag] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV1::Tag] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_tag(account_id, container_id, tag_id, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/tags/{tagId}', options) + command.response_representation = Google::Apis::TagmanagerV1::Tag::Representation + command.response_class = Google::Apis::TagmanagerV1::Tag + command.params['accountId'] = account_id unless account_id.nil? + command.params['containerId'] = container_id unless container_id.nil? + command.params['tagId'] = tag_id unless tag_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists all GTM Tags of a Container. + # @param [String] account_id + # The GTM Account ID. + # @param [String] container_id + # The GTM Container ID. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV1::ListTagsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV1::ListTagsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_tags(account_id, container_id, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/tags', options) + command.response_representation = Google::Apis::TagmanagerV1::ListTagsResponse::Representation + command.response_class = Google::Apis::TagmanagerV1::ListTagsResponse + command.params['accountId'] = account_id unless account_id.nil? + command.params['containerId'] = container_id unless container_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Updates a GTM Tag. + # @param [String] account_id + # The GTM Account ID. + # @param [String] container_id + # The GTM Container ID. + # @param [String] tag_id + # The GTM Tag ID. + # @param [Google::Apis::TagmanagerV1::Tag] tag_object + # @param [String] fingerprint + # When provided, this fingerprint must match the fingerprint of the tag in + # storage. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV1::Tag] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV1::Tag] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def update_tag(account_id, container_id, tag_id, tag_object = nil, fingerprint: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:put, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/tags/{tagId}', options) + command.request_representation = Google::Apis::TagmanagerV1::Tag::Representation + command.request_object = tag_object + command.response_representation = Google::Apis::TagmanagerV1::Tag::Representation + command.response_class = Google::Apis::TagmanagerV1::Tag + command.params['accountId'] = account_id unless account_id.nil? + command.params['containerId'] = container_id unless container_id.nil? + command.params['tagId'] = tag_id unless tag_id.nil? + command.query['fingerprint'] = fingerprint unless fingerprint.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates a GTM Trigger. + # @param [String] account_id + # The GTM Account ID. + # @param [String] container_id + # The GTM Container ID. + # @param [Google::Apis::TagmanagerV1::Trigger] trigger_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV1::Trigger] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV1::Trigger] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_trigger(account_id, container_id, trigger_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/triggers', options) + command.request_representation = Google::Apis::TagmanagerV1::Trigger::Representation + command.request_object = trigger_object + command.response_representation = Google::Apis::TagmanagerV1::Trigger::Representation + command.response_class = Google::Apis::TagmanagerV1::Trigger + command.params['accountId'] = account_id unless account_id.nil? + command.params['containerId'] = container_id unless container_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a GTM Trigger. + # @param [String] account_id + # The GTM Account ID. + # @param [String] container_id + # The GTM Container ID. + # @param [String] trigger_id + # The GTM Trigger ID. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [NilClass] No result returned for this method + # @yieldparam err [StandardError] error object if request failed + # + # @return [void] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_trigger(account_id, container_id, trigger_id, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/triggers/{triggerId}', options) + command.params['accountId'] = account_id unless account_id.nil? + command.params['containerId'] = container_id unless container_id.nil? + command.params['triggerId'] = trigger_id unless trigger_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets a GTM Trigger. + # @param [String] account_id + # The GTM Account ID. + # @param [String] container_id + # The GTM Container ID. + # @param [String] trigger_id + # The GTM Trigger ID. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV1::Trigger] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV1::Trigger] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_trigger(account_id, container_id, trigger_id, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/triggers/{triggerId}', options) + command.response_representation = Google::Apis::TagmanagerV1::Trigger::Representation + command.response_class = Google::Apis::TagmanagerV1::Trigger + command.params['accountId'] = account_id unless account_id.nil? + command.params['containerId'] = container_id unless container_id.nil? + command.params['triggerId'] = trigger_id unless trigger_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists all GTM Triggers of a Container. + # @param [String] account_id + # The GTM Account ID. + # @param [String] container_id + # The GTM Container ID. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV1::ListTriggersResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV1::ListTriggersResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_triggers(account_id, container_id, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/triggers', options) + command.response_representation = Google::Apis::TagmanagerV1::ListTriggersResponse::Representation + command.response_class = Google::Apis::TagmanagerV1::ListTriggersResponse + command.params['accountId'] = account_id unless account_id.nil? + command.params['containerId'] = container_id unless container_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Updates a GTM Trigger. + # @param [String] account_id + # The GTM Account ID. + # @param [String] container_id + # The GTM Container ID. + # @param [String] trigger_id + # The GTM Trigger ID. + # @param [Google::Apis::TagmanagerV1::Trigger] trigger_object + # @param [String] fingerprint + # When provided, this fingerprint must match the fingerprint of the trigger in + # storage. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV1::Trigger] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV1::Trigger] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def update_trigger(account_id, container_id, trigger_id, trigger_object = nil, fingerprint: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:put, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/triggers/{triggerId}', options) + command.request_representation = Google::Apis::TagmanagerV1::Trigger::Representation + command.request_object = trigger_object + command.response_representation = Google::Apis::TagmanagerV1::Trigger::Representation + command.response_class = Google::Apis::TagmanagerV1::Trigger + command.params['accountId'] = account_id unless account_id.nil? + command.params['containerId'] = container_id unless container_id.nil? + command.params['triggerId'] = trigger_id unless trigger_id.nil? + command.query['fingerprint'] = fingerprint unless fingerprint.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates a GTM Variable. + # @param [String] account_id + # The GTM Account ID. + # @param [String] container_id + # The GTM Container ID. + # @param [Google::Apis::TagmanagerV1::Variable] variable_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV1::Variable] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV1::Variable] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_variable(account_id, container_id, variable_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/variables', options) + command.request_representation = Google::Apis::TagmanagerV1::Variable::Representation + command.request_object = variable_object + command.response_representation = Google::Apis::TagmanagerV1::Variable::Representation + command.response_class = Google::Apis::TagmanagerV1::Variable + command.params['accountId'] = account_id unless account_id.nil? + command.params['containerId'] = container_id unless container_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a GTM Variable. + # @param [String] account_id + # The GTM Account ID. + # @param [String] container_id + # The GTM Container ID. + # @param [String] variable_id + # The GTM Variable ID. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [NilClass] No result returned for this method + # @yieldparam err [StandardError] error object if request failed + # + # @return [void] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_variable(account_id, container_id, variable_id, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/variables/{variableId}', options) + command.params['accountId'] = account_id unless account_id.nil? + command.params['containerId'] = container_id unless container_id.nil? + command.params['variableId'] = variable_id unless variable_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets a GTM Variable. + # @param [String] account_id + # The GTM Account ID. + # @param [String] container_id + # The GTM Container ID. + # @param [String] variable_id + # The GTM Variable ID. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV1::Variable] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV1::Variable] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_variable(account_id, container_id, variable_id, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/variables/{variableId}', options) + command.response_representation = Google::Apis::TagmanagerV1::Variable::Representation + command.response_class = Google::Apis::TagmanagerV1::Variable + command.params['accountId'] = account_id unless account_id.nil? + command.params['containerId'] = container_id unless container_id.nil? + command.params['variableId'] = variable_id unless variable_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists all GTM Variables of a Container. + # @param [String] account_id + # The GTM Account ID. + # @param [String] container_id + # The GTM Container ID. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV1::ListVariablesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV1::ListVariablesResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_variables(account_id, container_id, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/variables', options) + command.response_representation = Google::Apis::TagmanagerV1::ListVariablesResponse::Representation + command.response_class = Google::Apis::TagmanagerV1::ListVariablesResponse + command.params['accountId'] = account_id unless account_id.nil? + command.params['containerId'] = container_id unless container_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Updates a GTM Variable. + # @param [String] account_id + # The GTM Account ID. + # @param [String] container_id + # The GTM Container ID. + # @param [String] variable_id + # The GTM Variable ID. + # @param [Google::Apis::TagmanagerV1::Variable] variable_object + # @param [String] fingerprint + # When provided, this fingerprint must match the fingerprint of the variable in + # storage. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV1::Variable] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV1::Variable] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def update_variable(account_id, container_id, variable_id, variable_object = nil, fingerprint: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:put, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/variables/{variableId}', options) + command.request_representation = Google::Apis::TagmanagerV1::Variable::Representation + command.request_object = variable_object + command.response_representation = Google::Apis::TagmanagerV1::Variable::Representation + command.response_class = Google::Apis::TagmanagerV1::Variable + command.params['accountId'] = account_id unless account_id.nil? + command.params['containerId'] = container_id unless container_id.nil? + command.params['variableId'] = variable_id unless variable_id.nil? + command.query['fingerprint'] = fingerprint unless fingerprint.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates a Container Version. + # @param [String] account_id + # The GTM Account ID. + # @param [String] container_id + # The GTM Container ID. + # @param [Google::Apis::TagmanagerV1::CreateContainerVersionRequestVersionOptions] create_container_version_request_version_options_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV1::CreateContainerVersionResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV1::CreateContainerVersionResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_version(account_id, container_id, create_container_version_request_version_options_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/versions', options) + command.request_representation = Google::Apis::TagmanagerV1::CreateContainerVersionRequestVersionOptions::Representation + command.request_object = create_container_version_request_version_options_object + command.response_representation = Google::Apis::TagmanagerV1::CreateContainerVersionResponse::Representation + command.response_class = Google::Apis::TagmanagerV1::CreateContainerVersionResponse + command.params['accountId'] = account_id unless account_id.nil? + command.params['containerId'] = container_id unless container_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a Container Version. + # @param [String] account_id + # The GTM Account ID. + # @param [String] container_id + # The GTM Container ID. + # @param [String] container_version_id + # The GTM Container Version ID. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [NilClass] No result returned for this method + # @yieldparam err [StandardError] error object if request failed + # + # @return [void] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_version(account_id, container_id, container_version_id, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/versions/{containerVersionId}', options) + command.params['accountId'] = account_id unless account_id.nil? + command.params['containerId'] = container_id unless container_id.nil? + command.params['containerVersionId'] = container_version_id unless container_version_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets a Container Version. + # @param [String] account_id + # The GTM Account ID. + # @param [String] container_id + # The GTM Container ID. + # @param [String] container_version_id + # The GTM Container Version ID. Specify published to retrieve the currently + # published version. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV1::ContainerVersion] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV1::ContainerVersion] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_version(account_id, container_id, container_version_id, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/versions/{containerVersionId}', options) + command.response_representation = Google::Apis::TagmanagerV1::ContainerVersion::Representation + command.response_class = Google::Apis::TagmanagerV1::ContainerVersion + command.params['accountId'] = account_id unless account_id.nil? + command.params['containerId'] = container_id unless container_id.nil? + command.params['containerVersionId'] = container_version_id unless container_version_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists all Container Versions of a GTM Container. + # @param [String] account_id + # The GTM Account ID. + # @param [String] container_id + # The GTM Container ID. + # @param [Boolean] headers + # Retrieve headers only when true. + # @param [Boolean] include_deleted + # Also retrieve deleted (archived) versions when true. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV1::ListContainerVersionsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV1::ListContainerVersionsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_versions(account_id, container_id, headers: nil, include_deleted: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/versions', options) + command.response_representation = Google::Apis::TagmanagerV1::ListContainerVersionsResponse::Representation + command.response_class = Google::Apis::TagmanagerV1::ListContainerVersionsResponse + command.params['accountId'] = account_id unless account_id.nil? + command.params['containerId'] = container_id unless container_id.nil? + command.query['headers'] = headers unless headers.nil? + command.query['includeDeleted'] = include_deleted unless include_deleted.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Publishes a Container Version. + # @param [String] account_id + # The GTM Account ID. + # @param [String] container_id + # The GTM Container ID. + # @param [String] container_version_id + # The GTM Container Version ID. + # @param [String] fingerprint + # When provided, this fingerprint must match the fingerprint of the container + # version in storage. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV1::PublishContainerVersionResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV1::PublishContainerVersionResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def publish_version(account_id, container_id, container_version_id, fingerprint: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/versions/{containerVersionId}/publish', options) + command.response_representation = Google::Apis::TagmanagerV1::PublishContainerVersionResponse::Representation + command.response_class = Google::Apis::TagmanagerV1::PublishContainerVersionResponse + command.params['accountId'] = account_id unless account_id.nil? + command.params['containerId'] = container_id unless container_id.nil? + command.params['containerVersionId'] = container_version_id unless container_version_id.nil? + command.query['fingerprint'] = fingerprint unless fingerprint.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Restores a Container Version. This will overwrite the container's current + # configuration (including its variables, triggers and tags). The operation will + # not have any effect on the version that is being served (i.e. the published + # version). + # @param [String] account_id + # The GTM Account ID. + # @param [String] container_id + # The GTM Container ID. + # @param [String] container_version_id + # The GTM Container Version ID. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV1::ContainerVersion] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV1::ContainerVersion] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def restore_version(account_id, container_id, container_version_id, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/versions/{containerVersionId}/restore', options) + command.response_representation = Google::Apis::TagmanagerV1::ContainerVersion::Representation + command.response_class = Google::Apis::TagmanagerV1::ContainerVersion + command.params['accountId'] = account_id unless account_id.nil? + command.params['containerId'] = container_id unless container_id.nil? + command.params['containerVersionId'] = container_version_id unless container_version_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Undeletes a Container Version. + # @param [String] account_id + # The GTM Account ID. + # @param [String] container_id + # The GTM Container ID. + # @param [String] container_version_id + # The GTM Container Version ID. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV1::ContainerVersion] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV1::ContainerVersion] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def undelete_version(account_id, container_id, container_version_id, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/versions/{containerVersionId}/undelete', options) + command.response_representation = Google::Apis::TagmanagerV1::ContainerVersion::Representation + command.response_class = Google::Apis::TagmanagerV1::ContainerVersion + command.params['accountId'] = account_id unless account_id.nil? + command.params['containerId'] = container_id unless container_id.nil? + command.params['containerVersionId'] = container_version_id unless container_version_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Updates a Container Version. + # @param [String] account_id + # The GTM Account ID. + # @param [String] container_id + # The GTM Container ID. + # @param [String] container_version_id + # The GTM Container Version ID. + # @param [Google::Apis::TagmanagerV1::ContainerVersion] container_version_object + # @param [String] fingerprint + # When provided, this fingerprint must match the fingerprint of the container + # version in storage. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV1::ContainerVersion] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV1::ContainerVersion] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def update_version(account_id, container_id, container_version_id, container_version_object = nil, fingerprint: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:put, 'tagmanager/v1/accounts/{accountId}/containers/{containerId}/versions/{containerVersionId}', options) + command.request_representation = Google::Apis::TagmanagerV1::ContainerVersion::Representation + command.request_object = container_version_object + command.response_representation = Google::Apis::TagmanagerV1::ContainerVersion::Representation + command.response_class = Google::Apis::TagmanagerV1::ContainerVersion + command.params['accountId'] = account_id unless account_id.nil? + command.params['containerId'] = container_id unless container_id.nil? + command.params['containerVersionId'] = container_version_id unless container_version_id.nil? + command.query['fingerprint'] = fingerprint unless fingerprint.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates a user's Account & Container Permissions. + # @param [String] account_id + # The GTM Account ID. + # @param [Google::Apis::TagmanagerV1::UserAccess] user_access_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV1::UserAccess] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV1::UserAccess] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_permission(account_id, user_access_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'tagmanager/v1/accounts/{accountId}/permissions', options) + command.request_representation = Google::Apis::TagmanagerV1::UserAccess::Representation + command.request_object = user_access_object + command.response_representation = Google::Apis::TagmanagerV1::UserAccess::Representation + command.response_class = Google::Apis::TagmanagerV1::UserAccess + command.params['accountId'] = account_id unless account_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Removes a user from the account, revoking access to it and all of its + # containers. + # @param [String] account_id + # The GTM Account ID. + # @param [String] permission_id + # The GTM User ID. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [NilClass] No result returned for this method + # @yieldparam err [StandardError] error object if request failed + # + # @return [void] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_permission(account_id, permission_id, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'tagmanager/v1/accounts/{accountId}/permissions/{permissionId}', options) + command.params['accountId'] = account_id unless account_id.nil? + command.params['permissionId'] = permission_id unless permission_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets a user's Account & Container Permissions. + # @param [String] account_id + # The GTM Account ID. + # @param [String] permission_id + # The GTM User ID. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV1::UserAccess] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV1::UserAccess] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_permission(account_id, permission_id, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'tagmanager/v1/accounts/{accountId}/permissions/{permissionId}', options) + command.response_representation = Google::Apis::TagmanagerV1::UserAccess::Representation + command.response_class = Google::Apis::TagmanagerV1::UserAccess + command.params['accountId'] = account_id unless account_id.nil? + command.params['permissionId'] = permission_id unless permission_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # List all users that have access to the account along with Account and + # Container Permissions granted to each of them. + # @param [String] account_id + # The GTM Account ID. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV1::ListAccountUsersResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV1::ListAccountUsersResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_permissions(account_id, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'tagmanager/v1/accounts/{accountId}/permissions', options) + command.response_representation = Google::Apis::TagmanagerV1::ListAccountUsersResponse::Representation + command.response_class = Google::Apis::TagmanagerV1::ListAccountUsersResponse + command.params['accountId'] = account_id unless account_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Updates a user's Account & Container Permissions. + # @param [String] account_id + # The GTM Account ID. + # @param [String] permission_id + # The GTM User ID. + # @param [Google::Apis::TagmanagerV1::UserAccess] user_access_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV1::UserAccess] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV1::UserAccess] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def update_permission(account_id, permission_id, user_access_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:put, 'tagmanager/v1/accounts/{accountId}/permissions/{permissionId}', options) + command.request_representation = Google::Apis::TagmanagerV1::UserAccess::Representation + command.request_object = user_access_object + command.response_representation = Google::Apis::TagmanagerV1::UserAccess::Representation + command.response_class = Google::Apis::TagmanagerV1::UserAccess + command.params['accountId'] = account_id unless account_id.nil? + command.params['permissionId'] = permission_id unless permission_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + protected + + def apply_command_defaults(command) + command.query['key'] = key unless key.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + end + end + end + end +end diff --git a/generated/google/apis/tagmanager_v2.rb b/generated/google/apis/tagmanager_v2.rb new file mode 100644 index 000000000..6c0926b64 --- /dev/null +++ b/generated/google/apis/tagmanager_v2.rb @@ -0,0 +1,52 @@ +# Copyright 2015 Google Inc. +# +# 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. + +require 'google/apis/tagmanager_v2/service.rb' +require 'google/apis/tagmanager_v2/classes.rb' +require 'google/apis/tagmanager_v2/representations.rb' + +module Google + module Apis + # Tag Manager API + # + # This API allows clients to access and modify container and tag configuration. + # + # @see https://developers.google.com/tag-manager + module TagmanagerV2 + VERSION = 'V2' + REVISION = '20200826' + + # Delete your Google Tag Manager containers + AUTH_TAGMANAGER_DELETE_CONTAINERS = 'https://www.googleapis.com/auth/tagmanager.delete.containers' + + # Manage your Google Tag Manager container and its subcomponents, excluding versioning and publishing + AUTH_TAGMANAGER_EDIT_CONTAINERS = 'https://www.googleapis.com/auth/tagmanager.edit.containers' + + # Manage your Google Tag Manager container versions + AUTH_TAGMANAGER_EDIT_CONTAINERVERSIONS = 'https://www.googleapis.com/auth/tagmanager.edit.containerversions' + + # View and manage your Google Tag Manager accounts + AUTH_TAGMANAGER_MANAGE_ACCOUNTS = 'https://www.googleapis.com/auth/tagmanager.manage.accounts' + + # Manage user permissions of your Google Tag Manager account and container + AUTH_TAGMANAGER_MANAGE_USERS = 'https://www.googleapis.com/auth/tagmanager.manage.users' + + # Publish your Google Tag Manager container versions + AUTH_TAGMANAGER_PUBLISH = 'https://www.googleapis.com/auth/tagmanager.publish' + + # View your Google Tag Manager container and its subcomponents + AUTH_TAGMANAGER_READONLY = 'https://www.googleapis.com/auth/tagmanager.readonly' + end + end +end diff --git a/generated/google/apis/tagmanager_v2/classes.rb b/generated/google/apis/tagmanager_v2/classes.rb new file mode 100644 index 000000000..e85ca3d29 --- /dev/null +++ b/generated/google/apis/tagmanager_v2/classes.rb @@ -0,0 +1,2717 @@ +# Copyright 2015 Google Inc. +# +# 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. + +require 'date' +require 'google/apis/core/base_service' +require 'google/apis/core/json_representation' +require 'google/apis/core/hashable' +require 'google/apis/errors' + +module Google + module Apis + module TagmanagerV2 + + # Represents a Google Tag Manager Account. + class Account + include Google::Apis::Core::Hashable + + # The Account ID uniquely identifies the GTM Account. + # Corresponds to the JSON property `accountId` + # @return [String] + attr_accessor :account_id + + # The fingerprint of the GTM Account as computed at storage time. This value is + # recomputed whenever the account is modified. + # Corresponds to the JSON property `fingerprint` + # @return [String] + attr_accessor :fingerprint + + # Account display name. @mutable tagmanager.accounts.create @mutable tagmanager. + # accounts.update + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # GTM Account's API relative path. + # Corresponds to the JSON property `path` + # @return [String] + attr_accessor :path + + # 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. @mutable tagmanager.accounts.create @mutable tagmanager. + # accounts.update + # Corresponds to the JSON property `shareData` + # @return [Boolean] + attr_accessor :share_data + alias_method :share_data?, :share_data + + # Auto generated link to the tag manager UI + # Corresponds to the JSON property `tagManagerUrl` + # @return [String] + attr_accessor :tag_manager_url + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @account_id = args[:account_id] if args.key?(:account_id) + @fingerprint = args[:fingerprint] if args.key?(:fingerprint) + @name = args[:name] if args.key?(:name) + @path = args[:path] if args.key?(:path) + @share_data = args[:share_data] if args.key?(:share_data) + @tag_manager_url = args[:tag_manager_url] if args.key?(:tag_manager_url) + end + end + + # Defines the Google Tag Manager Account access permissions. + class AccountAccess + include Google::Apis::Core::Hashable + + # Whether the user has no access, user access, or admin access to an account. @ + # mutable tagmanager.accounts.permissions.create @mutable tagmanager.accounts. + # permissions.update + # Corresponds to the JSON property `permission` + # @return [String] + attr_accessor :permission + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @permission = args[:permission] if args.key?(:permission) + end + end + + # 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. + class BuiltInVariable + include Google::Apis::Core::Hashable + + # GTM Account ID. + # Corresponds to the JSON property `accountId` + # @return [String] + attr_accessor :account_id + + # GTM Container ID. + # Corresponds to the JSON property `containerId` + # @return [String] + attr_accessor :container_id + + # Name of the built-in variable to be used to refer to the built-in variable. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # GTM BuiltInVariable's API relative path. + # Corresponds to the JSON property `path` + # @return [String] + attr_accessor :path + + # Type of built-in variable. @required.tagmanager.accounts.containers.workspaces. + # built_in_variable.update @mutable tagmanager.accounts.containers.workspaces. + # built_in_variable.update + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # GTM Workspace ID. + # Corresponds to the JSON property `workspaceId` + # @return [String] + attr_accessor :workspace_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @account_id = args[:account_id] if args.key?(:account_id) + @container_id = args[:container_id] if args.key?(:container_id) + @name = args[:name] if args.key?(:name) + @path = args[:path] if args.key?(:path) + @type = args[:type] if args.key?(:type) + @workspace_id = args[:workspace_id] if args.key?(:workspace_id) + end + end + + # + class Client + include Google::Apis::Core::Hashable + + # GTM Account ID. + # Corresponds to the JSON property `accountId` + # @return [String] + attr_accessor :account_id + + # The Client ID uniquely identifies the GTM client. + # Corresponds to the JSON property `clientId` + # @return [String] + attr_accessor :client_id + + # GTM Container ID. + # Corresponds to the JSON property `containerId` + # @return [String] + attr_accessor :container_id + + # The fingerprint of the GTM Client as computed at storage time. This value is + # recomputed whenever the client is modified. + # Corresponds to the JSON property `fingerprint` + # @return [String] + attr_accessor :fingerprint + + # Client display name. @mutable tagmanager.accounts.containers.workspaces. + # clients.create @mutable tagmanager.accounts.containers.workspaces.clients. + # update + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The client's parameters. @mutable tagmanager.accounts.containers.workspaces. + # clients.create @mutable tagmanager.accounts.containers.workspaces.clients. + # update + # Corresponds to the JSON property `parameter` + # @return [Array] + attr_accessor :parameter + + # Parent folder id. + # Corresponds to the JSON property `parentFolderId` + # @return [String] + attr_accessor :parent_folder_id + + # GTM client's API relative path. + # Corresponds to the JSON property `path` + # @return [String] + attr_accessor :path + + # Priority determines relative firing order. @mutable tagmanager.accounts. + # containers.workspaces.clients.create @mutable tagmanager.accounts.containers. + # workspaces.clients.update + # Corresponds to the JSON property `priority` + # @return [Fixnum] + attr_accessor :priority + + # Auto generated link to the tag manager UI + # Corresponds to the JSON property `tagManagerUrl` + # @return [String] + attr_accessor :tag_manager_url + + # Client type. @mutable tagmanager.accounts.containers.workspaces.clients.create + # @mutable tagmanager.accounts.containers.workspaces.clients.update + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # GTM Workspace ID. + # Corresponds to the JSON property `workspaceId` + # @return [String] + attr_accessor :workspace_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @account_id = args[:account_id] if args.key?(:account_id) + @client_id = args[:client_id] if args.key?(:client_id) + @container_id = args[:container_id] if args.key?(:container_id) + @fingerprint = args[:fingerprint] if args.key?(:fingerprint) + @name = args[:name] if args.key?(:name) + @parameter = args[:parameter] if args.key?(:parameter) + @parent_folder_id = args[:parent_folder_id] if args.key?(:parent_folder_id) + @path = args[:path] if args.key?(:path) + @priority = args[:priority] if args.key?(:priority) + @tag_manager_url = args[:tag_manager_url] if args.key?(:tag_manager_url) + @type = args[:type] if args.key?(:type) + @workspace_id = args[:workspace_id] if args.key?(:workspace_id) + end + end + + # Represents a predicate. + class Condition + include Google::Apis::Core::Hashable + + # 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. @mutable tagmanager.accounts.containers. + # workspaces.triggers.create @mutable tagmanager.accounts.containers.workspaces. + # triggers.update + # Corresponds to the JSON property `parameter` + # @return [Array] + attr_accessor :parameter + + # The type of operator for this condition. @mutable tagmanager.accounts. + # containers.workspaces.triggers.create @mutable tagmanager.accounts.containers. + # workspaces.triggers.update + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @parameter = args[:parameter] if args.key?(:parameter) + @type = args[:type] if args.key?(:type) + end + end + + # Represents a Google Tag Manager Container, which specifies the platform tags + # will run on, manages workspaces, and retains container versions. + class Container + include Google::Apis::Core::Hashable + + # GTM Account ID. + # Corresponds to the JSON property `accountId` + # @return [String] + attr_accessor :account_id + + # The Container ID uniquely identifies the GTM Container. + # Corresponds to the JSON property `containerId` + # @return [String] + attr_accessor :container_id + + # List of domain names associated with the Container. @mutable tagmanager. + # accounts.containers.create @mutable tagmanager.accounts.containers.update + # Corresponds to the JSON property `domainName` + # @return [Array] + attr_accessor :domain_name + + # The fingerprint of the GTM Container as computed at storage time. This value + # is recomputed whenever the account is modified. + # Corresponds to the JSON property `fingerprint` + # @return [String] + attr_accessor :fingerprint + + # Container display name. @mutable tagmanager.accounts.containers.create @ + # mutable tagmanager.accounts.containers.update + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Container Notes. @mutable tagmanager.accounts.containers.create @mutable + # tagmanager.accounts.containers.update + # Corresponds to the JSON property `notes` + # @return [String] + attr_accessor :notes + + # GTM Container's API relative path. + # Corresponds to the JSON property `path` + # @return [String] + attr_accessor :path + + # Container Public ID. + # Corresponds to the JSON property `publicId` + # @return [String] + attr_accessor :public_id + + # Auto generated link to the tag manager UI + # Corresponds to the JSON property `tagManagerUrl` + # @return [String] + attr_accessor :tag_manager_url + + # List of Usage Contexts for the Container. Valid values include: web, android, + # or ios. @mutable tagmanager.accounts.containers.create @mutable tagmanager. + # accounts.containers.update + # Corresponds to the JSON property `usageContext` + # @return [Array] + attr_accessor :usage_context + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @account_id = args[:account_id] if args.key?(:account_id) + @container_id = args[:container_id] if args.key?(:container_id) + @domain_name = args[:domain_name] if args.key?(:domain_name) + @fingerprint = args[:fingerprint] if args.key?(:fingerprint) + @name = args[:name] if args.key?(:name) + @notes = args[:notes] if args.key?(:notes) + @path = args[:path] if args.key?(:path) + @public_id = args[:public_id] if args.key?(:public_id) + @tag_manager_url = args[:tag_manager_url] if args.key?(:tag_manager_url) + @usage_context = args[:usage_context] if args.key?(:usage_context) + end + end + + # Defines the Google Tag Manager Container access permissions. + class ContainerAccess + include Google::Apis::Core::Hashable + + # GTM Container ID. @mutable tagmanager.accounts.permissions.create @mutable + # tagmanager.accounts.permissions.update + # Corresponds to the JSON property `containerId` + # @return [String] + attr_accessor :container_id + + # List of Container permissions. @mutable tagmanager.accounts.permissions.create + # @mutable tagmanager.accounts.permissions.update + # Corresponds to the JSON property `permission` + # @return [String] + attr_accessor :permission + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @container_id = args[:container_id] if args.key?(:container_id) + @permission = args[:permission] if args.key?(:permission) + end + end + + # Represents a Google Tag Manager Container Version. + class ContainerVersion + include Google::Apis::Core::Hashable + + # GTM Account ID. + # Corresponds to the JSON property `accountId` + # @return [String] + attr_accessor :account_id + + # The built-in variables in the container that this version was taken from. + # Corresponds to the JSON property `builtInVariable` + # @return [Array] + attr_accessor :built_in_variable + + # The clients in the container that this version was taken from. + # Corresponds to the JSON property `client` + # @return [Array] + attr_accessor :client + + # Represents a Google Tag Manager Container, which specifies the platform tags + # will run on, manages workspaces, and retains container versions. + # Corresponds to the JSON property `container` + # @return [Google::Apis::TagmanagerV2::Container] + attr_accessor :container + + # GTM Container ID. + # Corresponds to the JSON property `containerId` + # @return [String] + attr_accessor :container_id + + # The Container Version ID uniquely identifies the GTM Container Version. + # Corresponds to the JSON property `containerVersionId` + # @return [String] + attr_accessor :container_version_id + + # The custom templates in the container that this version was taken from. + # Corresponds to the JSON property `customTemplate` + # @return [Array] + attr_accessor :custom_template + + # A value of true indicates this container version has been deleted. + # Corresponds to the JSON property `deleted` + # @return [Boolean] + attr_accessor :deleted + alias_method :deleted?, :deleted + + # Container version description. @mutable tagmanager.accounts.containers. + # versions.update + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # The fingerprint of the GTM Container Version as computed at storage time. This + # value is recomputed whenever the container version is modified. + # Corresponds to the JSON property `fingerprint` + # @return [String] + attr_accessor :fingerprint + + # The folders in the container that this version was taken from. + # Corresponds to the JSON property `folder` + # @return [Array] + attr_accessor :folder + + # Container version display name. @mutable tagmanager.accounts.containers. + # versions.update + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # GTM ContainerVersions's API relative path. + # Corresponds to the JSON property `path` + # @return [String] + attr_accessor :path + + # The tags in the container that this version was taken from. + # Corresponds to the JSON property `tag` + # @return [Array] + attr_accessor :tag + + # Auto generated link to the tag manager UI + # Corresponds to the JSON property `tagManagerUrl` + # @return [String] + attr_accessor :tag_manager_url + + # The triggers in the container that this version was taken from. + # Corresponds to the JSON property `trigger` + # @return [Array] + attr_accessor :trigger + + # The variables in the container that this version was taken from. + # Corresponds to the JSON property `variable` + # @return [Array] + attr_accessor :variable + + # The zones in the container that this version was taken from. + # Corresponds to the JSON property `zone` + # @return [Array] + attr_accessor :zone + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @account_id = args[:account_id] if args.key?(:account_id) + @built_in_variable = args[:built_in_variable] if args.key?(:built_in_variable) + @client = args[:client] if args.key?(:client) + @container = args[:container] if args.key?(:container) + @container_id = args[:container_id] if args.key?(:container_id) + @container_version_id = args[:container_version_id] if args.key?(:container_version_id) + @custom_template = args[:custom_template] if args.key?(:custom_template) + @deleted = args[:deleted] if args.key?(:deleted) + @description = args[:description] if args.key?(:description) + @fingerprint = args[:fingerprint] if args.key?(:fingerprint) + @folder = args[:folder] if args.key?(:folder) + @name = args[:name] if args.key?(:name) + @path = args[:path] if args.key?(:path) + @tag = args[:tag] if args.key?(:tag) + @tag_manager_url = args[:tag_manager_url] if args.key?(:tag_manager_url) + @trigger = args[:trigger] if args.key?(:trigger) + @variable = args[:variable] if args.key?(:variable) + @zone = args[:zone] if args.key?(:zone) + end + end + + # Represents a Google Tag Manager Container Version Header. + class ContainerVersionHeader + include Google::Apis::Core::Hashable + + # GTM Account ID. + # Corresponds to the JSON property `accountId` + # @return [String] + attr_accessor :account_id + + # GTM Container ID. + # Corresponds to the JSON property `containerId` + # @return [String] + attr_accessor :container_id + + # The Container Version ID uniquely identifies the GTM Container Version. + # Corresponds to the JSON property `containerVersionId` + # @return [String] + attr_accessor :container_version_id + + # A value of true indicates this container version has been deleted. + # Corresponds to the JSON property `deleted` + # @return [Boolean] + attr_accessor :deleted + alias_method :deleted?, :deleted + + # Container version display name. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Number of custom templates in the container version. + # Corresponds to the JSON property `numCustomTemplates` + # @return [String] + attr_accessor :num_custom_templates + + # Number of macros in the container version. + # Corresponds to the JSON property `numMacros` + # @return [String] + attr_accessor :num_macros + + # Number of rules in the container version. + # Corresponds to the JSON property `numRules` + # @return [String] + attr_accessor :num_rules + + # Number of tags in the container version. + # Corresponds to the JSON property `numTags` + # @return [String] + attr_accessor :num_tags + + # Number of triggers in the container version. + # Corresponds to the JSON property `numTriggers` + # @return [String] + attr_accessor :num_triggers + + # Number of variables in the container version. + # Corresponds to the JSON property `numVariables` + # @return [String] + attr_accessor :num_variables + + # Number of zones in the container version. + # Corresponds to the JSON property `numZones` + # @return [String] + attr_accessor :num_zones + + # GTM Container Versions's API relative path. + # Corresponds to the JSON property `path` + # @return [String] + attr_accessor :path + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @account_id = args[:account_id] if args.key?(:account_id) + @container_id = args[:container_id] if args.key?(:container_id) + @container_version_id = args[:container_version_id] if args.key?(:container_version_id) + @deleted = args[:deleted] if args.key?(:deleted) + @name = args[:name] if args.key?(:name) + @num_custom_templates = args[:num_custom_templates] if args.key?(:num_custom_templates) + @num_macros = args[:num_macros] if args.key?(:num_macros) + @num_rules = args[:num_rules] if args.key?(:num_rules) + @num_tags = args[:num_tags] if args.key?(:num_tags) + @num_triggers = args[:num_triggers] if args.key?(:num_triggers) + @num_variables = args[:num_variables] if args.key?(:num_variables) + @num_zones = args[:num_zones] if args.key?(:num_zones) + @path = args[:path] if args.key?(:path) + end + end + + # + class CreateBuiltInVariableResponse + include Google::Apis::Core::Hashable + + # List of created built-in variables. + # Corresponds to the JSON property `builtInVariable` + # @return [Array] + attr_accessor :built_in_variable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @built_in_variable = args[:built_in_variable] if args.key?(:built_in_variable) + end + end + + # Options for new container versions. + class CreateContainerVersionRequestVersionOptions + include Google::Apis::Core::Hashable + + # The name of the container version to be created. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The notes of the container version to be created. + # Corresponds to the JSON property `notes` + # @return [String] + attr_accessor :notes + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @name = args[:name] if args.key?(:name) + @notes = args[:notes] if args.key?(:notes) + end + end + + # Create container versions response. + class CreateContainerVersionResponse + include Google::Apis::Core::Hashable + + # Compiler errors or not. + # Corresponds to the JSON property `compilerError` + # @return [Boolean] + attr_accessor :compiler_error + alias_method :compiler_error?, :compiler_error + + # Represents a Google Tag Manager Container Version. + # Corresponds to the JSON property `containerVersion` + # @return [Google::Apis::TagmanagerV2::ContainerVersion] + attr_accessor :container_version + + # 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. + # Corresponds to the JSON property `newWorkspacePath` + # @return [String] + attr_accessor :new_workspace_path + + # The status of a workspace after synchronization. + # Corresponds to the JSON property `syncStatus` + # @return [Google::Apis::TagmanagerV2::SyncStatus] + attr_accessor :sync_status + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @compiler_error = args[:compiler_error] if args.key?(:compiler_error) + @container_version = args[:container_version] if args.key?(:container_version) + @new_workspace_path = args[:new_workspace_path] if args.key?(:new_workspace_path) + @sync_status = args[:sync_status] if args.key?(:sync_status) + end + end + + # Represents a Google Tag Manager Custom Template's contents. + class CustomTemplate + include Google::Apis::Core::Hashable + + # GTM Account ID. + # Corresponds to the JSON property `accountId` + # @return [String] + attr_accessor :account_id + + # GTM Container ID. + # Corresponds to the JSON property `containerId` + # @return [String] + attr_accessor :container_id + + # The fingerprint of the GTM Custom Template as computed at storage time. This + # value is recomputed whenever the template is modified. + # Corresponds to the JSON property `fingerprint` + # @return [String] + attr_accessor :fingerprint + + # Represents the link between a custom template and an entry on the Community + # Template Gallery site. + # Corresponds to the JSON property `galleryReference` + # @return [Google::Apis::TagmanagerV2::GalleryReference] + attr_accessor :gallery_reference + + # Custom Template display name. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # GTM Custom Template's API relative path. + # Corresponds to the JSON property `path` + # @return [String] + attr_accessor :path + + # Auto generated link to the tag manager UI + # Corresponds to the JSON property `tagManagerUrl` + # @return [String] + attr_accessor :tag_manager_url + + # The custom template in text format. + # Corresponds to the JSON property `templateData` + # @return [String] + attr_accessor :template_data + + # The Custom Template ID uniquely identifies the GTM custom template. + # Corresponds to the JSON property `templateId` + # @return [String] + attr_accessor :template_id + + # GTM Workspace ID. + # Corresponds to the JSON property `workspaceId` + # @return [String] + attr_accessor :workspace_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @account_id = args[:account_id] if args.key?(:account_id) + @container_id = args[:container_id] if args.key?(:container_id) + @fingerprint = args[:fingerprint] if args.key?(:fingerprint) + @gallery_reference = args[:gallery_reference] if args.key?(:gallery_reference) + @name = args[:name] if args.key?(:name) + @path = args[:path] if args.key?(:path) + @tag_manager_url = args[:tag_manager_url] if args.key?(:tag_manager_url) + @template_data = args[:template_data] if args.key?(:template_data) + @template_id = args[:template_id] if args.key?(:template_id) + @workspace_id = args[:workspace_id] if args.key?(:workspace_id) + end + end + + # A workspace entity that may represent a tag, trigger, variable, or folder in + # addition to its status in the workspace. + class Entity + include Google::Apis::Core::Hashable + + # Represents how the entity has been changed in the workspace. + # Corresponds to the JSON property `changeStatus` + # @return [String] + attr_accessor :change_status + + # Represents a Google Tag Manager Folder. + # Corresponds to the JSON property `folder` + # @return [Google::Apis::TagmanagerV2::Folder] + attr_accessor :folder + + # Represents a Google Tag Manager Tag. + # Corresponds to the JSON property `tag` + # @return [Google::Apis::TagmanagerV2::Tag] + attr_accessor :tag + + # Represents a Google Tag Manager Trigger + # Corresponds to the JSON property `trigger` + # @return [Google::Apis::TagmanagerV2::Trigger] + attr_accessor :trigger + + # Represents a Google Tag Manager Variable. + # Corresponds to the JSON property `variable` + # @return [Google::Apis::TagmanagerV2::Variable] + attr_accessor :variable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @change_status = args[:change_status] if args.key?(:change_status) + @folder = args[:folder] if args.key?(:folder) + @tag = args[:tag] if args.key?(:tag) + @trigger = args[:trigger] if args.key?(:trigger) + @variable = args[:variable] if args.key?(:variable) + end + end + + # 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. + class Environment + include Google::Apis::Core::Hashable + + # GTM Account ID. + # Corresponds to the JSON property `accountId` + # @return [String] + attr_accessor :account_id + + # The environment authorization code. + # Corresponds to the JSON property `authorizationCode` + # @return [String] + attr_accessor :authorization_code + + # The last update time-stamp for the authorization code. + # Corresponds to the JSON property `authorizationTimestamp` + # @return [String] + attr_accessor :authorization_timestamp + + # GTM Container ID. + # Corresponds to the JSON property `containerId` + # @return [String] + attr_accessor :container_id + + # Represents a link to a container version. + # Corresponds to the JSON property `containerVersionId` + # @return [String] + attr_accessor :container_version_id + + # The environment description. Can be set or changed only on USER type + # environments. @mutable tagmanager.accounts.containers.environments.create @ + # mutable tagmanager.accounts.containers.environments.update + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # Whether or not to enable debug by default for the environment. @mutable + # tagmanager.accounts.containers.environments.create @mutable tagmanager. + # accounts.containers.environments.update + # Corresponds to the JSON property `enableDebug` + # @return [Boolean] + attr_accessor :enable_debug + alias_method :enable_debug?, :enable_debug + + # GTM Environment ID uniquely identifies the GTM Environment. + # Corresponds to the JSON property `environmentId` + # @return [String] + attr_accessor :environment_id + + # The fingerprint of the GTM environment as computed at storage time. This value + # is recomputed whenever the environment is modified. + # Corresponds to the JSON property `fingerprint` + # @return [String] + attr_accessor :fingerprint + + # The environment display name. Can be set or changed only on USER type + # environments. @mutable tagmanager.accounts.containers.environments.create @ + # mutable tagmanager.accounts.containers.environments.update + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # GTM Environment's API relative path. + # Corresponds to the JSON property `path` + # @return [String] + attr_accessor :path + + # Auto generated link to the tag manager UI + # Corresponds to the JSON property `tagManagerUrl` + # @return [String] + attr_accessor :tag_manager_url + + # The type of this environment. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # Default preview page url for the environment. @mutable tagmanager.accounts. + # containers.environments.create @mutable tagmanager.accounts.containers. + # environments.update + # Corresponds to the JSON property `url` + # @return [String] + attr_accessor :url + + # Represents a link to a quick preview of a workspace. + # Corresponds to the JSON property `workspaceId` + # @return [String] + attr_accessor :workspace_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @account_id = args[:account_id] if args.key?(:account_id) + @authorization_code = args[:authorization_code] if args.key?(:authorization_code) + @authorization_timestamp = args[:authorization_timestamp] if args.key?(:authorization_timestamp) + @container_id = args[:container_id] if args.key?(:container_id) + @container_version_id = args[:container_version_id] if args.key?(:container_version_id) + @description = args[:description] if args.key?(:description) + @enable_debug = args[:enable_debug] if args.key?(:enable_debug) + @environment_id = args[:environment_id] if args.key?(:environment_id) + @fingerprint = args[:fingerprint] if args.key?(:fingerprint) + @name = args[:name] if args.key?(:name) + @path = args[:path] if args.key?(:path) + @tag_manager_url = args[:tag_manager_url] if args.key?(:tag_manager_url) + @type = args[:type] if args.key?(:type) + @url = args[:url] if args.key?(:url) + @workspace_id = args[:workspace_id] if args.key?(:workspace_id) + end + end + + # Represents a Google Tag Manager Folder. + class Folder + include Google::Apis::Core::Hashable + + # GTM Account ID. + # Corresponds to the JSON property `accountId` + # @return [String] + attr_accessor :account_id + + # GTM Container ID. + # Corresponds to the JSON property `containerId` + # @return [String] + attr_accessor :container_id + + # The fingerprint of the GTM Folder as computed at storage time. This value is + # recomputed whenever the folder is modified. + # Corresponds to the JSON property `fingerprint` + # @return [String] + attr_accessor :fingerprint + + # The Folder ID uniquely identifies the GTM Folder. + # Corresponds to the JSON property `folderId` + # @return [String] + attr_accessor :folder_id + + # Folder display name. @mutable tagmanager.accounts.containers.workspaces. + # folders.create @mutable tagmanager.accounts.containers.workspaces.folders. + # update + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # User notes on how to apply this folder in the container. @mutable tagmanager. + # accounts.containers.workspaces.folders.create @mutable tagmanager.accounts. + # containers.workspaces.folders.update + # Corresponds to the JSON property `notes` + # @return [String] + attr_accessor :notes + + # GTM Folder's API relative path. + # Corresponds to the JSON property `path` + # @return [String] + attr_accessor :path + + # Auto generated link to the tag manager UI + # Corresponds to the JSON property `tagManagerUrl` + # @return [String] + attr_accessor :tag_manager_url + + # GTM Workspace ID. + # Corresponds to the JSON property `workspaceId` + # @return [String] + attr_accessor :workspace_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @account_id = args[:account_id] if args.key?(:account_id) + @container_id = args[:container_id] if args.key?(:container_id) + @fingerprint = args[:fingerprint] if args.key?(:fingerprint) + @folder_id = args[:folder_id] if args.key?(:folder_id) + @name = args[:name] if args.key?(:name) + @notes = args[:notes] if args.key?(:notes) + @path = args[:path] if args.key?(:path) + @tag_manager_url = args[:tag_manager_url] if args.key?(:tag_manager_url) + @workspace_id = args[:workspace_id] if args.key?(:workspace_id) + end + end + + # Represents a Google Tag Manager Folder's contents. + class FolderEntities + include Google::Apis::Core::Hashable + + # Continuation token for fetching the next page of results. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # The list of tags inside the folder. + # Corresponds to the JSON property `tag` + # @return [Array] + attr_accessor :tag + + # The list of triggers inside the folder. + # Corresponds to the JSON property `trigger` + # @return [Array] + attr_accessor :trigger + + # The list of variables inside the folder. + # Corresponds to the JSON property `variable` + # @return [Array] + attr_accessor :variable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @tag = args[:tag] if args.key?(:tag) + @trigger = args[:trigger] if args.key?(:trigger) + @variable = args[:variable] if args.key?(:variable) + end + end + + # Represents the link between a custom template and an entry on the Community + # Template Gallery site. + class GalleryReference + include Google::Apis::Core::Hashable + + # The name of the host for the community gallery template. + # Corresponds to the JSON property `host` + # @return [String] + attr_accessor :host + + # If a user has manually edited the community gallery template. + # Corresponds to the JSON property `isModified` + # @return [Boolean] + attr_accessor :is_modified + alias_method :is_modified?, :is_modified + + # The name of the owner for the community gallery template. + # Corresponds to the JSON property `owner` + # @return [String] + attr_accessor :owner + + # The name of the repository for the community gallery template. + # Corresponds to the JSON property `repository` + # @return [String] + attr_accessor :repository + + # The signature of the community gallery template as computed at import time. + # This value is recomputed whenever the template is updated from the gallery. + # Corresponds to the JSON property `signature` + # @return [String] + attr_accessor :signature + + # The version of the community gallery template. + # Corresponds to the JSON property `version` + # @return [String] + attr_accessor :version + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @host = args[:host] if args.key?(:host) + @is_modified = args[:is_modified] if args.key?(:is_modified) + @owner = args[:owner] if args.key?(:owner) + @repository = args[:repository] if args.key?(:repository) + @signature = args[:signature] if args.key?(:signature) + @version = args[:version] if args.key?(:version) + end + end + + # The changes that have occurred in the workspace since the base container + # version. + class GetWorkspaceStatusResponse + include Google::Apis::Core::Hashable + + # The merge conflict after sync. + # Corresponds to the JSON property `mergeConflict` + # @return [Array] + attr_accessor :merge_conflict + + # Entities that have been changed in the workspace. + # Corresponds to the JSON property `workspaceChange` + # @return [Array] + attr_accessor :workspace_change + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @merge_conflict = args[:merge_conflict] if args.key?(:merge_conflict) + @workspace_change = args[:workspace_change] if args.key?(:workspace_change) + end + end + + # List Accounts Response. + class ListAccountsResponse + include Google::Apis::Core::Hashable + + # List of GTM Accounts that a user has access to. + # Corresponds to the JSON property `account` + # @return [Array] + attr_accessor :account + + # Continuation token for fetching the next page of results. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @account = args[:account] if args.key?(:account) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # List container versions response. + class ListContainerVersionsResponse + include Google::Apis::Core::Hashable + + # All container version headers of a GTM Container. + # Corresponds to the JSON property `containerVersionHeader` + # @return [Array] + attr_accessor :container_version_header + + # Continuation token for fetching the next page of results. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @container_version_header = args[:container_version_header] if args.key?(:container_version_header) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # List Containers Response. + class ListContainersResponse + include Google::Apis::Core::Hashable + + # All Containers of a GTM Account. + # Corresponds to the JSON property `container` + # @return [Array] + attr_accessor :container + + # Continuation token for fetching the next page of results. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @container = args[:container] if args.key?(:container) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # A list of enabled built-in variables. + class ListEnabledBuiltInVariablesResponse + include Google::Apis::Core::Hashable + + # All GTM BuiltInVariables of a GTM container. + # Corresponds to the JSON property `builtInVariable` + # @return [Array] + attr_accessor :built_in_variable + + # Continuation token for fetching the next page of results. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @built_in_variable = args[:built_in_variable] if args.key?(:built_in_variable) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # List Environments Response. + class ListEnvironmentsResponse + include Google::Apis::Core::Hashable + + # All Environments of a GTM Container. + # Corresponds to the JSON property `environment` + # @return [Array] + attr_accessor :environment + + # Continuation token for fetching the next page of results. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @environment = args[:environment] if args.key?(:environment) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # List Folders Response. + class ListFoldersResponse + include Google::Apis::Core::Hashable + + # All GTM Folders of a GTM Container. + # Corresponds to the JSON property `folder` + # @return [Array] + attr_accessor :folder + + # Continuation token for fetching the next page of results. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @folder = args[:folder] if args.key?(:folder) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # List Tags Response. + class ListTagsResponse + include Google::Apis::Core::Hashable + + # Continuation token for fetching the next page of results. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # All GTM Tags of a GTM Container. + # Corresponds to the JSON property `tag` + # @return [Array] + attr_accessor :tag + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @tag = args[:tag] if args.key?(:tag) + end + end + + # + class ListTemplatesResponse + include Google::Apis::Core::Hashable + + # Continuation token for fetching the next page of results. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # All GTM Custom Templates of a GTM Container. + # Corresponds to the JSON property `template` + # @return [Array] + attr_accessor :template + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @template = args[:template] if args.key?(:template) + end + end + + # List triggers response. + class ListTriggersResponse + include Google::Apis::Core::Hashable + + # Continuation token for fetching the next page of results. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # All GTM Triggers of a GTM Container. + # Corresponds to the JSON property `trigger` + # @return [Array] + attr_accessor :trigger + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @trigger = args[:trigger] if args.key?(:trigger) + end + end + + # List user permissions response. + class ListUserPermissionsResponse + include Google::Apis::Core::Hashable + + # Continuation token for fetching the next page of results. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # All GTM UserPermissions of a GTM Account. + # Corresponds to the JSON property `userPermission` + # @return [Array] + attr_accessor :user_permission + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @user_permission = args[:user_permission] if args.key?(:user_permission) + end + end + + # List Variables Response. + class ListVariablesResponse + include Google::Apis::Core::Hashable + + # Continuation token for fetching the next page of results. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # All GTM Variables of a GTM Container. + # Corresponds to the JSON property `variable` + # @return [Array] + attr_accessor :variable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @variable = args[:variable] if args.key?(:variable) + end + end + + # A list of workspaces in a container. + class ListWorkspacesResponse + include Google::Apis::Core::Hashable + + # Continuation token for fetching the next page of results. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # All Workspaces of a GTM Container. + # Corresponds to the JSON property `workspace` + # @return [Array] + attr_accessor :workspace + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @workspace = args[:workspace] if args.key?(:workspace) + end + end + + # + class ListZonesResponse + include Google::Apis::Core::Hashable + + # Continuation token for fetching the next page of results. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # All GTM Zones of a GTM Container. + # Corresponds to the JSON property `zone` + # @return [Array] + attr_accessor :zone + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @zone = args[:zone] if args.key?(:zone) + end + end + + # Represents a merge conflict. + class MergeConflict + include Google::Apis::Core::Hashable + + # A workspace entity that may represent a tag, trigger, variable, or folder in + # addition to its status in the workspace. + # Corresponds to the JSON property `entityInBaseVersion` + # @return [Google::Apis::TagmanagerV2::Entity] + attr_accessor :entity_in_base_version + + # A workspace entity that may represent a tag, trigger, variable, or folder in + # addition to its status in the workspace. + # Corresponds to the JSON property `entityInWorkspace` + # @return [Google::Apis::TagmanagerV2::Entity] + attr_accessor :entity_in_workspace + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @entity_in_base_version = args[:entity_in_base_version] if args.key?(:entity_in_base_version) + @entity_in_workspace = args[:entity_in_workspace] if args.key?(:entity_in_workspace) + end + end + + # Represents a Google Tag Manager Parameter. + class Parameter + include Google::Apis::Core::Hashable + + # The named key that uniquely identifies a parameter. Required for top-level + # parameters, as well as map values. Ignored for list values. @mutable + # tagmanager.accounts.containers.workspaces.variables.create @mutable tagmanager. + # accounts.containers.workspaces.variables.update @mutable tagmanager.accounts. + # containers.workspaces.triggers.create @mutable tagmanager.accounts.containers. + # workspaces.triggers.update @mutable tagmanager.accounts.containers.workspaces. + # tags.create @mutable tagmanager.accounts.containers.workspaces.tags.update + # Corresponds to the JSON property `key` + # @return [String] + attr_accessor :key + + # This list parameter's parameters (keys will be ignored). @mutable tagmanager. + # accounts.containers.workspaces.variables.create @mutable tagmanager.accounts. + # containers.workspaces.variables.update @mutable tagmanager.accounts.containers. + # workspaces.triggers.create @mutable tagmanager.accounts.containers.workspaces. + # triggers.update @mutable tagmanager.accounts.containers.workspaces.tags.create + # @mutable tagmanager.accounts.containers.workspaces.tags.update + # Corresponds to the JSON property `list` + # @return [Array] + attr_accessor :list + + # This map parameter's parameters (must have keys; keys must be unique). @ + # mutable tagmanager.accounts.containers.workspaces.variables.create @mutable + # tagmanager.accounts.containers.workspaces.variables.update @mutable tagmanager. + # accounts.containers.workspaces.triggers.create @mutable tagmanager.accounts. + # containers.workspaces.triggers.update @mutable tagmanager.accounts.containers. + # workspaces.tags.create @mutable tagmanager.accounts.containers.workspaces.tags. + # update + # Corresponds to the JSON property `map` + # @return [Array] + attr_accessor :map + + # 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 - tag_reference: The value + # represents a tag, represented as the tag name @mutable tagmanager.accounts. + # containers.workspaces.variables.create @mutable tagmanager.accounts.containers. + # workspaces.variables.update @mutable tagmanager.accounts.containers.workspaces. + # triggers.create @mutable tagmanager.accounts.containers.workspaces.triggers. + # update @mutable tagmanager.accounts.containers.workspaces.tags.create @mutable + # tagmanager.accounts.containers.workspaces.tags.update + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # A parameter's value (may contain variable references such as "``myVariable``") + # as appropriate to the specified type. @mutable tagmanager.accounts.containers. + # workspaces.variables.create @mutable tagmanager.accounts.containers.workspaces. + # variables.update @mutable tagmanager.accounts.containers.workspaces.triggers. + # create @mutable tagmanager.accounts.containers.workspaces.triggers.update @ + # mutable tagmanager.accounts.containers.workspaces.tags.create @mutable + # tagmanager.accounts.containers.workspaces.tags.update + # Corresponds to the JSON property `value` + # @return [String] + attr_accessor :value + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @key = args[:key] if args.key?(:key) + @list = args[:list] if args.key?(:list) + @map = args[:map] if args.key?(:map) + @type = args[:type] if args.key?(:type) + @value = args[:value] if args.key?(:value) + end + end + + # Publish container version response. + class PublishContainerVersionResponse + include Google::Apis::Core::Hashable + + # Compiler errors or not. + # Corresponds to the JSON property `compilerError` + # @return [Boolean] + attr_accessor :compiler_error + alias_method :compiler_error?, :compiler_error + + # Represents a Google Tag Manager Container Version. + # Corresponds to the JSON property `containerVersion` + # @return [Google::Apis::TagmanagerV2::ContainerVersion] + attr_accessor :container_version + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @compiler_error = args[:compiler_error] if args.key?(:compiler_error) + @container_version = args[:container_version] if args.key?(:container_version) + end + end + + # Response to quick previewing a workspace. + class QuickPreviewResponse + include Google::Apis::Core::Hashable + + # Were there compiler errors or not. + # Corresponds to the JSON property `compilerError` + # @return [Boolean] + attr_accessor :compiler_error + alias_method :compiler_error?, :compiler_error + + # Represents a Google Tag Manager Container Version. + # Corresponds to the JSON property `containerVersion` + # @return [Google::Apis::TagmanagerV2::ContainerVersion] + attr_accessor :container_version + + # The status of a workspace after synchronization. + # Corresponds to the JSON property `syncStatus` + # @return [Google::Apis::TagmanagerV2::SyncStatus] + attr_accessor :sync_status + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @compiler_error = args[:compiler_error] if args.key?(:compiler_error) + @container_version = args[:container_version] if args.key?(:container_version) + @sync_status = args[:sync_status] if args.key?(:sync_status) + end + end + + # The result of reverting a built-in variable in a workspace. + class RevertBuiltInVariableResponse + include Google::Apis::Core::Hashable + + # Whether the built-in variable is enabled after reversion. + # Corresponds to the JSON property `enabled` + # @return [Boolean] + attr_accessor :enabled + alias_method :enabled?, :enabled + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @enabled = args[:enabled] if args.key?(:enabled) + end + end + + # The result of reverting folder changes in a workspace. + class RevertFolderResponse + include Google::Apis::Core::Hashable + + # Represents a Google Tag Manager Folder. + # Corresponds to the JSON property `folder` + # @return [Google::Apis::TagmanagerV2::Folder] + attr_accessor :folder + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @folder = args[:folder] if args.key?(:folder) + end + end + + # The result of reverting a tag in a workspace. + class RevertTagResponse + include Google::Apis::Core::Hashable + + # Represents a Google Tag Manager Tag. + # Corresponds to the JSON property `tag` + # @return [Google::Apis::TagmanagerV2::Tag] + attr_accessor :tag + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @tag = args[:tag] if args.key?(:tag) + end + end + + # The result of reverting a template in a workspace. + class RevertTemplateResponse + include Google::Apis::Core::Hashable + + # Represents a Google Tag Manager Custom Template's contents. + # Corresponds to the JSON property `template` + # @return [Google::Apis::TagmanagerV2::CustomTemplate] + attr_accessor :template + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @template = args[:template] if args.key?(:template) + end + end + + # The result of reverting a trigger in a workspace. + class RevertTriggerResponse + include Google::Apis::Core::Hashable + + # Represents a Google Tag Manager Trigger + # Corresponds to the JSON property `trigger` + # @return [Google::Apis::TagmanagerV2::Trigger] + attr_accessor :trigger + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @trigger = args[:trigger] if args.key?(:trigger) + end + end + + # The result of reverting a variable in a workspace. + class RevertVariableResponse + include Google::Apis::Core::Hashable + + # Represents a Google Tag Manager Variable. + # Corresponds to the JSON property `variable` + # @return [Google::Apis::TagmanagerV2::Variable] + attr_accessor :variable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @variable = args[:variable] if args.key?(:variable) + end + end + + # The result of reverting a zone in a workspace. + class RevertZoneResponse + include Google::Apis::Core::Hashable + + # Represents a Google Tag Manager Zone's contents. + # Corresponds to the JSON property `zone` + # @return [Google::Apis::TagmanagerV2::Zone] + attr_accessor :zone + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @zone = args[:zone] if args.key?(:zone) + end + end + + # Represents a reference to atag that fires before another tag in order to set + # up dependencies. + class SetupTag + include Google::Apis::Core::Hashable + + # 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. + # Corresponds to the JSON property `stopOnSetupFailure` + # @return [Boolean] + attr_accessor :stop_on_setup_failure + alias_method :stop_on_setup_failure?, :stop_on_setup_failure + + # The name of the setup tag. + # Corresponds to the JSON property `tagName` + # @return [String] + attr_accessor :tag_name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @stop_on_setup_failure = args[:stop_on_setup_failure] if args.key?(:stop_on_setup_failure) + @tag_name = args[:tag_name] if args.key?(:tag_name) + end + end + + # The status of a workspace after synchronization. + class SyncStatus + include Google::Apis::Core::Hashable + + # Synchornization operation detected a merge conflict. + # Corresponds to the JSON property `mergeConflict` + # @return [Boolean] + attr_accessor :merge_conflict + alias_method :merge_conflict?, :merge_conflict + + # An error occurred during the synchronization operation. + # Corresponds to the JSON property `syncError` + # @return [Boolean] + attr_accessor :sync_error + alias_method :sync_error?, :sync_error + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @merge_conflict = args[:merge_conflict] if args.key?(:merge_conflict) + @sync_error = args[:sync_error] if args.key?(:sync_error) + end + end + + # A response after synchronizing the workspace to the latest container version. + class SyncWorkspaceResponse + include Google::Apis::Core::Hashable + + # 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. + # Corresponds to the JSON property `mergeConflict` + # @return [Array] + attr_accessor :merge_conflict + + # The status of a workspace after synchronization. + # Corresponds to the JSON property `syncStatus` + # @return [Google::Apis::TagmanagerV2::SyncStatus] + attr_accessor :sync_status + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @merge_conflict = args[:merge_conflict] if args.key?(:merge_conflict) + @sync_status = args[:sync_status] if args.key?(:sync_status) + end + end + + # Represents a Google Tag Manager Tag. + class Tag + include Google::Apis::Core::Hashable + + # GTM Account ID. + # Corresponds to the JSON property `accountId` + # @return [String] + attr_accessor :account_id + + # Blocking rule IDs. If any of the listed rules evaluate to true, the tag will + # not fire. @mutable tagmanager.accounts.containers.workspaces.tags.create @ + # mutable tagmanager.accounts.containers.workspaces.tags.update + # Corresponds to the JSON property `blockingRuleId` + # @return [Array] + attr_accessor :blocking_rule_id + + # Blocking trigger IDs. If any of the listed triggers evaluate to true, the tag + # will not fire. @mutable tagmanager.accounts.containers.workspaces.tags.create @ + # mutable tagmanager.accounts.containers.workspaces.tags.update + # Corresponds to the JSON property `blockingTriggerId` + # @return [Array] + attr_accessor :blocking_trigger_id + + # GTM Container ID. + # Corresponds to the JSON property `containerId` + # @return [String] + attr_accessor :container_id + + # The fingerprint of the GTM Tag as computed at storage time. This value is + # recomputed whenever the tag is modified. + # Corresponds to the JSON property `fingerprint` + # @return [String] + attr_accessor :fingerprint + + # 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. @mutable tagmanager. + # accounts.containers.workspaces.tags.create @mutable tagmanager.accounts. + # containers.workspaces.tags.update + # Corresponds to the JSON property `firingRuleId` + # @return [Array] + attr_accessor :firing_rule_id + + # 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. @mutable + # tagmanager.accounts.containers.workspaces.tags.create @mutable tagmanager. + # accounts.containers.workspaces.tags.update + # Corresponds to the JSON property `firingTriggerId` + # @return [Array] + attr_accessor :firing_trigger_id + + # If set to true, this tag will only fire in the live environment (e.g. not in + # preview or debug mode). @mutable tagmanager.accounts.containers.workspaces. + # tags.create @mutable tagmanager.accounts.containers.workspaces.tags.update + # Corresponds to the JSON property `liveOnly` + # @return [Boolean] + attr_accessor :live_only + alias_method :live_only?, :live_only + + # Represents a Google Tag Manager Parameter. + # Corresponds to the JSON property `monitoringMetadata` + # @return [Google::Apis::TagmanagerV2::Parameter] + attr_accessor :monitoring_metadata + + # If non-empty, then the tag display name will be included in the monitoring + # metadata map using the key specified. @mutable tagmanager.accounts.containers. + # workspaces.tags.create @mutable tagmanager.accounts.containers.workspaces.tags. + # update + # Corresponds to the JSON property `monitoringMetadataTagNameKey` + # @return [String] + attr_accessor :monitoring_metadata_tag_name_key + + # Tag display name. @mutable tagmanager.accounts.containers.workspaces.tags. + # create @mutable tagmanager.accounts.containers.workspaces.tags.update + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # User notes on how to apply this tag in the container. @mutable tagmanager. + # accounts.containers.workspaces.tags.create @mutable tagmanager.accounts. + # containers.workspaces.tags.update + # Corresponds to the JSON property `notes` + # @return [String] + attr_accessor :notes + + # The tag's parameters. @mutable tagmanager.accounts.containers.workspaces.tags. + # create @mutable tagmanager.accounts.containers.workspaces.tags.update + # Corresponds to the JSON property `parameter` + # @return [Array] + attr_accessor :parameter + + # Parent folder id. + # Corresponds to the JSON property `parentFolderId` + # @return [String] + attr_accessor :parent_folder_id + + # GTM Tag's API relative path. + # Corresponds to the JSON property `path` + # @return [String] + attr_accessor :path + + # Indicates whether the tag is paused, which prevents the tag from firing. @ + # mutable tagmanager.accounts.containers.workspaces.tags.create @mutable + # tagmanager.accounts.containers.workspaces.tags.update + # Corresponds to the JSON property `paused` + # @return [Boolean] + attr_accessor :paused + alias_method :paused?, :paused + + # Represents a Google Tag Manager Parameter. + # Corresponds to the JSON property `priority` + # @return [Google::Apis::TagmanagerV2::Parameter] + attr_accessor :priority + + # The end timestamp in milliseconds to schedule a tag. @mutable tagmanager. + # accounts.containers.workspaces.tags.create @mutable tagmanager.accounts. + # containers.workspaces.tags.update + # Corresponds to the JSON property `scheduleEndMs` + # @return [Fixnum] + attr_accessor :schedule_end_ms + + # The start timestamp in milliseconds to schedule a tag. @mutable tagmanager. + # accounts.containers.workspaces.tags.create @mutable tagmanager.accounts. + # containers.workspaces.tags.update + # Corresponds to the JSON property `scheduleStartMs` + # @return [Fixnum] + attr_accessor :schedule_start_ms + + # The list of setup tags. Currently we only allow one. + # Corresponds to the JSON property `setupTag` + # @return [Array] + attr_accessor :setup_tag + + # Option to fire this tag. + # Corresponds to the JSON property `tagFiringOption` + # @return [String] + attr_accessor :tag_firing_option + + # The Tag ID uniquely identifies the GTM Tag. + # Corresponds to the JSON property `tagId` + # @return [String] + attr_accessor :tag_id + + # Auto generated link to the tag manager UI + # Corresponds to the JSON property `tagManagerUrl` + # @return [String] + attr_accessor :tag_manager_url + + # The list of teardown tags. Currently we only allow one. + # Corresponds to the JSON property `teardownTag` + # @return [Array] + attr_accessor :teardown_tag + + # GTM Tag Type. @mutable tagmanager.accounts.containers.workspaces.tags.create @ + # mutable tagmanager.accounts.containers.workspaces.tags.update + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # GTM Workspace ID. + # Corresponds to the JSON property `workspaceId` + # @return [String] + attr_accessor :workspace_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @account_id = args[:account_id] if args.key?(:account_id) + @blocking_rule_id = args[:blocking_rule_id] if args.key?(:blocking_rule_id) + @blocking_trigger_id = args[:blocking_trigger_id] if args.key?(:blocking_trigger_id) + @container_id = args[:container_id] if args.key?(:container_id) + @fingerprint = args[:fingerprint] if args.key?(:fingerprint) + @firing_rule_id = args[:firing_rule_id] if args.key?(:firing_rule_id) + @firing_trigger_id = args[:firing_trigger_id] if args.key?(:firing_trigger_id) + @live_only = args[:live_only] if args.key?(:live_only) + @monitoring_metadata = args[:monitoring_metadata] if args.key?(:monitoring_metadata) + @monitoring_metadata_tag_name_key = args[:monitoring_metadata_tag_name_key] if args.key?(:monitoring_metadata_tag_name_key) + @name = args[:name] if args.key?(:name) + @notes = args[:notes] if args.key?(:notes) + @parameter = args[:parameter] if args.key?(:parameter) + @parent_folder_id = args[:parent_folder_id] if args.key?(:parent_folder_id) + @path = args[:path] if args.key?(:path) + @paused = args[:paused] if args.key?(:paused) + @priority = args[:priority] if args.key?(:priority) + @schedule_end_ms = args[:schedule_end_ms] if args.key?(:schedule_end_ms) + @schedule_start_ms = args[:schedule_start_ms] if args.key?(:schedule_start_ms) + @setup_tag = args[:setup_tag] if args.key?(:setup_tag) + @tag_firing_option = args[:tag_firing_option] if args.key?(:tag_firing_option) + @tag_id = args[:tag_id] if args.key?(:tag_id) + @tag_manager_url = args[:tag_manager_url] if args.key?(:tag_manager_url) + @teardown_tag = args[:teardown_tag] if args.key?(:teardown_tag) + @type = args[:type] if args.key?(:type) + @workspace_id = args[:workspace_id] if args.key?(:workspace_id) + end + end + + # Represents a tag that fires after another tag in order to tear down + # dependencies. + class TeardownTag + include Google::Apis::Core::Hashable + + # 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. + # Corresponds to the JSON property `stopTeardownOnFailure` + # @return [Boolean] + attr_accessor :stop_teardown_on_failure + alias_method :stop_teardown_on_failure?, :stop_teardown_on_failure + + # The name of the teardown tag. + # Corresponds to the JSON property `tagName` + # @return [String] + attr_accessor :tag_name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @stop_teardown_on_failure = args[:stop_teardown_on_failure] if args.key?(:stop_teardown_on_failure) + @tag_name = args[:tag_name] if args.key?(:tag_name) + end + end + + # Represents a Google Tag Manager Trigger + class Trigger + include Google::Apis::Core::Hashable + + # GTM Account ID. + # Corresponds to the JSON property `accountId` + # @return [String] + attr_accessor :account_id + + # Used in the case of auto event tracking. @mutable tagmanager.accounts. + # containers.workspaces.triggers.create @mutable tagmanager.accounts.containers. + # workspaces.triggers.update + # Corresponds to the JSON property `autoEventFilter` + # @return [Array] + attr_accessor :auto_event_filter + + # Represents a Google Tag Manager Parameter. + # Corresponds to the JSON property `checkValidation` + # @return [Google::Apis::TagmanagerV2::Parameter] + attr_accessor :check_validation + + # GTM Container ID. + # Corresponds to the JSON property `containerId` + # @return [String] + attr_accessor :container_id + + # Represents a Google Tag Manager Parameter. + # Corresponds to the JSON property `continuousTimeMinMilliseconds` + # @return [Google::Apis::TagmanagerV2::Parameter] + attr_accessor :continuous_time_min_milliseconds + + # Used in the case of custom event, which is fired iff all Conditions are true. @ + # mutable tagmanager.accounts.containers.workspaces.triggers.create @mutable + # tagmanager.accounts.containers.workspaces.triggers.update + # Corresponds to the JSON property `customEventFilter` + # @return [Array] + attr_accessor :custom_event_filter + + # Represents a Google Tag Manager Parameter. + # Corresponds to the JSON property `eventName` + # @return [Google::Apis::TagmanagerV2::Parameter] + attr_accessor :event_name + + # The trigger will only fire iff all Conditions are true. @mutable tagmanager. + # accounts.containers.workspaces.triggers.create @mutable tagmanager.accounts. + # containers.workspaces.triggers.update + # Corresponds to the JSON property `filter` + # @return [Array] + attr_accessor :filter + + # The fingerprint of the GTM Trigger as computed at storage time. This value is + # recomputed whenever the trigger is modified. + # Corresponds to the JSON property `fingerprint` + # @return [String] + attr_accessor :fingerprint + + # Represents a Google Tag Manager Parameter. + # Corresponds to the JSON property `horizontalScrollPercentageList` + # @return [Google::Apis::TagmanagerV2::Parameter] + attr_accessor :horizontal_scroll_percentage_list + + # Represents a Google Tag Manager Parameter. + # Corresponds to the JSON property `interval` + # @return [Google::Apis::TagmanagerV2::Parameter] + attr_accessor :interval + + # Represents a Google Tag Manager Parameter. + # Corresponds to the JSON property `intervalSeconds` + # @return [Google::Apis::TagmanagerV2::Parameter] + attr_accessor :interval_seconds + + # Represents a Google Tag Manager Parameter. + # Corresponds to the JSON property `limit` + # @return [Google::Apis::TagmanagerV2::Parameter] + attr_accessor :limit + + # Represents a Google Tag Manager Parameter. + # Corresponds to the JSON property `maxTimerLengthSeconds` + # @return [Google::Apis::TagmanagerV2::Parameter] + attr_accessor :max_timer_length_seconds + + # Trigger display name. @mutable tagmanager.accounts.containers.workspaces. + # triggers.create @mutable tagmanager.accounts.containers.workspaces.triggers. + # update + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # User notes on how to apply this trigger in the container. @mutable tagmanager. + # accounts.containers.workspaces.triggers.create @mutable tagmanager.accounts. + # containers.workspaces.triggers.update + # Corresponds to the JSON property `notes` + # @return [String] + attr_accessor :notes + + # Additional parameters. @mutable tagmanager.accounts.containers.workspaces. + # triggers.create @mutable tagmanager.accounts.containers.workspaces.triggers. + # update + # Corresponds to the JSON property `parameter` + # @return [Array] + attr_accessor :parameter + + # Parent folder id. + # Corresponds to the JSON property `parentFolderId` + # @return [String] + attr_accessor :parent_folder_id + + # GTM Trigger's API relative path. + # Corresponds to the JSON property `path` + # @return [String] + attr_accessor :path + + # Represents a Google Tag Manager Parameter. + # Corresponds to the JSON property `selector` + # @return [Google::Apis::TagmanagerV2::Parameter] + attr_accessor :selector + + # Auto generated link to the tag manager UI + # Corresponds to the JSON property `tagManagerUrl` + # @return [String] + attr_accessor :tag_manager_url + + # Represents a Google Tag Manager Parameter. + # Corresponds to the JSON property `totalTimeMinMilliseconds` + # @return [Google::Apis::TagmanagerV2::Parameter] + attr_accessor :total_time_min_milliseconds + + # The Trigger ID uniquely identifies the GTM Trigger. + # Corresponds to the JSON property `triggerId` + # @return [String] + attr_accessor :trigger_id + + # Defines the data layer event that causes this trigger. @mutable tagmanager. + # accounts.containers.workspaces.triggers.create @mutable tagmanager.accounts. + # containers.workspaces.triggers.update + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # Represents a Google Tag Manager Parameter. + # Corresponds to the JSON property `uniqueTriggerId` + # @return [Google::Apis::TagmanagerV2::Parameter] + attr_accessor :unique_trigger_id + + # Represents a Google Tag Manager Parameter. + # Corresponds to the JSON property `verticalScrollPercentageList` + # @return [Google::Apis::TagmanagerV2::Parameter] + attr_accessor :vertical_scroll_percentage_list + + # Represents a Google Tag Manager Parameter. + # Corresponds to the JSON property `visibilitySelector` + # @return [Google::Apis::TagmanagerV2::Parameter] + attr_accessor :visibility_selector + + # Represents a Google Tag Manager Parameter. + # Corresponds to the JSON property `visiblePercentageMax` + # @return [Google::Apis::TagmanagerV2::Parameter] + attr_accessor :visible_percentage_max + + # Represents a Google Tag Manager Parameter. + # Corresponds to the JSON property `visiblePercentageMin` + # @return [Google::Apis::TagmanagerV2::Parameter] + attr_accessor :visible_percentage_min + + # Represents a Google Tag Manager Parameter. + # Corresponds to the JSON property `waitForTags` + # @return [Google::Apis::TagmanagerV2::Parameter] + attr_accessor :wait_for_tags + + # Represents a Google Tag Manager Parameter. + # Corresponds to the JSON property `waitForTagsTimeout` + # @return [Google::Apis::TagmanagerV2::Parameter] + attr_accessor :wait_for_tags_timeout + + # GTM Workspace ID. + # Corresponds to the JSON property `workspaceId` + # @return [String] + attr_accessor :workspace_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @account_id = args[:account_id] if args.key?(:account_id) + @auto_event_filter = args[:auto_event_filter] if args.key?(:auto_event_filter) + @check_validation = args[:check_validation] if args.key?(:check_validation) + @container_id = args[:container_id] if args.key?(:container_id) + @continuous_time_min_milliseconds = args[:continuous_time_min_milliseconds] if args.key?(:continuous_time_min_milliseconds) + @custom_event_filter = args[:custom_event_filter] if args.key?(:custom_event_filter) + @event_name = args[:event_name] if args.key?(:event_name) + @filter = args[:filter] if args.key?(:filter) + @fingerprint = args[:fingerprint] if args.key?(:fingerprint) + @horizontal_scroll_percentage_list = args[:horizontal_scroll_percentage_list] if args.key?(:horizontal_scroll_percentage_list) + @interval = args[:interval] if args.key?(:interval) + @interval_seconds = args[:interval_seconds] if args.key?(:interval_seconds) + @limit = args[:limit] if args.key?(:limit) + @max_timer_length_seconds = args[:max_timer_length_seconds] if args.key?(:max_timer_length_seconds) + @name = args[:name] if args.key?(:name) + @notes = args[:notes] if args.key?(:notes) + @parameter = args[:parameter] if args.key?(:parameter) + @parent_folder_id = args[:parent_folder_id] if args.key?(:parent_folder_id) + @path = args[:path] if args.key?(:path) + @selector = args[:selector] if args.key?(:selector) + @tag_manager_url = args[:tag_manager_url] if args.key?(:tag_manager_url) + @total_time_min_milliseconds = args[:total_time_min_milliseconds] if args.key?(:total_time_min_milliseconds) + @trigger_id = args[:trigger_id] if args.key?(:trigger_id) + @type = args[:type] if args.key?(:type) + @unique_trigger_id = args[:unique_trigger_id] if args.key?(:unique_trigger_id) + @vertical_scroll_percentage_list = args[:vertical_scroll_percentage_list] if args.key?(:vertical_scroll_percentage_list) + @visibility_selector = args[:visibility_selector] if args.key?(:visibility_selector) + @visible_percentage_max = args[:visible_percentage_max] if args.key?(:visible_percentage_max) + @visible_percentage_min = args[:visible_percentage_min] if args.key?(:visible_percentage_min) + @wait_for_tags = args[:wait_for_tags] if args.key?(:wait_for_tags) + @wait_for_tags_timeout = args[:wait_for_tags_timeout] if args.key?(:wait_for_tags_timeout) + @workspace_id = args[:workspace_id] if args.key?(:workspace_id) + end + end + + # Represents a user's permissions to an account and its container. + class UserPermission + include Google::Apis::Core::Hashable + + # Defines the Google Tag Manager Account access permissions. + # Corresponds to the JSON property `accountAccess` + # @return [Google::Apis::TagmanagerV2::AccountAccess] + attr_accessor :account_access + + # The Account ID uniquely identifies the GTM Account. + # Corresponds to the JSON property `accountId` + # @return [String] + attr_accessor :account_id + + # GTM Container access permissions. @mutable tagmanager.accounts.permissions. + # create @mutable tagmanager.accounts.permissions.update + # Corresponds to the JSON property `containerAccess` + # @return [Array] + attr_accessor :container_access + + # User's email address. @mutable tagmanager.accounts.permissions.create + # Corresponds to the JSON property `emailAddress` + # @return [String] + attr_accessor :email_address + + # GTM UserPermission's API relative path. + # Corresponds to the JSON property `path` + # @return [String] + attr_accessor :path + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @account_access = args[:account_access] if args.key?(:account_access) + @account_id = args[:account_id] if args.key?(:account_id) + @container_access = args[:container_access] if args.key?(:container_access) + @email_address = args[:email_address] if args.key?(:email_address) + @path = args[:path] if args.key?(:path) + end + end + + # Represents a Google Tag Manager Variable. + class Variable + include Google::Apis::Core::Hashable + + # GTM Account ID. + # Corresponds to the JSON property `accountId` + # @return [String] + attr_accessor :account_id + + # GTM Container ID. + # Corresponds to the JSON property `containerId` + # @return [String] + attr_accessor :container_id + + # 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. @ + # mutable tagmanager.accounts.containers.workspaces.variables.create @mutable + # tagmanager.accounts.containers.workspaces.variables.update + # Corresponds to the JSON property `disablingTriggerId` + # @return [Array] + attr_accessor :disabling_trigger_id + + # 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. @ + # mutable tagmanager.accounts.containers.workspaces.variables.create @mutable + # tagmanager.accounts.containers.workspaces.variables.update + # Corresponds to the JSON property `enablingTriggerId` + # @return [Array] + attr_accessor :enabling_trigger_id + + # The fingerprint of the GTM Variable as computed at storage time. This value is + # recomputed whenever the variable is modified. + # Corresponds to the JSON property `fingerprint` + # @return [String] + attr_accessor :fingerprint + + # Option to convert a variable value to other value. + # Corresponds to the JSON property `formatValue` + # @return [Google::Apis::TagmanagerV2::VariableFormatValue] + attr_accessor :format_value + + # Variable display name. @mutable tagmanager.accounts.containers.workspaces. + # variables.create @mutable tagmanager.accounts.containers.workspaces.variables. + # update + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # User notes on how to apply this variable in the container. @mutable tagmanager. + # accounts.containers.workspaces.variables.create @mutable tagmanager.accounts. + # containers.workspaces.variables.update + # Corresponds to the JSON property `notes` + # @return [String] + attr_accessor :notes + + # The variable's parameters. @mutable tagmanager.accounts.containers.workspaces. + # variables.create @mutable tagmanager.accounts.containers.workspaces.variables. + # update + # Corresponds to the JSON property `parameter` + # @return [Array] + attr_accessor :parameter + + # Parent folder id. + # Corresponds to the JSON property `parentFolderId` + # @return [String] + attr_accessor :parent_folder_id + + # GTM Variable's API relative path. + # Corresponds to the JSON property `path` + # @return [String] + attr_accessor :path + + # The end timestamp in milliseconds to schedule a variable. @mutable tagmanager. + # accounts.containers.workspaces.variables.create @mutable tagmanager.accounts. + # containers.workspaces.variables.update + # Corresponds to the JSON property `scheduleEndMs` + # @return [Fixnum] + attr_accessor :schedule_end_ms + + # The start timestamp in milliseconds to schedule a variable. @mutable + # tagmanager.accounts.containers.workspaces.variables.create @mutable tagmanager. + # accounts.containers.workspaces.variables.update + # Corresponds to the JSON property `scheduleStartMs` + # @return [Fixnum] + attr_accessor :schedule_start_ms + + # Auto generated link to the tag manager UI + # Corresponds to the JSON property `tagManagerUrl` + # @return [String] + attr_accessor :tag_manager_url + + # GTM Variable Type. @mutable tagmanager.accounts.containers.workspaces. + # variables.create @mutable tagmanager.accounts.containers.workspaces.variables. + # update + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # The Variable ID uniquely identifies the GTM Variable. + # Corresponds to the JSON property `variableId` + # @return [String] + attr_accessor :variable_id + + # GTM Workspace ID. + # Corresponds to the JSON property `workspaceId` + # @return [String] + attr_accessor :workspace_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @account_id = args[:account_id] if args.key?(:account_id) + @container_id = args[:container_id] if args.key?(:container_id) + @disabling_trigger_id = args[:disabling_trigger_id] if args.key?(:disabling_trigger_id) + @enabling_trigger_id = args[:enabling_trigger_id] if args.key?(:enabling_trigger_id) + @fingerprint = args[:fingerprint] if args.key?(:fingerprint) + @format_value = args[:format_value] if args.key?(:format_value) + @name = args[:name] if args.key?(:name) + @notes = args[:notes] if args.key?(:notes) + @parameter = args[:parameter] if args.key?(:parameter) + @parent_folder_id = args[:parent_folder_id] if args.key?(:parent_folder_id) + @path = args[:path] if args.key?(:path) + @schedule_end_ms = args[:schedule_end_ms] if args.key?(:schedule_end_ms) + @schedule_start_ms = args[:schedule_start_ms] if args.key?(:schedule_start_ms) + @tag_manager_url = args[:tag_manager_url] if args.key?(:tag_manager_url) + @type = args[:type] if args.key?(:type) + @variable_id = args[:variable_id] if args.key?(:variable_id) + @workspace_id = args[:workspace_id] if args.key?(:workspace_id) + end + end + + # + class VariableFormatValue + include Google::Apis::Core::Hashable + + # The option to convert a string-type variable value to either lowercase or + # uppercase. + # Corresponds to the JSON property `caseConversionType` + # @return [String] + attr_accessor :case_conversion_type + + # Represents a Google Tag Manager Parameter. + # Corresponds to the JSON property `convertFalseToValue` + # @return [Google::Apis::TagmanagerV2::Parameter] + attr_accessor :convert_false_to_value + + # Represents a Google Tag Manager Parameter. + # Corresponds to the JSON property `convertNullToValue` + # @return [Google::Apis::TagmanagerV2::Parameter] + attr_accessor :convert_null_to_value + + # Represents a Google Tag Manager Parameter. + # Corresponds to the JSON property `convertTrueToValue` + # @return [Google::Apis::TagmanagerV2::Parameter] + attr_accessor :convert_true_to_value + + # Represents a Google Tag Manager Parameter. + # Corresponds to the JSON property `convertUndefinedToValue` + # @return [Google::Apis::TagmanagerV2::Parameter] + attr_accessor :convert_undefined_to_value + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @case_conversion_type = args[:case_conversion_type] if args.key?(:case_conversion_type) + @convert_false_to_value = args[:convert_false_to_value] if args.key?(:convert_false_to_value) + @convert_null_to_value = args[:convert_null_to_value] if args.key?(:convert_null_to_value) + @convert_true_to_value = args[:convert_true_to_value] if args.key?(:convert_true_to_value) + @convert_undefined_to_value = args[:convert_undefined_to_value] if args.key?(:convert_undefined_to_value) + end + end + + # Represents a Google Tag Manager Container Workspace. + class Workspace + include Google::Apis::Core::Hashable + + # GTM Account ID. + # Corresponds to the JSON property `accountId` + # @return [String] + attr_accessor :account_id + + # GTM Container ID. + # Corresponds to the JSON property `containerId` + # @return [String] + attr_accessor :container_id + + # Workspace description. @mutable tagmanager.accounts.containers.workspaces. + # create @mutable tagmanager.accounts.containers.workspaces.update + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # The fingerprint of the GTM Workspace as computed at storage time. This value + # is recomputed whenever the workspace is modified. + # Corresponds to the JSON property `fingerprint` + # @return [String] + attr_accessor :fingerprint + + # Workspace display name. @mutable tagmanager.accounts.containers.workspaces. + # create @mutable tagmanager.accounts.containers.workspaces.update + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # GTM Workspace's API relative path. + # Corresponds to the JSON property `path` + # @return [String] + attr_accessor :path + + # Auto generated link to the tag manager UI + # Corresponds to the JSON property `tagManagerUrl` + # @return [String] + attr_accessor :tag_manager_url + + # The Workspace ID uniquely identifies the GTM Workspace. + # Corresponds to the JSON property `workspaceId` + # @return [String] + attr_accessor :workspace_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @account_id = args[:account_id] if args.key?(:account_id) + @container_id = args[:container_id] if args.key?(:container_id) + @description = args[:description] if args.key?(:description) + @fingerprint = args[:fingerprint] if args.key?(:fingerprint) + @name = args[:name] if args.key?(:name) + @path = args[:path] if args.key?(:path) + @tag_manager_url = args[:tag_manager_url] if args.key?(:tag_manager_url) + @workspace_id = args[:workspace_id] if args.key?(:workspace_id) + end + end + + # Represents a Google Tag Manager Zone's contents. + class Zone + include Google::Apis::Core::Hashable + + # GTM Account ID. + # Corresponds to the JSON property `accountId` + # @return [String] + attr_accessor :account_id + + # Represents a Zone's boundaries. + # Corresponds to the JSON property `boundary` + # @return [Google::Apis::TagmanagerV2::ZoneBoundary] + attr_accessor :boundary + + # Containers that are children of this Zone. + # Corresponds to the JSON property `childContainer` + # @return [Array] + attr_accessor :child_container + + # GTM Container ID. + # Corresponds to the JSON property `containerId` + # @return [String] + attr_accessor :container_id + + # The fingerprint of the GTM Zone as computed at storage time. This value is + # recomputed whenever the zone is modified. + # Corresponds to the JSON property `fingerprint` + # @return [String] + attr_accessor :fingerprint + + # Zone display name. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # User notes on how to apply this zone in the container. + # Corresponds to the JSON property `notes` + # @return [String] + attr_accessor :notes + + # GTM Zone's API relative path. + # Corresponds to the JSON property `path` + # @return [String] + attr_accessor :path + + # Auto generated link to the tag manager UI + # Corresponds to the JSON property `tagManagerUrl` + # @return [String] + attr_accessor :tag_manager_url + + # Represents a Zone's type restrictions. + # Corresponds to the JSON property `typeRestriction` + # @return [Google::Apis::TagmanagerV2::ZoneTypeRestriction] + attr_accessor :type_restriction + + # GTM Workspace ID. + # Corresponds to the JSON property `workspaceId` + # @return [String] + attr_accessor :workspace_id + + # The Zone ID uniquely identifies the GTM Zone. + # Corresponds to the JSON property `zoneId` + # @return [String] + attr_accessor :zone_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @account_id = args[:account_id] if args.key?(:account_id) + @boundary = args[:boundary] if args.key?(:boundary) + @child_container = args[:child_container] if args.key?(:child_container) + @container_id = args[:container_id] if args.key?(:container_id) + @fingerprint = args[:fingerprint] if args.key?(:fingerprint) + @name = args[:name] if args.key?(:name) + @notes = args[:notes] if args.key?(:notes) + @path = args[:path] if args.key?(:path) + @tag_manager_url = args[:tag_manager_url] if args.key?(:tag_manager_url) + @type_restriction = args[:type_restriction] if args.key?(:type_restriction) + @workspace_id = args[:workspace_id] if args.key?(:workspace_id) + @zone_id = args[:zone_id] if args.key?(:zone_id) + end + end + + # Represents a Zone's boundaries. + class ZoneBoundary + include Google::Apis::Core::Hashable + + # The conditions that, when conjoined, make up the boundary. + # Corresponds to the JSON property `condition` + # @return [Array] + attr_accessor :condition + + # Custom evaluation trigger IDs. A zone will evaluate its boundary conditions + # when any of the listed triggers are true. + # Corresponds to the JSON property `customEvaluationTriggerId` + # @return [Array] + attr_accessor :custom_evaluation_trigger_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @condition = args[:condition] if args.key?(:condition) + @custom_evaluation_trigger_id = args[:custom_evaluation_trigger_id] if args.key?(:custom_evaluation_trigger_id) + end + end + + # Represents a child container of a Zone. + class ZoneChildContainer + include Google::Apis::Core::Hashable + + # The zone's nickname for the child container. + # Corresponds to the JSON property `nickname` + # @return [String] + attr_accessor :nickname + + # The child container's public id. + # Corresponds to the JSON property `publicId` + # @return [String] + attr_accessor :public_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @nickname = args[:nickname] if args.key?(:nickname) + @public_id = args[:public_id] if args.key?(:public_id) + end + end + + # Represents a Zone's type restrictions. + class ZoneTypeRestriction + include Google::Apis::Core::Hashable + + # True if type restrictions have been enabled for this Zone. + # Corresponds to the JSON property `enable` + # @return [Boolean] + attr_accessor :enable + alias_method :enable?, :enable + + # List of type public ids that have been whitelisted for use in this Zone. + # Corresponds to the JSON property `whitelistedTypeId` + # @return [Array] + attr_accessor :whitelisted_type_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @enable = args[:enable] if args.key?(:enable) + @whitelisted_type_id = args[:whitelisted_type_id] if args.key?(:whitelisted_type_id) + end + end + end + end +end diff --git a/generated/google/apis/tagmanager_v2/representations.rb b/generated/google/apis/tagmanager_v2/representations.rb new file mode 100644 index 000000000..01483f371 --- /dev/null +++ b/generated/google/apis/tagmanager_v2/representations.rb @@ -0,0 +1,1092 @@ +# Copyright 2015 Google Inc. +# +# 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. + +require 'date' +require 'google/apis/core/base_service' +require 'google/apis/core/json_representation' +require 'google/apis/core/hashable' +require 'google/apis/errors' + +module Google + module Apis + module TagmanagerV2 + + class Account + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AccountAccess + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class BuiltInVariable + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Client + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Condition + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Container + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ContainerAccess + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ContainerVersion + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ContainerVersionHeader + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CreateBuiltInVariableResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CreateContainerVersionRequestVersionOptions + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CreateContainerVersionResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CustomTemplate + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Entity + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Environment + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Folder + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class FolderEntities + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GalleryReference + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GetWorkspaceStatusResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListAccountsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListContainerVersionsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListContainersResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListEnabledBuiltInVariablesResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListEnvironmentsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListFoldersResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListTagsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListTemplatesResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListTriggersResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListUserPermissionsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListVariablesResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListWorkspacesResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListZonesResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class MergeConflict + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Parameter + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class PublishContainerVersionResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class QuickPreviewResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class RevertBuiltInVariableResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class RevertFolderResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class RevertTagResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class RevertTemplateResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class RevertTriggerResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class RevertVariableResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class RevertZoneResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SetupTag + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SyncStatus + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SyncWorkspaceResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Tag + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TeardownTag + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Trigger + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class UserPermission + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Variable + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class VariableFormatValue + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Workspace + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Zone + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ZoneBoundary + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ZoneChildContainer + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ZoneTypeRestriction + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Account + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :account_id, as: 'accountId' + property :fingerprint, as: 'fingerprint' + property :name, as: 'name' + property :path, as: 'path' + property :share_data, as: 'shareData' + property :tag_manager_url, as: 'tagManagerUrl' + end + end + + class AccountAccess + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :permission, as: 'permission' + end + end + + class BuiltInVariable + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :account_id, as: 'accountId' + property :container_id, as: 'containerId' + property :name, as: 'name' + property :path, as: 'path' + property :type, as: 'type' + property :workspace_id, as: 'workspaceId' + end + end + + class Client + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :account_id, as: 'accountId' + property :client_id, as: 'clientId' + property :container_id, as: 'containerId' + property :fingerprint, as: 'fingerprint' + property :name, as: 'name' + collection :parameter, as: 'parameter', class: Google::Apis::TagmanagerV2::Parameter, decorator: Google::Apis::TagmanagerV2::Parameter::Representation + + property :parent_folder_id, as: 'parentFolderId' + property :path, as: 'path' + property :priority, as: 'priority' + property :tag_manager_url, as: 'tagManagerUrl' + property :type, as: 'type' + property :workspace_id, as: 'workspaceId' + end + end + + class Condition + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :parameter, as: 'parameter', class: Google::Apis::TagmanagerV2::Parameter, decorator: Google::Apis::TagmanagerV2::Parameter::Representation + + property :type, as: 'type' + end + end + + class Container + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :account_id, as: 'accountId' + property :container_id, as: 'containerId' + collection :domain_name, as: 'domainName' + property :fingerprint, as: 'fingerprint' + property :name, as: 'name' + property :notes, as: 'notes' + property :path, as: 'path' + property :public_id, as: 'publicId' + property :tag_manager_url, as: 'tagManagerUrl' + collection :usage_context, as: 'usageContext' + end + end + + class ContainerAccess + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :container_id, as: 'containerId' + property :permission, as: 'permission' + end + end + + class ContainerVersion + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :account_id, as: 'accountId' + collection :built_in_variable, as: 'builtInVariable', class: Google::Apis::TagmanagerV2::BuiltInVariable, decorator: Google::Apis::TagmanagerV2::BuiltInVariable::Representation + + collection :client, as: 'client', class: Google::Apis::TagmanagerV2::Client, decorator: Google::Apis::TagmanagerV2::Client::Representation + + property :container, as: 'container', class: Google::Apis::TagmanagerV2::Container, decorator: Google::Apis::TagmanagerV2::Container::Representation + + property :container_id, as: 'containerId' + property :container_version_id, as: 'containerVersionId' + collection :custom_template, as: 'customTemplate', class: Google::Apis::TagmanagerV2::CustomTemplate, decorator: Google::Apis::TagmanagerV2::CustomTemplate::Representation + + property :deleted, as: 'deleted' + property :description, as: 'description' + property :fingerprint, as: 'fingerprint' + collection :folder, as: 'folder', class: Google::Apis::TagmanagerV2::Folder, decorator: Google::Apis::TagmanagerV2::Folder::Representation + + property :name, as: 'name' + property :path, as: 'path' + collection :tag, as: 'tag', class: Google::Apis::TagmanagerV2::Tag, decorator: Google::Apis::TagmanagerV2::Tag::Representation + + property :tag_manager_url, as: 'tagManagerUrl' + collection :trigger, as: 'trigger', class: Google::Apis::TagmanagerV2::Trigger, decorator: Google::Apis::TagmanagerV2::Trigger::Representation + + collection :variable, as: 'variable', class: Google::Apis::TagmanagerV2::Variable, decorator: Google::Apis::TagmanagerV2::Variable::Representation + + collection :zone, as: 'zone', class: Google::Apis::TagmanagerV2::Zone, decorator: Google::Apis::TagmanagerV2::Zone::Representation + + end + end + + class ContainerVersionHeader + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :account_id, as: 'accountId' + property :container_id, as: 'containerId' + property :container_version_id, as: 'containerVersionId' + property :deleted, as: 'deleted' + property :name, as: 'name' + property :num_custom_templates, as: 'numCustomTemplates' + property :num_macros, as: 'numMacros' + property :num_rules, as: 'numRules' + property :num_tags, as: 'numTags' + property :num_triggers, as: 'numTriggers' + property :num_variables, as: 'numVariables' + property :num_zones, as: 'numZones' + property :path, as: 'path' + end + end + + class CreateBuiltInVariableResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :built_in_variable, as: 'builtInVariable', class: Google::Apis::TagmanagerV2::BuiltInVariable, decorator: Google::Apis::TagmanagerV2::BuiltInVariable::Representation + + end + end + + class CreateContainerVersionRequestVersionOptions + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :name, as: 'name' + property :notes, as: 'notes' + end + end + + class CreateContainerVersionResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :compiler_error, as: 'compilerError' + property :container_version, as: 'containerVersion', class: Google::Apis::TagmanagerV2::ContainerVersion, decorator: Google::Apis::TagmanagerV2::ContainerVersion::Representation + + property :new_workspace_path, as: 'newWorkspacePath' + property :sync_status, as: 'syncStatus', class: Google::Apis::TagmanagerV2::SyncStatus, decorator: Google::Apis::TagmanagerV2::SyncStatus::Representation + + end + end + + class CustomTemplate + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :account_id, as: 'accountId' + property :container_id, as: 'containerId' + property :fingerprint, as: 'fingerprint' + property :gallery_reference, as: 'galleryReference', class: Google::Apis::TagmanagerV2::GalleryReference, decorator: Google::Apis::TagmanagerV2::GalleryReference::Representation + + property :name, as: 'name' + property :path, as: 'path' + property :tag_manager_url, as: 'tagManagerUrl' + property :template_data, as: 'templateData' + property :template_id, as: 'templateId' + property :workspace_id, as: 'workspaceId' + end + end + + class Entity + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :change_status, as: 'changeStatus' + property :folder, as: 'folder', class: Google::Apis::TagmanagerV2::Folder, decorator: Google::Apis::TagmanagerV2::Folder::Representation + + property :tag, as: 'tag', class: Google::Apis::TagmanagerV2::Tag, decorator: Google::Apis::TagmanagerV2::Tag::Representation + + property :trigger, as: 'trigger', class: Google::Apis::TagmanagerV2::Trigger, decorator: Google::Apis::TagmanagerV2::Trigger::Representation + + property :variable, as: 'variable', class: Google::Apis::TagmanagerV2::Variable, decorator: Google::Apis::TagmanagerV2::Variable::Representation + + end + end + + class Environment + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :account_id, as: 'accountId' + property :authorization_code, as: 'authorizationCode' + property :authorization_timestamp, as: 'authorizationTimestamp' + property :container_id, as: 'containerId' + property :container_version_id, as: 'containerVersionId' + property :description, as: 'description' + property :enable_debug, as: 'enableDebug' + property :environment_id, as: 'environmentId' + property :fingerprint, as: 'fingerprint' + property :name, as: 'name' + property :path, as: 'path' + property :tag_manager_url, as: 'tagManagerUrl' + property :type, as: 'type' + property :url, as: 'url' + property :workspace_id, as: 'workspaceId' + end + end + + class Folder + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :account_id, as: 'accountId' + property :container_id, as: 'containerId' + property :fingerprint, as: 'fingerprint' + property :folder_id, as: 'folderId' + property :name, as: 'name' + property :notes, as: 'notes' + property :path, as: 'path' + property :tag_manager_url, as: 'tagManagerUrl' + property :workspace_id, as: 'workspaceId' + end + end + + class FolderEntities + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :tag, as: 'tag', class: Google::Apis::TagmanagerV2::Tag, decorator: Google::Apis::TagmanagerV2::Tag::Representation + + collection :trigger, as: 'trigger', class: Google::Apis::TagmanagerV2::Trigger, decorator: Google::Apis::TagmanagerV2::Trigger::Representation + + collection :variable, as: 'variable', class: Google::Apis::TagmanagerV2::Variable, decorator: Google::Apis::TagmanagerV2::Variable::Representation + + end + end + + class GalleryReference + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :host, as: 'host' + property :is_modified, as: 'isModified' + property :owner, as: 'owner' + property :repository, as: 'repository' + property :signature, as: 'signature' + property :version, as: 'version' + end + end + + class GetWorkspaceStatusResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :merge_conflict, as: 'mergeConflict', class: Google::Apis::TagmanagerV2::MergeConflict, decorator: Google::Apis::TagmanagerV2::MergeConflict::Representation + + collection :workspace_change, as: 'workspaceChange', class: Google::Apis::TagmanagerV2::Entity, decorator: Google::Apis::TagmanagerV2::Entity::Representation + + end + end + + class ListAccountsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :account, as: 'account', class: Google::Apis::TagmanagerV2::Account, decorator: Google::Apis::TagmanagerV2::Account::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class ListContainerVersionsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :container_version_header, as: 'containerVersionHeader', class: Google::Apis::TagmanagerV2::ContainerVersionHeader, decorator: Google::Apis::TagmanagerV2::ContainerVersionHeader::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class ListContainersResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :container, as: 'container', class: Google::Apis::TagmanagerV2::Container, decorator: Google::Apis::TagmanagerV2::Container::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class ListEnabledBuiltInVariablesResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :built_in_variable, as: 'builtInVariable', class: Google::Apis::TagmanagerV2::BuiltInVariable, decorator: Google::Apis::TagmanagerV2::BuiltInVariable::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class ListEnvironmentsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :environment, as: 'environment', class: Google::Apis::TagmanagerV2::Environment, decorator: Google::Apis::TagmanagerV2::Environment::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class ListFoldersResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :folder, as: 'folder', class: Google::Apis::TagmanagerV2::Folder, decorator: Google::Apis::TagmanagerV2::Folder::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class ListTagsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :tag, as: 'tag', class: Google::Apis::TagmanagerV2::Tag, decorator: Google::Apis::TagmanagerV2::Tag::Representation + + end + end + + class ListTemplatesResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :template, as: 'template', class: Google::Apis::TagmanagerV2::CustomTemplate, decorator: Google::Apis::TagmanagerV2::CustomTemplate::Representation + + end + end + + class ListTriggersResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :trigger, as: 'trigger', class: Google::Apis::TagmanagerV2::Trigger, decorator: Google::Apis::TagmanagerV2::Trigger::Representation + + end + end + + class ListUserPermissionsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :user_permission, as: 'userPermission', class: Google::Apis::TagmanagerV2::UserPermission, decorator: Google::Apis::TagmanagerV2::UserPermission::Representation + + end + end + + class ListVariablesResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :variable, as: 'variable', class: Google::Apis::TagmanagerV2::Variable, decorator: Google::Apis::TagmanagerV2::Variable::Representation + + end + end + + class ListWorkspacesResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :workspace, as: 'workspace', class: Google::Apis::TagmanagerV2::Workspace, decorator: Google::Apis::TagmanagerV2::Workspace::Representation + + end + end + + class ListZonesResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :zone, as: 'zone', class: Google::Apis::TagmanagerV2::Zone, decorator: Google::Apis::TagmanagerV2::Zone::Representation + + end + end + + class MergeConflict + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :entity_in_base_version, as: 'entityInBaseVersion', class: Google::Apis::TagmanagerV2::Entity, decorator: Google::Apis::TagmanagerV2::Entity::Representation + + property :entity_in_workspace, as: 'entityInWorkspace', class: Google::Apis::TagmanagerV2::Entity, decorator: Google::Apis::TagmanagerV2::Entity::Representation + + end + end + + class Parameter + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :key, as: 'key' + collection :list, as: 'list', class: Google::Apis::TagmanagerV2::Parameter, decorator: Google::Apis::TagmanagerV2::Parameter::Representation + + collection :map, as: 'map', class: Google::Apis::TagmanagerV2::Parameter, decorator: Google::Apis::TagmanagerV2::Parameter::Representation + + property :type, as: 'type' + property :value, as: 'value' + end + end + + class PublishContainerVersionResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :compiler_error, as: 'compilerError' + property :container_version, as: 'containerVersion', class: Google::Apis::TagmanagerV2::ContainerVersion, decorator: Google::Apis::TagmanagerV2::ContainerVersion::Representation + + end + end + + class QuickPreviewResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :compiler_error, as: 'compilerError' + property :container_version, as: 'containerVersion', class: Google::Apis::TagmanagerV2::ContainerVersion, decorator: Google::Apis::TagmanagerV2::ContainerVersion::Representation + + property :sync_status, as: 'syncStatus', class: Google::Apis::TagmanagerV2::SyncStatus, decorator: Google::Apis::TagmanagerV2::SyncStatus::Representation + + end + end + + class RevertBuiltInVariableResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :enabled, as: 'enabled' + end + end + + class RevertFolderResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :folder, as: 'folder', class: Google::Apis::TagmanagerV2::Folder, decorator: Google::Apis::TagmanagerV2::Folder::Representation + + end + end + + class RevertTagResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :tag, as: 'tag', class: Google::Apis::TagmanagerV2::Tag, decorator: Google::Apis::TagmanagerV2::Tag::Representation + + end + end + + class RevertTemplateResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :template, as: 'template', class: Google::Apis::TagmanagerV2::CustomTemplate, decorator: Google::Apis::TagmanagerV2::CustomTemplate::Representation + + end + end + + class RevertTriggerResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :trigger, as: 'trigger', class: Google::Apis::TagmanagerV2::Trigger, decorator: Google::Apis::TagmanagerV2::Trigger::Representation + + end + end + + class RevertVariableResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :variable, as: 'variable', class: Google::Apis::TagmanagerV2::Variable, decorator: Google::Apis::TagmanagerV2::Variable::Representation + + end + end + + class RevertZoneResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :zone, as: 'zone', class: Google::Apis::TagmanagerV2::Zone, decorator: Google::Apis::TagmanagerV2::Zone::Representation + + end + end + + class SetupTag + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :stop_on_setup_failure, as: 'stopOnSetupFailure' + property :tag_name, as: 'tagName' + end + end + + class SyncStatus + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :merge_conflict, as: 'mergeConflict' + property :sync_error, as: 'syncError' + end + end + + class SyncWorkspaceResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :merge_conflict, as: 'mergeConflict', class: Google::Apis::TagmanagerV2::MergeConflict, decorator: Google::Apis::TagmanagerV2::MergeConflict::Representation + + property :sync_status, as: 'syncStatus', class: Google::Apis::TagmanagerV2::SyncStatus, decorator: Google::Apis::TagmanagerV2::SyncStatus::Representation + + end + end + + class Tag + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :account_id, as: 'accountId' + collection :blocking_rule_id, as: 'blockingRuleId' + collection :blocking_trigger_id, as: 'blockingTriggerId' + property :container_id, as: 'containerId' + property :fingerprint, as: 'fingerprint' + collection :firing_rule_id, as: 'firingRuleId' + collection :firing_trigger_id, as: 'firingTriggerId' + property :live_only, as: 'liveOnly' + property :monitoring_metadata, as: 'monitoringMetadata', class: Google::Apis::TagmanagerV2::Parameter, decorator: Google::Apis::TagmanagerV2::Parameter::Representation + + property :monitoring_metadata_tag_name_key, as: 'monitoringMetadataTagNameKey' + property :name, as: 'name' + property :notes, as: 'notes' + collection :parameter, as: 'parameter', class: Google::Apis::TagmanagerV2::Parameter, decorator: Google::Apis::TagmanagerV2::Parameter::Representation + + property :parent_folder_id, as: 'parentFolderId' + property :path, as: 'path' + property :paused, as: 'paused' + property :priority, as: 'priority', class: Google::Apis::TagmanagerV2::Parameter, decorator: Google::Apis::TagmanagerV2::Parameter::Representation + + property :schedule_end_ms, :numeric_string => true, as: 'scheduleEndMs' + property :schedule_start_ms, :numeric_string => true, as: 'scheduleStartMs' + collection :setup_tag, as: 'setupTag', class: Google::Apis::TagmanagerV2::SetupTag, decorator: Google::Apis::TagmanagerV2::SetupTag::Representation + + property :tag_firing_option, as: 'tagFiringOption' + property :tag_id, as: 'tagId' + property :tag_manager_url, as: 'tagManagerUrl' + collection :teardown_tag, as: 'teardownTag', class: Google::Apis::TagmanagerV2::TeardownTag, decorator: Google::Apis::TagmanagerV2::TeardownTag::Representation + + property :type, as: 'type' + property :workspace_id, as: 'workspaceId' + end + end + + class TeardownTag + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :stop_teardown_on_failure, as: 'stopTeardownOnFailure' + property :tag_name, as: 'tagName' + end + end + + class Trigger + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :account_id, as: 'accountId' + collection :auto_event_filter, as: 'autoEventFilter', class: Google::Apis::TagmanagerV2::Condition, decorator: Google::Apis::TagmanagerV2::Condition::Representation + + property :check_validation, as: 'checkValidation', class: Google::Apis::TagmanagerV2::Parameter, decorator: Google::Apis::TagmanagerV2::Parameter::Representation + + property :container_id, as: 'containerId' + property :continuous_time_min_milliseconds, as: 'continuousTimeMinMilliseconds', class: Google::Apis::TagmanagerV2::Parameter, decorator: Google::Apis::TagmanagerV2::Parameter::Representation + + collection :custom_event_filter, as: 'customEventFilter', class: Google::Apis::TagmanagerV2::Condition, decorator: Google::Apis::TagmanagerV2::Condition::Representation + + property :event_name, as: 'eventName', class: Google::Apis::TagmanagerV2::Parameter, decorator: Google::Apis::TagmanagerV2::Parameter::Representation + + collection :filter, as: 'filter', class: Google::Apis::TagmanagerV2::Condition, decorator: Google::Apis::TagmanagerV2::Condition::Representation + + property :fingerprint, as: 'fingerprint' + property :horizontal_scroll_percentage_list, as: 'horizontalScrollPercentageList', class: Google::Apis::TagmanagerV2::Parameter, decorator: Google::Apis::TagmanagerV2::Parameter::Representation + + property :interval, as: 'interval', class: Google::Apis::TagmanagerV2::Parameter, decorator: Google::Apis::TagmanagerV2::Parameter::Representation + + property :interval_seconds, as: 'intervalSeconds', class: Google::Apis::TagmanagerV2::Parameter, decorator: Google::Apis::TagmanagerV2::Parameter::Representation + + property :limit, as: 'limit', class: Google::Apis::TagmanagerV2::Parameter, decorator: Google::Apis::TagmanagerV2::Parameter::Representation + + property :max_timer_length_seconds, as: 'maxTimerLengthSeconds', class: Google::Apis::TagmanagerV2::Parameter, decorator: Google::Apis::TagmanagerV2::Parameter::Representation + + property :name, as: 'name' + property :notes, as: 'notes' + collection :parameter, as: 'parameter', class: Google::Apis::TagmanagerV2::Parameter, decorator: Google::Apis::TagmanagerV2::Parameter::Representation + + property :parent_folder_id, as: 'parentFolderId' + property :path, as: 'path' + property :selector, as: 'selector', class: Google::Apis::TagmanagerV2::Parameter, decorator: Google::Apis::TagmanagerV2::Parameter::Representation + + property :tag_manager_url, as: 'tagManagerUrl' + property :total_time_min_milliseconds, as: 'totalTimeMinMilliseconds', class: Google::Apis::TagmanagerV2::Parameter, decorator: Google::Apis::TagmanagerV2::Parameter::Representation + + property :trigger_id, as: 'triggerId' + property :type, as: 'type' + property :unique_trigger_id, as: 'uniqueTriggerId', class: Google::Apis::TagmanagerV2::Parameter, decorator: Google::Apis::TagmanagerV2::Parameter::Representation + + property :vertical_scroll_percentage_list, as: 'verticalScrollPercentageList', class: Google::Apis::TagmanagerV2::Parameter, decorator: Google::Apis::TagmanagerV2::Parameter::Representation + + property :visibility_selector, as: 'visibilitySelector', class: Google::Apis::TagmanagerV2::Parameter, decorator: Google::Apis::TagmanagerV2::Parameter::Representation + + property :visible_percentage_max, as: 'visiblePercentageMax', class: Google::Apis::TagmanagerV2::Parameter, decorator: Google::Apis::TagmanagerV2::Parameter::Representation + + property :visible_percentage_min, as: 'visiblePercentageMin', class: Google::Apis::TagmanagerV2::Parameter, decorator: Google::Apis::TagmanagerV2::Parameter::Representation + + property :wait_for_tags, as: 'waitForTags', class: Google::Apis::TagmanagerV2::Parameter, decorator: Google::Apis::TagmanagerV2::Parameter::Representation + + property :wait_for_tags_timeout, as: 'waitForTagsTimeout', class: Google::Apis::TagmanagerV2::Parameter, decorator: Google::Apis::TagmanagerV2::Parameter::Representation + + property :workspace_id, as: 'workspaceId' + end + end + + class UserPermission + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :account_access, as: 'accountAccess', class: Google::Apis::TagmanagerV2::AccountAccess, decorator: Google::Apis::TagmanagerV2::AccountAccess::Representation + + property :account_id, as: 'accountId' + collection :container_access, as: 'containerAccess', class: Google::Apis::TagmanagerV2::ContainerAccess, decorator: Google::Apis::TagmanagerV2::ContainerAccess::Representation + + property :email_address, as: 'emailAddress' + property :path, as: 'path' + end + end + + class Variable + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :account_id, as: 'accountId' + property :container_id, as: 'containerId' + collection :disabling_trigger_id, as: 'disablingTriggerId' + collection :enabling_trigger_id, as: 'enablingTriggerId' + property :fingerprint, as: 'fingerprint' + property :format_value, as: 'formatValue', class: Google::Apis::TagmanagerV2::VariableFormatValue, decorator: Google::Apis::TagmanagerV2::VariableFormatValue::Representation + + property :name, as: 'name' + property :notes, as: 'notes' + collection :parameter, as: 'parameter', class: Google::Apis::TagmanagerV2::Parameter, decorator: Google::Apis::TagmanagerV2::Parameter::Representation + + property :parent_folder_id, as: 'parentFolderId' + property :path, as: 'path' + property :schedule_end_ms, :numeric_string => true, as: 'scheduleEndMs' + property :schedule_start_ms, :numeric_string => true, as: 'scheduleStartMs' + property :tag_manager_url, as: 'tagManagerUrl' + property :type, as: 'type' + property :variable_id, as: 'variableId' + property :workspace_id, as: 'workspaceId' + end + end + + class VariableFormatValue + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :case_conversion_type, as: 'caseConversionType' + property :convert_false_to_value, as: 'convertFalseToValue', class: Google::Apis::TagmanagerV2::Parameter, decorator: Google::Apis::TagmanagerV2::Parameter::Representation + + property :convert_null_to_value, as: 'convertNullToValue', class: Google::Apis::TagmanagerV2::Parameter, decorator: Google::Apis::TagmanagerV2::Parameter::Representation + + property :convert_true_to_value, as: 'convertTrueToValue', class: Google::Apis::TagmanagerV2::Parameter, decorator: Google::Apis::TagmanagerV2::Parameter::Representation + + property :convert_undefined_to_value, as: 'convertUndefinedToValue', class: Google::Apis::TagmanagerV2::Parameter, decorator: Google::Apis::TagmanagerV2::Parameter::Representation + + end + end + + class Workspace + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :account_id, as: 'accountId' + property :container_id, as: 'containerId' + property :description, as: 'description' + property :fingerprint, as: 'fingerprint' + property :name, as: 'name' + property :path, as: 'path' + property :tag_manager_url, as: 'tagManagerUrl' + property :workspace_id, as: 'workspaceId' + end + end + + class Zone + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :account_id, as: 'accountId' + property :boundary, as: 'boundary', class: Google::Apis::TagmanagerV2::ZoneBoundary, decorator: Google::Apis::TagmanagerV2::ZoneBoundary::Representation + + collection :child_container, as: 'childContainer', class: Google::Apis::TagmanagerV2::ZoneChildContainer, decorator: Google::Apis::TagmanagerV2::ZoneChildContainer::Representation + + property :container_id, as: 'containerId' + property :fingerprint, as: 'fingerprint' + property :name, as: 'name' + property :notes, as: 'notes' + property :path, as: 'path' + property :tag_manager_url, as: 'tagManagerUrl' + property :type_restriction, as: 'typeRestriction', class: Google::Apis::TagmanagerV2::ZoneTypeRestriction, decorator: Google::Apis::TagmanagerV2::ZoneTypeRestriction::Representation + + property :workspace_id, as: 'workspaceId' + property :zone_id, as: 'zoneId' + end + end + + class ZoneBoundary + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :condition, as: 'condition', class: Google::Apis::TagmanagerV2::Condition, decorator: Google::Apis::TagmanagerV2::Condition::Representation + + collection :custom_evaluation_trigger_id, as: 'customEvaluationTriggerId' + end + end + + class ZoneChildContainer + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :nickname, as: 'nickname' + property :public_id, as: 'publicId' + end + end + + class ZoneTypeRestriction + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :enable, as: 'enable' + collection :whitelisted_type_id, as: 'whitelistedTypeId' + end + end + end + end +end diff --git a/generated/google/apis/tagmanager_v2/service.rb b/generated/google/apis/tagmanager_v2/service.rb new file mode 100644 index 000000000..d10a12690 --- /dev/null +++ b/generated/google/apis/tagmanager_v2/service.rb @@ -0,0 +1,2730 @@ +# Copyright 2015 Google Inc. +# +# 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. + +require 'google/apis/core/base_service' +require 'google/apis/core/json_representation' +require 'google/apis/core/hashable' +require 'google/apis/errors' + +module Google + module Apis + module TagmanagerV2 + # Tag Manager API + # + # This API allows clients to access and modify container and tag configuration. + # + # @example + # require 'google/apis/tagmanager_v2' + # + # Tagmanager = Google::Apis::TagmanagerV2 # Alias the module + # service = Tagmanager::TagManagerService.new + # + # @see https://developers.google.com/tag-manager + class TagManagerService < Google::Apis::Core::BaseService + # @return [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. + attr_accessor :key + + # @return [String] + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + attr_accessor :quota_user + + def initialize + super('https://tagmanager.googleapis.com/', '') + @batch_path = 'batch' + end + + # Gets a GTM Account. + # @param [String] path + # GTM Accounts's API relative path. Example: accounts/`account_id` + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::Account] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::Account] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_account(path, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'tagmanager/v2/{+path}', options) + command.response_representation = Google::Apis::TagmanagerV2::Account::Representation + command.response_class = Google::Apis::TagmanagerV2::Account + command.params['path'] = path unless path.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists all GTM Accounts that a user has access to. + # @param [String] page_token + # Continuation token for fetching the next page of results. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::ListAccountsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::ListAccountsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_accounts(page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'tagmanager/v2/accounts', options) + command.response_representation = Google::Apis::TagmanagerV2::ListAccountsResponse::Representation + command.response_class = Google::Apis::TagmanagerV2::ListAccountsResponse + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Updates a GTM Account. + # @param [String] path + # GTM Accounts's API relative path. Example: accounts/`account_id` + # @param [Google::Apis::TagmanagerV2::Account] account_object + # @param [String] fingerprint + # When provided, this fingerprint must match the fingerprint of the account in + # storage. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::Account] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::Account] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def update_account(path, account_object = nil, fingerprint: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:put, 'tagmanager/v2/{+path}', options) + command.request_representation = Google::Apis::TagmanagerV2::Account::Representation + command.request_object = account_object + command.response_representation = Google::Apis::TagmanagerV2::Account::Representation + command.response_class = Google::Apis::TagmanagerV2::Account + command.params['path'] = path unless path.nil? + command.query['fingerprint'] = fingerprint unless fingerprint.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates a Container. + # @param [String] parent + # GTM Account's API relative path. Example: accounts/`account_id`. + # @param [Google::Apis::TagmanagerV2::Container] container_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::Container] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::Container] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_account_container(parent, container_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'tagmanager/v2/{+parent}/containers', options) + command.request_representation = Google::Apis::TagmanagerV2::Container::Representation + command.request_object = container_object + command.response_representation = Google::Apis::TagmanagerV2::Container::Representation + command.response_class = Google::Apis::TagmanagerV2::Container + command.params['parent'] = parent unless parent.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a Container. + # @param [String] path + # GTM Container's API relative path. Example: accounts/`account_id`/containers/` + # container_id` + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [NilClass] No result returned for this method + # @yieldparam err [StandardError] error object if request failed + # + # @return [void] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_account_container(path, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'tagmanager/v2/{+path}', options) + command.params['path'] = path unless path.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets a Container. + # @param [String] path + # GTM Container's API relative path. Example: accounts/`account_id`/containers/` + # container_id` + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::Container] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::Container] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_account_container(path, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'tagmanager/v2/{+path}', options) + command.response_representation = Google::Apis::TagmanagerV2::Container::Representation + command.response_class = Google::Apis::TagmanagerV2::Container + command.params['path'] = path unless path.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists all Containers that belongs to a GTM Account. + # @param [String] parent + # GTM Accounts's API relative path. Example: accounts/`account_id`. + # @param [String] page_token + # Continuation token for fetching the next page of results. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::ListContainersResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::ListContainersResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_account_containers(parent, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'tagmanager/v2/{+parent}/containers', options) + command.response_representation = Google::Apis::TagmanagerV2::ListContainersResponse::Representation + command.response_class = Google::Apis::TagmanagerV2::ListContainersResponse + command.params['parent'] = parent unless parent.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Updates a Container. + # @param [String] path + # GTM Container's API relative path. Example: accounts/`account_id`/containers/` + # container_id` + # @param [Google::Apis::TagmanagerV2::Container] container_object + # @param [String] fingerprint + # When provided, this fingerprint must match the fingerprint of the container in + # storage. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::Container] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::Container] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def update_account_container(path, container_object = nil, fingerprint: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:put, 'tagmanager/v2/{+path}', options) + command.request_representation = Google::Apis::TagmanagerV2::Container::Representation + command.request_object = container_object + command.response_representation = Google::Apis::TagmanagerV2::Container::Representation + command.response_class = Google::Apis::TagmanagerV2::Container + command.params['path'] = path unless path.nil? + command.query['fingerprint'] = fingerprint unless fingerprint.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates a GTM Environment. + # @param [String] parent + # GTM Container's API relative path. Example: accounts/`account_id`/containers/` + # container_id` + # @param [Google::Apis::TagmanagerV2::Environment] environment_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::Environment] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::Environment] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_account_container_environment(parent, environment_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'tagmanager/v2/{+parent}/environments', options) + command.request_representation = Google::Apis::TagmanagerV2::Environment::Representation + command.request_object = environment_object + command.response_representation = Google::Apis::TagmanagerV2::Environment::Representation + command.response_class = Google::Apis::TagmanagerV2::Environment + command.params['parent'] = parent unless parent.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a GTM Environment. + # @param [String] path + # GTM Environment's API relative path. Example: accounts/`account_id`/containers/ + # `container_id`/environments/`environment_id` + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [NilClass] No result returned for this method + # @yieldparam err [StandardError] error object if request failed + # + # @return [void] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_account_container_environment(path, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'tagmanager/v2/{+path}', options) + command.params['path'] = path unless path.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets a GTM Environment. + # @param [String] path + # GTM Environment's API relative path. Example: accounts/`account_id`/containers/ + # `container_id`/environments/`environment_id` + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::Environment] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::Environment] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_account_container_environment(path, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'tagmanager/v2/{+path}', options) + command.response_representation = Google::Apis::TagmanagerV2::Environment::Representation + command.response_class = Google::Apis::TagmanagerV2::Environment + command.params['path'] = path unless path.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists all GTM Environments of a GTM Container. + # @param [String] parent + # GTM Container's API relative path. Example: accounts/`account_id`/containers/` + # container_id` + # @param [String] page_token + # Continuation token for fetching the next page of results. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::ListEnvironmentsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::ListEnvironmentsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_account_container_environments(parent, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'tagmanager/v2/{+parent}/environments', options) + command.response_representation = Google::Apis::TagmanagerV2::ListEnvironmentsResponse::Representation + command.response_class = Google::Apis::TagmanagerV2::ListEnvironmentsResponse + command.params['parent'] = parent unless parent.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Re-generates the authorization code for a GTM Environment. + # @param [String] path + # GTM Environment's API relative path. Example: accounts/`account_id`/containers/ + # `container_id`/environments/`environment_id` + # @param [Google::Apis::TagmanagerV2::Environment] environment_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::Environment] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::Environment] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def reauthorize_account_container_environment(path, environment_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'tagmanager/v2/{+path}:reauthorize', options) + command.request_representation = Google::Apis::TagmanagerV2::Environment::Representation + command.request_object = environment_object + command.response_representation = Google::Apis::TagmanagerV2::Environment::Representation + command.response_class = Google::Apis::TagmanagerV2::Environment + command.params['path'] = path unless path.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Updates a GTM Environment. + # @param [String] path + # GTM Environment's API relative path. Example: accounts/`account_id`/containers/ + # `container_id`/environments/`environment_id` + # @param [Google::Apis::TagmanagerV2::Environment] environment_object + # @param [String] fingerprint + # When provided, this fingerprint must match the fingerprint of the environment + # in storage. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::Environment] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::Environment] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def update_account_container_environment(path, environment_object = nil, fingerprint: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:put, 'tagmanager/v2/{+path}', options) + command.request_representation = Google::Apis::TagmanagerV2::Environment::Representation + command.request_object = environment_object + command.response_representation = Google::Apis::TagmanagerV2::Environment::Representation + command.response_class = Google::Apis::TagmanagerV2::Environment + command.params['path'] = path unless path.nil? + command.query['fingerprint'] = fingerprint unless fingerprint.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets the latest container version header + # @param [String] parent + # GTM Container's API relative path. Example: accounts/`account_id`/containers/` + # container_id` + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::ContainerVersionHeader] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::ContainerVersionHeader] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def latest_account_container_version_header(parent, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'tagmanager/v2/{+parent}/version_headers:latest', options) + command.response_representation = Google::Apis::TagmanagerV2::ContainerVersionHeader::Representation + command.response_class = Google::Apis::TagmanagerV2::ContainerVersionHeader + command.params['parent'] = parent unless parent.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists all Container Versions of a GTM Container. + # @param [String] parent + # GTM Container's API relative path. Example: accounts/`account_id`/containers/` + # container_id` + # @param [Boolean] include_deleted + # Also retrieve deleted (archived) versions when true. + # @param [String] page_token + # Continuation token for fetching the next page of results. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::ListContainerVersionsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::ListContainerVersionsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_account_container_version_headers(parent, include_deleted: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'tagmanager/v2/{+parent}/version_headers', options) + command.response_representation = Google::Apis::TagmanagerV2::ListContainerVersionsResponse::Representation + command.response_class = Google::Apis::TagmanagerV2::ListContainerVersionsResponse + command.params['parent'] = parent unless parent.nil? + command.query['includeDeleted'] = include_deleted unless include_deleted.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a Container Version. + # @param [String] path + # GTM ContainerVersion's API relative path. Example: accounts/`account_id`/ + # containers/`container_id`/versions/`version_id` + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [NilClass] No result returned for this method + # @yieldparam err [StandardError] error object if request failed + # + # @return [void] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_account_container_version(path, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'tagmanager/v2/{+path}', options) + command.params['path'] = path unless path.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets a Container Version. + # @param [String] path + # GTM ContainerVersion's API relative path. Example: accounts/`account_id`/ + # containers/`container_id`/versions/`version_id` + # @param [String] container_version_id + # The GTM ContainerVersion ID. Specify published to retrieve the currently + # published version. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::ContainerVersion] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::ContainerVersion] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_account_container_version(path, container_version_id: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'tagmanager/v2/{+path}', options) + command.response_representation = Google::Apis::TagmanagerV2::ContainerVersion::Representation + command.response_class = Google::Apis::TagmanagerV2::ContainerVersion + command.params['path'] = path unless path.nil? + command.query['containerVersionId'] = container_version_id unless container_version_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets the live (i.e. published) container version + # @param [String] parent + # GTM Container's API relative path. Example: accounts/`account_id`/containers/` + # container_id` + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::ContainerVersion] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::ContainerVersion] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def live_account_container_version(parent, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'tagmanager/v2/{+parent}/versions:live', options) + command.response_representation = Google::Apis::TagmanagerV2::ContainerVersion::Representation + command.response_class = Google::Apis::TagmanagerV2::ContainerVersion + command.params['parent'] = parent unless parent.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Publishes a Container Version. + # @param [String] path + # GTM ContainerVersion's API relative path. Example: accounts/`account_id`/ + # containers/`container_id`/versions/`version_id` + # @param [String] fingerprint + # When provided, this fingerprint must match the fingerprint of the container + # version in storage. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::PublishContainerVersionResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::PublishContainerVersionResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def publish_account_container_version(path, fingerprint: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'tagmanager/v2/{+path}:publish', options) + command.response_representation = Google::Apis::TagmanagerV2::PublishContainerVersionResponse::Representation + command.response_class = Google::Apis::TagmanagerV2::PublishContainerVersionResponse + command.params['path'] = path unless path.nil? + command.query['fingerprint'] = fingerprint unless fingerprint.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Sets the latest version used for synchronization of workspaces when detecting + # conflicts and errors. + # @param [String] path + # GTM ContainerVersion's API relative path. Example: accounts/`account_id`/ + # containers/`container_id`/versions/`version_id` + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::ContainerVersion] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::ContainerVersion] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def set_account_container_version_latest(path, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'tagmanager/v2/{+path}:set_latest', options) + command.response_representation = Google::Apis::TagmanagerV2::ContainerVersion::Representation + command.response_class = Google::Apis::TagmanagerV2::ContainerVersion + command.params['path'] = path unless path.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Undeletes a Container Version. + # @param [String] path + # GTM ContainerVersion's API relative path. Example: accounts/`account_id`/ + # containers/`container_id`/versions/`version_id` + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::ContainerVersion] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::ContainerVersion] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def undelete_account_container_version(path, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'tagmanager/v2/{+path}:undelete', options) + command.response_representation = Google::Apis::TagmanagerV2::ContainerVersion::Representation + command.response_class = Google::Apis::TagmanagerV2::ContainerVersion + command.params['path'] = path unless path.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Updates a Container Version. + # @param [String] path + # GTM ContainerVersion's API relative path. Example: accounts/`account_id`/ + # containers/`container_id`/versions/`version_id` + # @param [Google::Apis::TagmanagerV2::ContainerVersion] container_version_object + # @param [String] fingerprint + # When provided, this fingerprint must match the fingerprint of the container + # version in storage. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::ContainerVersion] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::ContainerVersion] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def update_account_container_version(path, container_version_object = nil, fingerprint: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:put, 'tagmanager/v2/{+path}', options) + command.request_representation = Google::Apis::TagmanagerV2::ContainerVersion::Representation + command.request_object = container_version_object + command.response_representation = Google::Apis::TagmanagerV2::ContainerVersion::Representation + command.response_class = Google::Apis::TagmanagerV2::ContainerVersion + command.params['path'] = path unless path.nil? + command.query['fingerprint'] = fingerprint unless fingerprint.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates a Workspace. + # @param [String] parent + # GTM parent Container's API relative path. Example: accounts/`account_id`/ + # containers/`container_id` + # @param [Google::Apis::TagmanagerV2::Workspace] workspace_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::Workspace] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::Workspace] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_account_container_workspace(parent, workspace_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'tagmanager/v2/{+parent}/workspaces', options) + command.request_representation = Google::Apis::TagmanagerV2::Workspace::Representation + command.request_object = workspace_object + command.response_representation = Google::Apis::TagmanagerV2::Workspace::Representation + command.response_class = Google::Apis::TagmanagerV2::Workspace + command.params['parent'] = parent unless parent.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates a Container Version from the entities present in the workspace, + # deletes the workspace, and sets the base container version to the newly + # created version. + # @param [String] path + # GTM Workspace's API relative path. Example: accounts/`account_id`/containers/` + # container_id`/workspaces/`workspace_id` + # @param [Google::Apis::TagmanagerV2::CreateContainerVersionRequestVersionOptions] create_container_version_request_version_options_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::CreateContainerVersionResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::CreateContainerVersionResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_account_container_workspace_version(path, create_container_version_request_version_options_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'tagmanager/v2/{+path}:create_version', options) + command.request_representation = Google::Apis::TagmanagerV2::CreateContainerVersionRequestVersionOptions::Representation + command.request_object = create_container_version_request_version_options_object + command.response_representation = Google::Apis::TagmanagerV2::CreateContainerVersionResponse::Representation + command.response_class = Google::Apis::TagmanagerV2::CreateContainerVersionResponse + command.params['path'] = path unless path.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a Workspace. + # @param [String] path + # GTM Workspace's API relative path. Example: accounts/`account_id`/containers/` + # container_id`/workspaces/`workspace_id` + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [NilClass] No result returned for this method + # @yieldparam err [StandardError] error object if request failed + # + # @return [void] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_account_container_workspace(path, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'tagmanager/v2/{+path}', options) + command.params['path'] = path unless path.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets a Workspace. + # @param [String] path + # GTM Workspace's API relative path. Example: accounts/`account_id`/containers/` + # container_id`/workspaces/`workspace_id` + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::Workspace] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::Workspace] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_account_container_workspace(path, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'tagmanager/v2/{+path}', options) + command.response_representation = Google::Apis::TagmanagerV2::Workspace::Representation + command.response_class = Google::Apis::TagmanagerV2::Workspace + command.params['path'] = path unless path.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Finds conflicting and modified entities in the workspace. + # @param [String] path + # GTM Workspace's API relative path. Example: accounts/`account_id`/containers/` + # container_id`/workspaces/`workspace_id` + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::GetWorkspaceStatusResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::GetWorkspaceStatusResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_account_container_workspace_status(path, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'tagmanager/v2/{+path}/status', options) + command.response_representation = Google::Apis::TagmanagerV2::GetWorkspaceStatusResponse::Representation + command.response_class = Google::Apis::TagmanagerV2::GetWorkspaceStatusResponse + command.params['path'] = path unless path.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists all Workspaces that belong to a GTM Container. + # @param [String] parent + # GTM parent Container's API relative path. Example: accounts/`account_id`/ + # containers/`container_id` + # @param [String] page_token + # Continuation token for fetching the next page of results. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::ListWorkspacesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::ListWorkspacesResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_account_container_workspaces(parent, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'tagmanager/v2/{+parent}/workspaces', options) + command.response_representation = Google::Apis::TagmanagerV2::ListWorkspacesResponse::Representation + command.response_class = Google::Apis::TagmanagerV2::ListWorkspacesResponse + command.params['parent'] = parent unless parent.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Quick previews a workspace by creating a fake container version from all + # entities in the provided workspace. + # @param [String] path + # GTM Workspace's API relative path. Example: accounts/`account_id`/containers/` + # container_id`/workspaces/`workspace_id` + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::QuickPreviewResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::QuickPreviewResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def quick_account_container_workspace_preview(path, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'tagmanager/v2/{+path}:quick_preview', options) + command.response_representation = Google::Apis::TagmanagerV2::QuickPreviewResponse::Representation + command.response_class = Google::Apis::TagmanagerV2::QuickPreviewResponse + command.params['path'] = path unless path.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Resolves a merge conflict for a workspace entity by updating it to the + # resolved entity passed in the request. + # @param [String] path + # GTM Workspace's API relative path. Example: accounts/`account_id`/containers/` + # container_id`/workspaces/`workspace_id` + # @param [Google::Apis::TagmanagerV2::Entity] entity_object + # @param [String] fingerprint + # When provided, this fingerprint must match the fingerprint of the + # entity_in_workspace in the merge conflict. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [NilClass] No result returned for this method + # @yieldparam err [StandardError] error object if request failed + # + # @return [void] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def resolve_account_container_workspace_conflict(path, entity_object = nil, fingerprint: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'tagmanager/v2/{+path}:resolve_conflict', options) + command.request_representation = Google::Apis::TagmanagerV2::Entity::Representation + command.request_object = entity_object + command.params['path'] = path unless path.nil? + command.query['fingerprint'] = fingerprint unless fingerprint.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Syncs a workspace to the latest container version by updating all unmodified + # workspace entities and displaying conflicts for modified entities. + # @param [String] path + # GTM Workspace's API relative path. Example: accounts/`account_id`/containers/` + # container_id`/workspaces/`workspace_id` + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::SyncWorkspaceResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::SyncWorkspaceResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def sync_account_container_workspace(path, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'tagmanager/v2/{+path}:sync', options) + command.response_representation = Google::Apis::TagmanagerV2::SyncWorkspaceResponse::Representation + command.response_class = Google::Apis::TagmanagerV2::SyncWorkspaceResponse + command.params['path'] = path unless path.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Updates a Workspace. + # @param [String] path + # GTM Workspace's API relative path. Example: accounts/`account_id`/containers/` + # container_id`/workspaces/`workspace_id` + # @param [Google::Apis::TagmanagerV2::Workspace] workspace_object + # @param [String] fingerprint + # When provided, this fingerprint must match the fingerprint of the workspace in + # storage. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::Workspace] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::Workspace] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def update_account_container_workspace(path, workspace_object = nil, fingerprint: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:put, 'tagmanager/v2/{+path}', options) + command.request_representation = Google::Apis::TagmanagerV2::Workspace::Representation + command.request_object = workspace_object + command.response_representation = Google::Apis::TagmanagerV2::Workspace::Representation + command.response_class = Google::Apis::TagmanagerV2::Workspace + command.params['path'] = path unless path.nil? + command.query['fingerprint'] = fingerprint unless fingerprint.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates one or more GTM Built-In Variables. + # @param [String] parent + # GTM Workspace's API relative path. Example: accounts/`account_id`/containers/` + # container_id`/workspaces/`workspace_id` + # @param [Array, String] type + # The types of built-in variables to enable. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::CreateBuiltInVariableResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::CreateBuiltInVariableResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_account_container_workspace_built_in_variable(parent, type: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'tagmanager/v2/{+parent}/built_in_variables', options) + command.response_representation = Google::Apis::TagmanagerV2::CreateBuiltInVariableResponse::Representation + command.response_class = Google::Apis::TagmanagerV2::CreateBuiltInVariableResponse + command.params['parent'] = parent unless parent.nil? + command.query['type'] = type unless type.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes one or more GTM Built-In Variables. + # @param [String] path + # GTM BuiltInVariable's API relative path. Example: accounts/`account_id`/ + # containers/`container_id`/workspaces/`workspace_id`/built_in_variables + # @param [Array, String] type + # The types of built-in variables to delete. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [NilClass] No result returned for this method + # @yieldparam err [StandardError] error object if request failed + # + # @return [void] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_account_container_workspace_built_in_variable(path, type: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'tagmanager/v2/{+path}', options) + command.params['path'] = path unless path.nil? + command.query['type'] = type unless type.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists all the enabled Built-In Variables of a GTM Container. + # @param [String] parent + # GTM Workspace's API relative path. Example: accounts/`account_id`/containers/` + # container_id`/workspaces/`workspace_id` + # @param [String] page_token + # Continuation token for fetching the next page of results. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::ListEnabledBuiltInVariablesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::ListEnabledBuiltInVariablesResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_account_container_workspace_built_in_variables(parent, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'tagmanager/v2/{+parent}/built_in_variables', options) + command.response_representation = Google::Apis::TagmanagerV2::ListEnabledBuiltInVariablesResponse::Representation + command.response_class = Google::Apis::TagmanagerV2::ListEnabledBuiltInVariablesResponse + command.params['parent'] = parent unless parent.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Reverts changes to a GTM Built-In Variables in a GTM Workspace. + # @param [String] path + # GTM BuiltInVariable's API relative path. Example: accounts/`account_id`/ + # containers/`container_id`/workspaces/`workspace_id`/built_in_variables + # @param [String] type + # The type of built-in variable to revert. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::RevertBuiltInVariableResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::RevertBuiltInVariableResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def revert_account_container_workspace_built_in_variable(path, type: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'tagmanager/v2/{+path}/built_in_variables:revert', options) + command.response_representation = Google::Apis::TagmanagerV2::RevertBuiltInVariableResponse::Representation + command.response_class = Google::Apis::TagmanagerV2::RevertBuiltInVariableResponse + command.params['path'] = path unless path.nil? + command.query['type'] = type unless type.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates a GTM Folder. + # @param [String] parent + # GTM Workspace's API relative path. Example: accounts/`account_id`/containers/` + # container_id`/workspaces/`workspace_id` + # @param [Google::Apis::TagmanagerV2::Folder] folder_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::Folder] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::Folder] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_account_container_workspace_folder(parent, folder_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'tagmanager/v2/{+parent}/folders', options) + command.request_representation = Google::Apis::TagmanagerV2::Folder::Representation + command.request_object = folder_object + command.response_representation = Google::Apis::TagmanagerV2::Folder::Representation + command.response_class = Google::Apis::TagmanagerV2::Folder + command.params['parent'] = parent unless parent.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a GTM Folder. + # @param [String] path + # GTM Folder's API relative path. Example: accounts/`account_id`/containers/` + # container_id`/workspaces/`workspace_id`/folders/`folder_id` + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [NilClass] No result returned for this method + # @yieldparam err [StandardError] error object if request failed + # + # @return [void] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_account_container_workspace_folder(path, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'tagmanager/v2/{+path}', options) + command.params['path'] = path unless path.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # List all entities in a GTM Folder. + # @param [String] path + # GTM Folder's API relative path. Example: accounts/`account_id`/containers/` + # container_id`/workspaces/`workspace_id`/folders/`folder_id` + # @param [String] page_token + # Continuation token for fetching the next page of results. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::FolderEntities] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::FolderEntities] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def entities_account_container_workspace_folder(path, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'tagmanager/v2/{+path}:entities', options) + command.response_representation = Google::Apis::TagmanagerV2::FolderEntities::Representation + command.response_class = Google::Apis::TagmanagerV2::FolderEntities + command.params['path'] = path unless path.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets a GTM Folder. + # @param [String] path + # GTM Folder's API relative path. Example: accounts/`account_id`/containers/` + # container_id`/workspaces/`workspace_id`/folders/`folder_id` + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::Folder] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::Folder] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_account_container_workspace_folder(path, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'tagmanager/v2/{+path}', options) + command.response_representation = Google::Apis::TagmanagerV2::Folder::Representation + command.response_class = Google::Apis::TagmanagerV2::Folder + command.params['path'] = path unless path.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists all GTM Folders of a Container. + # @param [String] parent + # GTM Workspace's API relative path. Example: accounts/`account_id`/containers/` + # container_id`/workspaces/`workspace_id` + # @param [String] page_token + # Continuation token for fetching the next page of results. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::ListFoldersResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::ListFoldersResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_account_container_workspace_folders(parent, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'tagmanager/v2/{+parent}/folders', options) + command.response_representation = Google::Apis::TagmanagerV2::ListFoldersResponse::Representation + command.response_class = Google::Apis::TagmanagerV2::ListFoldersResponse + command.params['parent'] = parent unless parent.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Moves entities to a GTM Folder. + # @param [String] path + # GTM Folder's API relative path. Example: accounts/`account_id`/containers/` + # container_id`/workspaces/`workspace_id`/folders/`folder_id` + # @param [Google::Apis::TagmanagerV2::Folder] folder_object + # @param [Array, String] tag_id + # The tags to be moved to the folder. + # @param [Array, String] trigger_id + # The triggers to be moved to the folder. + # @param [Array, String] variable_id + # The variables to be moved to the folder. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [NilClass] No result returned for this method + # @yieldparam err [StandardError] error object if request failed + # + # @return [void] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def move_account_container_workspace_folder_entities_to_folder(path, folder_object = nil, tag_id: nil, trigger_id: nil, variable_id: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'tagmanager/v2/{+path}:move_entities_to_folder', options) + command.request_representation = Google::Apis::TagmanagerV2::Folder::Representation + command.request_object = folder_object + command.params['path'] = path unless path.nil? + command.query['tagId'] = tag_id unless tag_id.nil? + command.query['triggerId'] = trigger_id unless trigger_id.nil? + command.query['variableId'] = variable_id unless variable_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Reverts changes to a GTM Folder in a GTM Workspace. + # @param [String] path + # GTM Folder's API relative path. Example: accounts/`account_id`/containers/` + # container_id`/workspaces/`workspace_id`/folders/`folder_id` + # @param [String] fingerprint + # When provided, this fingerprint must match the fingerprint of the tag in + # storage. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::RevertFolderResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::RevertFolderResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def revert_account_container_workspace_folder(path, fingerprint: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'tagmanager/v2/{+path}:revert', options) + command.response_representation = Google::Apis::TagmanagerV2::RevertFolderResponse::Representation + command.response_class = Google::Apis::TagmanagerV2::RevertFolderResponse + command.params['path'] = path unless path.nil? + command.query['fingerprint'] = fingerprint unless fingerprint.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Updates a GTM Folder. + # @param [String] path + # GTM Folder's API relative path. Example: accounts/`account_id`/containers/` + # container_id`/workspaces/`workspace_id`/folders/`folder_id` + # @param [Google::Apis::TagmanagerV2::Folder] folder_object + # @param [String] fingerprint + # When provided, this fingerprint must match the fingerprint of the folder in + # storage. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::Folder] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::Folder] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def update_account_container_workspace_folder(path, folder_object = nil, fingerprint: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:put, 'tagmanager/v2/{+path}', options) + command.request_representation = Google::Apis::TagmanagerV2::Folder::Representation + command.request_object = folder_object + command.response_representation = Google::Apis::TagmanagerV2::Folder::Representation + command.response_class = Google::Apis::TagmanagerV2::Folder + command.params['path'] = path unless path.nil? + command.query['fingerprint'] = fingerprint unless fingerprint.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates a GTM Tag. + # @param [String] parent + # GTM Workspace's API relative path. Example: accounts/`account_id`/containers/` + # container_id`/workspaces/`workspace_id` + # @param [Google::Apis::TagmanagerV2::Tag] tag_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::Tag] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::Tag] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_account_container_workspace_tag(parent, tag_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'tagmanager/v2/{+parent}/tags', options) + command.request_representation = Google::Apis::TagmanagerV2::Tag::Representation + command.request_object = tag_object + command.response_representation = Google::Apis::TagmanagerV2::Tag::Representation + command.response_class = Google::Apis::TagmanagerV2::Tag + command.params['parent'] = parent unless parent.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a GTM Tag. + # @param [String] path + # GTM Tag's API relative path. Example: accounts/`account_id`/containers/` + # container_id`/workspaces/`workspace_id`/tags/`tag_id` + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [NilClass] No result returned for this method + # @yieldparam err [StandardError] error object if request failed + # + # @return [void] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_account_container_workspace_tag(path, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'tagmanager/v2/{+path}', options) + command.params['path'] = path unless path.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets a GTM Tag. + # @param [String] path + # GTM Tag's API relative path. Example: accounts/`account_id`/containers/` + # container_id`/workspaces/`workspace_id`/tags/`tag_id` + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::Tag] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::Tag] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_account_container_workspace_tag(path, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'tagmanager/v2/{+path}', options) + command.response_representation = Google::Apis::TagmanagerV2::Tag::Representation + command.response_class = Google::Apis::TagmanagerV2::Tag + command.params['path'] = path unless path.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists all GTM Tags of a Container. + # @param [String] parent + # GTM Workspace's API relative path. Example: accounts/`account_id`/containers/` + # container_id`/workspaces/`workspace_id` + # @param [String] page_token + # Continuation token for fetching the next page of results. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::ListTagsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::ListTagsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_account_container_workspace_tags(parent, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'tagmanager/v2/{+parent}/tags', options) + command.response_representation = Google::Apis::TagmanagerV2::ListTagsResponse::Representation + command.response_class = Google::Apis::TagmanagerV2::ListTagsResponse + command.params['parent'] = parent unless parent.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Reverts changes to a GTM Tag in a GTM Workspace. + # @param [String] path + # GTM Tag's API relative path. Example: accounts/`account_id`/containers/` + # container_id`/workspaces/`workspace_id`/tags/`tag_id` + # @param [String] fingerprint + # When provided, this fingerprint must match the fingerprint of thetag in + # storage. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::RevertTagResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::RevertTagResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def revert_account_container_workspace_tag(path, fingerprint: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'tagmanager/v2/{+path}:revert', options) + command.response_representation = Google::Apis::TagmanagerV2::RevertTagResponse::Representation + command.response_class = Google::Apis::TagmanagerV2::RevertTagResponse + command.params['path'] = path unless path.nil? + command.query['fingerprint'] = fingerprint unless fingerprint.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Updates a GTM Tag. + # @param [String] path + # GTM Tag's API relative path. Example: accounts/`account_id`/containers/` + # container_id`/workspaces/`workspace_id`/tags/`tag_id` + # @param [Google::Apis::TagmanagerV2::Tag] tag_object + # @param [String] fingerprint + # When provided, this fingerprint must match the fingerprint of the tag in + # storage. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::Tag] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::Tag] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def update_account_container_workspace_tag(path, tag_object = nil, fingerprint: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:put, 'tagmanager/v2/{+path}', options) + command.request_representation = Google::Apis::TagmanagerV2::Tag::Representation + command.request_object = tag_object + command.response_representation = Google::Apis::TagmanagerV2::Tag::Representation + command.response_class = Google::Apis::TagmanagerV2::Tag + command.params['path'] = path unless path.nil? + command.query['fingerprint'] = fingerprint unless fingerprint.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates a GTM Custom Template. + # @param [String] parent + # GTM Workspace's API relative path. Example: accounts/`account_id`/containers/` + # container_id`/workspaces/`workspace_id` + # @param [Google::Apis::TagmanagerV2::CustomTemplate] custom_template_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::CustomTemplate] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::CustomTemplate] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_account_container_workspace_template(parent, custom_template_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'tagmanager/v2/{+parent}/templates', options) + command.request_representation = Google::Apis::TagmanagerV2::CustomTemplate::Representation + command.request_object = custom_template_object + command.response_representation = Google::Apis::TagmanagerV2::CustomTemplate::Representation + command.response_class = Google::Apis::TagmanagerV2::CustomTemplate + command.params['parent'] = parent unless parent.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a GTM Template. + # @param [String] path + # GTM Custom Template's API relative path. Example: accounts/`account_id`/ + # containers/`container_id`/workspaces/`workspace_id`/templates/`template_id` + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [NilClass] No result returned for this method + # @yieldparam err [StandardError] error object if request failed + # + # @return [void] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_account_container_workspace_template(path, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'tagmanager/v2/{+path}', options) + command.params['path'] = path unless path.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets a GTM Template. + # @param [String] path + # GTM Custom Template's API relative path. Example: accounts/`account_id`/ + # containers/`container_id`/workspaces/`workspace_id`/templates/`template_id` + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::CustomTemplate] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::CustomTemplate] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_account_container_workspace_template(path, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'tagmanager/v2/{+path}', options) + command.response_representation = Google::Apis::TagmanagerV2::CustomTemplate::Representation + command.response_class = Google::Apis::TagmanagerV2::CustomTemplate + command.params['path'] = path unless path.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists all GTM Templates of a GTM container workspace. + # @param [String] parent + # GTM Workspace's API relative path. Example: accounts/`account_id`/containers/` + # container_id`/workspaces/`workspace_id` + # @param [String] page_token + # Continuation token for fetching the next page of results. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::ListTemplatesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::ListTemplatesResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_account_container_workspace_templates(parent, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'tagmanager/v2/{+parent}/templates', options) + command.response_representation = Google::Apis::TagmanagerV2::ListTemplatesResponse::Representation + command.response_class = Google::Apis::TagmanagerV2::ListTemplatesResponse + command.params['parent'] = parent unless parent.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Reverts changes to a GTM Template in a GTM Workspace. + # @param [String] path + # GTM Custom Template's API relative path. Example: accounts/`account_id`/ + # containers/`container_id`/workspaces/`workspace_id`/templates/`template_id` + # @param [String] fingerprint + # When provided, this fingerprint must match the fingerprint of the template in + # storage. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::RevertTemplateResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::RevertTemplateResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def revert_account_container_workspace_template(path, fingerprint: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'tagmanager/v2/{+path}:revert', options) + command.response_representation = Google::Apis::TagmanagerV2::RevertTemplateResponse::Representation + command.response_class = Google::Apis::TagmanagerV2::RevertTemplateResponse + command.params['path'] = path unless path.nil? + command.query['fingerprint'] = fingerprint unless fingerprint.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Updates a GTM Template. + # @param [String] path + # GTM Custom Template's API relative path. Example: accounts/`account_id`/ + # containers/`container_id`/workspaces/`workspace_id`/templates/`template_id` + # @param [Google::Apis::TagmanagerV2::CustomTemplate] custom_template_object + # @param [String] fingerprint + # When provided, this fingerprint must match the fingerprint of the templates in + # storage. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::CustomTemplate] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::CustomTemplate] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def update_account_container_workspace_template(path, custom_template_object = nil, fingerprint: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:put, 'tagmanager/v2/{+path}', options) + command.request_representation = Google::Apis::TagmanagerV2::CustomTemplate::Representation + command.request_object = custom_template_object + command.response_representation = Google::Apis::TagmanagerV2::CustomTemplate::Representation + command.response_class = Google::Apis::TagmanagerV2::CustomTemplate + command.params['path'] = path unless path.nil? + command.query['fingerprint'] = fingerprint unless fingerprint.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates a GTM Trigger. + # @param [String] parent + # GTM Workspaces's API relative path. Example: accounts/`account_id`/containers/` + # container_id`/workspaces/`workspace_id` + # @param [Google::Apis::TagmanagerV2::Trigger] trigger_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::Trigger] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::Trigger] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_account_container_workspace_trigger(parent, trigger_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'tagmanager/v2/{+parent}/triggers', options) + command.request_representation = Google::Apis::TagmanagerV2::Trigger::Representation + command.request_object = trigger_object + command.response_representation = Google::Apis::TagmanagerV2::Trigger::Representation + command.response_class = Google::Apis::TagmanagerV2::Trigger + command.params['parent'] = parent unless parent.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a GTM Trigger. + # @param [String] path + # GTM Trigger's API relative path. Example: accounts/`account_id`/containers/` + # container_id`/workspaces/`workspace_id`/triggers/`trigger_id` + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [NilClass] No result returned for this method + # @yieldparam err [StandardError] error object if request failed + # + # @return [void] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_account_container_workspace_trigger(path, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'tagmanager/v2/{+path}', options) + command.params['path'] = path unless path.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets a GTM Trigger. + # @param [String] path + # GTM Trigger's API relative path. Example: accounts/`account_id`/containers/` + # container_id`/workspaces/`workspace_id`/triggers/`trigger_id` + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::Trigger] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::Trigger] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_account_container_workspace_trigger(path, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'tagmanager/v2/{+path}', options) + command.response_representation = Google::Apis::TagmanagerV2::Trigger::Representation + command.response_class = Google::Apis::TagmanagerV2::Trigger + command.params['path'] = path unless path.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists all GTM Triggers of a Container. + # @param [String] parent + # GTM Workspaces's API relative path. Example: accounts/`account_id`/containers/` + # container_id`/workspaces/`workspace_id` + # @param [String] page_token + # Continuation token for fetching the next page of results. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::ListTriggersResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::ListTriggersResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_account_container_workspace_triggers(parent, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'tagmanager/v2/{+parent}/triggers', options) + command.response_representation = Google::Apis::TagmanagerV2::ListTriggersResponse::Representation + command.response_class = Google::Apis::TagmanagerV2::ListTriggersResponse + command.params['parent'] = parent unless parent.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Reverts changes to a GTM Trigger in a GTM Workspace. + # @param [String] path + # GTM Trigger's API relative path. Example: accounts/`account_id`/containers/` + # container_id`/workspaces/`workspace_id`/triggers/`trigger_id` + # @param [String] fingerprint + # When provided, this fingerprint must match the fingerprint of the trigger in + # storage. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::RevertTriggerResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::RevertTriggerResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def revert_account_container_workspace_trigger(path, fingerprint: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'tagmanager/v2/{+path}:revert', options) + command.response_representation = Google::Apis::TagmanagerV2::RevertTriggerResponse::Representation + command.response_class = Google::Apis::TagmanagerV2::RevertTriggerResponse + command.params['path'] = path unless path.nil? + command.query['fingerprint'] = fingerprint unless fingerprint.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Updates a GTM Trigger. + # @param [String] path + # GTM Trigger's API relative path. Example: accounts/`account_id`/containers/` + # container_id`/workspaces/`workspace_id`/triggers/`trigger_id` + # @param [Google::Apis::TagmanagerV2::Trigger] trigger_object + # @param [String] fingerprint + # When provided, this fingerprint must match the fingerprint of the trigger in + # storage. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::Trigger] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::Trigger] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def update_account_container_workspace_trigger(path, trigger_object = nil, fingerprint: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:put, 'tagmanager/v2/{+path}', options) + command.request_representation = Google::Apis::TagmanagerV2::Trigger::Representation + command.request_object = trigger_object + command.response_representation = Google::Apis::TagmanagerV2::Trigger::Representation + command.response_class = Google::Apis::TagmanagerV2::Trigger + command.params['path'] = path unless path.nil? + command.query['fingerprint'] = fingerprint unless fingerprint.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates a GTM Variable. + # @param [String] parent + # GTM Workspace's API relative path. Example: accounts/`account_id`/containers/` + # container_id`/workspaces/`workspace_id` + # @param [Google::Apis::TagmanagerV2::Variable] variable_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::Variable] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::Variable] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_account_container_workspace_variable(parent, variable_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'tagmanager/v2/{+parent}/variables', options) + command.request_representation = Google::Apis::TagmanagerV2::Variable::Representation + command.request_object = variable_object + command.response_representation = Google::Apis::TagmanagerV2::Variable::Representation + command.response_class = Google::Apis::TagmanagerV2::Variable + command.params['parent'] = parent unless parent.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a GTM Variable. + # @param [String] path + # GTM Variable's API relative path. Example: accounts/`account_id`/containers/` + # container_id`/workspaces/`workspace_id`/variables/`variable_id` + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [NilClass] No result returned for this method + # @yieldparam err [StandardError] error object if request failed + # + # @return [void] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_account_container_workspace_variable(path, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'tagmanager/v2/{+path}', options) + command.params['path'] = path unless path.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets a GTM Variable. + # @param [String] path + # GTM Variable's API relative path. Example: accounts/`account_id`/containers/` + # container_id`/workspaces/`workspace_id`/variables/`variable_id` + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::Variable] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::Variable] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_account_container_workspace_variable(path, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'tagmanager/v2/{+path}', options) + command.response_representation = Google::Apis::TagmanagerV2::Variable::Representation + command.response_class = Google::Apis::TagmanagerV2::Variable + command.params['path'] = path unless path.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists all GTM Variables of a Container. + # @param [String] parent + # GTM Workspace's API relative path. Example: accounts/`account_id`/containers/` + # container_id`/workspaces/`workspace_id` + # @param [String] page_token + # Continuation token for fetching the next page of results. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::ListVariablesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::ListVariablesResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_account_container_workspace_variables(parent, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'tagmanager/v2/{+parent}/variables', options) + command.response_representation = Google::Apis::TagmanagerV2::ListVariablesResponse::Representation + command.response_class = Google::Apis::TagmanagerV2::ListVariablesResponse + command.params['parent'] = parent unless parent.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Reverts changes to a GTM Variable in a GTM Workspace. + # @param [String] path + # GTM Variable's API relative path. Example: accounts/`account_id`/containers/` + # container_id`/workspaces/`workspace_id`/variables/`variable_id` + # @param [String] fingerprint + # When provided, this fingerprint must match the fingerprint of the variable in + # storage. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::RevertVariableResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::RevertVariableResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def revert_account_container_workspace_variable(path, fingerprint: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'tagmanager/v2/{+path}:revert', options) + command.response_representation = Google::Apis::TagmanagerV2::RevertVariableResponse::Representation + command.response_class = Google::Apis::TagmanagerV2::RevertVariableResponse + command.params['path'] = path unless path.nil? + command.query['fingerprint'] = fingerprint unless fingerprint.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Updates a GTM Variable. + # @param [String] path + # GTM Variable's API relative path. Example: accounts/`account_id`/containers/` + # container_id`/workspaces/`workspace_id`/variables/`variable_id` + # @param [Google::Apis::TagmanagerV2::Variable] variable_object + # @param [String] fingerprint + # When provided, this fingerprint must match the fingerprint of the variable in + # storage. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::Variable] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::Variable] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def update_account_container_workspace_variable(path, variable_object = nil, fingerprint: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:put, 'tagmanager/v2/{+path}', options) + command.request_representation = Google::Apis::TagmanagerV2::Variable::Representation + command.request_object = variable_object + command.response_representation = Google::Apis::TagmanagerV2::Variable::Representation + command.response_class = Google::Apis::TagmanagerV2::Variable + command.params['path'] = path unless path.nil? + command.query['fingerprint'] = fingerprint unless fingerprint.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates a GTM Zone. + # @param [String] parent + # GTM Workspace's API relative path. Example: accounts/`account_id`/containers/` + # container_id`/workspaces/`workspace_id` + # @param [Google::Apis::TagmanagerV2::Zone] zone_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::Zone] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::Zone] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_account_container_workspace_zone(parent, zone_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'tagmanager/v2/{+parent}/zones', options) + command.request_representation = Google::Apis::TagmanagerV2::Zone::Representation + command.request_object = zone_object + command.response_representation = Google::Apis::TagmanagerV2::Zone::Representation + command.response_class = Google::Apis::TagmanagerV2::Zone + command.params['parent'] = parent unless parent.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a GTM Zone. + # @param [String] path + # GTM Zone's API relative path. Example: accounts/`account_id`/containers/` + # container_id`/workspaces/`workspace_id`/zones/`zone_id` + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [NilClass] No result returned for this method + # @yieldparam err [StandardError] error object if request failed + # + # @return [void] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_account_container_workspace_zone(path, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'tagmanager/v2/{+path}', options) + command.params['path'] = path unless path.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets a GTM Zone. + # @param [String] path + # GTM Zone's API relative path. Example: accounts/`account_id`/containers/` + # container_id`/workspaces/`workspace_id`/zones/`zone_id` + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::Zone] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::Zone] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_account_container_workspace_zone(path, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'tagmanager/v2/{+path}', options) + command.response_representation = Google::Apis::TagmanagerV2::Zone::Representation + command.response_class = Google::Apis::TagmanagerV2::Zone + command.params['path'] = path unless path.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists all GTM Zones of a GTM container workspace. + # @param [String] parent + # GTM Workspace's API relative path. Example: accounts/`account_id`/containers/` + # container_id`/workspaces/`workspace_id` + # @param [String] page_token + # Continuation token for fetching the next page of results. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::ListZonesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::ListZonesResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_account_container_workspace_zones(parent, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'tagmanager/v2/{+parent}/zones', options) + command.response_representation = Google::Apis::TagmanagerV2::ListZonesResponse::Representation + command.response_class = Google::Apis::TagmanagerV2::ListZonesResponse + command.params['parent'] = parent unless parent.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Reverts changes to a GTM Zone in a GTM Workspace. + # @param [String] path + # GTM Zone's API relative path. Example: accounts/`account_id`/containers/` + # container_id`/workspaces/`workspace_id`/zones/`zone_id` + # @param [String] fingerprint + # When provided, this fingerprint must match the fingerprint of the zone in + # storage. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::RevertZoneResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::RevertZoneResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def revert_account_container_workspace_zone(path, fingerprint: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'tagmanager/v2/{+path}:revert', options) + command.response_representation = Google::Apis::TagmanagerV2::RevertZoneResponse::Representation + command.response_class = Google::Apis::TagmanagerV2::RevertZoneResponse + command.params['path'] = path unless path.nil? + command.query['fingerprint'] = fingerprint unless fingerprint.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Updates a GTM Zone. + # @param [String] path + # GTM Zone's API relative path. Example: accounts/`account_id`/containers/` + # container_id`/workspaces/`workspace_id`/zones/`zone_id` + # @param [Google::Apis::TagmanagerV2::Zone] zone_object + # @param [String] fingerprint + # When provided, this fingerprint must match the fingerprint of the zone in + # storage. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::Zone] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::Zone] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def update_account_container_workspace_zone(path, zone_object = nil, fingerprint: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:put, 'tagmanager/v2/{+path}', options) + command.request_representation = Google::Apis::TagmanagerV2::Zone::Representation + command.request_object = zone_object + command.response_representation = Google::Apis::TagmanagerV2::Zone::Representation + command.response_class = Google::Apis::TagmanagerV2::Zone + command.params['path'] = path unless path.nil? + command.query['fingerprint'] = fingerprint unless fingerprint.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates a user's Account & Container access. + # @param [String] parent + # GTM Account's API relative path. Example: accounts/`account_id` + # @param [Google::Apis::TagmanagerV2::UserPermission] user_permission_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::UserPermission] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::UserPermission] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_account_user_permission(parent, user_permission_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'tagmanager/v2/{+parent}/user_permissions', options) + command.request_representation = Google::Apis::TagmanagerV2::UserPermission::Representation + command.request_object = user_permission_object + command.response_representation = Google::Apis::TagmanagerV2::UserPermission::Representation + command.response_class = Google::Apis::TagmanagerV2::UserPermission + command.params['parent'] = parent unless parent.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Removes a user from the account, revoking access to it and all of its + # containers. + # @param [String] path + # GTM UserPermission's API relative path. Example: accounts/`account_id`/ + # user_permissions/`user_permission_id` + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [NilClass] No result returned for this method + # @yieldparam err [StandardError] error object if request failed + # + # @return [void] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_account_user_permission(path, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'tagmanager/v2/{+path}', options) + command.params['path'] = path unless path.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets a user's Account & Container access. + # @param [String] path + # GTM UserPermission's API relative path. Example: accounts/`account_id`/ + # user_permissions/`user_permission_id` + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::UserPermission] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::UserPermission] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_account_user_permission(path, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'tagmanager/v2/{+path}', options) + command.response_representation = Google::Apis::TagmanagerV2::UserPermission::Representation + command.response_class = Google::Apis::TagmanagerV2::UserPermission + command.params['path'] = path unless path.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # List all users that have access to the account along with Account and + # Container user access granted to each of them. + # @param [String] parent + # GTM Accounts's API relative path. Example: accounts/`account_id` + # @param [String] page_token + # Continuation token for fetching the next page of results. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::ListUserPermissionsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::ListUserPermissionsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_account_user_permissions(parent, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'tagmanager/v2/{+parent}/user_permissions', options) + command.response_representation = Google::Apis::TagmanagerV2::ListUserPermissionsResponse::Representation + command.response_class = Google::Apis::TagmanagerV2::ListUserPermissionsResponse + command.params['parent'] = parent unless parent.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Updates a user's Account & Container access. + # @param [String] path + # GTM UserPermission's API relative path. Example: accounts/`account_id`/ + # user_permissions/`user_permission_id` + # @param [Google::Apis::TagmanagerV2::UserPermission] user_permission_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TagmanagerV2::UserPermission] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TagmanagerV2::UserPermission] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def update_account_user_permission(path, user_permission_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:put, 'tagmanager/v2/{+path}', options) + command.request_representation = Google::Apis::TagmanagerV2::UserPermission::Representation + command.request_object = user_permission_object + command.response_representation = Google::Apis::TagmanagerV2::UserPermission::Representation + command.response_class = Google::Apis::TagmanagerV2::UserPermission + command.params['path'] = path unless path.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + protected + + def apply_command_defaults(command) + command.query['key'] = key unless key.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + end + end + end + end +end