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\Client; 21use Google\Service\TagManager\ListClientsResponse; 22use Google\Service\TagManager\RevertClientResponse; 23 24/** 25 * The "clients" collection of methods. 26 * Typical usage is: 27 * <code> 28 * $tagmanagerService = new Google\Service\TagManager(...); 29 * $clients = $tagmanagerService->clients; 30 * </code> 31 */ 32class AccountsContainersWorkspacesClients extends \Google\Service\Resource 33{ 34 /** 35 * Creates a GTM Client. (clients.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 Client $postBody 40 * @param array $optParams Optional parameters. 41 * @return Client 42 */ 43 public function create($parent, Client $postBody, $optParams = []) 44 { 45 $params = ['parent' => $parent, 'postBody' => $postBody]; 46 $params = array_merge($params, $optParams); 47 return $this->call('create', [$params], Client::class); 48 } 49 /** 50 * Deletes a GTM Client. (clients.delete) 51 * 52 * @param string $path GTM Client's API relative path. Example: accounts/{accoun 53 * t_id}/containers/{container_id}/workspaces/{workspace_id}/clients/{client_id} 54 * @param array $optParams Optional parameters. 55 */ 56 public function delete($path, $optParams = []) 57 { 58 $params = ['path' => $path]; 59 $params = array_merge($params, $optParams); 60 return $this->call('delete', [$params]); 61 } 62 /** 63 * Gets a GTM Client. (clients.get) 64 * 65 * @param string $path GTM Client's API relative path. Example: accounts/{accoun 66 * t_id}/containers/{container_id}/workspaces/{workspace_id}/clients/{client_id} 67 * @param array $optParams Optional parameters. 68 * @return Client 69 */ 70 public function get($path, $optParams = []) 71 { 72 $params = ['path' => $path]; 73 $params = array_merge($params, $optParams); 74 return $this->call('get', [$params], Client::class); 75 } 76 /** 77 * Lists all GTM Clients of a GTM container workspace. 78 * (clients.listAccountsContainersWorkspacesClients) 79 * 80 * @param string $parent GTM Workspace's API relative path. Example: 81 * accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id} 82 * @param array $optParams Optional parameters. 83 * 84 * @opt_param string pageToken Continuation token for fetching the next page of 85 * results. 86 * @return ListClientsResponse 87 */ 88 public function listAccountsContainersWorkspacesClients($parent, $optParams = []) 89 { 90 $params = ['parent' => $parent]; 91 $params = array_merge($params, $optParams); 92 return $this->call('list', [$params], ListClientsResponse::class); 93 } 94 /** 95 * Reverts changes to a GTM Client in a GTM Workspace. (clients.revert) 96 * 97 * @param string $path GTM Client's API relative path. Example: accounts/{accoun 98 * t_id}/containers/{container_id}/workspaces/{workspace_id}/clients/{client_id} 99 * @param array $optParams Optional parameters. 100 * 101 * @opt_param string fingerprint When provided, this fingerprint must match the 102 * fingerprint of the client in storage. 103 * @return RevertClientResponse 104 */ 105 public function revert($path, $optParams = []) 106 { 107 $params = ['path' => $path]; 108 $params = array_merge($params, $optParams); 109 return $this->call('revert', [$params], RevertClientResponse::class); 110 } 111 /** 112 * Updates a GTM Client. (clients.update) 113 * 114 * @param string $path GTM Client's API relative path. Example: accounts/{accoun 115 * t_id}/containers/{container_id}/workspaces/{workspace_id}/clients/{client_id} 116 * @param Client $postBody 117 * @param array $optParams Optional parameters. 118 * 119 * @opt_param string fingerprint When provided, this fingerprint must match the 120 * fingerprint of the client in storage. 121 * @return Client 122 */ 123 public function update($path, Client $postBody, $optParams = []) 124 { 125 $params = ['path' => $path, 'postBody' => $postBody]; 126 $params = array_merge($params, $optParams); 127 return $this->call('update', [$params], Client::class); 128 } 129} 130 131// Adding a class alias for backwards compatibility with the previous class name. 132class_alias(AccountsContainersWorkspacesClients::class, 'Google_Service_TagManager_Resource_AccountsContainersWorkspacesClients'); 133