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\GoogleAnalyticsAdmin\Resource; 19 20use Google\Service\GoogleAnalyticsAdmin\GoogleAnalyticsAdminV1alphaArchiveCustomDimensionRequest; 21use Google\Service\GoogleAnalyticsAdmin\GoogleAnalyticsAdminV1alphaCustomDimension; 22use Google\Service\GoogleAnalyticsAdmin\GoogleAnalyticsAdminV1alphaListCustomDimensionsResponse; 23use Google\Service\GoogleAnalyticsAdmin\GoogleProtobufEmpty; 24 25/** 26 * The "customDimensions" collection of methods. 27 * Typical usage is: 28 * <code> 29 * $analyticsadminService = new Google\Service\GoogleAnalyticsAdmin(...); 30 * $customDimensions = $analyticsadminService->customDimensions; 31 * </code> 32 */ 33class PropertiesCustomDimensions extends \Google\Service\Resource 34{ 35 /** 36 * Archives a CustomDimension on a property. (customDimensions.archive) 37 * 38 * @param string $name Required. The name of the CustomDimension to archive. 39 * Example format: properties/1234/customDimensions/5678 40 * @param GoogleAnalyticsAdminV1alphaArchiveCustomDimensionRequest $postBody 41 * @param array $optParams Optional parameters. 42 * @return GoogleProtobufEmpty 43 */ 44 public function archive($name, GoogleAnalyticsAdminV1alphaArchiveCustomDimensionRequest $postBody, $optParams = []) 45 { 46 $params = ['name' => $name, 'postBody' => $postBody]; 47 $params = array_merge($params, $optParams); 48 return $this->call('archive', [$params], GoogleProtobufEmpty::class); 49 } 50 /** 51 * Creates a CustomDimension. (customDimensions.create) 52 * 53 * @param string $parent Required. Example format: properties/1234 54 * @param GoogleAnalyticsAdminV1alphaCustomDimension $postBody 55 * @param array $optParams Optional parameters. 56 * @return GoogleAnalyticsAdminV1alphaCustomDimension 57 */ 58 public function create($parent, GoogleAnalyticsAdminV1alphaCustomDimension $postBody, $optParams = []) 59 { 60 $params = ['parent' => $parent, 'postBody' => $postBody]; 61 $params = array_merge($params, $optParams); 62 return $this->call('create', [$params], GoogleAnalyticsAdminV1alphaCustomDimension::class); 63 } 64 /** 65 * Lookup for a single CustomDimension. (customDimensions.get) 66 * 67 * @param string $name Required. The name of the CustomDimension to get. Example 68 * format: properties/1234/customDimensions/5678 69 * @param array $optParams Optional parameters. 70 * @return GoogleAnalyticsAdminV1alphaCustomDimension 71 */ 72 public function get($name, $optParams = []) 73 { 74 $params = ['name' => $name]; 75 $params = array_merge($params, $optParams); 76 return $this->call('get', [$params], GoogleAnalyticsAdminV1alphaCustomDimension::class); 77 } 78 /** 79 * Lists CustomDimensions on a property. 80 * (customDimensions.listPropertiesCustomDimensions) 81 * 82 * @param string $parent Required. Example format: properties/1234 83 * @param array $optParams Optional parameters. 84 * 85 * @opt_param int pageSize The maximum number of resources to return. If 86 * unspecified, at most 50 resources will be returned. The maximum value is 200 87 * (higher values will be coerced to the maximum). 88 * @opt_param string pageToken A page token, received from a previous 89 * `ListCustomDimensions` call. Provide this to retrieve the subsequent page. 90 * When paginating, all other parameters provided to `ListCustomDimensions` must 91 * match the call that provided the page token. 92 * @return GoogleAnalyticsAdminV1alphaListCustomDimensionsResponse 93 */ 94 public function listPropertiesCustomDimensions($parent, $optParams = []) 95 { 96 $params = ['parent' => $parent]; 97 $params = array_merge($params, $optParams); 98 return $this->call('list', [$params], GoogleAnalyticsAdminV1alphaListCustomDimensionsResponse::class); 99 } 100 /** 101 * Updates a CustomDimension on a property. (customDimensions.patch) 102 * 103 * @param string $name Output only. Resource name for this CustomDimension 104 * resource. Format: properties/{property}/customDimensions/{customDimension} 105 * @param GoogleAnalyticsAdminV1alphaCustomDimension $postBody 106 * @param array $optParams Optional parameters. 107 * 108 * @opt_param string updateMask Required. The list of fields to be updated. 109 * Omitted fields will not be updated. To replace the entire entity, use one 110 * path with the string "*" to match all fields. 111 * @return GoogleAnalyticsAdminV1alphaCustomDimension 112 */ 113 public function patch($name, GoogleAnalyticsAdminV1alphaCustomDimension $postBody, $optParams = []) 114 { 115 $params = ['name' => $name, 'postBody' => $postBody]; 116 $params = array_merge($params, $optParams); 117 return $this->call('patch', [$params], GoogleAnalyticsAdminV1alphaCustomDimension::class); 118 } 119} 120 121// Adding a class alias for backwards compatibility with the previous class name. 122class_alias(PropertiesCustomDimensions::class, 'Google_Service_GoogleAnalyticsAdmin_Resource_PropertiesCustomDimensions'); 123