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 FirebaseRealtimeDatabase (v1beta).
24 *
25 * <p>
26 * The Firebase Realtime Database Management API enables programmatic
27 * provisioning and management of Realtime Database instances.</p>
28 *
29 * <p>
30 * For more information about this service, see the API
31 * <a href="https://firebase.google.com/docs/reference/rest/database/database-management/rest/" target="_blank">Documentation</a>
32 * </p>
33 *
34 * @author Google, Inc.
35 */
36class FirebaseRealtimeDatabase extends \Google\Service
37{
38  /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.. */
39  const CLOUD_PLATFORM =
40      "https://www.googleapis.com/auth/cloud-platform";
41  /** View your data across Google Cloud services and see the email address of your Google Account. */
42  const CLOUD_PLATFORM_READ_ONLY =
43      "https://www.googleapis.com/auth/cloud-platform.read-only";
44  /** View and administer all your Firebase data and settings. */
45  const FIREBASE =
46      "https://www.googleapis.com/auth/firebase";
47  /** View all your Firebase data and settings. */
48  const FIREBASE_READONLY =
49      "https://www.googleapis.com/auth/firebase.readonly";
50
51  public $projects_locations_instances;
52
53  /**
54   * Constructs the internal representation of the FirebaseRealtimeDatabase
55   * service.
56   *
57   * @param Client|array $clientOrConfig The client used to deliver requests, or a
58   *                                     config array to pass to a new Client instance.
59   * @param string $rootUrl The root URL used for requests to the service.
60   */
61  public function __construct($clientOrConfig = [], $rootUrl = null)
62  {
63    parent::__construct($clientOrConfig);
64    $this->rootUrl = $rootUrl ?: 'https://firebasedatabase.googleapis.com/';
65    $this->servicePath = '';
66    $this->batchPath = 'batch';
67    $this->version = 'v1beta';
68    $this->serviceName = 'firebasedatabase';
69
70    $this->projects_locations_instances = new FirebaseRealtimeDatabase\Resource\ProjectsLocationsInstances(
71        $this,
72        $this->serviceName,
73        'instances',
74        [
75          'methods' => [
76            'create' => [
77              'path' => 'v1beta/{+parent}/instances',
78              'httpMethod' => 'POST',
79              'parameters' => [
80                'parent' => [
81                  'location' => 'path',
82                  'type' => 'string',
83                  'required' => true,
84                ],
85                'databaseId' => [
86                  'location' => 'query',
87                  'type' => 'string',
88                ],
89                'validateOnly' => [
90                  'location' => 'query',
91                  'type' => 'boolean',
92                ],
93              ],
94            ],'delete' => [
95              'path' => 'v1beta/{+name}',
96              'httpMethod' => 'DELETE',
97              'parameters' => [
98                'name' => [
99                  'location' => 'path',
100                  'type' => 'string',
101                  'required' => true,
102                ],
103              ],
104            ],'disable' => [
105              'path' => 'v1beta/{+name}:disable',
106              'httpMethod' => 'POST',
107              'parameters' => [
108                'name' => [
109                  'location' => 'path',
110                  'type' => 'string',
111                  'required' => true,
112                ],
113              ],
114            ],'get' => [
115              'path' => 'v1beta/{+name}',
116              'httpMethod' => 'GET',
117              'parameters' => [
118                'name' => [
119                  'location' => 'path',
120                  'type' => 'string',
121                  'required' => true,
122                ],
123              ],
124            ],'list' => [
125              'path' => 'v1beta/{+parent}/instances',
126              'httpMethod' => 'GET',
127              'parameters' => [
128                'parent' => [
129                  'location' => 'path',
130                  'type' => 'string',
131                  'required' => true,
132                ],
133                'pageSize' => [
134                  'location' => 'query',
135                  'type' => 'integer',
136                ],
137                'pageToken' => [
138                  'location' => 'query',
139                  'type' => 'string',
140                ],
141                'showDeleted' => [
142                  'location' => 'query',
143                  'type' => 'boolean',
144                ],
145              ],
146            ],'reenable' => [
147              'path' => 'v1beta/{+name}:reenable',
148              'httpMethod' => 'POST',
149              'parameters' => [
150                'name' => [
151                  'location' => 'path',
152                  'type' => 'string',
153                  'required' => true,
154                ],
155              ],
156            ],'undelete' => [
157              'path' => 'v1beta/{+name}:undelete',
158              'httpMethod' => 'POST',
159              'parameters' => [
160                'name' => [
161                  'location' => 'path',
162                  'type' => 'string',
163                  'required' => true,
164                ],
165              ],
166            ],
167          ]
168        ]
169    );
170  }
171}
172
173// Adding a class alias for backwards compatibility with the previous class name.
174class_alias(FirebaseRealtimeDatabase::class, 'Google_Service_FirebaseRealtimeDatabase');
175