source: vendor/google/apiclient-services/src/Looker/Resource/ProjectsLocationsInstancesBackups.php@ e3d4e0a

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

Upload project files

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