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\GoogleAnalyticsAdminV1betaListMeasurementProtocolSecretsResponse;
|
---|
21 | use Google\Service\GoogleAnalyticsAdmin\GoogleAnalyticsAdminV1betaMeasurementProtocolSecret;
|
---|
22 | use Google\Service\GoogleAnalyticsAdmin\GoogleProtobufEmpty;
|
---|
23 |
|
---|
24 | /**
|
---|
25 | * The "measurementProtocolSecrets" collection of methods.
|
---|
26 | * Typical usage is:
|
---|
27 | * <code>
|
---|
28 | * $analyticsadminService = new Google\Service\GoogleAnalyticsAdmin(...);
|
---|
29 | * $measurementProtocolSecrets = $analyticsadminService->properties_dataStreams_measurementProtocolSecrets;
|
---|
30 | * </code>
|
---|
31 | */
|
---|
32 | class PropertiesDataStreamsMeasurementProtocolSecrets extends \Google\Service\Resource
|
---|
33 | {
|
---|
34 | /**
|
---|
35 | * Creates a measurement protocol secret. (measurementProtocolSecrets.create)
|
---|
36 | *
|
---|
37 | * @param string $parent Required. The parent resource where this secret will be
|
---|
38 | * created. Format: properties/{property}/dataStreams/{dataStream}
|
---|
39 | * @param GoogleAnalyticsAdminV1betaMeasurementProtocolSecret $postBody
|
---|
40 | * @param array $optParams Optional parameters.
|
---|
41 | * @return GoogleAnalyticsAdminV1betaMeasurementProtocolSecret
|
---|
42 | * @throws \Google\Service\Exception
|
---|
43 | */
|
---|
44 | public function create($parent, GoogleAnalyticsAdminV1betaMeasurementProtocolSecret $postBody, $optParams = [])
|
---|
45 | {
|
---|
46 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
47 | $params = array_merge($params, $optParams);
|
---|
48 | return $this->call('create', [$params], GoogleAnalyticsAdminV1betaMeasurementProtocolSecret::class);
|
---|
49 | }
|
---|
50 | /**
|
---|
51 | * Deletes target MeasurementProtocolSecret. (measurementProtocolSecrets.delete)
|
---|
52 | *
|
---|
53 | * @param string $name Required. The name of the MeasurementProtocolSecret to
|
---|
54 | * delete. Format: properties/{property}/dataStreams/{dataStream}/measurementPro
|
---|
55 | * tocolSecrets/{measurementProtocolSecret}
|
---|
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 | * Lookup for a single MeasurementProtocolSecret.
|
---|
68 | * (measurementProtocolSecrets.get)
|
---|
69 | *
|
---|
70 | * @param string $name Required. The name of the measurement protocol secret to
|
---|
71 | * lookup. Format: properties/{property}/dataStreams/{dataStream}/measurementPro
|
---|
72 | * tocolSecrets/{measurementProtocolSecret}
|
---|
73 | * @param array $optParams Optional parameters.
|
---|
74 | * @return GoogleAnalyticsAdminV1betaMeasurementProtocolSecret
|
---|
75 | * @throws \Google\Service\Exception
|
---|
76 | */
|
---|
77 | public function get($name, $optParams = [])
|
---|
78 | {
|
---|
79 | $params = ['name' => $name];
|
---|
80 | $params = array_merge($params, $optParams);
|
---|
81 | return $this->call('get', [$params], GoogleAnalyticsAdminV1betaMeasurementProtocolSecret::class);
|
---|
82 | }
|
---|
83 | /**
|
---|
84 | * Returns child MeasurementProtocolSecrets under the specified parent Property.
|
---|
85 | * (measurementProtocolSecrets.listPropertiesDataStreamsMeasurementProtocolSecre
|
---|
86 | * ts)
|
---|
87 | *
|
---|
88 | * @param string $parent Required. The resource name of the parent stream.
|
---|
89 | * Format:
|
---|
90 | * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets
|
---|
91 | * @param array $optParams Optional parameters.
|
---|
92 | *
|
---|
93 | * @opt_param int pageSize The maximum number of resources to return. If
|
---|
94 | * unspecified, at most 10 resources will be returned. The maximum value is 10.
|
---|
95 | * Higher values will be coerced to the maximum.
|
---|
96 | * @opt_param string pageToken A page token, received from a previous
|
---|
97 | * `ListMeasurementProtocolSecrets` call. Provide this to retrieve the
|
---|
98 | * subsequent page. When paginating, all other parameters provided to
|
---|
99 | * `ListMeasurementProtocolSecrets` must match the call that provided the page
|
---|
100 | * token.
|
---|
101 | * @return GoogleAnalyticsAdminV1betaListMeasurementProtocolSecretsResponse
|
---|
102 | * @throws \Google\Service\Exception
|
---|
103 | */
|
---|
104 | public function listPropertiesDataStreamsMeasurementProtocolSecrets($parent, $optParams = [])
|
---|
105 | {
|
---|
106 | $params = ['parent' => $parent];
|
---|
107 | $params = array_merge($params, $optParams);
|
---|
108 | return $this->call('list', [$params], GoogleAnalyticsAdminV1betaListMeasurementProtocolSecretsResponse::class);
|
---|
109 | }
|
---|
110 | /**
|
---|
111 | * Updates a measurement protocol secret. (measurementProtocolSecrets.patch)
|
---|
112 | *
|
---|
113 | * @param string $name Output only. Resource name of this secret. This secret
|
---|
114 | * may be a child of any type of stream. Format: properties/{property}/dataStrea
|
---|
115 | * ms/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret}
|
---|
116 | * @param GoogleAnalyticsAdminV1betaMeasurementProtocolSecret $postBody
|
---|
117 | * @param array $optParams Optional parameters.
|
---|
118 | *
|
---|
119 | * @opt_param string updateMask Required. The list of fields to be updated.
|
---|
120 | * Omitted fields will not be updated.
|
---|
121 | * @return GoogleAnalyticsAdminV1betaMeasurementProtocolSecret
|
---|
122 | * @throws \Google\Service\Exception
|
---|
123 | */
|
---|
124 | public function patch($name, GoogleAnalyticsAdminV1betaMeasurementProtocolSecret $postBody, $optParams = [])
|
---|
125 | {
|
---|
126 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
127 | $params = array_merge($params, $optParams);
|
---|
128 | return $this->call('patch', [$params], GoogleAnalyticsAdminV1betaMeasurementProtocolSecret::class);
|
---|
129 | }
|
---|
130 | }
|
---|
131 |
|
---|
132 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
133 | class_alias(PropertiesDataStreamsMeasurementProtocolSecrets::class, 'Google_Service_GoogleAnalyticsAdmin_Resource_PropertiesDataStreamsMeasurementProtocolSecrets');
|
---|