[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\CloudHealthcare\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\CloudHealthcare\Policy;
|
---|
| 21 | use Google\Service\CloudHealthcare\SetIamPolicyRequest;
|
---|
| 22 | use Google\Service\CloudHealthcare\TestIamPermissionsRequest;
|
---|
| 23 | use Google\Service\CloudHealthcare\TestIamPermissionsResponse;
|
---|
| 24 |
|
---|
| 25 | /**
|
---|
| 26 | * The "dataMapperWorkspaces" collection of methods.
|
---|
| 27 | * Typical usage is:
|
---|
| 28 | * <code>
|
---|
| 29 | * $healthcareService = new Google\Service\CloudHealthcare(...);
|
---|
| 30 | * $dataMapperWorkspaces = $healthcareService->projects_locations_datasets_dataMapperWorkspaces;
|
---|
| 31 | * </code>
|
---|
| 32 | */
|
---|
| 33 | class ProjectsLocationsDatasetsDataMapperWorkspaces extends \Google\Service\Resource
|
---|
| 34 | {
|
---|
| 35 | /**
|
---|
| 36 | * Gets the access control policy for a resource. Returns an empty policy if the
|
---|
| 37 | * resource exists and does not have a policy set.
|
---|
| 38 | * (dataMapperWorkspaces.getIamPolicy)
|
---|
| 39 | *
|
---|
| 40 | * @param string $resource REQUIRED: The resource for which the policy is being
|
---|
| 41 | * requested. See [Resource
|
---|
| 42 | * names](https://cloud.google.com/apis/design/resource_names) for the
|
---|
| 43 | * appropriate value for this field.
|
---|
| 44 | * @param array $optParams Optional parameters.
|
---|
| 45 | *
|
---|
| 46 | * @opt_param int options.requestedPolicyVersion Optional. The maximum policy
|
---|
| 47 | * version that will be used to format the policy. Valid values are 0, 1, and 3.
|
---|
| 48 | * Requests specifying an invalid value will be rejected. Requests for policies
|
---|
| 49 | * with any conditional role bindings must specify version 3. Policies with no
|
---|
| 50 | * conditional role bindings may specify any valid value or leave the field
|
---|
| 51 | * unset. The policy in the response might use the policy version that you
|
---|
| 52 | * specified, or it might use a lower policy version. For example, if you
|
---|
| 53 | * specify version 3, but the policy has no conditional role bindings, the
|
---|
| 54 | * response uses version 1. To learn which resources support conditions in their
|
---|
| 55 | * IAM policies, see the [IAM
|
---|
| 56 | * documentation](https://cloud.google.com/iam/help/conditions/resource-
|
---|
| 57 | * policies).
|
---|
| 58 | * @return Policy
|
---|
| 59 | * @throws \Google\Service\Exception
|
---|
| 60 | */
|
---|
| 61 | public function getIamPolicy($resource, $optParams = [])
|
---|
| 62 | {
|
---|
| 63 | $params = ['resource' => $resource];
|
---|
| 64 | $params = array_merge($params, $optParams);
|
---|
| 65 | return $this->call('getIamPolicy', [$params], Policy::class);
|
---|
| 66 | }
|
---|
| 67 | /**
|
---|
| 68 | * Sets the access control policy on the specified resource. Replaces any
|
---|
| 69 | * existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and
|
---|
| 70 | * `PERMISSION_DENIED` errors. (dataMapperWorkspaces.setIamPolicy)
|
---|
| 71 | *
|
---|
| 72 | * @param string $resource REQUIRED: The resource for which the policy is being
|
---|
| 73 | * specified. See [Resource
|
---|
| 74 | * names](https://cloud.google.com/apis/design/resource_names) for the
|
---|
| 75 | * appropriate value for this field.
|
---|
| 76 | * @param SetIamPolicyRequest $postBody
|
---|
| 77 | * @param array $optParams Optional parameters.
|
---|
| 78 | * @return Policy
|
---|
| 79 | * @throws \Google\Service\Exception
|
---|
| 80 | */
|
---|
| 81 | public function setIamPolicy($resource, SetIamPolicyRequest $postBody, $optParams = [])
|
---|
| 82 | {
|
---|
| 83 | $params = ['resource' => $resource, 'postBody' => $postBody];
|
---|
| 84 | $params = array_merge($params, $optParams);
|
---|
| 85 | return $this->call('setIamPolicy', [$params], Policy::class);
|
---|
| 86 | }
|
---|
| 87 | /**
|
---|
| 88 | * Returns permissions that a caller has on the specified resource. If the
|
---|
| 89 | * resource does not exist, this will return an empty set of permissions, not a
|
---|
| 90 | * `NOT_FOUND` error. Note: This operation is designed to be used for building
|
---|
| 91 | * permission-aware UIs and command-line tools, not for authorization checking.
|
---|
| 92 | * This operation may "fail open" without warning.
|
---|
| 93 | * (dataMapperWorkspaces.testIamPermissions)
|
---|
| 94 | *
|
---|
| 95 | * @param string $resource REQUIRED: The resource for which the policy detail is
|
---|
| 96 | * being requested. See [Resource
|
---|
| 97 | * names](https://cloud.google.com/apis/design/resource_names) for the
|
---|
| 98 | * appropriate value for this field.
|
---|
| 99 | * @param TestIamPermissionsRequest $postBody
|
---|
| 100 | * @param array $optParams Optional parameters.
|
---|
| 101 | * @return TestIamPermissionsResponse
|
---|
| 102 | * @throws \Google\Service\Exception
|
---|
| 103 | */
|
---|
| 104 | public function testIamPermissions($resource, TestIamPermissionsRequest $postBody, $optParams = [])
|
---|
| 105 | {
|
---|
| 106 | $params = ['resource' => $resource, 'postBody' => $postBody];
|
---|
| 107 | $params = array_merge($params, $optParams);
|
---|
| 108 | return $this->call('testIamPermissions', [$params], TestIamPermissionsResponse::class);
|
---|
| 109 | }
|
---|
| 110 | }
|
---|
| 111 |
|
---|
| 112 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 113 | class_alias(ProjectsLocationsDatasetsDataMapperWorkspaces::class, 'Google_Service_CloudHealthcare_Resource_ProjectsLocationsDatasetsDataMapperWorkspaces');
|
---|