1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
<?php
/*
* Copyright 2010 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
/**
* Service definition for Cloudresourcemanager (v1beta1).
*
* <p>
* The Google Cloud Resource Manager API provides methods for creating, reading,
* and updating of project metadata, including IAM policies, and will shortly
* provide the same for other high-level entities (e.g. customers and resource
* groups). Longer term, we expect the cloudresourcemanager API to encompass
* other Cloud resources as well.</p>
*
* <p>
* For more information about this service, see the API
* <a href="https://cloud.google.com/resource-manager" target="_blank">Documentation</a>
* </p>
*
* @author Google, Inc.
*/
class Google_Service_Cloudresourcemanager extends Google_Service
{
/** View and manage your data across Google Cloud Platform services. */
const CLOUD_PLATFORM =
"https://www.googleapis.com/auth/cloud-platform";
public $projects;
/**
* Constructs the internal representation of the Cloudresourcemanager service.
*
* @param Google_Client $client
*/
public function __construct(Google_Client $client)
{
parent::__construct($client);
$this->rootUrl = 'https://cloudresourcemanager.googleapis.com/';
$this->servicePath = '';
$this->version = 'v1beta1';
$this->serviceName = 'cloudresourcemanager';
$this->projects = new Google_Service_Cloudresourcemanager_Projects_Resource(
$this,
$this->serviceName,
'projects',
array(
'methods' => array(
'create' => array(
'path' => 'v1beta1/projects',
'httpMethod' => 'POST',
'parameters' => array(),
),'delete' => array(
'path' => 'v1beta1/projects/{projectId}',
'httpMethod' => 'DELETE',
'parameters' => array(
'projectId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
),
),'get' => array(
'path' => 'v1beta1/projects/{projectId}',
'httpMethod' => 'GET',
'parameters' => array(
'projectId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
),
),'list' => array(
'path' => 'v1beta1/projects',
'httpMethod' => 'GET',
'parameters' => array(
'filter' => array(
'location' => 'query',
'type' => 'string',
),
'pageToken' => array(
'location' => 'query',
'type' => 'string',
),
'pageSize' => array(
'location' => 'query',
'type' => 'integer',
),
),
),'undelete' => array(
'path' => 'v1beta1/projects/{projectId}:undelete',
'httpMethod' => 'POST',
'parameters' => array(
'projectId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
),
),'update' => array(
'path' => 'v1beta1/projects/{projectId}',
'httpMethod' => 'PUT',
'parameters' => array(
'projectId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
),
),
)
)
);
}
}
/**
* The "projects" collection of methods.
* Typical usage is:
* <code>
* $cloudresourcemanagerService = new Google_Service_Cloudresourcemanager(...);
* $projects = $cloudresourcemanagerService->projects;
* </code>
*/
class Google_Service_Cloudresourcemanager_Projects_Resource extends Google_Service_Resource
{
/**
* Creates a project resource. Initially, the project resource is owned by its
* creator exclusively. The creator can later grant permission to others to read
* or update the project. Several APIs are activated automatically for the
* project, including Google Cloud Storage. (projects.create)
*
* @param Google_Project $postBody
* @param array $optParams Optional parameters.
* @return Google_Service_Cloudresourcemanager_Project
*/
public function create(Google_Service_Cloudresourcemanager_Project $postBody, $optParams = array())
{
$params = array('postBody' => $postBody);
$params = array_merge($params, $optParams);
return $this->call('create', array($params), "Google_Service_Cloudresourcemanager_Project");
}
/**
* Marks the project identified by the specified `project_id` (for example, `my-
* project-123`) for deletion. This method will only affect the project if it
* has a lifecycle state of
* [ACTIVE][cloudresourcemanager.projects.v1beta2.LifecycleState.ACTIVE] when
* this method is called. Otherwise this method does nothing (since all other
* states are phases of deletion). This method changes the project's lifecycle
* state from
* [ACTIVE][cloudresourcemanager.projects.v1beta2.LifecycleState.ACTIVE] to
* [DELETE_REQUESTED]
* [cloudresourcemanager.projects.v1beta2.LifecycleState.DELETE_REQUESTED]. The
* deletion starts at an unspecified time, at which point the lifecycle state
* changes to [DELETE_IN_PROGRESS]
* [cloudresourcemanager.projects.v1beta2.LifecycleState.DELETE_IN_PROGRESS].
* Until the deletion completes, you can check the lifecycle state checked by
* retrieving the project with [GetProject]
* [cloudresourcemanager.projects.v1beta2.Projects.GetProject], and the project
* remains visible to [ListProjects]
* [cloudresourcemanager.projects.v1beta2.Projects.ListProjects]. However, you
* cannot update the project. After the deletion completes, the project is not
* retrievable by the [GetProject]
* [cloudresourcemanager.projects.v1beta2.Projects.GetProject] and
* [ListProjects] [cloudresourcemanager.projects.v1beta2.Projects.ListProjects]
* methods. The caller must have modify permissions for this project.
* (projects.delete)
*
* @param string $projectId The project ID (for example, `foo-bar-123`).
* Required.
* @param array $optParams Optional parameters.
* @return Google_Service_Cloudresourcemanager_Empty
*/
public function delete($projectId, $optParams = array())
{
$params = array('projectId' => $projectId);
$params = array_merge($params, $optParams);
return $this->call('delete', array($params), "Google_Service_Cloudresourcemanager_Empty");
}
/**
* Retrieves the project identified by the specified `project_id` (for example,
* `my-project-123`). The caller must have read permissions for this project.
* (projects.get)
*
* @param string $projectId The project ID (for example, `my-project-123`).
* Required.
* @param array $optParams Optional parameters.
* @return Google_Service_Cloudresourcemanager_Project
*/
public function get($projectId, $optParams = array())
{
$params = array('projectId' => $projectId);
$params = array_merge($params, $optParams);
return $this->call('get', array($params), "Google_Service_Cloudresourcemanager_Project");
}
/**
* Lists projects that are visible to the user and satisfy the specified filter.
* This method returns projects in an unspecified order. New projects do not
* necessarily appear at the end of the list. (projects.listProjects)
*
* @param array $optParams Optional parameters.
*
* @opt_param string filter An expression for filtering the results of the
* request. Filter rules are case insensitive. The fields eligible for filtering
* are: name id labels. where is a the name of a label Examples: name:* ==> The
* project has a name. name:Howl ==> The project’s name is `Howl` or 'howl'.
* name:HOWL ==> Equivalent to above. NAME:howl ==> Equivalent to above.
* labels.color:* ==> The project has the label "color". labels.color:red ==>
* The project’s label `color` has the value `red`. labels.color:red
* label.size:big ==> The project's label `color` has the value `red` and its
* label `size` has the value `big`. Optional.
* @opt_param string pageToken A pagination token returned from a previous call
* to ListProject that indicates from where listing should continue. Note:
* pagination is not yet supported; the server ignores this field. Optional.
* @opt_param int pageSize The maximum number of Projects to return in the
* response. The server can return fewer projects than requested. If
* unspecified, server picks an appropriate default. Note: pagination is not yet
* supported; the server ignores this field. Optional.
* @return Google_Service_Cloudresourcemanager_ListProjectsResponse
*/
public function listProjects($optParams = array())
{
$params = array();
$params = array_merge($params, $optParams);
return $this->call('list', array($params), "Google_Service_Cloudresourcemanager_ListProjectsResponse");
}
/**
* Restores the project identified by the specified `project_id` (for example,
* `my-project-123`). You can only use this method for a project that has a
* lifecycle state of [DELETE_REQUESTED]
* [cloudresourcemanager.projects.v1beta2.LifecycleState.DELETE_REQUESTED].
* After deletion starts, as indicated by a lifecycle state of
* [DELETE_IN_PROGRESS]
* [cloudresourcemanager.projects.v1beta2.LifecycleState.DELETE_IN_PROGRESS],
* the project cannot be restored. The caller must have modify permissions for
* this project. (projects.undelete)
*
* @param string $projectId The project ID (for example, `foo-bar-123`).
* Required.
* @param array $optParams Optional parameters.
* @return Google_Service_Cloudresourcemanager_Empty
*/
public function undelete($projectId, $optParams = array())
{
$params = array('projectId' => $projectId);
$params = array_merge($params, $optParams);
return $this->call('undelete', array($params), "Google_Service_Cloudresourcemanager_Empty");
}
/**
* Updates the attributes of the project identified by the specified
* `project_id` (for example, `my-project-123`). The caller must have modify
* permissions for this project. (projects.update)
*
* @param string $projectId The project ID (for example, `my-project-123`).
* Required.
* @param Google_Project $postBody
* @param array $optParams Optional parameters.
* @return Google_Service_Cloudresourcemanager_Project
*/
public function update($projectId, Google_Service_Cloudresourcemanager_Project $postBody, $optParams = array())
{
$params = array('projectId' => $projectId, 'postBody' => $postBody);
$params = array_merge($params, $optParams);
return $this->call('update', array($params), "Google_Service_Cloudresourcemanager_Project");
}
}
class Google_Service_Cloudresourcemanager_Empty extends Google_Model
{
}
class Google_Service_Cloudresourcemanager_ListProjectsResponse extends Google_Collection
{
protected $collection_key = 'projects';
protected $internal_gapi_mappings = array(
);
public $nextPageToken;
protected $projectsType = 'Google_Service_Cloudresourcemanager_Project';
protected $projectsDataType = 'array';
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
public function getNextPageToken()
{
return $this->nextPageToken;
}
public function setProjects($projects)
{
$this->projects = $projects;
}
public function getProjects()
{
return $this->projects;
}
}
class Google_Service_Cloudresourcemanager_Project extends Google_Model
{
protected $internal_gapi_mappings = array(
);
public $createTime;
public $labels;
public $lifecycleState;
public $name;
public $projectId;
public $projectNumber;
public function setCreateTime($createTime)
{
$this->createTime = $createTime;
}
public function getCreateTime()
{
return $this->createTime;
}
public function setLabels($labels)
{
$this->labels = $labels;
}
public function getLabels()
{
return $this->labels;
}
public function setLifecycleState($lifecycleState)
{
$this->lifecycleState = $lifecycleState;
}
public function getLifecycleState()
{
return $this->lifecycleState;
}
public function setName($name)
{
$this->name = $name;
}
public function getName()
{
return $this->name;
}
public function setProjectId($projectId)
{
$this->projectId = $projectId;
}
public function getProjectId()
{
return $this->projectId;
}
public function setProjectNumber($projectNumber)
{
$this->projectNumber = $projectNumber;
}
public function getProjectNumber()
{
return $this->projectNumber;
}
}
class Google_Service_Cloudresourcemanager_ProjectLabels extends Google_Model
{
}