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\GoogleAnalyticsAdminV1alphaFirebaseLink;
21use Google\Service\GoogleAnalyticsAdmin\GoogleAnalyticsAdminV1alphaListFirebaseLinksResponse;
22use Google\Service\GoogleAnalyticsAdmin\GoogleProtobufEmpty;
23
24/**
25 * The "firebaseLinks" collection of methods.
26 * Typical usage is:
27 *  <code>
28 *   $analyticsadminService = new Google\Service\GoogleAnalyticsAdmin(...);
29 *   $firebaseLinks = $analyticsadminService->firebaseLinks;
30 *  </code>
31 */
32class PropertiesFirebaseLinks extends \Google\Service\Resource
33{
34  /**
35   * Creates a FirebaseLink. Properties can have at most one FirebaseLink.
36   * (firebaseLinks.create)
37   *
38   * @param string $parent Required. Format: properties/{property_id} Example:
39   * properties/1234
40   * @param GoogleAnalyticsAdminV1alphaFirebaseLink $postBody
41   * @param array $optParams Optional parameters.
42   * @return GoogleAnalyticsAdminV1alphaFirebaseLink
43   */
44  public function create($parent, GoogleAnalyticsAdminV1alphaFirebaseLink $postBody, $optParams = [])
45  {
46    $params = ['parent' => $parent, 'postBody' => $postBody];
47    $params = array_merge($params, $optParams);
48    return $this->call('create', [$params], GoogleAnalyticsAdminV1alphaFirebaseLink::class);
49  }
50  /**
51   * Deletes a FirebaseLink on a property (firebaseLinks.delete)
52   *
53   * @param string $name Required. Format:
54   * properties/{property_id}/firebaseLinks/{firebase_link_id} Example:
55   * properties/1234/firebaseLinks/5678
56   * @param array $optParams Optional parameters.
57   * @return GoogleProtobufEmpty
58   */
59  public function delete($name, $optParams = [])
60  {
61    $params = ['name' => $name];
62    $params = array_merge($params, $optParams);
63    return $this->call('delete', [$params], GoogleProtobufEmpty::class);
64  }
65  /**
66   * Lists FirebaseLinks on a property. Properties can have at most one
67   * FirebaseLink. (firebaseLinks.listPropertiesFirebaseLinks)
68   *
69   * @param string $parent Required. Format: properties/{property_id} Example:
70   * properties/1234
71   * @param array $optParams Optional parameters.
72   *
73   * @opt_param int pageSize The maximum number of resources to return. The
74   * service may return fewer than this value, even if there are additional pages.
75   * If unspecified, at most 50 resources will be returned. The maximum value is
76   * 200; (higher values will be coerced to the maximum)
77   * @opt_param string pageToken A page token, received from a previous
78   * `ListFirebaseLinks` call. Provide this to retrieve the subsequent page. When
79   * paginating, all other parameters provided to `ListProperties` must match the
80   * call that provided the page token.
81   * @return GoogleAnalyticsAdminV1alphaListFirebaseLinksResponse
82   */
83  public function listPropertiesFirebaseLinks($parent, $optParams = [])
84  {
85    $params = ['parent' => $parent];
86    $params = array_merge($params, $optParams);
87    return $this->call('list', [$params], GoogleAnalyticsAdminV1alphaListFirebaseLinksResponse::class);
88  }
89}
90
91// Adding a class alias for backwards compatibility with the previous class name.
92class_alias(PropertiesFirebaseLinks::class, 'Google_Service_GoogleAnalyticsAdmin_Resource_PropertiesFirebaseLinks');
93