source: vendor/google/apiclient-services/src/ServiceUsage.php@ e3d4e0a

Last change on this file since e3d4e0a was e3d4e0a, checked in by Vlado 222039 <vlado.popovski@…>, 7 days ago

Upload project files

  • Property mode set to 100644
File size: 7.0 KB
Line 
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 ServiceUsage (v1).
24 *
25 * <p>
26 * Enables services that service consumers want to use on Google Cloud Platform,
27 * lists the available or enabled services, or disables services that service
28 * consumers no longer use.</p>
29 *
30 * <p>
31 * For more information about this service, see the API
32 * <a href="https://cloud.google.com/service-usage/" target="_blank">Documentation</a>
33 * </p>
34 *
35 * @author Google, Inc.
36 */
37class ServiceUsage extends \Google\Service
38{
39 /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.. */
40 const CLOUD_PLATFORM =
41 "https://www.googleapis.com/auth/cloud-platform";
42 /** View your data across Google Cloud services and see the email address of your Google Account. */
43 const CLOUD_PLATFORM_READ_ONLY =
44 "https://www.googleapis.com/auth/cloud-platform.read-only";
45 /** Manage your Google API service configuration. */
46 const SERVICE_MANAGEMENT =
47 "https://www.googleapis.com/auth/service.management";
48
49 public $operations;
50 public $services;
51 public $rootUrlTemplate;
52
53 /**
54 * Constructs the internal representation of the ServiceUsage service.
55 *
56 * @param Client|array $clientOrConfig The client used to deliver requests, or a
57 * config array to pass to a new Client instance.
58 * @param string $rootUrl The root URL used for requests to the service.
59 */
60 public function __construct($clientOrConfig = [], $rootUrl = null)
61 {
62 parent::__construct($clientOrConfig);
63 $this->rootUrl = $rootUrl ?: 'https://serviceusage.googleapis.com/';
64 $this->rootUrlTemplate = $rootUrl ?: 'https://serviceusage.UNIVERSE_DOMAIN/';
65 $this->servicePath = '';
66 $this->batchPath = 'batch';
67 $this->version = 'v1';
68 $this->serviceName = 'serviceusage';
69
70 $this->operations = new ServiceUsage\Resource\Operations(
71 $this,
72 $this->serviceName,
73 'operations',
74 [
75 'methods' => [
76 'cancel' => [
77 'path' => 'v1/{+name}:cancel',
78 'httpMethod' => 'POST',
79 'parameters' => [
80 'name' => [
81 'location' => 'path',
82 'type' => 'string',
83 'required' => true,
84 ],
85 ],
86 ],'delete' => [
87 'path' => 'v1/{+name}',
88 'httpMethod' => 'DELETE',
89 'parameters' => [
90 'name' => [
91 'location' => 'path',
92 'type' => 'string',
93 'required' => true,
94 ],
95 ],
96 ],'get' => [
97 'path' => 'v1/{+name}',
98 'httpMethod' => 'GET',
99 'parameters' => [
100 'name' => [
101 'location' => 'path',
102 'type' => 'string',
103 'required' => true,
104 ],
105 ],
106 ],'list' => [
107 'path' => 'v1/operations',
108 'httpMethod' => 'GET',
109 'parameters' => [
110 'filter' => [
111 'location' => 'query',
112 'type' => 'string',
113 ],
114 'name' => [
115 'location' => 'query',
116 'type' => 'string',
117 ],
118 'pageSize' => [
119 'location' => 'query',
120 'type' => 'integer',
121 ],
122 'pageToken' => [
123 'location' => 'query',
124 'type' => 'string',
125 ],
126 ],
127 ],
128 ]
129 ]
130 );
131 $this->services = new ServiceUsage\Resource\Services(
132 $this,
133 $this->serviceName,
134 'services',
135 [
136 'methods' => [
137 'batchEnable' => [
138 'path' => 'v1/{+parent}/services:batchEnable',
139 'httpMethod' => 'POST',
140 'parameters' => [
141 'parent' => [
142 'location' => 'path',
143 'type' => 'string',
144 'required' => true,
145 ],
146 ],
147 ],'batchGet' => [
148 'path' => 'v1/{+parent}/services:batchGet',
149 'httpMethod' => 'GET',
150 'parameters' => [
151 'parent' => [
152 'location' => 'path',
153 'type' => 'string',
154 'required' => true,
155 ],
156 'names' => [
157 'location' => 'query',
158 'type' => 'string',
159 'repeated' => true,
160 ],
161 ],
162 ],'disable' => [
163 'path' => 'v1/{+name}:disable',
164 'httpMethod' => 'POST',
165 'parameters' => [
166 'name' => [
167 'location' => 'path',
168 'type' => 'string',
169 'required' => true,
170 ],
171 ],
172 ],'enable' => [
173 'path' => 'v1/{+name}:enable',
174 'httpMethod' => 'POST',
175 'parameters' => [
176 'name' => [
177 'location' => 'path',
178 'type' => 'string',
179 'required' => true,
180 ],
181 ],
182 ],'get' => [
183 'path' => 'v1/{+name}',
184 'httpMethod' => 'GET',
185 'parameters' => [
186 'name' => [
187 'location' => 'path',
188 'type' => 'string',
189 'required' => true,
190 ],
191 ],
192 ],'list' => [
193 'path' => 'v1/{+parent}/services',
194 'httpMethod' => 'GET',
195 'parameters' => [
196 'parent' => [
197 'location' => 'path',
198 'type' => 'string',
199 'required' => true,
200 ],
201 'filter' => [
202 'location' => 'query',
203 'type' => 'string',
204 ],
205 'pageSize' => [
206 'location' => 'query',
207 'type' => 'integer',
208 ],
209 'pageToken' => [
210 'location' => 'query',
211 'type' => 'string',
212 ],
213 ],
214 ],
215 ]
216 ]
217 );
218 }
219}
220
221// Adding a class alias for backwards compatibility with the previous class name.
222class_alias(ServiceUsage::class, 'Google_Service_ServiceUsage');
Note: See TracBrowser for help on using the repository browser.