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\GoogleAnalyticsAdminV1betaDataStream;
|
---|
21 | use Google\Service\GoogleAnalyticsAdmin\GoogleAnalyticsAdminV1betaListDataStreamsResponse;
|
---|
22 | use Google\Service\GoogleAnalyticsAdmin\GoogleProtobufEmpty;
|
---|
23 |
|
---|
24 | /**
|
---|
25 | * The "dataStreams" collection of methods.
|
---|
26 | * Typical usage is:
|
---|
27 | * <code>
|
---|
28 | * $analyticsadminService = new Google\Service\GoogleAnalyticsAdmin(...);
|
---|
29 | * $dataStreams = $analyticsadminService->properties_dataStreams;
|
---|
30 | * </code>
|
---|
31 | */
|
---|
32 | class PropertiesDataStreams extends \Google\Service\Resource
|
---|
33 | {
|
---|
34 | /**
|
---|
35 | * Creates a DataStream. (dataStreams.create)
|
---|
36 | *
|
---|
37 | * @param string $parent Required. Example format: properties/1234
|
---|
38 | * @param GoogleAnalyticsAdminV1betaDataStream $postBody
|
---|
39 | * @param array $optParams Optional parameters.
|
---|
40 | * @return GoogleAnalyticsAdminV1betaDataStream
|
---|
41 | * @throws \Google\Service\Exception
|
---|
42 | */
|
---|
43 | public function create($parent, GoogleAnalyticsAdminV1betaDataStream $postBody, $optParams = [])
|
---|
44 | {
|
---|
45 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
46 | $params = array_merge($params, $optParams);
|
---|
47 | return $this->call('create', [$params], GoogleAnalyticsAdminV1betaDataStream::class);
|
---|
48 | }
|
---|
49 | /**
|
---|
50 | * Deletes a DataStream on a property. (dataStreams.delete)
|
---|
51 | *
|
---|
52 | * @param string $name Required. The name of the DataStream to delete. Example
|
---|
53 | * format: properties/1234/dataStreams/5678
|
---|
54 | * @param array $optParams Optional parameters.
|
---|
55 | * @return GoogleProtobufEmpty
|
---|
56 | * @throws \Google\Service\Exception
|
---|
57 | */
|
---|
58 | public function delete($name, $optParams = [])
|
---|
59 | {
|
---|
60 | $params = ['name' => $name];
|
---|
61 | $params = array_merge($params, $optParams);
|
---|
62 | return $this->call('delete', [$params], GoogleProtobufEmpty::class);
|
---|
63 | }
|
---|
64 | /**
|
---|
65 | * Lookup for a single DataStream. (dataStreams.get)
|
---|
66 | *
|
---|
67 | * @param string $name Required. The name of the DataStream to get. Example
|
---|
68 | * format: properties/1234/dataStreams/5678
|
---|
69 | * @param array $optParams Optional parameters.
|
---|
70 | * @return GoogleAnalyticsAdminV1betaDataStream
|
---|
71 | * @throws \Google\Service\Exception
|
---|
72 | */
|
---|
73 | public function get($name, $optParams = [])
|
---|
74 | {
|
---|
75 | $params = ['name' => $name];
|
---|
76 | $params = array_merge($params, $optParams);
|
---|
77 | return $this->call('get', [$params], GoogleAnalyticsAdminV1betaDataStream::class);
|
---|
78 | }
|
---|
79 | /**
|
---|
80 | * Lists DataStreams on a property. (dataStreams.listPropertiesDataStreams)
|
---|
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 | * `ListDataStreams` call. Provide this to retrieve the subsequent page. When
|
---|
90 | * paginating, all other parameters provided to `ListDataStreams` must match the
|
---|
91 | * call that provided the page token.
|
---|
92 | * @return GoogleAnalyticsAdminV1betaListDataStreamsResponse
|
---|
93 | * @throws \Google\Service\Exception
|
---|
94 | */
|
---|
95 | public function listPropertiesDataStreams($parent, $optParams = [])
|
---|
96 | {
|
---|
97 | $params = ['parent' => $parent];
|
---|
98 | $params = array_merge($params, $optParams);
|
---|
99 | return $this->call('list', [$params], GoogleAnalyticsAdminV1betaListDataStreamsResponse::class);
|
---|
100 | }
|
---|
101 | /**
|
---|
102 | * Updates a DataStream on a property. (dataStreams.patch)
|
---|
103 | *
|
---|
104 | * @param string $name Output only. Resource name of this Data Stream. Format:
|
---|
105 | * properties/{property_id}/dataStreams/{stream_id} Example:
|
---|
106 | * "properties/1000/dataStreams/2000"
|
---|
107 | * @param GoogleAnalyticsAdminV1betaDataStream $postBody
|
---|
108 | * @param array $optParams Optional parameters.
|
---|
109 | *
|
---|
110 | * @opt_param string updateMask Required. The list of fields to be updated.
|
---|
111 | * Omitted fields will not be updated. To replace the entire entity, use one
|
---|
112 | * path with the string "*" to match all fields.
|
---|
113 | * @return GoogleAnalyticsAdminV1betaDataStream
|
---|
114 | * @throws \Google\Service\Exception
|
---|
115 | */
|
---|
116 | public function patch($name, GoogleAnalyticsAdminV1betaDataStream $postBody, $optParams = [])
|
---|
117 | {
|
---|
118 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
119 | $params = array_merge($params, $optParams);
|
---|
120 | return $this->call('patch', [$params], GoogleAnalyticsAdminV1betaDataStream::class);
|
---|
121 | }
|
---|
122 | }
|
---|
123 |
|
---|
124 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
125 | class_alias(PropertiesDataStreams::class, 'Google_Service_GoogleAnalyticsAdmin_Resource_PropertiesDataStreams');
|
---|