Firebasestorage.php 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  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. namespace Google\Service;
  18. use Google\Client;
  19. /**
  20. * Service definition for Firebasestorage (v1beta).
  21. *
  22. * <p>
  23. * The Cloud Storage for Firebase API enables programmatic management of Cloud
  24. * Storage buckets for use in Firebase projects</p>
  25. *
  26. * <p>
  27. * For more information about this service, see the API
  28. * <a href="https://firebase.google.com/docs/storage" target="_blank">Documentation</a>
  29. * </p>
  30. *
  31. * @author Google, Inc.
  32. */
  33. class Firebasestorage extends \Google\Service
  34. {
  35. /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.. */
  36. const CLOUD_PLATFORM =
  37. "https://www.googleapis.com/auth/cloud-platform";
  38. /** View and administer all your Firebase data and settings. */
  39. const FIREBASE =
  40. "https://www.googleapis.com/auth/firebase";
  41. public $projects_buckets;
  42. /**
  43. * Constructs the internal representation of the Firebasestorage service.
  44. *
  45. * @param Client|array $clientOrConfig The client used to deliver requests, or a
  46. * config array to pass to a new Client instance.
  47. * @param string $rootUrl The root URL used for requests to the service.
  48. */
  49. public function __construct($clientOrConfig = [], $rootUrl = null)
  50. {
  51. parent::__construct($clientOrConfig);
  52. $this->rootUrl = $rootUrl ?: 'https://firebasestorage.googleapis.com/';
  53. $this->servicePath = '';
  54. $this->batchPath = 'batch';
  55. $this->version = 'v1beta';
  56. $this->serviceName = 'firebasestorage';
  57. $this->projects_buckets = new Firebasestorage\Resource\ProjectsBuckets(
  58. $this,
  59. $this->serviceName,
  60. 'buckets',
  61. [
  62. 'methods' => [
  63. 'addFirebase' => [
  64. 'path' => 'v1beta/{+bucket}:addFirebase',
  65. 'httpMethod' => 'POST',
  66. 'parameters' => [
  67. 'bucket' => [
  68. 'location' => 'path',
  69. 'type' => 'string',
  70. 'required' => true,
  71. ],
  72. ],
  73. ],'get' => [
  74. 'path' => 'v1beta/{+name}',
  75. 'httpMethod' => 'GET',
  76. 'parameters' => [
  77. 'name' => [
  78. 'location' => 'path',
  79. 'type' => 'string',
  80. 'required' => true,
  81. ],
  82. ],
  83. ],'list' => [
  84. 'path' => 'v1beta/{+parent}/buckets',
  85. 'httpMethod' => 'GET',
  86. 'parameters' => [
  87. 'parent' => [
  88. 'location' => 'path',
  89. 'type' => 'string',
  90. 'required' => true,
  91. ],
  92. 'pageSize' => [
  93. 'location' => 'query',
  94. 'type' => 'integer',
  95. ],
  96. 'pageToken' => [
  97. 'location' => 'query',
  98. 'type' => 'string',
  99. ],
  100. ],
  101. ],'removeFirebase' => [
  102. 'path' => 'v1beta/{+bucket}:removeFirebase',
  103. 'httpMethod' => 'POST',
  104. 'parameters' => [
  105. 'bucket' => [
  106. 'location' => 'path',
  107. 'type' => 'string',
  108. 'required' => true,
  109. ],
  110. ],
  111. ],
  112. ]
  113. ]
  114. );
  115. }
  116. }
  117. // Adding a class alias for backwards compatibility with the previous class name.
  118. class_alias(Firebasestorage::class, 'Google_Service_Firebasestorage');