1<?php 2/* 3 * Copyright 2014 Google Inc. 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); you may not 6 * use this file except in compliance with the License. You may obtain a copy of 7 * the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 * License for the specific language governing permissions and limitations under 15 * the License. 16 */ 17 18namespace Google\Service\TagManager\Resource; 19 20use Google\Service\TagManager\CreateBuiltInVariableResponse; 21use Google\Service\TagManager\ListEnabledBuiltInVariablesResponse; 22use Google\Service\TagManager\RevertBuiltInVariableResponse; 23 24/** 25 * The "built_in_variables" collection of methods. 26 * Typical usage is: 27 * <code> 28 * $tagmanagerService = new Google\Service\TagManager(...); 29 * $built_in_variables = $tagmanagerService->built_in_variables; 30 * </code> 31 */ 32class AccountsContainersWorkspacesBuiltInVariables extends \Google\Service\Resource 33{ 34 /** 35 * Creates one or more GTM Built-In Variables. (built_in_variables.create) 36 * 37 * @param string $parent GTM Workspace's API relative path. Example: 38 * accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id} 39 * @param array $optParams Optional parameters. 40 * 41 * @opt_param string type The types of built-in variables to enable. 42 * @return CreateBuiltInVariableResponse 43 */ 44 public function create($parent, $optParams = []) 45 { 46 $params = ['parent' => $parent]; 47 $params = array_merge($params, $optParams); 48 return $this->call('create', [$params], CreateBuiltInVariableResponse::class); 49 } 50 /** 51 * Deletes one or more GTM Built-In Variables. (built_in_variables.delete) 52 * 53 * @param string $path GTM BuiltInVariable's API relative path. Example: account 54 * s/{account_id}/containers/{container_id}/workspaces/{workspace_id}/built_in_v 55 * ariables 56 * @param array $optParams Optional parameters. 57 * 58 * @opt_param string type The types of built-in variables to delete. 59 */ 60 public function delete($path, $optParams = []) 61 { 62 $params = ['path' => $path]; 63 $params = array_merge($params, $optParams); 64 return $this->call('delete', [$params]); 65 } 66 /** 67 * Lists all the enabled Built-In Variables of a GTM Container. 68 * (built_in_variables.listAccountsContainersWorkspacesBuiltInVariables) 69 * 70 * @param string $parent GTM Workspace's API relative path. Example: 71 * accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id} 72 * @param array $optParams Optional parameters. 73 * 74 * @opt_param string pageToken Continuation token for fetching the next page of 75 * results. 76 * @return ListEnabledBuiltInVariablesResponse 77 */ 78 public function listAccountsContainersWorkspacesBuiltInVariables($parent, $optParams = []) 79 { 80 $params = ['parent' => $parent]; 81 $params = array_merge($params, $optParams); 82 return $this->call('list', [$params], ListEnabledBuiltInVariablesResponse::class); 83 } 84 /** 85 * Reverts changes to a GTM Built-In Variables in a GTM Workspace. 86 * (built_in_variables.revert) 87 * 88 * @param string $path GTM BuiltInVariable's API relative path. Example: account 89 * s/{account_id}/containers/{container_id}/workspaces/{workspace_id}/built_in_v 90 * ariables 91 * @param array $optParams Optional parameters. 92 * 93 * @opt_param string type The type of built-in variable to revert. 94 * @return RevertBuiltInVariableResponse 95 */ 96 public function revert($path, $optParams = []) 97 { 98 $params = ['path' => $path]; 99 $params = array_merge($params, $optParams); 100 return $this->call('revert', [$params], RevertBuiltInVariableResponse::class); 101 } 102} 103 104// Adding a class alias for backwards compatibility with the previous class name. 105class_alias(AccountsContainersWorkspacesBuiltInVariables::class, 'Google_Service_TagManager_Resource_AccountsContainersWorkspacesBuiltInVariables'); 106