[e3d4e0a] | 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\CloudDataplex\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\CloudDataplex\DataplexEmpty;
|
---|
| 21 | use Google\Service\CloudDataplex\GoogleCloudDataplexV1Content;
|
---|
| 22 | use Google\Service\CloudDataplex\GoogleCloudDataplexV1ListContentResponse;
|
---|
| 23 | use Google\Service\CloudDataplex\GoogleIamV1Policy;
|
---|
| 24 | use Google\Service\CloudDataplex\GoogleIamV1SetIamPolicyRequest;
|
---|
| 25 | use Google\Service\CloudDataplex\GoogleIamV1TestIamPermissionsRequest;
|
---|
| 26 | use Google\Service\CloudDataplex\GoogleIamV1TestIamPermissionsResponse;
|
---|
| 27 |
|
---|
| 28 | /**
|
---|
| 29 | * The "contentitems" collection of methods.
|
---|
| 30 | * Typical usage is:
|
---|
| 31 | * <code>
|
---|
| 32 | * $dataplexService = new Google\Service\CloudDataplex(...);
|
---|
| 33 | * $contentitems = $dataplexService->projects_locations_lakes_contentitems;
|
---|
| 34 | * </code>
|
---|
| 35 | */
|
---|
| 36 | class ProjectsLocationsLakesContentitems extends \Google\Service\Resource
|
---|
| 37 | {
|
---|
| 38 | /**
|
---|
| 39 | * Create a content. (contentitems.create)
|
---|
| 40 | *
|
---|
| 41 | * @param string $parent Required. The resource name of the parent lake:
|
---|
| 42 | * projects/{project_id}/locations/{location_id}/lakes/{lake_id}
|
---|
| 43 | * @param GoogleCloudDataplexV1Content $postBody
|
---|
| 44 | * @param array $optParams Optional parameters.
|
---|
| 45 | *
|
---|
| 46 | * @opt_param bool validateOnly Optional. Only validate the request, but do not
|
---|
| 47 | * perform mutations. The default is false.
|
---|
| 48 | * @return GoogleCloudDataplexV1Content
|
---|
| 49 | * @throws \Google\Service\Exception
|
---|
| 50 | */
|
---|
| 51 | public function create($parent, GoogleCloudDataplexV1Content $postBody, $optParams = [])
|
---|
| 52 | {
|
---|
| 53 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
| 54 | $params = array_merge($params, $optParams);
|
---|
| 55 | return $this->call('create', [$params], GoogleCloudDataplexV1Content::class);
|
---|
| 56 | }
|
---|
| 57 | /**
|
---|
| 58 | * Delete a content. (contentitems.delete)
|
---|
| 59 | *
|
---|
| 60 | * @param string $name Required. The resource name of the content: projects/{pro
|
---|
| 61 | * ject_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id}
|
---|
| 62 | * @param array $optParams Optional parameters.
|
---|
| 63 | * @return DataplexEmpty
|
---|
| 64 | * @throws \Google\Service\Exception
|
---|
| 65 | */
|
---|
| 66 | public function delete($name, $optParams = [])
|
---|
| 67 | {
|
---|
| 68 | $params = ['name' => $name];
|
---|
| 69 | $params = array_merge($params, $optParams);
|
---|
| 70 | return $this->call('delete', [$params], DataplexEmpty::class);
|
---|
| 71 | }
|
---|
| 72 | /**
|
---|
| 73 | * Get a content resource. (contentitems.get)
|
---|
| 74 | *
|
---|
| 75 | * @param string $name Required. The resource name of the content: projects/{pro
|
---|
| 76 | * ject_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id}
|
---|
| 77 | * @param array $optParams Optional parameters.
|
---|
| 78 | *
|
---|
| 79 | * @opt_param string view Optional. Specify content view to make a partial
|
---|
| 80 | * request.
|
---|
| 81 | * @return GoogleCloudDataplexV1Content
|
---|
| 82 | * @throws \Google\Service\Exception
|
---|
| 83 | */
|
---|
| 84 | public function get($name, $optParams = [])
|
---|
| 85 | {
|
---|
| 86 | $params = ['name' => $name];
|
---|
| 87 | $params = array_merge($params, $optParams);
|
---|
| 88 | return $this->call('get', [$params], GoogleCloudDataplexV1Content::class);
|
---|
| 89 | }
|
---|
| 90 | /**
|
---|
| 91 | * Gets the access control policy for a contentitem resource. A NOT_FOUND error
|
---|
| 92 | * is returned if the resource does not exist. An empty policy is returned if
|
---|
| 93 | * the resource exists but does not have a policy set on it.Caller must have
|
---|
| 94 | * Google IAM dataplex.content.getIamPolicy permission on the resource.
|
---|
| 95 | * (contentitems.getIamPolicy)
|
---|
| 96 | *
|
---|
| 97 | * @param string $resource REQUIRED: The resource for which the policy is being
|
---|
| 98 | * requested. See Resource names
|
---|
| 99 | * (https://cloud.google.com/apis/design/resource_names) for the appropriate
|
---|
| 100 | * value for this field.
|
---|
| 101 | * @param array $optParams Optional parameters.
|
---|
| 102 | *
|
---|
| 103 | * @opt_param int options.requestedPolicyVersion Optional. The maximum policy
|
---|
| 104 | * version that will be used to format the policy.Valid values are 0, 1, and 3.
|
---|
| 105 | * Requests specifying an invalid value will be rejected.Requests for policies
|
---|
| 106 | * with any conditional role bindings must specify version 3. Policies with no
|
---|
| 107 | * conditional role bindings may specify any valid value or leave the field
|
---|
| 108 | * unset.The policy in the response might use the policy version that you
|
---|
| 109 | * specified, or it might use a lower policy version. For example, if you
|
---|
| 110 | * specify version 3, but the policy has no conditional role bindings, the
|
---|
| 111 | * response uses version 1.To learn which resources support conditions in their
|
---|
| 112 | * IAM policies, see the IAM documentation
|
---|
| 113 | * (https://cloud.google.com/iam/help/conditions/resource-policies).
|
---|
| 114 | * @return GoogleIamV1Policy
|
---|
| 115 | * @throws \Google\Service\Exception
|
---|
| 116 | */
|
---|
| 117 | public function getIamPolicy($resource, $optParams = [])
|
---|
| 118 | {
|
---|
| 119 | $params = ['resource' => $resource];
|
---|
| 120 | $params = array_merge($params, $optParams);
|
---|
| 121 | return $this->call('getIamPolicy', [$params], GoogleIamV1Policy::class);
|
---|
| 122 | }
|
---|
| 123 | /**
|
---|
| 124 | * List content. (contentitems.listProjectsLocationsLakesContentitems)
|
---|
| 125 | *
|
---|
| 126 | * @param string $parent Required. The resource name of the parent lake:
|
---|
| 127 | * projects/{project_id}/locations/{location_id}/lakes/{lake_id}
|
---|
| 128 | * @param array $optParams Optional parameters.
|
---|
| 129 | *
|
---|
| 130 | * @opt_param string filter Optional. Filter request. Filters are case-
|
---|
| 131 | * sensitive. The following formats are supported:labels.key1 = "value1"
|
---|
| 132 | * labels:key1 type = "NOTEBOOK" type = "SQL_SCRIPT"These restrictions can be
|
---|
| 133 | * coinjoined with AND, OR and NOT conjunctions.
|
---|
| 134 | * @opt_param int pageSize Optional. Maximum number of content to return. The
|
---|
| 135 | * service may return fewer than this value. If unspecified, at most 10 content
|
---|
| 136 | * will be returned. The maximum value is 1000; values above 1000 will be
|
---|
| 137 | * coerced to 1000.
|
---|
| 138 | * @opt_param string pageToken Optional. Page token received from a previous
|
---|
| 139 | * ListContent call. Provide this to retrieve the subsequent page. When
|
---|
| 140 | * paginating, all other parameters provided to ListContent must match the call
|
---|
| 141 | * that provided the page token.
|
---|
| 142 | * @return GoogleCloudDataplexV1ListContentResponse
|
---|
| 143 | * @throws \Google\Service\Exception
|
---|
| 144 | */
|
---|
| 145 | public function listProjectsLocationsLakesContentitems($parent, $optParams = [])
|
---|
| 146 | {
|
---|
| 147 | $params = ['parent' => $parent];
|
---|
| 148 | $params = array_merge($params, $optParams);
|
---|
| 149 | return $this->call('list', [$params], GoogleCloudDataplexV1ListContentResponse::class);
|
---|
| 150 | }
|
---|
| 151 | /**
|
---|
| 152 | * Update a content. Only supports full resource update. (contentitems.patch)
|
---|
| 153 | *
|
---|
| 154 | * @param string $name Output only. The relative resource name of the content,
|
---|
| 155 | * of the form: projects/{project_id}/locations/{location_id}/lakes/{lake_id}/co
|
---|
| 156 | * ntent/{content_id}
|
---|
| 157 | * @param GoogleCloudDataplexV1Content $postBody
|
---|
| 158 | * @param array $optParams Optional parameters.
|
---|
| 159 | *
|
---|
| 160 | * @opt_param string updateMask Required. Mask of fields to update.
|
---|
| 161 | * @opt_param bool validateOnly Optional. Only validate the request, but do not
|
---|
| 162 | * perform mutations. The default is false.
|
---|
| 163 | * @return GoogleCloudDataplexV1Content
|
---|
| 164 | * @throws \Google\Service\Exception
|
---|
| 165 | */
|
---|
| 166 | public function patch($name, GoogleCloudDataplexV1Content $postBody, $optParams = [])
|
---|
| 167 | {
|
---|
| 168 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
| 169 | $params = array_merge($params, $optParams);
|
---|
| 170 | return $this->call('patch', [$params], GoogleCloudDataplexV1Content::class);
|
---|
| 171 | }
|
---|
| 172 | /**
|
---|
| 173 | * Sets the access control policy on the specified contentitem resource.
|
---|
| 174 | * Replaces any existing policy.Caller must have Google IAM
|
---|
| 175 | * dataplex.content.setIamPolicy permission on the resource.
|
---|
| 176 | * (contentitems.setIamPolicy)
|
---|
| 177 | *
|
---|
| 178 | * @param string $resource REQUIRED: The resource for which the policy is being
|
---|
| 179 | * specified. See Resource names
|
---|
| 180 | * (https://cloud.google.com/apis/design/resource_names) for the appropriate
|
---|
| 181 | * value for this field.
|
---|
| 182 | * @param GoogleIamV1SetIamPolicyRequest $postBody
|
---|
| 183 | * @param array $optParams Optional parameters.
|
---|
| 184 | * @return GoogleIamV1Policy
|
---|
| 185 | * @throws \Google\Service\Exception
|
---|
| 186 | */
|
---|
| 187 | public function setIamPolicy($resource, GoogleIamV1SetIamPolicyRequest $postBody, $optParams = [])
|
---|
| 188 | {
|
---|
| 189 | $params = ['resource' => $resource, 'postBody' => $postBody];
|
---|
| 190 | $params = array_merge($params, $optParams);
|
---|
| 191 | return $this->call('setIamPolicy', [$params], GoogleIamV1Policy::class);
|
---|
| 192 | }
|
---|
| 193 | /**
|
---|
| 194 | * Returns the caller's permissions on a resource. If the resource does not
|
---|
| 195 | * exist, an empty set of permissions is returned (a NOT_FOUND error is not
|
---|
| 196 | * returned).A caller is not required to have Google IAM permission to make this
|
---|
| 197 | * request.Note: This operation is designed to be used for building permission-
|
---|
| 198 | * aware UIs and command-line tools, not for authorization checking. This
|
---|
| 199 | * operation may "fail open" without warning. (contentitems.testIamPermissions)
|
---|
| 200 | *
|
---|
| 201 | * @param string $resource REQUIRED: The resource for which the policy detail is
|
---|
| 202 | * being requested. See Resource names
|
---|
| 203 | * (https://cloud.google.com/apis/design/resource_names) for the appropriate
|
---|
| 204 | * value for this field.
|
---|
| 205 | * @param GoogleIamV1TestIamPermissionsRequest $postBody
|
---|
| 206 | * @param array $optParams Optional parameters.
|
---|
| 207 | * @return GoogleIamV1TestIamPermissionsResponse
|
---|
| 208 | * @throws \Google\Service\Exception
|
---|
| 209 | */
|
---|
| 210 | public function testIamPermissions($resource, GoogleIamV1TestIamPermissionsRequest $postBody, $optParams = [])
|
---|
| 211 | {
|
---|
| 212 | $params = ['resource' => $resource, 'postBody' => $postBody];
|
---|
| 213 | $params = array_merge($params, $optParams);
|
---|
| 214 | return $this->call('testIamPermissions', [$params], GoogleIamV1TestIamPermissionsResponse::class);
|
---|
| 215 | }
|
---|
| 216 | }
|
---|
| 217 |
|
---|
| 218 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 219 | class_alias(ProjectsLocationsLakesContentitems::class, 'Google_Service_CloudDataplex_Resource_ProjectsLocationsLakesContentitems');
|
---|