source: vendor/google/apiclient-services/src/DataFusion/Resource/ProjectsLocationsInstances.php

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

Upload project files

  • Property mode set to 100644
File size: 9.8 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\DataFusion\Resource;
19
20use Google\Service\DataFusion\Instance;
21use Google\Service\DataFusion\ListInstancesResponse;
22use Google\Service\DataFusion\Operation;
23use Google\Service\DataFusion\Policy;
24use Google\Service\DataFusion\RestartInstanceRequest;
25use Google\Service\DataFusion\SetIamPolicyRequest;
26use Google\Service\DataFusion\TestIamPermissionsRequest;
27use Google\Service\DataFusion\TestIamPermissionsResponse;
28
29/**
30 * The "instances" collection of methods.
31 * Typical usage is:
32 * <code>
33 * $datafusionService = new Google\Service\DataFusion(...);
34 * $instances = $datafusionService->projects_locations_instances;
35 * </code>
36 */
37class ProjectsLocationsInstances extends \Google\Service\Resource
38{
39 /**
40 * Creates a new Data Fusion instance in the specified project and location.
41 * (instances.create)
42 *
43 * @param string $parent Required. The instance's project and location in the
44 * format projects/{project}/locations/{location}.
45 * @param Instance $postBody
46 * @param array $optParams Optional parameters.
47 *
48 * @opt_param string instanceId Required. The name of the instance to create.
49 * Instance name can only contain lowercase alphanumeric characters and hyphens.
50 * It must start with a letter and must not end with a hyphen. It can have a
51 * maximum of 30 characters.
52 * @return Operation
53 * @throws \Google\Service\Exception
54 */
55 public function create($parent, Instance $postBody, $optParams = [])
56 {
57 $params = ['parent' => $parent, 'postBody' => $postBody];
58 $params = array_merge($params, $optParams);
59 return $this->call('create', [$params], Operation::class);
60 }
61 /**
62 * Deletes a single Date Fusion instance. (instances.delete)
63 *
64 * @param string $name Required. The instance resource name in the format
65 * projects/{project}/locations/{location}/instances/{instance}
66 * @param array $optParams Optional parameters.
67 * @return Operation
68 * @throws \Google\Service\Exception
69 */
70 public function delete($name, $optParams = [])
71 {
72 $params = ['name' => $name];
73 $params = array_merge($params, $optParams);
74 return $this->call('delete', [$params], Operation::class);
75 }
76 /**
77 * Gets details of a single Data Fusion instance. (instances.get)
78 *
79 * @param string $name Required. The instance resource name in the format
80 * projects/{project}/locations/{location}/instances/{instance}.
81 * @param array $optParams Optional parameters.
82 * @return Instance
83 * @throws \Google\Service\Exception
84 */
85 public function get($name, $optParams = [])
86 {
87 $params = ['name' => $name];
88 $params = array_merge($params, $optParams);
89 return $this->call('get', [$params], Instance::class);
90 }
91 /**
92 * Gets the access control policy for a resource. Returns an empty policy if the
93 * resource exists and does not have a policy set. (instances.getIamPolicy)
94 *
95 * @param string $resource REQUIRED: The resource for which the policy is being
96 * requested. See [Resource
97 * names](https://cloud.google.com/apis/design/resource_names) for the
98 * appropriate value for this field.
99 * @param array $optParams Optional parameters.
100 *
101 * @opt_param int options.requestedPolicyVersion Optional. The maximum policy
102 * version that will be used to format the policy. Valid values are 0, 1, and 3.
103 * Requests specifying an invalid value will be rejected. Requests for policies
104 * with any conditional role bindings must specify version 3. Policies with no
105 * conditional role bindings may specify any valid value or leave the field
106 * unset. The policy in the response might use the policy version that you
107 * specified, or it might use a lower policy version. For example, if you
108 * specify version 3, but the policy has no conditional role bindings, the
109 * response uses version 1. To learn which resources support conditions in their
110 * IAM policies, see the [IAM
111 * documentation](https://cloud.google.com/iam/help/conditions/resource-
112 * policies).
113 * @return Policy
114 * @throws \Google\Service\Exception
115 */
116 public function getIamPolicy($resource, $optParams = [])
117 {
118 $params = ['resource' => $resource];
119 $params = array_merge($params, $optParams);
120 return $this->call('getIamPolicy', [$params], Policy::class);
121 }
122 /**
123 * Lists Data Fusion instances in the specified project and location.
124 * (instances.listProjectsLocationsInstances)
125 *
126 * @param string $parent Required. The project and location for which to
127 * retrieve instance information in the format
128 * projects/{project}/locations/{location}. If the location is specified as '-'
129 * (wildcard), then all regions available to the project are queried, and the
130 * results are aggregated.
131 * @param array $optParams Optional parameters.
132 *
133 * @opt_param string filter List filter.
134 * @opt_param string orderBy Sort results. Supported values are "name", "name
135 * desc", or "" (unsorted).
136 * @opt_param int pageSize The maximum number of items to return.
137 * @opt_param string pageToken The next_page_token value to use if there are
138 * additional results to retrieve for this list request.
139 * @return ListInstancesResponse
140 * @throws \Google\Service\Exception
141 */
142 public function listProjectsLocationsInstances($parent, $optParams = [])
143 {
144 $params = ['parent' => $parent];
145 $params = array_merge($params, $optParams);
146 return $this->call('list', [$params], ListInstancesResponse::class);
147 }
148 /**
149 * Updates a single Data Fusion instance. (instances.patch)
150 *
151 * @param string $name Output only. The name of this instance is in the form of
152 * projects/{project}/locations/{location}/instances/{instance}.
153 * @param Instance $postBody
154 * @param array $optParams Optional parameters.
155 *
156 * @opt_param string updateMask Field mask is used to specify the fields that
157 * the update will overwrite in an instance resource. The fields specified in
158 * the update_mask are relative to the resource, not the full request. A field
159 * will be overwritten if it is in the mask. If the user does not provide a
160 * mask, the label field will be overwritten.
161 * @return Operation
162 * @throws \Google\Service\Exception
163 */
164 public function patch($name, Instance $postBody, $optParams = [])
165 {
166 $params = ['name' => $name, 'postBody' => $postBody];
167 $params = array_merge($params, $optParams);
168 return $this->call('patch', [$params], Operation::class);
169 }
170 /**
171 * Restart a single Data Fusion instance. At the end of an operation instance is
172 * fully restarted. (instances.restart)
173 *
174 * @param string $name Required. Name of the Data Fusion instance which need to
175 * be restarted in the form of
176 * projects/{project}/locations/{location}/instances/{instance}
177 * @param RestartInstanceRequest $postBody
178 * @param array $optParams Optional parameters.
179 * @return Operation
180 * @throws \Google\Service\Exception
181 */
182 public function restart($name, RestartInstanceRequest $postBody, $optParams = [])
183 {
184 $params = ['name' => $name, 'postBody' => $postBody];
185 $params = array_merge($params, $optParams);
186 return $this->call('restart', [$params], Operation::class);
187 }
188 /**
189 * Sets the access control policy on the specified resource. Replaces any
190 * existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and
191 * `PERMISSION_DENIED` errors. (instances.setIamPolicy)
192 *
193 * @param string $resource REQUIRED: The resource for which the policy is being
194 * specified. See [Resource
195 * names](https://cloud.google.com/apis/design/resource_names) for the
196 * appropriate value for this field.
197 * @param SetIamPolicyRequest $postBody
198 * @param array $optParams Optional parameters.
199 * @return Policy
200 * @throws \Google\Service\Exception
201 */
202 public function setIamPolicy($resource, SetIamPolicyRequest $postBody, $optParams = [])
203 {
204 $params = ['resource' => $resource, 'postBody' => $postBody];
205 $params = array_merge($params, $optParams);
206 return $this->call('setIamPolicy', [$params], Policy::class);
207 }
208 /**
209 * Returns permissions that a caller has on the specified resource. If the
210 * resource does not exist, this will return an empty set of permissions, not a
211 * `NOT_FOUND` error. Note: This operation is designed to be used for building
212 * permission-aware UIs and command-line tools, not for authorization checking.
213 * This operation may "fail open" without warning.
214 * (instances.testIamPermissions)
215 *
216 * @param string $resource REQUIRED: The resource for which the policy detail is
217 * being requested. See [Resource
218 * names](https://cloud.google.com/apis/design/resource_names) for the
219 * appropriate value for this field.
220 * @param TestIamPermissionsRequest $postBody
221 * @param array $optParams Optional parameters.
222 * @return TestIamPermissionsResponse
223 * @throws \Google\Service\Exception
224 */
225 public function testIamPermissions($resource, TestIamPermissionsRequest $postBody, $optParams = [])
226 {
227 $params = ['resource' => $resource, 'postBody' => $postBody];
228 $params = array_merge($params, $optParams);
229 return $this->call('testIamPermissions', [$params], TestIamPermissionsResponse::class);
230 }
231}
232
233// Adding a class alias for backwards compatibility with the previous class name.
234class_alias(ProjectsLocationsInstances::class, 'Google_Service_DataFusion_Resource_ProjectsLocationsInstances');
Note: See TracBrowser for help on using the repository browser.