diff --git a/src/CloudAsset/AnalyzeIamPolicyLongrunningMetadata.php b/src/CloudAsset/AnalyzeIamPolicyLongrunningMetadata.php new file mode 100644 index 0000000000..b2b8a65120 --- /dev/null +++ b/src/CloudAsset/AnalyzeIamPolicyLongrunningMetadata.php @@ -0,0 +1,35 @@ +createTime = $createTime; + } + public function getCreateTime() + { + return $this->createTime; + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AnalyzeIamPolicyLongrunningMetadata::class, 'Google_Service_CloudAsset_AnalyzeIamPolicyLongrunningMetadata'); diff --git a/src/CloudRetail/Resource/ProjectsLocationsCatalogs.php b/src/CloudRetail/Resource/ProjectsLocationsCatalogs.php index ea1d8e8beb..f71fc00ac9 100644 --- a/src/CloudRetail/Resource/ProjectsLocationsCatalogs.php +++ b/src/CloudRetail/Resource/ProjectsLocationsCatalogs.php @@ -36,9 +36,9 @@ class ProjectsLocationsCatalogs extends \Google\Service\Resource { /** * Completes the specified prefix with keyword suggestions. This feature is only - * available for users who have Retail Search enabled. Contact Retail Support - * (retail-search-support@google.com) if you are interested in using Retail - * Search. (catalogs.completeQuery) + * available for users who have Retail Search enabled. Please submit a form + * [here](https://cloud.google.com/contact) to contact cloud sales if you are + * interested in using Retail Search. (catalogs.completeQuery) * * @param string $catalog Required. Catalog for which the completion is * performed. Full resource name of catalog, such as @@ -47,11 +47,11 @@ class ProjectsLocationsCatalogs extends \Google\Service\Resource * * @opt_param string dataset Determines which dataset to use for fetching * completion. "user-data" will use the imported dataset through - * ImportCompletionData. "cloud-retail" will use the dataset generated by cloud - * retail based on user events. If leave empty, it will use the "user-data". - * Current supported values: * user-data * cloud-retail This option is not - * automatically enabled. Before using cloud-retail, contact retail-search- - * support@google.com first. + * CompletionService.ImportCompletionData. "cloud-retail" will use the dataset + * generated by cloud retail based on user events. If leave empty, it will use + * the "user-data". Current supported values: * user-data * cloud-retail This + * option requires additional allowlisting. Before using cloud-retail, contact + * Cloud Retail support team first. * @opt_param string deviceType The device type context for completion * suggestions. It is useful to apply different suggestions on different device * types, e.g. DESKTOP, MOBILE. If it is empty, the suggestions are across all @@ -62,8 +62,10 @@ class ProjectsLocationsCatalogs extends \Google\Service\Resource * see [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47). The * maximum number of allowed characters is 255. Only "en-US" is currently * supported. - * @opt_param int maxSuggestions Completion max suggestions. The maximum allowed - * max suggestions is 20. The default value is 20. + * @opt_param int maxSuggestions Completion max suggestions. If left unset or + * set to 0, then will fallback to the configured value + * CompletionConfig.max_suggestions. The maximum allowed max suggestions is 20. + * If it is set higher, it will be capped by 20. * @opt_param string query Required. The query used to generate suggestions. The * maximum number of allowed characters is 255. * @opt_param string visitorId A unique identifier for tracking visitors. For @@ -83,9 +85,9 @@ public function completeQuery($catalog, $optParams = []) /** * Get which branch is currently default branch set by * CatalogService.SetDefaultBranch method under a specified parent catalog. This - * feature is only available for users who have Retail Search enabled. Contact - * Retail Support (retail-search-support@google.com) if you are interested in - * using Retail Search. (catalogs.getDefaultBranch) + * feature is only available for users who have Retail Search enabled. Please + * submit a form [here](https://cloud.google.com/contact) to contact cloud sales + * if you are interested in using Retail Search. (catalogs.getDefaultBranch) * * @param string $catalog The parent catalog resource name, such as * `projects/locations/global/catalogs/default_catalog`. @@ -163,9 +165,9 @@ public function patch($name, GoogleCloudRetailV2Catalog $postBody, $optParams = * branch {newBranch}. * SearchService will only return product IDs from branch * {newBranch} (if branch is not explicitly set). * UserEventService will only * join events with products from branch {newBranch}. This feature is only - * available for users who have Retail Search enabled. Contact Retail Support - * (retail-search-support@google.com) if you are interested in using Retail - * Search. (catalogs.setDefaultBranch) + * available for users who have Retail Search enabled. Please submit a form + * [here](https://cloud.google.com/contact) to contact cloud sales if you are + * interested in using Retail Search. (catalogs.setDefaultBranch) * * @param string $catalog Full resource name of the catalog, such as * `projects/locations/global/catalogs/default_catalog`. diff --git a/src/CloudRetail/Resource/ProjectsLocationsCatalogsBranchesProducts.php b/src/CloudRetail/Resource/ProjectsLocationsCatalogsBranchesProducts.php index 1862c14cdc..51d9d79411 100644 --- a/src/CloudRetail/Resource/ProjectsLocationsCatalogsBranchesProducts.php +++ b/src/CloudRetail/Resource/ProjectsLocationsCatalogsBranchesProducts.php @@ -43,9 +43,9 @@ class ProjectsLocationsCatalogsBranchesProducts extends \Google\Service\Resource * enqueued and processed downstream. As a consequence, when a response is * returned, the added place IDs are not immediately manifested in the Product * queried by GetProduct or ListProducts. This feature is only available for - * users who have Retail Search enabled. Contact Retail Support (retail-search- - * support@google.com) if you are interested in using Retail Search. - * (products.addFulfillmentPlaces) + * users who have Retail Search enabled. Please submit a form + * [here](https://cloud.google.com/contact) to contact cloud sales if you are + * interested in using Retail Search. (products.addFulfillmentPlaces) * * @param string $product Required. Full resource name of Product, such as `proj * ects/locations/global/catalogs/default_catalog/branches/default_branch/produc @@ -223,9 +223,9 @@ public function patch($name, GoogleCloudRetailV2Product $postBody, $optParams = * enqueued and processed downstream. As a consequence, when a response is * returned, the removed place IDs are not immediately manifested in the Product * queried by GetProduct or ListProducts. This feature is only available for - * users who have Retail Search enabled. Contact Retail Support (retail-search- - * support@google.com) if you are interested in using Retail Search. - * (products.removeFulfillmentPlaces) + * users who have Retail Search enabled. Please submit a form + * [here](https://cloud.google.com/contact) to contact cloud sales if you are + * interested in using Retail Search. (products.removeFulfillmentPlaces) * * @param string $product Required. Full resource name of Product, such as `proj * ects/locations/global/catalogs/default_catalog/branches/default_branch/produc @@ -259,9 +259,9 @@ public function removeFulfillmentPlaces($product, GoogleCloudRetailV2RemoveFulfi * UpdateProductRequest.set_mask, then any existing inventory information will * be preserved. Pre-existing inventory information can only be updated with * SetInventory, AddFulfillmentPlaces, and RemoveFulfillmentPlaces. This feature - * is only available for users who have Retail Search enabled. Contact Retail - * Support (retail-search-support@google.com) if you are interested in using - * Retail Search. (products.setInventory) + * is only available for users who have Retail Search enabled. Please submit a + * form [here](https://cloud.google.com/contact) to contact cloud sales if you + * are interested in using Retail Search. (products.setInventory) * * @param string $name Immutable. Full resource name of the product, such as `pr * ojects/locations/global/catalogs/default_catalog/branches/default_branch/prod diff --git a/src/CloudRetail/Resource/ProjectsLocationsCatalogsCompletionData.php b/src/CloudRetail/Resource/ProjectsLocationsCatalogsCompletionData.php index 8e412c4a51..45b49ddbfc 100644 --- a/src/CloudRetail/Resource/ProjectsLocationsCatalogsCompletionData.php +++ b/src/CloudRetail/Resource/ProjectsLocationsCatalogsCompletionData.php @@ -33,9 +33,9 @@ class ProjectsLocationsCatalogsCompletionData extends \Google\Service\Resource /** * Bulk import of processed completion dataset. Request processing may be * synchronous. Partial updating is not supported. This feature is only - * available for users who have Retail Search enabled. Contact Retail Support - * (retail-search-support@google.com) if you are interested in using Retail - * Search. (completionData.import) + * available for users who have Retail Search enabled. Please submit a form + * [here](https://cloud.google.com/contact) to contact cloud sales if you are + * interested in using Retail Search. (completionData.import) * * @param string $parent Required. The catalog which the suggestions dataset * belongs to. Format: diff --git a/src/CloudRetail/Resource/ProjectsLocationsCatalogsPlacements.php b/src/CloudRetail/Resource/ProjectsLocationsCatalogsPlacements.php index caaac7f060..cd81598feb 100644 --- a/src/CloudRetail/Resource/ProjectsLocationsCatalogsPlacements.php +++ b/src/CloudRetail/Resource/ProjectsLocationsCatalogsPlacements.php @@ -55,8 +55,9 @@ public function predict($placement, GoogleCloudRetailV2PredictRequest $postBody, } /** * Performs a search. This feature is only available for users who have Retail - * Search enabled. Contact Retail Support (retail-search-support@google.com) if - * you are interested in using Retail Search. (placements.search) + * Search enabled. Please submit a form [here](https://cloud.google.com/contact) + * to contact cloud sales if you are interested in using Retail Search. + * (placements.search) * * @param string $placement Required. The resource name of the search engine * placement, such as `projects/locations/global/catalogs/default_catalog/placem diff --git a/src/PubsubLite.php b/src/PubsubLite.php index dfdc7e8819..0851687640 100644 --- a/src/PubsubLite.php +++ b/src/PubsubLite.php @@ -38,6 +38,7 @@ class PubsubLite extends \Google\Service const CLOUD_PLATFORM = "https://www.googleapis.com/auth/cloud-platform"; + public $admin_projects_locations_operations; public $admin_projects_locations_subscriptions; public $admin_projects_locations_topics; public $admin_projects_locations_topics_subscriptions; @@ -61,6 +62,68 @@ public function __construct($clientOrConfig = [], $rootUrl = null) $this->version = 'v1'; $this->serviceName = 'pubsublite'; + $this->admin_projects_locations_operations = new PubsubLite\Resource\AdminProjectsLocationsOperations( + $this, + $this->serviceName, + 'operations', + [ + 'methods' => [ + 'cancel' => [ + 'path' => 'v1/admin/{+name}:cancel', + 'httpMethod' => 'POST', + 'parameters' => [ + 'name' => [ + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ], + ], + ],'delete' => [ + 'path' => 'v1/admin/{+name}', + 'httpMethod' => 'DELETE', + 'parameters' => [ + 'name' => [ + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ], + ], + ],'get' => [ + 'path' => 'v1/admin/{+name}', + 'httpMethod' => 'GET', + 'parameters' => [ + 'name' => [ + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ], + ], + ],'list' => [ + 'path' => 'v1/admin/{+name}/operations', + 'httpMethod' => 'GET', + 'parameters' => [ + 'name' => [ + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ], + 'filter' => [ + 'location' => 'query', + 'type' => 'string', + ], + 'pageSize' => [ + 'location' => 'query', + 'type' => 'integer', + ], + 'pageToken' => [ + 'location' => 'query', + 'type' => 'string', + ], + ], + ], + ] + ] + ); $this->admin_projects_locations_subscriptions = new PubsubLite\Resource\AdminProjectsLocationsSubscriptions( $this, $this->serviceName, @@ -137,6 +200,16 @@ public function __construct($clientOrConfig = [], $rootUrl = null) 'type' => 'string', ], ], + ],'seek' => [ + 'path' => 'v1/admin/{+name}:seek', + 'httpMethod' => 'POST', + 'parameters' => [ + 'name' => [ + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ], + ], ], ] ] diff --git a/src/PubsubLite/CancelOperationRequest.php b/src/PubsubLite/CancelOperationRequest.php new file mode 100644 index 0000000000..eae11e5b3e --- /dev/null +++ b/src/PubsubLite/CancelOperationRequest.php @@ -0,0 +1,25 @@ +nextPageToken = $nextPageToken; + } + public function getNextPageToken() + { + return $this->nextPageToken; + } + /** + * @param Operation[] + */ + public function setOperations($operations) + { + $this->operations = $operations; + } + /** + * @return Operation[] + */ + public function getOperations() + { + return $this->operations; + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ListOperationsResponse::class, 'Google_Service_PubsubLite_ListOperationsResponse'); diff --git a/src/PubsubLite/Operation.php b/src/PubsubLite/Operation.php new file mode 100644 index 0000000000..a2f169db50 --- /dev/null +++ b/src/PubsubLite/Operation.php @@ -0,0 +1,78 @@ +done = $done; + } + public function getDone() + { + return $this->done; + } + /** + * @param Status + */ + public function setError(Status $error) + { + $this->error = $error; + } + /** + * @return Status + */ + public function getError() + { + return $this->error; + } + public function setMetadata($metadata) + { + $this->metadata = $metadata; + } + public function getMetadata() + { + return $this->metadata; + } + public function setName($name) + { + $this->name = $name; + } + public function getName() + { + return $this->name; + } + public function setResponse($response) + { + $this->response = $response; + } + public function getResponse() + { + return $this->response; + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Operation::class, 'Google_Service_PubsubLite_Operation'); diff --git a/src/PubsubLite/OperationMetadata.php b/src/PubsubLite/OperationMetadata.php new file mode 100644 index 0000000000..82e82840b1 --- /dev/null +++ b/src/PubsubLite/OperationMetadata.php @@ -0,0 +1,62 @@ +createTime = $createTime; + } + public function getCreateTime() + { + return $this->createTime; + } + public function setEndTime($endTime) + { + $this->endTime = $endTime; + } + public function getEndTime() + { + return $this->endTime; + } + public function setTarget($target) + { + $this->target = $target; + } + public function getTarget() + { + return $this->target; + } + public function setVerb($verb) + { + $this->verb = $verb; + } + public function getVerb() + { + return $this->verb; + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(OperationMetadata::class, 'Google_Service_PubsubLite_OperationMetadata'); diff --git a/src/PubsubLite/Resource/AdminProjectsLocationsOperations.php b/src/PubsubLite/Resource/AdminProjectsLocationsOperations.php new file mode 100644 index 0000000000..e1b52b2339 --- /dev/null +++ b/src/PubsubLite/Resource/AdminProjectsLocationsOperations.php @@ -0,0 +1,116 @@ + + * $pubsubliteService = new Google\Service\PubsubLite(...); + * $operations = $pubsubliteService->operations; + * + */ +class AdminProjectsLocationsOperations extends \Google\Service\Resource +{ + /** + * Starts asynchronous cancellation on a long-running operation. The server + * makes a best effort to cancel the operation, but success is not guaranteed. + * If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or + * other methods to check whether the cancellation succeeded or whether the + * operation completed despite cancellation. On successful cancellation, the + * operation is not deleted; instead, it becomes an operation with an + * Operation.error value with a google.rpc.Status.code of 1, corresponding to + * `Code.CANCELLED`. (operations.cancel) + * + * @param string $name The name of the operation resource to be cancelled. + * @param CancelOperationRequest $postBody + * @param array $optParams Optional parameters. + * @return PubsubliteEmpty + */ + public function cancel($name, CancelOperationRequest $postBody, $optParams = []) + { + $params = ['name' => $name, 'postBody' => $postBody]; + $params = array_merge($params, $optParams); + return $this->call('cancel', [$params], PubsubliteEmpty::class); + } + /** + * Deletes a long-running operation. This method indicates that the client is no + * longer interested in the operation result. It does not cancel the operation. + * If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. (operations.delete) + * + * @param string $name The name of the operation resource to be deleted. + * @param array $optParams Optional parameters. + * @return PubsubliteEmpty + */ + public function delete($name, $optParams = []) + { + $params = ['name' => $name]; + $params = array_merge($params, $optParams); + return $this->call('delete', [$params], PubsubliteEmpty::class); + } + /** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. (operations.get) + * + * @param string $name The name of the operation resource. + * @param array $optParams Optional parameters. + * @return Operation + */ + public function get($name, $optParams = []) + { + $params = ['name' => $name]; + $params = array_merge($params, $optParams); + return $this->call('get', [$params], Operation::class); + } + /** + * Lists operations that match the specified filter in the request. If the + * server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the + * `name` binding allows API services to override the binding to use different + * resource name schemes, such as `users/operations`. To override the binding, + * API services can add a binding such as `"/v1/{name=users}/operations"` to + * their service configuration. For backwards compatibility, the default name + * includes the operations collection id, however overriding users must ensure + * the name binding is the parent resource, without the operations collection + * id. (operations.listAdminProjectsLocationsOperations) + * + * @param string $name The name of the operation's parent resource. + * @param array $optParams Optional parameters. + * + * @opt_param string filter The standard list filter. + * @opt_param int pageSize The standard list page size. + * @opt_param string pageToken The standard list page token. + * @return ListOperationsResponse + */ + public function listAdminProjectsLocationsOperations($name, $optParams = []) + { + $params = ['name' => $name]; + $params = array_merge($params, $optParams); + return $this->call('list', [$params], ListOperationsResponse::class); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AdminProjectsLocationsOperations::class, 'Google_Service_PubsubLite_Resource_AdminProjectsLocationsOperations'); diff --git a/src/PubsubLite/Resource/AdminProjectsLocationsSubscriptions.php b/src/PubsubLite/Resource/AdminProjectsLocationsSubscriptions.php index 0e31ac1450..a229b34776 100644 --- a/src/PubsubLite/Resource/AdminProjectsLocationsSubscriptions.php +++ b/src/PubsubLite/Resource/AdminProjectsLocationsSubscriptions.php @@ -18,7 +18,9 @@ namespace Google\Service\PubsubLite\Resource; use Google\Service\PubsubLite\ListSubscriptionsResponse; +use Google\Service\PubsubLite\Operation; use Google\Service\PubsubLite\PubsubliteEmpty; +use Google\Service\PubsubLite\SeekSubscriptionRequest; use Google\Service\PubsubLite\Subscription; /** @@ -123,6 +125,35 @@ public function patch($name, Subscription $postBody, $optParams = []) $params = array_merge($params, $optParams); return $this->call('patch', [$params], Subscription::class); } + /** + * Performs an out-of-band seek for a subscription to a specified target, which + * may be timestamps or named positions within the message backlog. Seek + * translates these targets to cursors for each partition and orchestrates + * subscribers to start consuming messages from these seek cursors. If an + * operation is returned, the seek has been registered and subscribers will + * eventually receive messages from the seek cursors (i.e. eventual + * consistency), as long as they are using a minimum supported client library + * version and not a system that tracks cursors independently of Pub/Sub Lite + * (e.g. Apache Beam, Dataflow, Spark). The seek operation will fail for + * unsupported clients. If clients would like to know when subscribers react to + * the seek (or not), they can poll the operation. The seek operation will + * succeed and complete once subscribers are ready to receive messages from the + * seek cursors for all partitions of the topic. This means that the seek + * operation will not complete until all subscribers come online. If the + * previous seek operation has not yet completed, it will be aborted and the new + * invocation of seek will supersede it. (subscriptions.seek) + * + * @param string $name Required. The name of the subscription to seek. + * @param SeekSubscriptionRequest $postBody + * @param array $optParams Optional parameters. + * @return Operation + */ + public function seek($name, SeekSubscriptionRequest $postBody, $optParams = []) + { + $params = ['name' => $name, 'postBody' => $postBody]; + $params = array_merge($params, $optParams); + return $this->call('seek', [$params], Operation::class); + } } // Adding a class alias for backwards compatibility with the previous class name. diff --git a/src/PubsubLite/SeekSubscriptionRequest.php b/src/PubsubLite/SeekSubscriptionRequest.php new file mode 100644 index 0000000000..6b0c61aa14 --- /dev/null +++ b/src/PubsubLite/SeekSubscriptionRequest.php @@ -0,0 +1,51 @@ +namedTarget = $namedTarget; + } + public function getNamedTarget() + { + return $this->namedTarget; + } + /** + * @param TimeTarget + */ + public function setTimeTarget(TimeTarget $timeTarget) + { + $this->timeTarget = $timeTarget; + } + /** + * @return TimeTarget + */ + public function getTimeTarget() + { + return $this->timeTarget; + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SeekSubscriptionRequest::class, 'Google_Service_PubsubLite_SeekSubscriptionRequest'); diff --git a/src/PubsubLite/SeekSubscriptionResponse.php b/src/PubsubLite/SeekSubscriptionResponse.php new file mode 100644 index 0000000000..bedb60995a --- /dev/null +++ b/src/PubsubLite/SeekSubscriptionResponse.php @@ -0,0 +1,25 @@ +code = $code; + } + public function getCode() + { + return $this->code; + } + public function setDetails($details) + { + $this->details = $details; + } + public function getDetails() + { + return $this->details; + } + public function setMessage($message) + { + $this->message = $message; + } + public function getMessage() + { + return $this->message; + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Status::class, 'Google_Service_PubsubLite_Status'); diff --git a/synth.metadata b/synth.metadata index 0ebe6041a4..344595a4b9 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/google-api-php-client-services.git", - "sha": "b510a997a8ae182545f927a712cdb0a342fb07b6" + "sha": "63b0ac92d9091dc54b2c4c74fc388171674e8064" } }, { "git": { "name": "discovery-artifact-manager", "remote": "https://github.com/googleapis/discovery-artifact-manager.git", - "sha": "ada09a2d952039d90b3745a00362968cb5df029c" + "sha": "9dc7495247fd22af680444403f8419e26c5cdfe4" } } ]