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\GoogleAnalyticsAdminV1alphaAndroidAppDataStream;
21use Google\Service\GoogleAnalyticsAdmin\GoogleAnalyticsAdminV1alphaListAndroidAppDataStreamsResponse;
22use Google\Service\GoogleAnalyticsAdmin\GoogleProtobufEmpty;
23
24/**
25 * The "androidAppDataStreams" collection of methods.
26 * Typical usage is:
27 *  <code>
28 *   $analyticsadminService = new Google\Service\GoogleAnalyticsAdmin(...);
29 *   $androidAppDataStreams = $analyticsadminService->androidAppDataStreams;
30 *  </code>
31 */
32class PropertiesAndroidAppDataStreams extends \Google\Service\Resource
33{
34  /**
35   * Deletes an android app stream on a property. (androidAppDataStreams.delete)
36   *
37   * @param string $name Required. The name of the android app data stream to
38   * delete. Format: properties/{property_id}/androidAppDataStreams/{stream_id}
39   * Example: "properties/123/androidAppDataStreams/456"
40   * @param array $optParams Optional parameters.
41   * @return GoogleProtobufEmpty
42   */
43  public function delete($name, $optParams = [])
44  {
45    $params = ['name' => $name];
46    $params = array_merge($params, $optParams);
47    return $this->call('delete', [$params], GoogleProtobufEmpty::class);
48  }
49  /**
50   * Lookup for a single AndroidAppDataStream (androidAppDataStreams.get)
51   *
52   * @param string $name Required. The name of the android app data stream to
53   * lookup. Format: properties/{property_id}/androidAppDataStreams/{stream_id}
54   * Example: "properties/123/androidAppDataStreams/456"
55   * @param array $optParams Optional parameters.
56   * @return GoogleAnalyticsAdminV1alphaAndroidAppDataStream
57   */
58  public function get($name, $optParams = [])
59  {
60    $params = ['name' => $name];
61    $params = array_merge($params, $optParams);
62    return $this->call('get', [$params], GoogleAnalyticsAdminV1alphaAndroidAppDataStream::class);
63  }
64  /**
65   * Returns child android app streams under the specified parent property.
66   * Android app streams will be excluded if the caller does not have access.
67   * Returns an empty list if no relevant android app streams are found.
68   * (androidAppDataStreams.listPropertiesAndroidAppDataStreams)
69   *
70   * @param string $parent Required. The name of the parent property. For example,
71   * to limit results to app streams under the property with Id 123:
72   * "properties/123"
73   * @param array $optParams Optional parameters.
74   *
75   * @opt_param int pageSize The maximum number of resources to return. If
76   * unspecified, at most 50 resources will be returned. The maximum value is 200;
77   * (higher values will be coerced to the maximum)
78   * @opt_param string pageToken A page token, received from a previous call.
79   * Provide this to retrieve the subsequent page. When paginating, all other
80   * parameters provided to `ListAndroidAppDataStreams` must match the call that
81   * provided the page token.
82   * @return GoogleAnalyticsAdminV1alphaListAndroidAppDataStreamsResponse
83   */
84  public function listPropertiesAndroidAppDataStreams($parent, $optParams = [])
85  {
86    $params = ['parent' => $parent];
87    $params = array_merge($params, $optParams);
88    return $this->call('list', [$params], GoogleAnalyticsAdminV1alphaListAndroidAppDataStreamsResponse::class);
89  }
90  /**
91   * Updates an android app stream on a property. (androidAppDataStreams.patch)
92   *
93   * @param string $name Output only. Resource name of this Data Stream. Format:
94   * properties/{property_id}/androidAppDataStreams/{stream_id} Example:
95   * "properties/1000/androidAppDataStreams/2000"
96   * @param GoogleAnalyticsAdminV1alphaAndroidAppDataStream $postBody
97   * @param array $optParams Optional parameters.
98   *
99   * @opt_param string updateMask Required. The list of fields to be updated.
100   * Field names must be in snake case (e.g., "field_to_update"). Omitted fields
101   * will not be updated. To replace the entire entity, use one path with the
102   * string "*" to match all fields.
103   * @return GoogleAnalyticsAdminV1alphaAndroidAppDataStream
104   */
105  public function patch($name, GoogleAnalyticsAdminV1alphaAndroidAppDataStream $postBody, $optParams = [])
106  {
107    $params = ['name' => $name, 'postBody' => $postBody];
108    $params = array_merge($params, $optParams);
109    return $this->call('patch', [$params], GoogleAnalyticsAdminV1alphaAndroidAppDataStream::class);
110  }
111}
112
113// Adding a class alias for backwards compatibility with the previous class name.
114class_alias(PropertiesAndroidAppDataStreams::class, 'Google_Service_GoogleAnalyticsAdmin_Resource_PropertiesAndroidAppDataStreams');
115