wp-stateless
/
lib
/
Google
/
src
/
Google
/
Service
/
Storage
/
Resource
/
BucketAccessControls.php
BucketAccessControls.php in WP-Stateless – Google Cloud Storage 3.0.3, at lib/Google/src/Google/Service/Storage/Resource/BucketAccessControls.php
| 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 | /** |
| 19 | * The "bucketAccessControls" collection of methods. |
| 20 | * Typical usage is: |
| 21 | * <code> |
| 22 | * $storageService = new Google_Service_Storage(...); |
| 23 | * $bucketAccessControls = $storageService->bucketAccessControls; |
| 24 | * </code> |
| 25 | */ |
| 26 | namespace wpCloud\StatelessMedia\Google_Client; |
| 27 | |
| 28 | class Google_Service_Storage_Resource_BucketAccessControls extends Google_Service_Resource |
| 29 | { |
| 30 | /** |
| 31 | * Permanently deletes the ACL entry for the specified entity on the specified |
| 32 | * bucket. (bucketAccessControls.delete) |
| 33 | * |
| 34 | * @param string $bucket Name of a bucket. |
| 35 | * @param string $entity The entity holding the permission. Can be user-userId, |
| 36 | * user-emailAddress, group-groupId, group-emailAddress, allUsers, or |
| 37 | * allAuthenticatedUsers. |
| 38 | * @param array $optParams Optional parameters. |
| 39 | * |
| 40 | * @opt_param string provisionalUserProject The project to be billed for this |
| 41 | * request if the target bucket is requester-pays bucket. |
| 42 | * @opt_param string userProject The project to be billed for this request. |
| 43 | * Required for Requester Pays buckets. |
| 44 | */ |
| 45 | public function delete($bucket, $entity, $optParams = array()) |
| 46 | { |
| 47 | $params = array('bucket' => $bucket, 'entity' => $entity); |
| 48 | $params = array_merge($params, $optParams); |
| 49 | return $this->call('delete', array($params)); |
| 50 | } |
| 51 | /** |
| 52 | * Returns the ACL entry for the specified entity on the specified bucket. |
| 53 | * (bucketAccessControls.get) |
| 54 | * |
| 55 | * @param string $bucket Name of a bucket. |
| 56 | * @param string $entity The entity holding the permission. Can be user-userId, |
| 57 | * user-emailAddress, group-groupId, group-emailAddress, allUsers, or |
| 58 | * allAuthenticatedUsers. |
| 59 | * @param array $optParams Optional parameters. |
| 60 | * |
| 61 | * @opt_param string provisionalUserProject The project to be billed for this |
| 62 | * request if the target bucket is requester-pays bucket. |
| 63 | * @opt_param string userProject The project to be billed for this request. |
| 64 | * Required for Requester Pays buckets. |
| 65 | * @return Google_Service_Storage_BucketAccessControl |
| 66 | */ |
| 67 | public function get($bucket, $entity, $optParams = array()) |
| 68 | { |
| 69 | $params = array('bucket' => $bucket, 'entity' => $entity); |
| 70 | $params = array_merge($params, $optParams); |
| 71 | return $this->call('get', array($params), "Google_Service_Storage_BucketAccessControl"); |
| 72 | } |
| 73 | /** |
| 74 | * Creates a new ACL entry on the specified bucket. |
| 75 | * (bucketAccessControls.insert) |
| 76 | * |
| 77 | * @param string $bucket Name of a bucket. |
| 78 | * @param Google_Service_Storage_BucketAccessControl $postBody |
| 79 | * @param array $optParams Optional parameters. |
| 80 | * |
| 81 | * @opt_param string provisionalUserProject The project to be billed for this |
| 82 | * request if the target bucket is requester-pays bucket. |
| 83 | * @opt_param string userProject The project to be billed for this request. |
| 84 | * Required for Requester Pays buckets. |
| 85 | * @return Google_Service_Storage_BucketAccessControl |
| 86 | */ |
| 87 | public function insert($bucket, Google_Service_Storage_BucketAccessControl $postBody, $optParams = array()) |
| 88 | { |
| 89 | $params = array('bucket' => $bucket, 'postBody' => $postBody); |
| 90 | $params = array_merge($params, $optParams); |
| 91 | return $this->call('insert', array($params), "Google_Service_Storage_BucketAccessControl"); |
| 92 | } |
| 93 | /** |
| 94 | * Retrieves ACL entries on the specified bucket. |
| 95 | * (bucketAccessControls.listBucketAccessControls) |
| 96 | * |
| 97 | * @param string $bucket Name of a bucket. |
| 98 | * @param array $optParams Optional parameters. |
| 99 | * |
| 100 | * @opt_param string provisionalUserProject The project to be billed for this |
| 101 | * request if the target bucket is requester-pays bucket. |
| 102 | * @opt_param string userProject The project to be billed for this request. |
| 103 | * Required for Requester Pays buckets. |
| 104 | * @return Google_Service_Storage_BucketAccessControls |
| 105 | */ |
| 106 | public function listBucketAccessControls($bucket, $optParams = array()) |
| 107 | { |
| 108 | $params = array('bucket' => $bucket); |
| 109 | $params = array_merge($params, $optParams); |
| 110 | return $this->call('list', array($params), "Google_Service_Storage_BucketAccessControls"); |
| 111 | } |
| 112 | /** |
| 113 | * Patches an ACL entry on the specified bucket. (bucketAccessControls.patch) |
| 114 | * |
| 115 | * @param string $bucket Name of a bucket. |
| 116 | * @param string $entity The entity holding the permission. Can be user-userId, |
| 117 | * user-emailAddress, group-groupId, group-emailAddress, allUsers, or |
| 118 | * allAuthenticatedUsers. |
| 119 | * @param Google_Service_Storage_BucketAccessControl $postBody |
| 120 | * @param array $optParams Optional parameters. |
| 121 | * |
| 122 | * @opt_param string provisionalUserProject The project to be billed for this |
| 123 | * request if the target bucket is requester-pays bucket. |
| 124 | * @opt_param string userProject The project to be billed for this request. |
| 125 | * Required for Requester Pays buckets. |
| 126 | * @return Google_Service_Storage_BucketAccessControl |
| 127 | */ |
| 128 | public function patch($bucket, $entity, Google_Service_Storage_BucketAccessControl $postBody, $optParams = array()) |
| 129 | { |
| 130 | $params = array('bucket' => $bucket, 'entity' => $entity, 'postBody' => $postBody); |
| 131 | $params = array_merge($params, $optParams); |
| 132 | return $this->call('patch', array($params), "Google_Service_Storage_BucketAccessControl"); |
| 133 | } |
| 134 | /** |
| 135 | * Updates an ACL entry on the specified bucket. (bucketAccessControls.update) |
| 136 | * |
| 137 | * @param string $bucket Name of a bucket. |
| 138 | * @param string $entity The entity holding the permission. Can be user-userId, |
| 139 | * user-emailAddress, group-groupId, group-emailAddress, allUsers, or |
| 140 | * allAuthenticatedUsers. |
| 141 | * @param Google_Service_Storage_BucketAccessControl $postBody |
| 142 | * @param array $optParams Optional parameters. |
| 143 | * |
| 144 | * @opt_param string provisionalUserProject The project to be billed for this |
| 145 | * request if the target bucket is requester-pays bucket. |
| 146 | * @opt_param string userProject The project to be billed for this request. |
| 147 | * Required for Requester Pays buckets. |
| 148 | * @return Google_Service_Storage_BucketAccessControl |
| 149 | */ |
| 150 | public function update($bucket, $entity, Google_Service_Storage_BucketAccessControl $postBody, $optParams = array()) |
| 151 | { |
| 152 | $params = array('bucket' => $bucket, 'entity' => $entity, 'postBody' => $postBody); |
| 153 | $params = array_merge($params, $optParams); |
| 154 | return $this->call('update', array($params), "Google_Service_Storage_BucketAccessControl"); |
| 155 | } |
| 156 | } |
| 157 |