source: vendor/google/apiclient-services/src/CloudWorkstations/Resource/ProjectsLocationsWorkstationClusters.php

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

Upload project files

  • Property mode set to 100644
File size: 5.4 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\CloudWorkstations\Resource;
19
20use Google\Service\CloudWorkstations\ListWorkstationClustersResponse;
21use Google\Service\CloudWorkstations\Operation;
22use Google\Service\CloudWorkstations\WorkstationCluster;
23
24/**
25 * The "workstationClusters" collection of methods.
26 * Typical usage is:
27 * <code>
28 * $workstationsService = new Google\Service\CloudWorkstations(...);
29 * $workstationClusters = $workstationsService->projects_locations_workstationClusters;
30 * </code>
31 */
32class ProjectsLocationsWorkstationClusters extends \Google\Service\Resource
33{
34 /**
35 * Creates a new workstation cluster. (workstationClusters.create)
36 *
37 * @param string $parent Required. Parent resource name.
38 * @param WorkstationCluster $postBody
39 * @param array $optParams Optional parameters.
40 *
41 * @opt_param bool validateOnly Optional. If set, validate the request and
42 * preview the review, but do not actually apply it.
43 * @opt_param string workstationClusterId Required. ID to use for the
44 * workstation cluster.
45 * @return Operation
46 * @throws \Google\Service\Exception
47 */
48 public function create($parent, WorkstationCluster $postBody, $optParams = [])
49 {
50 $params = ['parent' => $parent, 'postBody' => $postBody];
51 $params = array_merge($params, $optParams);
52 return $this->call('create', [$params], Operation::class);
53 }
54 /**
55 * Deletes the specified workstation cluster. (workstationClusters.delete)
56 *
57 * @param string $name Required. Name of the workstation cluster to delete.
58 * @param array $optParams Optional parameters.
59 *
60 * @opt_param string etag Optional. If set, the request will be rejected if the
61 * latest version of the workstation cluster on the server does not have this
62 * ETag.
63 * @opt_param bool force Optional. If set, any workstation configurations and
64 * workstations in the workstation cluster are also deleted. Otherwise, the
65 * request only works if the workstation cluster has no configurations or
66 * workstations.
67 * @opt_param bool validateOnly Optional. If set, validate the request and
68 * preview the review, but do not apply it.
69 * @return Operation
70 * @throws \Google\Service\Exception
71 */
72 public function delete($name, $optParams = [])
73 {
74 $params = ['name' => $name];
75 $params = array_merge($params, $optParams);
76 return $this->call('delete', [$params], Operation::class);
77 }
78 /**
79 * Returns the requested workstation cluster. (workstationClusters.get)
80 *
81 * @param string $name Required. Name of the requested resource.
82 * @param array $optParams Optional parameters.
83 * @return WorkstationCluster
84 * @throws \Google\Service\Exception
85 */
86 public function get($name, $optParams = [])
87 {
88 $params = ['name' => $name];
89 $params = array_merge($params, $optParams);
90 return $this->call('get', [$params], WorkstationCluster::class);
91 }
92 /**
93 * Returns all workstation clusters in the specified location.
94 * (workstationClusters.listProjectsLocationsWorkstationClusters)
95 *
96 * @param string $parent Required. Parent resource name.
97 * @param array $optParams Optional parameters.
98 *
99 * @opt_param int pageSize Optional. Maximum number of items to return.
100 * @opt_param string pageToken Optional. next_page_token value returned from a
101 * previous List request, if any.
102 * @return ListWorkstationClustersResponse
103 * @throws \Google\Service\Exception
104 */
105 public function listProjectsLocationsWorkstationClusters($parent, $optParams = [])
106 {
107 $params = ['parent' => $parent];
108 $params = array_merge($params, $optParams);
109 return $this->call('list', [$params], ListWorkstationClustersResponse::class);
110 }
111 /**
112 * Updates an existing workstation cluster. (workstationClusters.patch)
113 *
114 * @param string $name Identifier. Full name of this workstation cluster.
115 * @param WorkstationCluster $postBody
116 * @param array $optParams Optional parameters.
117 *
118 * @opt_param bool allowMissing Optional. If set, and the workstation cluster is
119 * not found, a new workstation cluster will be created. In this situation,
120 * update_mask is ignored.
121 * @opt_param string updateMask Required. Mask that specifies which fields in
122 * the workstation cluster should be updated.
123 * @opt_param bool validateOnly Optional. If set, validate the request and
124 * preview the review, but do not actually apply it.
125 * @return Operation
126 * @throws \Google\Service\Exception
127 */
128 public function patch($name, WorkstationCluster $postBody, $optParams = [])
129 {
130 $params = ['name' => $name, 'postBody' => $postBody];
131 $params = array_merge($params, $optParams);
132 return $this->call('patch', [$params], Operation::class);
133 }
134}
135
136// Adding a class alias for backwards compatibility with the previous class name.
137class_alias(ProjectsLocationsWorkstationClusters::class, 'Google_Service_CloudWorkstations_Resource_ProjectsLocationsWorkstationClusters');
Note: See TracBrowser for help on using the repository browser.