source: vendor/google/apiclient-services/src/Storage/Resource/DefaultObjectAccessControls.php

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

Upload project files

  • Property mode set to 100644
File size: 6.5 KB
RevLine 
[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
18namespace Google\Service\Storage\Resource;
19
20use Google\Service\Storage\ObjectAccessControl;
21use Google\Service\Storage\ObjectAccessControls as ObjectAccessControlsModel;
22
23/**
24 * The "defaultObjectAccessControls" collection of methods.
25 * Typical usage is:
26 * <code>
27 * $storageService = new Google\Service\Storage(...);
28 * $defaultObjectAccessControls = $storageService->defaultObjectAccessControls;
29 * </code>
30 */
31class DefaultObjectAccessControls extends \Google\Service\Resource
32{
33 /**
34 * Permanently deletes the default object ACL entry for the specified entity on
35 * the specified bucket. (defaultObjectAccessControls.delete)
36 *
37 * @param string $bucket Name of a bucket.
38 * @param string $entity The entity holding the permission. Can be user-userId,
39 * user-emailAddress, group-groupId, group-emailAddress, allUsers, or
40 * allAuthenticatedUsers.
41 * @param array $optParams Optional parameters.
42 *
43 * @opt_param string userProject The project to be billed for this request.
44 * Required for Requester Pays buckets.
45 * @throws \Google\Service\Exception
46 */
47 public function delete($bucket, $entity, $optParams = [])
48 {
49 $params = ['bucket' => $bucket, 'entity' => $entity];
50 $params = array_merge($params, $optParams);
51 return $this->call('delete', [$params]);
52 }
53 /**
54 * Returns the default object ACL entry for the specified entity on the
55 * specified bucket. (defaultObjectAccessControls.get)
56 *
57 * @param string $bucket Name of a bucket.
58 * @param string $entity The entity holding the permission. Can be user-userId,
59 * user-emailAddress, group-groupId, group-emailAddress, allUsers, or
60 * allAuthenticatedUsers.
61 * @param array $optParams Optional parameters.
62 *
63 * @opt_param string userProject The project to be billed for this request.
64 * Required for Requester Pays buckets.
65 * @return ObjectAccessControl
66 * @throws \Google\Service\Exception
67 */
68 public function get($bucket, $entity, $optParams = [])
69 {
70 $params = ['bucket' => $bucket, 'entity' => $entity];
71 $params = array_merge($params, $optParams);
72 return $this->call('get', [$params], ObjectAccessControl::class);
73 }
74 /**
75 * Creates a new default object ACL entry on the specified bucket.
76 * (defaultObjectAccessControls.insert)
77 *
78 * @param string $bucket Name of a bucket.
79 * @param ObjectAccessControl $postBody
80 * @param array $optParams Optional parameters.
81 *
82 * @opt_param string userProject The project to be billed for this request.
83 * Required for Requester Pays buckets.
84 * @return ObjectAccessControl
85 * @throws \Google\Service\Exception
86 */
87 public function insert($bucket, ObjectAccessControl $postBody, $optParams = [])
88 {
89 $params = ['bucket' => $bucket, 'postBody' => $postBody];
90 $params = array_merge($params, $optParams);
91 return $this->call('insert', [$params], ObjectAccessControl::class);
92 }
93 /**
94 * Retrieves default object ACL entries on the specified bucket.
95 * (defaultObjectAccessControls.listDefaultObjectAccessControls)
96 *
97 * @param string $bucket Name of a bucket.
98 * @param array $optParams Optional parameters.
99 *
100 * @opt_param string ifMetagenerationMatch If present, only return default ACL
101 * listing if the bucket's current metageneration matches this value.
102 * @opt_param string ifMetagenerationNotMatch If present, only return default
103 * ACL listing if the bucket's current metageneration does not match the given
104 * value.
105 * @opt_param string userProject The project to be billed for this request.
106 * Required for Requester Pays buckets.
107 * @return ObjectAccessControlsModel
108 * @throws \Google\Service\Exception
109 */
110 public function listDefaultObjectAccessControls($bucket, $optParams = [])
111 {
112 $params = ['bucket' => $bucket];
113 $params = array_merge($params, $optParams);
114 return $this->call('list', [$params], ObjectAccessControlsModel::class);
115 }
116 /**
117 * Patches a default object ACL entry on the specified bucket.
118 * (defaultObjectAccessControls.patch)
119 *
120 * @param string $bucket Name of a bucket.
121 * @param string $entity The entity holding the permission. Can be user-userId,
122 * user-emailAddress, group-groupId, group-emailAddress, allUsers, or
123 * allAuthenticatedUsers.
124 * @param ObjectAccessControl $postBody
125 * @param array $optParams Optional parameters.
126 *
127 * @opt_param string userProject The project to be billed for this request.
128 * Required for Requester Pays buckets.
129 * @return ObjectAccessControl
130 * @throws \Google\Service\Exception
131 */
132 public function patch($bucket, $entity, ObjectAccessControl $postBody, $optParams = [])
133 {
134 $params = ['bucket' => $bucket, 'entity' => $entity, 'postBody' => $postBody];
135 $params = array_merge($params, $optParams);
136 return $this->call('patch', [$params], ObjectAccessControl::class);
137 }
138 /**
139 * Updates a default object ACL entry on the specified bucket.
140 * (defaultObjectAccessControls.update)
141 *
142 * @param string $bucket Name of a bucket.
143 * @param string $entity The entity holding the permission. Can be user-userId,
144 * user-emailAddress, group-groupId, group-emailAddress, allUsers, or
145 * allAuthenticatedUsers.
146 * @param ObjectAccessControl $postBody
147 * @param array $optParams Optional parameters.
148 *
149 * @opt_param string userProject The project to be billed for this request.
150 * Required for Requester Pays buckets.
151 * @return ObjectAccessControl
152 * @throws \Google\Service\Exception
153 */
154 public function update($bucket, $entity, ObjectAccessControl $postBody, $optParams = [])
155 {
156 $params = ['bucket' => $bucket, 'entity' => $entity, 'postBody' => $postBody];
157 $params = array_merge($params, $optParams);
158 return $this->call('update', [$params], ObjectAccessControl::class);
159 }
160}
161
162// Adding a class alias for backwards compatibility with the previous class name.
163class_alias(DefaultObjectAccessControls::class, 'Google_Service_Storage_Resource_DefaultObjectAccessControls');
Note: See TracBrowser for help on using the repository browser.