diff --git a/src/Storage.php b/src/Storage.php index 3f07fd67ae6..37634a29043 100644 --- a/src/Storage.php +++ b/src/Storage.php @@ -63,6 +63,7 @@ class Storage extends \Google\Service public $operations; public $projects_hmacKeys; public $projects_serviceAccount; + public $rapidCaches; public $rootUrlTemplate; /** @@ -1075,6 +1076,29 @@ public function __construct($clientOrConfig = [], $rootUrl = null) 'type' => 'string', ], ], + ],'update' => [ + 'path' => 'b/{bucket}/managedFolders/{managedFolder}', + 'httpMethod' => 'PATCH', + 'parameters' => [ + 'bucket' => [ + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ], + 'managedFolder' => [ + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ], + 'ifMetagenerationMatch' => [ + 'location' => 'query', + 'type' => 'string', + ], + 'ifMetagenerationNotMatch' => [ + 'location' => 'query', + 'type' => 'string', + ], + ], ], ] ] @@ -2262,6 +2286,89 @@ public function __construct($clientOrConfig = [], $rootUrl = null) ] ] ); + $this->rapidCaches = new Storage\Resource\RapidCaches( + $this, + $this->serviceName, + 'rapidCaches', + [ + 'methods' => [ + 'disable' => [ + 'path' => 'b/{bucket}/rapidCaches/{rapidCacheId}/disable', + 'httpMethod' => 'POST', + 'parameters' => [ + 'bucket' => [ + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ], + 'rapidCacheId' => [ + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ], + ], + ],'get' => [ + 'path' => 'b/{bucket}/rapidCaches/{rapidCacheId}', + 'httpMethod' => 'GET', + 'parameters' => [ + 'bucket' => [ + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ], + 'rapidCacheId' => [ + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ], + ], + ],'insert' => [ + 'path' => 'b/{bucket}/rapidCaches', + 'httpMethod' => 'POST', + 'parameters' => [ + 'bucket' => [ + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ], + ], + ],'list' => [ + 'path' => 'b/{bucket}/rapidCaches', + 'httpMethod' => 'GET', + 'parameters' => [ + 'bucket' => [ + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ], + 'pageSize' => [ + 'location' => 'query', + 'type' => 'integer', + ], + 'pageToken' => [ + 'location' => 'query', + 'type' => 'string', + ], + ], + ],'update' => [ + 'path' => 'b/{bucket}/rapidCaches/{rapidCacheId}', + 'httpMethod' => 'PATCH', + 'parameters' => [ + 'bucket' => [ + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ], + 'rapidCacheId' => [ + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ], + ], + ], + ] + ] + ); } } diff --git a/src/Storage/ManagedFolder.php b/src/Storage/ManagedFolder.php index b248a87e588..8f593f8eca4 100644 --- a/src/Storage/ManagedFolder.php +++ b/src/Storage/ManagedFolder.php @@ -58,6 +58,8 @@ class ManagedFolder extends \Google\Model * @var string */ public $name; + protected $rapidCacheConfigType = RapidCacheConfig::class; + protected $rapidCacheConfigDataType = ''; /** * The link to this managed folder. * @@ -170,6 +172,22 @@ public function getName() { return $this->name; } + /** + * The rapid cache configuration for the managed folder. + * + * @param RapidCacheConfig $rapidCacheConfig + */ + public function setRapidCacheConfig(RapidCacheConfig $rapidCacheConfig) + { + $this->rapidCacheConfig = $rapidCacheConfig; + } + /** + * @return RapidCacheConfig + */ + public function getRapidCacheConfig() + { + return $this->rapidCacheConfig; + } /** * The link to this managed folder. * diff --git a/src/Storage/RapidCache.php b/src/Storage/RapidCache.php new file mode 100644 index 00000000000..c6f81ae115f --- /dev/null +++ b/src/Storage/RapidCache.php @@ -0,0 +1,342 @@ +admissionPolicy = $admissionPolicy; + } + /** + * @return string + */ + public function getAdmissionPolicy() + { + return $this->admissionPolicy; + } + /** + * The name of the bucket containing this cache instance. + * + * @param string $bucket + */ + public function setBucket($bucket) + { + $this->bucket = $bucket; + } + /** + * @return string + */ + public function getBucket() + { + return $this->bucket; + } + /** + * The type of Rapid Cache this represents. Valid values include: "rapid- + * cache" and "rapid-cache-ultra". + * + * @param string $cacheType + */ + public function setCacheType($cacheType) + { + $this->cacheType = $cacheType; + } + /** + * @return string + */ + public function getCacheType() + { + return $this->cacheType; + } + /** + * The creation time of the cache instance in RFC 3339 format. + * + * @param string $createTime + */ + public function setCreateTime($createTime) + { + $this->createTime = $createTime; + } + /** + * @return string + */ + public function getCreateTime() + { + return $this->createTime; + } + /** + * The ID of the resource, including the project number, bucket name and rapid + * cache ID. + * + * @param string $id + */ + public function setId($id) + { + $this->id = $id; + } + /** + * @return string + */ + public function getId() + { + return $this->id; + } + /** + * Specifies whether objects are ingested into the cache upon write. + * + * @param bool $ingestOnWrite + */ + public function setIngestOnWrite($ingestOnWrite) + { + $this->ingestOnWrite = $ingestOnWrite; + } + /** + * @return bool + */ + public function getIngestOnWrite() + { + return $this->ingestOnWrite; + } + /** + * The kind of item this is. For Rapid Cache, this is always + * storage#rapidCache. + * + * @param string $kind + */ + public function setKind($kind) + { + $this->kind = $kind; + } + /** + * @return string + */ + public function getKind() + { + return $this->kind; + } + /** + * True if the cache instance has an active Update long-running operation. + * + * @param bool $pendingUpdate + */ + public function setPendingUpdate($pendingUpdate) + { + $this->pendingUpdate = $pendingUpdate; + } + /** + * @return bool + */ + public function getPendingUpdate() + { + return $this->pendingUpdate; + } + /** + * The ID of the Rapid cache instance. + * + * @param string $rapidCacheId + */ + public function setRapidCacheId($rapidCacheId) + { + $this->rapidCacheId = $rapidCacheId; + } + /** + * @return string + */ + public function getRapidCacheId() + { + return $this->rapidCacheId; + } + /** + * The link to this cache instance. + * + * @param string $selfLink + */ + public function setSelfLink($selfLink) + { + $this->selfLink = $selfLink; + } + /** + * @return string + */ + public function getSelfLink() + { + return $this->selfLink; + } + /** + * The current state of the cache instance. + * + * @param string $state + */ + public function setState($state) + { + $this->state = $state; + } + /** + * @return string + */ + public function getState() + { + return $this->state; + } + /** + * The TTL of all cache entries in whole seconds. e.g., "7200s". + * + * @param string $ttl + */ + public function setTtl($ttl) + { + $this->ttl = $ttl; + } + /** + * @return string + */ + public function getTtl() + { + return $this->ttl; + } + /** + * The modification time of the cache instance metadata in RFC 3339 format. + * + * @param string $updateTime + */ + public function setUpdateTime($updateTime) + { + $this->updateTime = $updateTime; + } + /** + * @return string + */ + public function getUpdateTime() + { + return $this->updateTime; + } + /** + * The zone in which the cache instance is running. For example, us- + * central1-a. + * + * @param string $zone + */ + public function setZone($zone) + { + $this->zone = $zone; + } + /** + * @return string + */ + public function getZone() + { + return $this->zone; + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RapidCache::class, 'Google_Service_Storage_RapidCache'); diff --git a/src/Storage/RapidCacheConfig.php b/src/Storage/RapidCacheConfig.php new file mode 100644 index 00000000000..2e8225102e4 --- /dev/null +++ b/src/Storage/RapidCacheConfig.php @@ -0,0 +1,45 @@ +policies = $policies; + } + /** + * @return RapidCachePolicy[] + */ + public function getPolicies() + { + return $this->policies; + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RapidCacheConfig::class, 'Google_Service_Storage_RapidCacheConfig'); diff --git a/src/Storage/RapidCachePolicy.php b/src/Storage/RapidCachePolicy.php new file mode 100644 index 00000000000..53d2743e7e8 --- /dev/null +++ b/src/Storage/RapidCachePolicy.php @@ -0,0 +1,86 @@ +ingestOnWrite = $ingestOnWrite; + } + /** + * @return self::INGEST_ON_WRITE_* + */ + public function getIngestOnWrite() + { + return $this->ingestOnWrite; + } + /** + * The unique identifier of the rapid cache. + * + * @param string $rapidCacheId + */ + public function setRapidCacheId($rapidCacheId) + { + $this->rapidCacheId = $rapidCacheId; + } + /** + * @return string + */ + public function getRapidCacheId() + { + return $this->rapidCacheId; + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RapidCachePolicy::class, 'Google_Service_Storage_RapidCachePolicy'); diff --git a/src/Storage/RapidCaches.php b/src/Storage/RapidCaches.php new file mode 100644 index 00000000000..dab17a5ab3a --- /dev/null +++ b/src/Storage/RapidCaches.php @@ -0,0 +1,93 @@ +items = $items; + } + /** + * @return RapidCache[] + */ + public function getItems() + { + return $this->items; + } + /** + * The kind of item this is. For lists of Rapid Caches, this is always + * storage#rapidCaches. + * + * @param string $kind + */ + public function setKind($kind) + { + $this->kind = $kind; + } + /** + * @return string + */ + public function getKind() + { + return $this->kind; + } + /** + * The continuation token, used to page through large result sets. Provide + * this value in a subsequent request to return the next page of results. + * + * @param string $nextPageToken + */ + public function setNextPageToken($nextPageToken) + { + $this->nextPageToken = $nextPageToken; + } + /** + * @return string + */ + public function getNextPageToken() + { + return $this->nextPageToken; + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RapidCaches::class, 'Google_Service_Storage_RapidCaches'); diff --git a/src/Storage/Resource/ManagedFolders.php b/src/Storage/Resource/ManagedFolders.php index 02df1b6edae..e2211a02537 100644 --- a/src/Storage/Resource/ManagedFolders.php +++ b/src/Storage/Resource/ManagedFolders.php @@ -176,6 +176,28 @@ public function testIamPermissions($bucket, $managedFolder, $permissions, $optPa $params = array_merge($params, $optParams); return $this->call('testIamPermissions', [$params], TestIamPermissionsResponse::class); } + /** + * Updates a managed folder using patch semantics. (managedFolders.update) + * + * @param string $bucket The name of the bucket containing the managed folder. + * @param string $managedFolder The name of the managed folder. + * @param ManagedFolder $postBody + * @param array $optParams Optional parameters. + * + * @opt_param string ifMetagenerationMatch Makes the operation conditional on + * whether the metageneration of the managed folder matches the specified value. + * @opt_param string ifMetagenerationNotMatch Makes the operation conditional on + * whether the metageneration of the managed folder doesn't match the specified + * value. + * @return ManagedFolder + * @throws \Google\Service\Exception + */ + public function update($bucket, $managedFolder, ManagedFolder $postBody, $optParams = []) + { + $params = ['bucket' => $bucket, 'managedFolder' => $managedFolder, 'postBody' => $postBody]; + $params = array_merge($params, $optParams); + return $this->call('update', [$params], ManagedFolder::class); + } } // Adding a class alias for backwards compatibility with the previous class name. diff --git a/src/Storage/Resource/RapidCaches.php b/src/Storage/Resource/RapidCaches.php new file mode 100644 index 00000000000..3972c977487 --- /dev/null +++ b/src/Storage/Resource/RapidCaches.php @@ -0,0 +1,118 @@ + + * $storageService = new Google\Service\Storage(...); + * $rapidCaches = $storageService->rapidCaches; + * + */ +class RapidCaches extends \Google\Service\Resource +{ + /** + * Disables a Rapid Cache instance. (rapidCaches.disable) + * + * @param string $bucket Name of the parent bucket. + * @param string $rapidCacheId The ID of the requested Rapid Cache instance. + * @param array $optParams Optional parameters. + * @return GoogleLongrunningOperation + * @throws \Google\Service\Exception + */ + public function disable($bucket, $rapidCacheId, $optParams = []) + { + $params = ['bucket' => $bucket, 'rapidCacheId' => $rapidCacheId]; + $params = array_merge($params, $optParams); + return $this->call('disable', [$params], GoogleLongrunningOperation::class); + } + /** + * Returns the metadata of a Rapid Cache instance. (rapidCaches.get) + * + * @param string $bucket Name of the parent bucket. + * @param string $rapidCacheId The ID of the requested Rapid Cache instance. + * @param array $optParams Optional parameters. + * @return RapidCache + * @throws \Google\Service\Exception + */ + public function get($bucket, $rapidCacheId, $optParams = []) + { + $params = ['bucket' => $bucket, 'rapidCacheId' => $rapidCacheId]; + $params = array_merge($params, $optParams); + return $this->call('get', [$params], RapidCache::class); + } + /** + * Creates a Rapid Cache instance. (rapidCaches.insert) + * + * @param string $bucket Name of the parent bucket. + * @param RapidCache $postBody + * @param array $optParams Optional parameters. + * @return GoogleLongrunningOperation + * @throws \Google\Service\Exception + */ + public function insert($bucket, RapidCache $postBody, $optParams = []) + { + $params = ['bucket' => $bucket, 'postBody' => $postBody]; + $params = array_merge($params, $optParams); + return $this->call('insert', [$params], GoogleLongrunningOperation::class); + } + /** + * Returns a list of Rapid Cache instances of the bucket. + * (rapidCaches.listRapidCaches) + * + * @param string $bucket Name of the parent bucket. + * @param array $optParams Optional parameters. + * + * @opt_param int pageSize Maximum number of items to return in a single page of + * responses. + * @opt_param string pageToken A previously-returned page token representing + * part of the larger set of results to view. + * @return RapidCachesModel + * @throws \Google\Service\Exception + */ + public function listRapidCaches($bucket, $optParams = []) + { + $params = ['bucket' => $bucket]; + $params = array_merge($params, $optParams); + return $this->call('list', [$params], RapidCachesModel::class); + } + /** + * Updates the configuration of a Rapid Cache instance. (rapidCaches.update) + * + * @param string $bucket Name of the parent bucket. + * @param string $rapidCacheId The ID of the requested Rapid Cache instance. + * @param RapidCache $postBody + * @param array $optParams Optional parameters. + * @return GoogleLongrunningOperation + * @throws \Google\Service\Exception + */ + public function update($bucket, $rapidCacheId, RapidCache $postBody, $optParams = []) + { + $params = ['bucket' => $bucket, 'rapidCacheId' => $rapidCacheId, 'postBody' => $postBody]; + $params = array_merge($params, $optParams); + return $this->call('update', [$params], GoogleLongrunningOperation::class); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RapidCaches::class, 'Google_Service_Storage_Resource_RapidCaches');