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;
19
20use Google\Client;
21
22/**
23 * Service definition for FirebaseDynamicLinks (v1).
24 *
25 * <p>
26 * Programmatically creates and manages Firebase Dynamic Links.</p>
27 *
28 * <p>
29 * For more information about this service, see the API
30 * <a href="https://firebase.google.com/docs/dynamic-links/" target="_blank">Documentation</a>
31 * </p>
32 *
33 * @author Google, Inc.
34 */
35class FirebaseDynamicLinks extends \Google\Service
36{
37  /** View and administer all your Firebase data and settings. */
38  const FIREBASE =
39      "https://www.googleapis.com/auth/firebase";
40
41  public $managedShortLinks;
42  public $shortLinks;
43  public $v1;
44
45  /**
46   * Constructs the internal representation of the FirebaseDynamicLinks service.
47   *
48   * @param Client|array $clientOrConfig The client used to deliver requests, or a
49   *                                     config array to pass to a new Client instance.
50   * @param string $rootUrl The root URL used for requests to the service.
51   */
52  public function __construct($clientOrConfig = [], $rootUrl = null)
53  {
54    parent::__construct($clientOrConfig);
55    $this->rootUrl = $rootUrl ?: 'https://firebasedynamiclinks.googleapis.com/';
56    $this->servicePath = '';
57    $this->batchPath = 'batch';
58    $this->version = 'v1';
59    $this->serviceName = 'firebasedynamiclinks';
60
61    $this->managedShortLinks = new FirebaseDynamicLinks\Resource\ManagedShortLinks(
62        $this,
63        $this->serviceName,
64        'managedShortLinks',
65        [
66          'methods' => [
67            'create' => [
68              'path' => 'v1/managedShortLinks:create',
69              'httpMethod' => 'POST',
70              'parameters' => [],
71            ],
72          ]
73        ]
74    );
75    $this->shortLinks = new FirebaseDynamicLinks\Resource\ShortLinks(
76        $this,
77        $this->serviceName,
78        'shortLinks',
79        [
80          'methods' => [
81            'create' => [
82              'path' => 'v1/shortLinks',
83              'httpMethod' => 'POST',
84              'parameters' => [],
85            ],
86          ]
87        ]
88    );
89    $this->v1 = new FirebaseDynamicLinks\Resource\V1(
90        $this,
91        $this->serviceName,
92        'v1',
93        [
94          'methods' => [
95            'getLinkStats' => [
96              'path' => 'v1/{dynamicLink}/linkStats',
97              'httpMethod' => 'GET',
98              'parameters' => [
99                'dynamicLink' => [
100                  'location' => 'path',
101                  'type' => 'string',
102                  'required' => true,
103                ],
104                'durationDays' => [
105                  'location' => 'query',
106                  'type' => 'string',
107                ],
108                'sdkVersion' => [
109                  'location' => 'query',
110                  'type' => 'string',
111                ],
112              ],
113            ],'installAttribution' => [
114              'path' => 'v1/installAttribution',
115              'httpMethod' => 'POST',
116              'parameters' => [],
117            ],'reopenAttribution' => [
118              'path' => 'v1/reopenAttribution',
119              'httpMethod' => 'POST',
120              'parameters' => [],
121            ],
122          ]
123        ]
124    );
125  }
126}
127
128// Adding a class alias for backwards compatibility with the previous class name.
129class_alias(FirebaseDynamicLinks::class, 'Google_Service_FirebaseDynamicLinks');
130