* $firebasestorageService = new Google\Service\Firebasestorage(...); * $buckets = $firebasestorageService->buckets; * */ class ProjectsBuckets extends \Google\Service\Resource { /** * Links a Google Cloud Storage bucket to a Firebase project. * (buckets.addFirebase) * * @param string $bucket Required. Resource name of the bucket, mirrors the ID * of the underlying Google Cloud Storage bucket, * `projects/{project_number}/buckets/{bucket_id}`. * @param AddFirebaseRequest $postBody * @param array $optParams Optional parameters. * @return Bucket */ public function addFirebase($bucket, AddFirebaseRequest $postBody, $optParams = []) { $params = ['bucket' => $bucket, 'postBody' => $postBody]; $params = array_merge($params, $optParams); return $this->call('addFirebase', [$params], Bucket::class); } /** * Gets a single linked storage bucket. (buckets.get) * * @param string $name Required. Resource name of the bucket, mirrors the ID of * the underlying Google Cloud Storage bucket, * `projects/{project_number}/buckets/{bucket_id}`. * @param array $optParams Optional parameters. * @return Bucket */ public function get($name, $optParams = []) { $params = ['name' => $name]; $params = array_merge($params, $optParams); return $this->call('get', [$params], Bucket::class); } /** * Lists the linked storage buckets for a project. (buckets.listProjectsBuckets) * * @param string $parent Required. Resource name of the parent Firebase project, * `projects/{project_number}`. * @param array $optParams Optional parameters. * * @opt_param int pageSize The maximum number of buckets to return. If not set, * the server will use a reasonable default. * @opt_param string pageToken A page token, received from a previous * `ListBuckets` call. Provide this to retrieve the subsequent page. When * paginating, all other parameters provided to `ListBuckets` must match the * call that provided the page token. * @return ListBucketsResponse */ public function listProjectsBuckets($parent, $optParams = []) { $params = ['parent' => $parent]; $params = array_merge($params, $optParams); return $this->call('list', [$params], ListBucketsResponse::class); } /** * Unlinks a linked Google Cloud Storage bucket from a Firebase project. * (buckets.removeFirebase) * * @param string $bucket Required. Resource name of the bucket, mirrors the ID * of the underlying Google Cloud Storage bucket, * `projects/{project_number}/buckets/{bucket_id}`. * @param RemoveFirebaseRequest $postBody * @param array $optParams Optional parameters. * @return FirebasestorageEmpty */ public function removeFirebase($bucket, RemoveFirebaseRequest $postBody, $optParams = []) { $params = ['bucket' => $bucket, 'postBody' => $postBody]; $params = array_merge($params, $optParams); return $this->call('removeFirebase', [$params], FirebasestorageEmpty::class); } } // Adding a class alias for backwards compatibility with the previous class name. class_alias(ProjectsBuckets::class, 'Google_Service_Firebasestorage_Resource_ProjectsBuckets');