source: vendor/google/apiclient-services/src/Firebasestorage/Resource/ProjectsBuckets.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.3 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\Firebasestorage\Resource;
19
20use Google\Service\Firebasestorage\AddFirebaseRequest;
21use Google\Service\Firebasestorage\Bucket;
22use Google\Service\Firebasestorage\FirebasestorageEmpty;
23use Google\Service\Firebasestorage\ListBucketsResponse;
24use Google\Service\Firebasestorage\RemoveFirebaseRequest;
25
26/**
27 * The "buckets" collection of methods.
28 * Typical usage is:
29 * <code>
30 * $firebasestorageService = new Google\Service\Firebasestorage(...);
31 * $buckets = $firebasestorageService->projects_buckets;
32 * </code>
33 */
34class ProjectsBuckets extends \Google\Service\Resource
35{
36 /**
37 * Links a Google Cloud Storage bucket to a Firebase project.
38 * (buckets.addFirebase)
39 *
40 * @param string $bucket Required. Resource name of the bucket, mirrors the ID
41 * of the underlying Google Cloud Storage bucket,
42 * `projects/{project_id_or_number}/buckets/{bucket_id}`.
43 * @param AddFirebaseRequest $postBody
44 * @param array $optParams Optional parameters.
45 * @return Bucket
46 * @throws \Google\Service\Exception
47 */
48 public function addFirebase($bucket, AddFirebaseRequest $postBody, $optParams = [])
49 {
50 $params = ['bucket' => $bucket, 'postBody' => $postBody];
51 $params = array_merge($params, $optParams);
52 return $this->call('addFirebase', [$params], Bucket::class);
53 }
54 /**
55 * Gets a single linked storage bucket. (buckets.get)
56 *
57 * @param string $name Required. Resource name of the bucket, mirrors the ID of
58 * the underlying Google Cloud Storage bucket,
59 * `projects/{project_id_or_number}/buckets/{bucket_id}`.
60 * @param array $optParams Optional parameters.
61 * @return Bucket
62 * @throws \Google\Service\Exception
63 */
64 public function get($name, $optParams = [])
65 {
66 $params = ['name' => $name];
67 $params = array_merge($params, $optParams);
68 return $this->call('get', [$params], Bucket::class);
69 }
70 /**
71 * Lists the linked storage buckets for a project. (buckets.listProjectsBuckets)
72 *
73 * @param string $parent Required. Resource name of the parent Firebase project,
74 * `projects/{project_id_or_number}`.
75 * @param array $optParams Optional parameters.
76 *
77 * @opt_param int pageSize The maximum number of buckets to return. If not set,
78 * the server will use a reasonable default.
79 * @opt_param string pageToken A page token, received from a previous
80 * `ListBuckets` call. Provide this to retrieve the subsequent page. When
81 * paginating, all other parameters provided to `ListBuckets` must match the
82 * call that provided the page token.
83 * @return ListBucketsResponse
84 * @throws \Google\Service\Exception
85 */
86 public function listProjectsBuckets($parent, $optParams = [])
87 {
88 $params = ['parent' => $parent];
89 $params = array_merge($params, $optParams);
90 return $this->call('list', [$params], ListBucketsResponse::class);
91 }
92 /**
93 * Unlinks a linked Google Cloud Storage bucket from a Firebase project.
94 * (buckets.removeFirebase)
95 *
96 * @param string $bucket Required. Resource name of the bucket, mirrors the ID
97 * of the underlying Google Cloud Storage bucket,
98 * `projects/{project_id_or_number}/buckets/{bucket_id}`.
99 * @param RemoveFirebaseRequest $postBody
100 * @param array $optParams Optional parameters.
101 * @return FirebasestorageEmpty
102 * @throws \Google\Service\Exception
103 */
104 public function removeFirebase($bucket, RemoveFirebaseRequest $postBody, $optParams = [])
105 {
106 $params = ['bucket' => $bucket, 'postBody' => $postBody];
107 $params = array_merge($params, $optParams);
108 return $this->call('removeFirebase', [$params], FirebasestorageEmpty::class);
109 }
110}
111
112// Adding a class alias for backwards compatibility with the previous class name.
113class_alias(ProjectsBuckets::class, 'Google_Service_Firebasestorage_Resource_ProjectsBuckets');
Note: See TracBrowser for help on using the repository browser.