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\GoogleAnalyticsAdminV1betaKeyEvent;
|
---|
21 | use Google\Service\GoogleAnalyticsAdmin\GoogleAnalyticsAdminV1betaListKeyEventsResponse;
|
---|
22 | use Google\Service\GoogleAnalyticsAdmin\GoogleProtobufEmpty;
|
---|
23 |
|
---|
24 | /**
|
---|
25 | * The "keyEvents" collection of methods.
|
---|
26 | * Typical usage is:
|
---|
27 | * <code>
|
---|
28 | * $analyticsadminService = new Google\Service\GoogleAnalyticsAdmin(...);
|
---|
29 | * $keyEvents = $analyticsadminService->properties_keyEvents;
|
---|
30 | * </code>
|
---|
31 | */
|
---|
32 | class PropertiesKeyEvents extends \Google\Service\Resource
|
---|
33 | {
|
---|
34 | /**
|
---|
35 | * Creates a Key Event. (keyEvents.create)
|
---|
36 | *
|
---|
37 | * @param string $parent Required. The resource name of the parent property
|
---|
38 | * where this Key Event will be created. Format: properties/123
|
---|
39 | * @param GoogleAnalyticsAdminV1betaKeyEvent $postBody
|
---|
40 | * @param array $optParams Optional parameters.
|
---|
41 | * @return GoogleAnalyticsAdminV1betaKeyEvent
|
---|
42 | * @throws \Google\Service\Exception
|
---|
43 | */
|
---|
44 | public function create($parent, GoogleAnalyticsAdminV1betaKeyEvent $postBody, $optParams = [])
|
---|
45 | {
|
---|
46 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
47 | $params = array_merge($params, $optParams);
|
---|
48 | return $this->call('create', [$params], GoogleAnalyticsAdminV1betaKeyEvent::class);
|
---|
49 | }
|
---|
50 | /**
|
---|
51 | * Deletes a Key Event. (keyEvents.delete)
|
---|
52 | *
|
---|
53 | * @param string $name Required. The resource name of the Key Event to delete.
|
---|
54 | * Format: properties/{property}/keyEvents/{key_event} Example:
|
---|
55 | * "properties/123/keyEvents/456"
|
---|
56 | * @param array $optParams Optional parameters.
|
---|
57 | * @return GoogleProtobufEmpty
|
---|
58 | * @throws \Google\Service\Exception
|
---|
59 | */
|
---|
60 | public function delete($name, $optParams = [])
|
---|
61 | {
|
---|
62 | $params = ['name' => $name];
|
---|
63 | $params = array_merge($params, $optParams);
|
---|
64 | return $this->call('delete', [$params], GoogleProtobufEmpty::class);
|
---|
65 | }
|
---|
66 | /**
|
---|
67 | * Retrieve a single Key Event. (keyEvents.get)
|
---|
68 | *
|
---|
69 | * @param string $name Required. The resource name of the Key Event to retrieve.
|
---|
70 | * Format: properties/{property}/keyEvents/{key_event} Example:
|
---|
71 | * "properties/123/keyEvents/456"
|
---|
72 | * @param array $optParams Optional parameters.
|
---|
73 | * @return GoogleAnalyticsAdminV1betaKeyEvent
|
---|
74 | * @throws \Google\Service\Exception
|
---|
75 | */
|
---|
76 | public function get($name, $optParams = [])
|
---|
77 | {
|
---|
78 | $params = ['name' => $name];
|
---|
79 | $params = array_merge($params, $optParams);
|
---|
80 | return $this->call('get', [$params], GoogleAnalyticsAdminV1betaKeyEvent::class);
|
---|
81 | }
|
---|
82 | /**
|
---|
83 | * Returns a list of Key Events in the specified parent property. Returns an
|
---|
84 | * empty list if no Key Events are found. (keyEvents.listPropertiesKeyEvents)
|
---|
85 | *
|
---|
86 | * @param string $parent Required. The resource name of the parent property.
|
---|
87 | * Example: 'properties/123'
|
---|
88 | * @param array $optParams Optional parameters.
|
---|
89 | *
|
---|
90 | * @opt_param int pageSize The maximum number of resources to return. If
|
---|
91 | * unspecified, at most 50 resources will be returned. The maximum value is 200;
|
---|
92 | * (higher values will be coerced to the maximum)
|
---|
93 | * @opt_param string pageToken A page token, received from a previous
|
---|
94 | * `ListKeyEvents` call. Provide this to retrieve the subsequent page. When
|
---|
95 | * paginating, all other parameters provided to `ListKeyEvents` must match the
|
---|
96 | * call that provided the page token.
|
---|
97 | * @return GoogleAnalyticsAdminV1betaListKeyEventsResponse
|
---|
98 | * @throws \Google\Service\Exception
|
---|
99 | */
|
---|
100 | public function listPropertiesKeyEvents($parent, $optParams = [])
|
---|
101 | {
|
---|
102 | $params = ['parent' => $parent];
|
---|
103 | $params = array_merge($params, $optParams);
|
---|
104 | return $this->call('list', [$params], GoogleAnalyticsAdminV1betaListKeyEventsResponse::class);
|
---|
105 | }
|
---|
106 | /**
|
---|
107 | * Updates a Key Event. (keyEvents.patch)
|
---|
108 | *
|
---|
109 | * @param string $name Output only. Resource name of this key event. Format:
|
---|
110 | * properties/{property}/keyEvents/{key_event}
|
---|
111 | * @param GoogleAnalyticsAdminV1betaKeyEvent $postBody
|
---|
112 | * @param array $optParams Optional parameters.
|
---|
113 | *
|
---|
114 | * @opt_param string updateMask Required. The list of fields to be updated.
|
---|
115 | * Field names must be in snake case (e.g., "field_to_update"). Omitted fields
|
---|
116 | * will not be updated. To replace the entire entity, use one path with the
|
---|
117 | * string "*" to match all fields.
|
---|
118 | * @return GoogleAnalyticsAdminV1betaKeyEvent
|
---|
119 | * @throws \Google\Service\Exception
|
---|
120 | */
|
---|
121 | public function patch($name, GoogleAnalyticsAdminV1betaKeyEvent $postBody, $optParams = [])
|
---|
122 | {
|
---|
123 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
124 | $params = array_merge($params, $optParams);
|
---|
125 | return $this->call('patch', [$params], GoogleAnalyticsAdminV1betaKeyEvent::class);
|
---|
126 | }
|
---|
127 | }
|
---|
128 |
|
---|
129 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
130 | class_alias(PropertiesKeyEvents::class, 'Google_Service_GoogleAnalyticsAdmin_Resource_PropertiesKeyEvents');
|
---|