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 |
|
---|
18 | namespace Google\Service\Aiplatform\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\Aiplatform\GoogleCloudAiplatformV1ListNotebookRuntimeTemplatesResponse;
|
---|
21 | use Google\Service\Aiplatform\GoogleCloudAiplatformV1NotebookRuntimeTemplate;
|
---|
22 | use Google\Service\Aiplatform\GoogleIamV1Policy;
|
---|
23 | use Google\Service\Aiplatform\GoogleIamV1SetIamPolicyRequest;
|
---|
24 | use Google\Service\Aiplatform\GoogleIamV1TestIamPermissionsResponse;
|
---|
25 | use Google\Service\Aiplatform\GoogleLongrunningOperation;
|
---|
26 |
|
---|
27 | /**
|
---|
28 | * The "notebookRuntimeTemplates" collection of methods.
|
---|
29 | * Typical usage is:
|
---|
30 | * <code>
|
---|
31 | * $aiplatformService = new Google\Service\Aiplatform(...);
|
---|
32 | * $notebookRuntimeTemplates = $aiplatformService->projects_locations_notebookRuntimeTemplates;
|
---|
33 | * </code>
|
---|
34 | */
|
---|
35 | class ProjectsLocationsNotebookRuntimeTemplates extends \Google\Service\Resource
|
---|
36 | {
|
---|
37 | /**
|
---|
38 | * Creates a NotebookRuntimeTemplate. (notebookRuntimeTemplates.create)
|
---|
39 | *
|
---|
40 | * @param string $parent Required. The resource name of the Location to create
|
---|
41 | * the NotebookRuntimeTemplate. Format:
|
---|
42 | * `projects/{project}/locations/{location}`
|
---|
43 | * @param GoogleCloudAiplatformV1NotebookRuntimeTemplate $postBody
|
---|
44 | * @param array $optParams Optional parameters.
|
---|
45 | *
|
---|
46 | * @opt_param string notebookRuntimeTemplateId Optional. User specified ID for
|
---|
47 | * the notebook runtime template.
|
---|
48 | * @return GoogleLongrunningOperation
|
---|
49 | * @throws \Google\Service\Exception
|
---|
50 | */
|
---|
51 | public function create($parent, GoogleCloudAiplatformV1NotebookRuntimeTemplate $postBody, $optParams = [])
|
---|
52 | {
|
---|
53 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
54 | $params = array_merge($params, $optParams);
|
---|
55 | return $this->call('create', [$params], GoogleLongrunningOperation::class);
|
---|
56 | }
|
---|
57 | /**
|
---|
58 | * Deletes a NotebookRuntimeTemplate. (notebookRuntimeTemplates.delete)
|
---|
59 | *
|
---|
60 | * @param string $name Required. The name of the NotebookRuntimeTemplate
|
---|
61 | * resource to be deleted. Format: `projects/{project}/locations/{location}/note
|
---|
62 | * bookRuntimeTemplates/{notebook_runtime_template}`
|
---|
63 | * @param array $optParams Optional parameters.
|
---|
64 | * @return GoogleLongrunningOperation
|
---|
65 | * @throws \Google\Service\Exception
|
---|
66 | */
|
---|
67 | public function delete($name, $optParams = [])
|
---|
68 | {
|
---|
69 | $params = ['name' => $name];
|
---|
70 | $params = array_merge($params, $optParams);
|
---|
71 | return $this->call('delete', [$params], GoogleLongrunningOperation::class);
|
---|
72 | }
|
---|
73 | /**
|
---|
74 | * Gets a NotebookRuntimeTemplate. (notebookRuntimeTemplates.get)
|
---|
75 | *
|
---|
76 | * @param string $name Required. The name of the NotebookRuntimeTemplate
|
---|
77 | * resource. Format: `projects/{project}/locations/{location}/notebookRuntimeTem
|
---|
78 | * plates/{notebook_runtime_template}`
|
---|
79 | * @param array $optParams Optional parameters.
|
---|
80 | * @return GoogleCloudAiplatformV1NotebookRuntimeTemplate
|
---|
81 | * @throws \Google\Service\Exception
|
---|
82 | */
|
---|
83 | public function get($name, $optParams = [])
|
---|
84 | {
|
---|
85 | $params = ['name' => $name];
|
---|
86 | $params = array_merge($params, $optParams);
|
---|
87 | return $this->call('get', [$params], GoogleCloudAiplatformV1NotebookRuntimeTemplate::class);
|
---|
88 | }
|
---|
89 | /**
|
---|
90 | * Gets the access control policy for a resource. Returns an empty policy if the
|
---|
91 | * resource exists and does not have a policy set.
|
---|
92 | * (notebookRuntimeTemplates.getIamPolicy)
|
---|
93 | *
|
---|
94 | * @param string $resource REQUIRED: The resource for which the policy is being
|
---|
95 | * requested. See [Resource
|
---|
96 | * names](https://cloud.google.com/apis/design/resource_names) for the
|
---|
97 | * appropriate value for this field.
|
---|
98 | * @param array $optParams Optional parameters.
|
---|
99 | *
|
---|
100 | * @opt_param int options.requestedPolicyVersion Optional. The maximum policy
|
---|
101 | * version that will be used to format the policy. Valid values are 0, 1, and 3.
|
---|
102 | * Requests specifying an invalid value will be rejected. Requests for policies
|
---|
103 | * with any conditional role bindings must specify version 3. Policies with no
|
---|
104 | * conditional role bindings may specify any valid value or leave the field
|
---|
105 | * unset. The policy in the response might use the policy version that you
|
---|
106 | * specified, or it might use a lower policy version. For example, if you
|
---|
107 | * specify version 3, but the policy has no conditional role bindings, the
|
---|
108 | * response uses version 1. To learn which resources support conditions in their
|
---|
109 | * IAM policies, see the [IAM
|
---|
110 | * documentation](https://cloud.google.com/iam/help/conditions/resource-
|
---|
111 | * policies).
|
---|
112 | * @return GoogleIamV1Policy
|
---|
113 | * @throws \Google\Service\Exception
|
---|
114 | */
|
---|
115 | public function getIamPolicy($resource, $optParams = [])
|
---|
116 | {
|
---|
117 | $params = ['resource' => $resource];
|
---|
118 | $params = array_merge($params, $optParams);
|
---|
119 | return $this->call('getIamPolicy', [$params], GoogleIamV1Policy::class);
|
---|
120 | }
|
---|
121 | /**
|
---|
122 | * Lists NotebookRuntimeTemplates in a Location.
|
---|
123 | * (notebookRuntimeTemplates.listProjectsLocationsNotebookRuntimeTemplates)
|
---|
124 | *
|
---|
125 | * @param string $parent Required. The resource name of the Location from which
|
---|
126 | * to list the NotebookRuntimeTemplates. Format:
|
---|
127 | * `projects/{project}/locations/{location}`
|
---|
128 | * @param array $optParams Optional parameters.
|
---|
129 | *
|
---|
130 | * @opt_param string filter Optional. An expression for filtering the results of
|
---|
131 | * the request. For field names both snake_case and camelCase are supported. *
|
---|
132 | * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate`
|
---|
133 | * represents the NotebookRuntimeTemplate ID, i.e. the last segment of the
|
---|
134 | * NotebookRuntimeTemplate's resource name. * `display_name` supports = and != *
|
---|
135 | * `labels` supports general map functions that is: * `labels.key=value` -
|
---|
136 | * key:value equality * `labels.key:* or labels:key - key existence * A key
|
---|
137 | * including a space must be quoted. `labels."a key"`. * `notebookRuntimeType`
|
---|
138 | * supports = and !=. notebookRuntimeType enum: [USER_DEFINED, ONE_CLICK]. Some
|
---|
139 | * examples: * `notebookRuntimeTemplate=notebookRuntimeTemplate123` *
|
---|
140 | * `displayName="myDisplayName"` * `labels.myKey="myValue"` *
|
---|
141 | * `notebookRuntimeType=USER_DEFINED`
|
---|
142 | * @opt_param string orderBy Optional. A comma-separated list of fields to order
|
---|
143 | * by, sorted in ascending order. Use "desc" after a field name for descending.
|
---|
144 | * Supported fields: * `display_name` * `create_time` * `update_time` Example:
|
---|
145 | * `display_name, create_time desc`.
|
---|
146 | * @opt_param int pageSize Optional. The standard list page size.
|
---|
147 | * @opt_param string pageToken Optional. The standard list page token. Typically
|
---|
148 | * obtained via ListNotebookRuntimeTemplatesResponse.next_page_token of the
|
---|
149 | * previous NotebookService.ListNotebookRuntimeTemplates call.
|
---|
150 | * @opt_param string readMask Optional. Mask specifying which fields to read.
|
---|
151 | * @return GoogleCloudAiplatformV1ListNotebookRuntimeTemplatesResponse
|
---|
152 | * @throws \Google\Service\Exception
|
---|
153 | */
|
---|
154 | public function listProjectsLocationsNotebookRuntimeTemplates($parent, $optParams = [])
|
---|
155 | {
|
---|
156 | $params = ['parent' => $parent];
|
---|
157 | $params = array_merge($params, $optParams);
|
---|
158 | return $this->call('list', [$params], GoogleCloudAiplatformV1ListNotebookRuntimeTemplatesResponse::class);
|
---|
159 | }
|
---|
160 | /**
|
---|
161 | * Updates a NotebookRuntimeTemplate. (notebookRuntimeTemplates.patch)
|
---|
162 | *
|
---|
163 | * @param string $name The resource name of the NotebookRuntimeTemplate.
|
---|
164 | * @param GoogleCloudAiplatformV1NotebookRuntimeTemplate $postBody
|
---|
165 | * @param array $optParams Optional parameters.
|
---|
166 | *
|
---|
167 | * @opt_param string updateMask Required. The update mask applies to the
|
---|
168 | * resource. For the `FieldMask` definition, see google.protobuf.FieldMask.
|
---|
169 | * Input format: `{paths: "${updated_filed}"}` Updatable fields: *
|
---|
170 | * `encryption_spec.kms_key_name`
|
---|
171 | * @return GoogleCloudAiplatformV1NotebookRuntimeTemplate
|
---|
172 | * @throws \Google\Service\Exception
|
---|
173 | */
|
---|
174 | public function patch($name, GoogleCloudAiplatformV1NotebookRuntimeTemplate $postBody, $optParams = [])
|
---|
175 | {
|
---|
176 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
177 | $params = array_merge($params, $optParams);
|
---|
178 | return $this->call('patch', [$params], GoogleCloudAiplatformV1NotebookRuntimeTemplate::class);
|
---|
179 | }
|
---|
180 | /**
|
---|
181 | * Sets the access control policy on the specified resource. Replaces any
|
---|
182 | * existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and
|
---|
183 | * `PERMISSION_DENIED` errors. (notebookRuntimeTemplates.setIamPolicy)
|
---|
184 | *
|
---|
185 | * @param string $resource REQUIRED: The resource for which the policy is being
|
---|
186 | * specified. See [Resource
|
---|
187 | * names](https://cloud.google.com/apis/design/resource_names) for the
|
---|
188 | * appropriate value for this field.
|
---|
189 | * @param GoogleIamV1SetIamPolicyRequest $postBody
|
---|
190 | * @param array $optParams Optional parameters.
|
---|
191 | * @return GoogleIamV1Policy
|
---|
192 | * @throws \Google\Service\Exception
|
---|
193 | */
|
---|
194 | public function setIamPolicy($resource, GoogleIamV1SetIamPolicyRequest $postBody, $optParams = [])
|
---|
195 | {
|
---|
196 | $params = ['resource' => $resource, 'postBody' => $postBody];
|
---|
197 | $params = array_merge($params, $optParams);
|
---|
198 | return $this->call('setIamPolicy', [$params], GoogleIamV1Policy::class);
|
---|
199 | }
|
---|
200 | /**
|
---|
201 | * Returns permissions that a caller has on the specified resource. If the
|
---|
202 | * resource does not exist, this will return an empty set of permissions, not a
|
---|
203 | * `NOT_FOUND` error. Note: This operation is designed to be used for building
|
---|
204 | * permission-aware UIs and command-line tools, not for authorization checking.
|
---|
205 | * This operation may "fail open" without warning.
|
---|
206 | * (notebookRuntimeTemplates.testIamPermissions)
|
---|
207 | *
|
---|
208 | * @param string $resource REQUIRED: The resource for which the policy detail is
|
---|
209 | * being requested. See [Resource
|
---|
210 | * names](https://cloud.google.com/apis/design/resource_names) for the
|
---|
211 | * appropriate value for this field.
|
---|
212 | * @param array $optParams Optional parameters.
|
---|
213 | *
|
---|
214 | * @opt_param string permissions The set of permissions to check for the
|
---|
215 | * `resource`. Permissions with wildcards (such as `*` or `storage.*`) are not
|
---|
216 | * allowed. For more information see [IAM
|
---|
217 | * Overview](https://cloud.google.com/iam/docs/overview#permissions).
|
---|
218 | * @return GoogleIamV1TestIamPermissionsResponse
|
---|
219 | * @throws \Google\Service\Exception
|
---|
220 | */
|
---|
221 | public function testIamPermissions($resource, $optParams = [])
|
---|
222 | {
|
---|
223 | $params = ['resource' => $resource];
|
---|
224 | $params = array_merge($params, $optParams);
|
---|
225 | return $this->call('testIamPermissions', [$params], GoogleIamV1TestIamPermissionsResponse::class);
|
---|
226 | }
|
---|
227 | }
|
---|
228 |
|
---|
229 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
230 | class_alias(ProjectsLocationsNotebookRuntimeTemplates::class, 'Google_Service_Aiplatform_Resource_ProjectsLocationsNotebookRuntimeTemplates');
|
---|