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