diff --git a/.github/workflows/storage-emulator-retry-conformance-tests.yaml b/.github/workflows/storage-emulator-retry-conformance-tests.yaml index 3058e94c8799..94249cd98532 100644 --- a/.github/workflows/storage-emulator-retry-conformance-tests.yaml +++ b/.github/workflows/storage-emulator-retry-conformance-tests.yaml @@ -16,7 +16,7 @@ jobs: services: emulator: - image: gcr.io/cloud-devrel-public-resources/storage-testbench:v0.43.0 + image: gcr.io/cloud-devrel-public-resources/storage-testbench:v0.44.0 ports: - 9000:9000 diff --git a/AccessApproval/VERSION b/AccessApproval/VERSION index 23aa8390630c..0495c4a88cae 100644 --- a/AccessApproval/VERSION +++ b/AccessApproval/VERSION @@ -1 +1 @@ -1.2.2 +1.2.3 diff --git a/AccessContextManager/VERSION b/AccessContextManager/VERSION index cb0c939a936f..be14282b7fff 100644 --- a/AccessContextManager/VERSION +++ b/AccessContextManager/VERSION @@ -1 +1 @@ -0.5.2 +0.5.3 diff --git a/AdvisoryNotifications/VERSION b/AdvisoryNotifications/VERSION index a3df0a6959e1..6f4eebdf6f68 100644 --- a/AdvisoryNotifications/VERSION +++ b/AdvisoryNotifications/VERSION @@ -1 +1 @@ -0.8.0 +0.8.1 diff --git a/AiPlatform/VERSION b/AiPlatform/VERSION index 0f1a7dfc7c40..9b1bb8512396 100644 --- a/AiPlatform/VERSION +++ b/AiPlatform/VERSION @@ -1 +1 @@ -0.37.0 +0.37.1 diff --git a/AlloyDb/VERSION b/AlloyDb/VERSION index 78bc1abd14f2..571215736a66 100644 --- a/AlloyDb/VERSION +++ b/AlloyDb/VERSION @@ -1 +1 @@ -0.10.0 +0.10.1 diff --git a/AnalyticsAdmin/VERSION b/AnalyticsAdmin/VERSION index faa5fb2659b5..d90746a79af3 100644 --- a/AnalyticsAdmin/VERSION +++ b/AnalyticsAdmin/VERSION @@ -1 +1 @@ -0.22.2 +0.22.3 diff --git a/AnalyticsData/VERSION b/AnalyticsData/VERSION index 201a22c8fa5c..7eb3095a3295 100644 --- a/AnalyticsData/VERSION +++ b/AnalyticsData/VERSION @@ -1 +1 @@ -0.16.2 +0.16.3 diff --git a/ApiGateway/VERSION b/ApiGateway/VERSION index 1892b9267677..31e5c843497c 100644 --- a/ApiGateway/VERSION +++ b/ApiGateway/VERSION @@ -1 +1 @@ -1.3.2 +1.3.3 diff --git a/ApiKeys/VERSION b/ApiKeys/VERSION index 2b7c5ae01848..17b2ccd9bf90 100644 --- a/ApiKeys/VERSION +++ b/ApiKeys/VERSION @@ -1 +1 @@ -0.4.2 +0.4.3 diff --git a/ApigeeConnect/VERSION b/ApigeeConnect/VERSION index 23aa8390630c..0495c4a88cae 100644 --- a/ApigeeConnect/VERSION +++ b/ApigeeConnect/VERSION @@ -1 +1 @@ -1.2.2 +1.2.3 diff --git a/ApigeeRegistry/VERSION b/ApigeeRegistry/VERSION index cb0c939a936f..be14282b7fff 100644 --- a/ApigeeRegistry/VERSION +++ b/ApigeeRegistry/VERSION @@ -1 +1 @@ -0.5.2 +0.5.3 diff --git a/AppEngineAdmin/VERSION b/AppEngineAdmin/VERSION index 1892b9267677..31e5c843497c 100644 --- a/AppEngineAdmin/VERSION +++ b/AppEngineAdmin/VERSION @@ -1 +1 @@ -1.3.2 +1.3.3 diff --git a/AppHub/VERSION b/AppHub/VERSION index 6e8bf73aa550..17e51c385ea3 100644 --- a/AppHub/VERSION +++ b/AppHub/VERSION @@ -1 +1 @@ -0.1.0 +0.1.1 diff --git a/AppsChat/.repo-metadata.json b/AppsChat/.repo-metadata.json index 917a35ff0820..0b70a325cd0a 100644 --- a/AppsChat/.repo-metadata.json +++ b/AppsChat/.repo-metadata.json @@ -1,8 +1,8 @@ { "language": "php", - "distribution_name": "google/chat", + "distribution_name": "google/apps-chat", "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/chat/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/apps-chat/latest", "library_type": "GAPIC_AUTO", "api_shortname": "chat" } diff --git a/AppsChat/VERSION b/AppsChat/VERSION index 77d6f4ca2371..6e8bf73aa550 100644 --- a/AppsChat/VERSION +++ b/AppsChat/VERSION @@ -1 +1 @@ -0.0.0 +0.1.0 diff --git a/AppsChat/metadata/Chat/V1/ChatService.php b/AppsChat/metadata/Chat/V1/ChatService.php index 815f339431fd..9c06a9d4498f 100644 Binary files a/AppsChat/metadata/Chat/V1/ChatService.php and b/AppsChat/metadata/Chat/V1/ChatService.php differ diff --git a/AppsChat/metadata/Chat/V1/Membership.php b/AppsChat/metadata/Chat/V1/Membership.php index 6feaa39be9a0..e86c272e3b7e 100644 Binary files a/AppsChat/metadata/Chat/V1/Membership.php and b/AppsChat/metadata/Chat/V1/Membership.php differ diff --git a/AppsChat/metadata/Chat/V1/SpaceReadState.php b/AppsChat/metadata/Chat/V1/SpaceReadState.php new file mode 100644 index 000000000000..c50a77eec7f1 --- /dev/null +++ b/AppsChat/metadata/Chat/V1/SpaceReadState.php @@ -0,0 +1,41 @@ +internalAddGeneratedFile( + ' +è +%google/chat/v1/space_read_state.protogoogle.chat.v1google/api/resource.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"¼ +SpaceReadState +name ( 7 +last_read_time ( 2.google.protobuf.TimestampBàA:cêA` +"chat.googleapis.com/SpaceReadState*users/{user}/spaces/{space}/spaceReadState2spaceReadState"T +GetSpaceReadStateRequest8 +name ( B*àAúA$ +"chat.googleapis.com/SpaceReadState"’ +UpdateSpaceReadStateRequest= +space_read_state ( 2.google.chat.v1.SpaceReadStateBàA4 + update_mask ( 2.google.protobuf.FieldMaskBàABž +com.google.chat.v1BSpaceReadStateProtoPZ,cloud.google.com/go/chat/apiv1/chatpb;chatpbªGoogle.Apps.Chat.V1ÊGoogle\\Apps\\Chat\\V1êGoogle::Apps::Chat::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/AppsChat/metadata/Chat/V1/ThreadReadState.php b/AppsChat/metadata/Chat/V1/ThreadReadState.php new file mode 100644 index 000000000000..f1dcbd1fc458 --- /dev/null +++ b/AppsChat/metadata/Chat/V1/ThreadReadState.php @@ -0,0 +1,37 @@ +internalAddGeneratedFile( + ' +Å +&google/chat/v1/thread_read_state.protogoogle.chat.v1google/api/resource.protogoogle/protobuf/timestamp.proto"Ì +ThreadReadState +name ( 2 +last_read_time ( 2.google.protobuf.Timestamp:wêAt +#chat.googleapis.com/ThreadReadStatesetName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var SpaceReadState $response */ + $response = $chatServiceClient->getSpaceReadState($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ChatServiceClient::spaceReadStateName('[USER]', '[SPACE]'); + + get_space_read_state_sample($formattedName); +} +// [END chat_v1_generated_ChatService_GetSpaceReadState_sync] diff --git a/AppsChat/samples/V1/ChatServiceClient/get_thread_read_state.php b/AppsChat/samples/V1/ChatServiceClient/get_thread_read_state.php new file mode 100644 index 000000000000..3f8bf096c47f --- /dev/null +++ b/AppsChat/samples/V1/ChatServiceClient/get_thread_read_state.php @@ -0,0 +1,90 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var ThreadReadState $response */ + $response = $chatServiceClient->getThreadReadState($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ChatServiceClient::threadReadStateName('[USER]', '[SPACE]', '[THREAD]'); + + get_thread_read_state_sample($formattedName); +} +// [END chat_v1_generated_ChatService_GetThreadReadState_sync] diff --git a/AppsChat/samples/V1/ChatServiceClient/update_membership.php b/AppsChat/samples/V1/ChatServiceClient/update_membership.php new file mode 100644 index 000000000000..9bdc4cc059ca --- /dev/null +++ b/AppsChat/samples/V1/ChatServiceClient/update_membership.php @@ -0,0 +1,63 @@ +setMembership($membership) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var Membership $response */ + $response = $chatServiceClient->updateMembership($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END chat_v1_generated_ChatService_UpdateMembership_sync] diff --git a/AppsChat/samples/V1/ChatServiceClient/update_space_read_state.php b/AppsChat/samples/V1/ChatServiceClient/update_space_read_state.php new file mode 100644 index 000000000000..f3bc77396457 --- /dev/null +++ b/AppsChat/samples/V1/ChatServiceClient/update_space_read_state.php @@ -0,0 +1,66 @@ +setSpaceReadState($spaceReadState) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var SpaceReadState $response */ + $response = $chatServiceClient->updateSpaceReadState($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END chat_v1_generated_ChatService_UpdateSpaceReadState_sync] diff --git a/AppsChat/src/Chat/V1/Client/ChatServiceClient.php b/AppsChat/src/Chat/V1/Client/ChatServiceClient.php index cfbe6d679e84..2ab67351b2b1 100644 --- a/AppsChat/src/Chat/V1/Client/ChatServiceClient.php +++ b/AppsChat/src/Chat/V1/Client/ChatServiceClient.php @@ -47,7 +47,9 @@ use Google\Apps\Chat\V1\GetAttachmentRequest; use Google\Apps\Chat\V1\GetMembershipRequest; use Google\Apps\Chat\V1\GetMessageRequest; +use Google\Apps\Chat\V1\GetSpaceReadStateRequest; use Google\Apps\Chat\V1\GetSpaceRequest; +use Google\Apps\Chat\V1\GetThreadReadStateRequest; use Google\Apps\Chat\V1\ListMembershipsRequest; use Google\Apps\Chat\V1\ListMessagesRequest; use Google\Apps\Chat\V1\ListReactionsRequest; @@ -57,7 +59,11 @@ use Google\Apps\Chat\V1\Reaction; use Google\Apps\Chat\V1\SetUpSpaceRequest; use Google\Apps\Chat\V1\Space; +use Google\Apps\Chat\V1\SpaceReadState; +use Google\Apps\Chat\V1\ThreadReadState; +use Google\Apps\Chat\V1\UpdateMembershipRequest; use Google\Apps\Chat\V1\UpdateMessageRequest; +use Google\Apps\Chat\V1\UpdateSpaceReadStateRequest; use Google\Apps\Chat\V1\UpdateSpaceRequest; use Google\Apps\Chat\V1\UploadAttachmentRequest; use Google\Apps\Chat\V1\UploadAttachmentResponse; @@ -90,13 +96,17 @@ * @method PromiseInterface getMembershipAsync(GetMembershipRequest $request, array $optionalArgs = []) * @method PromiseInterface getMessageAsync(GetMessageRequest $request, array $optionalArgs = []) * @method PromiseInterface getSpaceAsync(GetSpaceRequest $request, array $optionalArgs = []) + * @method PromiseInterface getSpaceReadStateAsync(GetSpaceReadStateRequest $request, array $optionalArgs = []) + * @method PromiseInterface getThreadReadStateAsync(GetThreadReadStateRequest $request, array $optionalArgs = []) * @method PromiseInterface listMembershipsAsync(ListMembershipsRequest $request, array $optionalArgs = []) * @method PromiseInterface listMessagesAsync(ListMessagesRequest $request, array $optionalArgs = []) * @method PromiseInterface listReactionsAsync(ListReactionsRequest $request, array $optionalArgs = []) * @method PromiseInterface listSpacesAsync(ListSpacesRequest $request, array $optionalArgs = []) * @method PromiseInterface setUpSpaceAsync(SetUpSpaceRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateMembershipAsync(UpdateMembershipRequest $request, array $optionalArgs = []) * @method PromiseInterface updateMessageAsync(UpdateMessageRequest $request, array $optionalArgs = []) * @method PromiseInterface updateSpaceAsync(UpdateSpaceRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateSpaceReadStateAsync(UpdateSpaceReadStateRequest $request, array $optionalArgs = []) * @method PromiseInterface uploadAttachmentAsync(UploadAttachmentRequest $request, array $optionalArgs = []) */ final class ChatServiceClient @@ -140,6 +150,8 @@ final class ChatServiceClient 'https://www.googleapis.com/auth/chat.spaces', 'https://www.googleapis.com/auth/chat.spaces.create', 'https://www.googleapis.com/auth/chat.spaces.readonly', + 'https://www.googleapis.com/auth/chat.users.readstate', + 'https://www.googleapis.com/auth/chat.users.readstate.readonly', ]; private static function getClientDefaults() @@ -270,6 +282,23 @@ public static function spaceName(string $space): string ]); } + /** + * Formats a string containing the fully-qualified path to represent a + * space_read_state resource. + * + * @param string $user + * @param string $space + * + * @return string The formatted space_read_state resource. + */ + public static function spaceReadStateName(string $user, string $space): string + { + return self::getPathTemplate('spaceReadState')->render([ + 'user' => $user, + 'space' => $space, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a thread * resource. @@ -287,6 +316,25 @@ public static function threadName(string $space, string $thread): string ]); } + /** + * Formats a string containing the fully-qualified path to represent a + * thread_read_state resource. + * + * @param string $user + * @param string $space + * @param string $thread + * + * @return string The formatted thread_read_state resource. + */ + public static function threadReadStateName(string $user, string $space, string $thread): string + { + return self::getPathTemplate('threadReadState')->render([ + 'user' => $user, + 'space' => $space, + 'thread' => $thread, + ]); + } + /** * Parses a formatted name string and returns an associative array of the components in the name. * The following name formats are supported: @@ -297,7 +345,9 @@ public static function threadName(string $space, string $thread): string * - quotedMessageMetadata: spaces/{space}/messages/{message}/quotedMessageMetadata/{quoted_message_metadata} * - reaction: spaces/{space}/messages/{message}/reactions/{reaction} * - space: spaces/{space} + * - spaceReadState: users/{user}/spaces/{space}/spaceReadState * - thread: spaces/{space}/threads/{thread} + * - threadReadState: users/{user}/spaces/{space}/threads/{thread}/threadReadState * * The optional $template argument can be supplied to specify a particular pattern, * and must match one of the templates listed above. If no $template argument is @@ -886,6 +936,66 @@ public function getSpace(GetSpaceRequest $request, array $callOptions = []): Spa return $this->startApiCall('GetSpace', $request, $callOptions)->wait(); } + /** + * Returns details about a user's read state within a space, used to identify + * read and unread messages. + * + * Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + * + * The async variant is {@see ChatServiceClient::getSpaceReadStateAsync()} . + * + * @example samples/V1/ChatServiceClient/get_space_read_state.php + * + * @param GetSpaceReadStateRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return SpaceReadState + * + * @throws ApiException Thrown if the API call fails. + */ + public function getSpaceReadState(GetSpaceReadStateRequest $request, array $callOptions = []): SpaceReadState + { + return $this->startApiCall('GetSpaceReadState', $request, $callOptions)->wait(); + } + + /** + * Returns details about a user's read state within a thread, used to identify + * read and unread messages. + * + * Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + * + * The async variant is {@see ChatServiceClient::getThreadReadStateAsync()} . + * + * @example samples/V1/ChatServiceClient/get_thread_read_state.php + * + * @param GetThreadReadStateRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ThreadReadState + * + * @throws ApiException Thrown if the API call fails. + */ + public function getThreadReadState(GetThreadReadStateRequest $request, array $callOptions = []): ThreadReadState + { + return $this->startApiCall('GetThreadReadState', $request, $callOptions)->wait(); + } + /** * Lists memberships in a space. For an example, see [List users and Google * Chat apps in a @@ -1096,6 +1206,33 @@ public function setUpSpace(SetUpSpaceRequest $request, array $callOptions = []): return $this->startApiCall('SetUpSpace', $request, $callOptions)->wait(); } + /** + * Updates a membership. Requires [user + * authentication](https://developers.google.com/chat/api/guides/auth/users). + * + * The async variant is {@see ChatServiceClient::updateMembershipAsync()} . + * + * @example samples/V1/ChatServiceClient/update_membership.php + * + * @param UpdateMembershipRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Membership + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateMembership(UpdateMembershipRequest $request, array $callOptions = []): Membership + { + return $this->startApiCall('UpdateMembership', $request, $callOptions)->wait(); + } + /** * Updates a message. There's a difference between the `patch` and `update` * methods. The `patch` @@ -1172,6 +1309,36 @@ public function updateSpace(UpdateSpaceRequest $request, array $callOptions = [] return $this->startApiCall('UpdateSpace', $request, $callOptions)->wait(); } + /** + * Updates a user's read state within a space, used to identify read and + * unread messages. + * + * Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + * + * The async variant is {@see ChatServiceClient::updateSpaceReadStateAsync()} . + * + * @example samples/V1/ChatServiceClient/update_space_read_state.php + * + * @param UpdateSpaceReadStateRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return SpaceReadState + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateSpaceReadState(UpdateSpaceReadStateRequest $request, array $callOptions = []): SpaceReadState + { + return $this->startApiCall('UpdateSpaceReadState', $request, $callOptions)->wait(); + } + /** * Uploads an attachment. For an example, see * [Upload media as a file diff --git a/AppsChat/src/Chat/V1/GetSpaceReadStateRequest.php b/AppsChat/src/Chat/V1/GetSpaceReadStateRequest.php new file mode 100644 index 000000000000..388b0ec0c154 --- /dev/null +++ b/AppsChat/src/Chat/V1/GetSpaceReadStateRequest.php @@ -0,0 +1,127 @@ +google.chat.v1.GetSpaceReadStateRequest + */ +class GetSpaceReadStateRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the space read state to retrieve. + * Only supports getting read state for the calling user. + * To refer to the calling user, set one of the following: + * - The `me` alias. For example, `users/me/spaces/{space}/spaceReadState`. + * - Their Workspace email address. For example, + * `users/user@example.com/spaces/{space}/spaceReadState`. + * - Their user id. For example, + * `users/123456789/spaces/{space}/spaceReadState`. + * Format: users/{user}/spaces/{space}/spaceReadState + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Resource name of the space read state to retrieve. + * + * Only supports getting read state for the calling user. + * + * To refer to the calling user, set one of the following: + * + * - The `me` alias. For example, `users/me/spaces/{space}/spaceReadState`. + * + * - Their Workspace email address. For example, + * `users/user@example.com/spaces/{space}/spaceReadState`. + * + * - Their user id. For example, + * `users/123456789/spaces/{space}/spaceReadState`. + * + * Format: users/{user}/spaces/{space}/spaceReadState + * Please see {@see ChatServiceClient::spaceReadStateName()} for help formatting this field. + * + * @return \Google\Apps\Chat\V1\GetSpaceReadStateRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Resource name of the space read state to retrieve. + * Only supports getting read state for the calling user. + * To refer to the calling user, set one of the following: + * - The `me` alias. For example, `users/me/spaces/{space}/spaceReadState`. + * - Their Workspace email address. For example, + * `users/user@example.com/spaces/{space}/spaceReadState`. + * - Their user id. For example, + * `users/123456789/spaces/{space}/spaceReadState`. + * Format: users/{user}/spaces/{space}/spaceReadState + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\SpaceReadState::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the space read state to retrieve. + * Only supports getting read state for the calling user. + * To refer to the calling user, set one of the following: + * - The `me` alias. For example, `users/me/spaces/{space}/spaceReadState`. + * - Their Workspace email address. For example, + * `users/user@example.com/spaces/{space}/spaceReadState`. + * - Their user id. For example, + * `users/123456789/spaces/{space}/spaceReadState`. + * Format: users/{user}/spaces/{space}/spaceReadState + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Resource name of the space read state to retrieve. + * Only supports getting read state for the calling user. + * To refer to the calling user, set one of the following: + * - The `me` alias. For example, `users/me/spaces/{space}/spaceReadState`. + * - Their Workspace email address. For example, + * `users/user@example.com/spaces/{space}/spaceReadState`. + * - Their user id. For example, + * `users/123456789/spaces/{space}/spaceReadState`. + * Format: users/{user}/spaces/{space}/spaceReadState + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Chat/V1/GetThreadReadStateRequest.php b/AppsChat/src/Chat/V1/GetThreadReadStateRequest.php new file mode 100644 index 000000000000..66ef60d6afb3 --- /dev/null +++ b/AppsChat/src/Chat/V1/GetThreadReadStateRequest.php @@ -0,0 +1,132 @@ +google.chat.v1.GetThreadReadStateRequest + */ +class GetThreadReadStateRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the thread read state to retrieve. + * Only supports getting read state for the calling user. + * To refer to the calling user, set one of the following: + * - The `me` alias. For example, + * `users/me/spaces/{space}/threads/{thread}/threadReadState`. + * - Their Workspace email address. For example, + * `users/user@example.com/spaces/{space}/threads/{thread}/threadReadState`. + * - Their user id. For example, + * `users/123456789/spaces/{space}/threads/{thread}/threadReadState`. + * Format: users/{user}/spaces/{space}/threads/{thread}/threadReadState + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Resource name of the thread read state to retrieve. + * + * Only supports getting read state for the calling user. + * + * To refer to the calling user, set one of the following: + * + * - The `me` alias. For example, + * `users/me/spaces/{space}/threads/{thread}/threadReadState`. + * + * - Their Workspace email address. For example, + * `users/user@example.com/spaces/{space}/threads/{thread}/threadReadState`. + * + * - Their user id. For example, + * `users/123456789/spaces/{space}/threads/{thread}/threadReadState`. + * + * Format: users/{user}/spaces/{space}/threads/{thread}/threadReadState + * Please see {@see ChatServiceClient::threadReadStateName()} for help formatting this field. + * + * @return \Google\Apps\Chat\V1\GetThreadReadStateRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Resource name of the thread read state to retrieve. + * Only supports getting read state for the calling user. + * To refer to the calling user, set one of the following: + * - The `me` alias. For example, + * `users/me/spaces/{space}/threads/{thread}/threadReadState`. + * - Their Workspace email address. For example, + * `users/user@example.com/spaces/{space}/threads/{thread}/threadReadState`. + * - Their user id. For example, + * `users/123456789/spaces/{space}/threads/{thread}/threadReadState`. + * Format: users/{user}/spaces/{space}/threads/{thread}/threadReadState + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\ThreadReadState::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the thread read state to retrieve. + * Only supports getting read state for the calling user. + * To refer to the calling user, set one of the following: + * - The `me` alias. For example, + * `users/me/spaces/{space}/threads/{thread}/threadReadState`. + * - Their Workspace email address. For example, + * `users/user@example.com/spaces/{space}/threads/{thread}/threadReadState`. + * - Their user id. For example, + * `users/123456789/spaces/{space}/threads/{thread}/threadReadState`. + * Format: users/{user}/spaces/{space}/threads/{thread}/threadReadState + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Resource name of the thread read state to retrieve. + * Only supports getting read state for the calling user. + * To refer to the calling user, set one of the following: + * - The `me` alias. For example, + * `users/me/spaces/{space}/threads/{thread}/threadReadState`. + * - Their Workspace email address. For example, + * `users/user@example.com/spaces/{space}/threads/{thread}/threadReadState`. + * - Their user id. For example, + * `users/123456789/spaces/{space}/threads/{thread}/threadReadState`. + * Format: users/{user}/spaces/{space}/threads/{thread}/threadReadState + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Chat/V1/Membership.php b/AppsChat/src/Chat/V1/Membership.php index 4361e9ab1970..b588dfd08aa5 100644 --- a/AppsChat/src/Chat/V1/Membership.php +++ b/AppsChat/src/Chat/V1/Membership.php @@ -32,7 +32,6 @@ class Membership extends \Google\Protobuf\Internal\Message /** * Optional. User's role within a Chat space, which determines their permitted * actions in the space. - * [Developer Preview](https://developers.google.com/workspace/preview): * This field can only be used as input in `UpdateMembership`. * * Generated from protobuf field .google.chat.v1.Membership.MembershipRole role = 7 [(.google.api.field_behavior) = OPTIONAL]; @@ -70,7 +69,6 @@ class Membership extends \Google\Protobuf\Internal\Message * @type int $role * Optional. User's role within a Chat space, which determines their permitted * actions in the space. - * [Developer Preview](https://developers.google.com/workspace/preview): * This field can only be used as input in `UpdateMembership`. * @type \Google\Apps\Chat\V1\User $member * The Google Chat user or app the membership corresponds to. @@ -155,7 +153,6 @@ public function setState($var) /** * Optional. User's role within a Chat space, which determines their permitted * actions in the space. - * [Developer Preview](https://developers.google.com/workspace/preview): * This field can only be used as input in `UpdateMembership`. * * Generated from protobuf field .google.chat.v1.Membership.MembershipRole role = 7 [(.google.api.field_behavior) = OPTIONAL]; @@ -169,7 +166,6 @@ public function getRole() /** * Optional. User's role within a Chat space, which determines their permitted * actions in the space. - * [Developer Preview](https://developers.google.com/workspace/preview): * This field can only be used as input in `UpdateMembership`. * * Generated from protobuf field .google.chat.v1.Membership.MembershipRole role = 7 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/AppsChat/src/Chat/V1/SpaceReadState.php b/AppsChat/src/Chat/V1/SpaceReadState.php new file mode 100644 index 000000000000..c50b92718f4c --- /dev/null +++ b/AppsChat/src/Chat/V1/SpaceReadState.php @@ -0,0 +1,124 @@ +google.chat.v1.SpaceReadState + */ +class SpaceReadState extends \Google\Protobuf\Internal\Message +{ + /** + * Resource name of the space read state. + * Format: `users/{user}/spaces/{space}/spaceReadState` + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Optional. The time when the user's space read state was updated. Usually + * this corresponds with either the timestamp of the last read message, or a + * timestamp specified by the user to mark the last read position in a space. + * + * Generated from protobuf field .google.protobuf.Timestamp last_read_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $last_read_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Resource name of the space read state. + * Format: `users/{user}/spaces/{space}/spaceReadState` + * @type \Google\Protobuf\Timestamp $last_read_time + * Optional. The time when the user's space read state was updated. Usually + * this corresponds with either the timestamp of the last read message, or a + * timestamp specified by the user to mark the last read position in a space. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\SpaceReadState::initOnce(); + parent::__construct($data); + } + + /** + * Resource name of the space read state. + * Format: `users/{user}/spaces/{space}/spaceReadState` + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Resource name of the space read state. + * Format: `users/{user}/spaces/{space}/spaceReadState` + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. The time when the user's space read state was updated. Usually + * this corresponds with either the timestamp of the last read message, or a + * timestamp specified by the user to mark the last read position in a space. + * + * Generated from protobuf field .google.protobuf.Timestamp last_read_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastReadTime() + { + return $this->last_read_time; + } + + public function hasLastReadTime() + { + return isset($this->last_read_time); + } + + public function clearLastReadTime() + { + unset($this->last_read_time); + } + + /** + * Optional. The time when the user's space read state was updated. Usually + * this corresponds with either the timestamp of the last read message, or a + * timestamp specified by the user to mark the last read position in a space. + * + * Generated from protobuf field .google.protobuf.Timestamp last_read_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_read_time = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Chat/V1/ThreadReadState.php b/AppsChat/src/Chat/V1/ThreadReadState.php new file mode 100644 index 000000000000..5605873dfdea --- /dev/null +++ b/AppsChat/src/Chat/V1/ThreadReadState.php @@ -0,0 +1,120 @@ +google.chat.v1.ThreadReadState + */ +class ThreadReadState extends \Google\Protobuf\Internal\Message +{ + /** + * Resource name of the thread read state. + * Format: `users/{user}/spaces/{space}/threads/{thread}/threadReadState` + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The time when the user's thread read state was updated. Usually this + * corresponds with the timestamp of the last read message in a thread. + * + * Generated from protobuf field .google.protobuf.Timestamp last_read_time = 2; + */ + protected $last_read_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Resource name of the thread read state. + * Format: `users/{user}/spaces/{space}/threads/{thread}/threadReadState` + * @type \Google\Protobuf\Timestamp $last_read_time + * The time when the user's thread read state was updated. Usually this + * corresponds with the timestamp of the last read message in a thread. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\ThreadReadState::initOnce(); + parent::__construct($data); + } + + /** + * Resource name of the thread read state. + * Format: `users/{user}/spaces/{space}/threads/{thread}/threadReadState` + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Resource name of the thread read state. + * Format: `users/{user}/spaces/{space}/threads/{thread}/threadReadState` + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The time when the user's thread read state was updated. Usually this + * corresponds with the timestamp of the last read message in a thread. + * + * Generated from protobuf field .google.protobuf.Timestamp last_read_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastReadTime() + { + return $this->last_read_time; + } + + public function hasLastReadTime() + { + return isset($this->last_read_time); + } + + public function clearLastReadTime() + { + unset($this->last_read_time); + } + + /** + * The time when the user's thread read state was updated. Usually this + * corresponds with the timestamp of the last read message in a thread. + * + * Generated from protobuf field .google.protobuf.Timestamp last_read_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_read_time = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Chat/V1/UpdateMembershipRequest.php b/AppsChat/src/Chat/V1/UpdateMembershipRequest.php new file mode 100644 index 000000000000..b9dba2305c9b --- /dev/null +++ b/AppsChat/src/Chat/V1/UpdateMembershipRequest.php @@ -0,0 +1,158 @@ +google.chat.v1.UpdateMembershipRequest + */ +class UpdateMembershipRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The membership to update. Only fields specified by `update_mask` + * are updated. + * + * Generated from protobuf field .google.chat.v1.Membership membership = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $membership = null; + /** + * Required. The field paths to update. Separate multiple values with commas + * or use `*` to update all field paths. + * Currently supported field paths: + * - `role` + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * @param \Google\Apps\Chat\V1\Membership $membership Required. The membership to update. Only fields specified by `update_mask` + * are updated. + * @param \Google\Protobuf\FieldMask $updateMask Required. The field paths to update. Separate multiple values with commas + * or use `*` to update all field paths. + * + * Currently supported field paths: + * + * - `role` + * + * @return \Google\Apps\Chat\V1\UpdateMembershipRequest + * + * @experimental + */ + public static function build(\Google\Apps\Chat\V1\Membership $membership, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setMembership($membership) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Chat\V1\Membership $membership + * Required. The membership to update. Only fields specified by `update_mask` + * are updated. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The field paths to update. Separate multiple values with commas + * or use `*` to update all field paths. + * Currently supported field paths: + * - `role` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Membership::initOnce(); + parent::__construct($data); + } + + /** + * Required. The membership to update. Only fields specified by `update_mask` + * are updated. + * + * Generated from protobuf field .google.chat.v1.Membership membership = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Apps\Chat\V1\Membership|null + */ + public function getMembership() + { + return $this->membership; + } + + public function hasMembership() + { + return isset($this->membership); + } + + public function clearMembership() + { + unset($this->membership); + } + + /** + * Required. The membership to update. Only fields specified by `update_mask` + * are updated. + * + * Generated from protobuf field .google.chat.v1.Membership membership = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Apps\Chat\V1\Membership $var + * @return $this + */ + public function setMembership($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Membership::class); + $this->membership = $var; + + return $this; + } + + /** + * Required. The field paths to update. Separate multiple values with commas + * or use `*` to update all field paths. + * Currently supported field paths: + * - `role` + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. The field paths to update. Separate multiple values with commas + * or use `*` to update all field paths. + * Currently supported field paths: + * - `role` + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Chat/V1/UpdateSpaceReadStateRequest.php b/AppsChat/src/Chat/V1/UpdateSpaceReadStateRequest.php new file mode 100644 index 000000000000..ca8c1da1bda2 --- /dev/null +++ b/AppsChat/src/Chat/V1/UpdateSpaceReadStateRequest.php @@ -0,0 +1,230 @@ +google.chat.v1.UpdateSpaceReadStateRequest + */ +class UpdateSpaceReadStateRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The space read state and fields to update. + * Only supports updating read state for the calling user. + * To refer to the calling user, set one of the following: + * - The `me` alias. For example, `users/me/spaces/{space}/spaceReadState`. + * - Their Workspace email address. For example, + * `users/user@example.com/spaces/{space}/spaceReadState`. + * - Their user id. For example, + * `users/123456789/spaces/{space}/spaceReadState`. + * Format: users/{user}/spaces/{space}/spaceReadState + * + * Generated from protobuf field .google.chat.v1.SpaceReadState space_read_state = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $space_read_state = null; + /** + * Required. The field paths to update. Currently supported field paths: + * - `last_read_time` + * When the `last_read_time` is before the latest message create time, the + * space appears as unread in the UI. + * To mark the space as read, set `last_read_time` to any value later (larger) + * than the latest message create time. The `last_read_time` is coerced to + * match the latest message create time. Note that the space read state only + * affects the read state of messages that are visible in the space's + * top-level conversation. Replies in threads are unaffected by this + * timestamp, and instead rely on the thread read state. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * @param \Google\Apps\Chat\V1\SpaceReadState $spaceReadState Required. The space read state and fields to update. + * + * Only supports updating read state for the calling user. + * + * To refer to the calling user, set one of the following: + * + * - The `me` alias. For example, `users/me/spaces/{space}/spaceReadState`. + * + * - Their Workspace email address. For example, + * `users/user@example.com/spaces/{space}/spaceReadState`. + * + * - Their user id. For example, + * `users/123456789/spaces/{space}/spaceReadState`. + * + * Format: users/{user}/spaces/{space}/spaceReadState + * @param \Google\Protobuf\FieldMask $updateMask Required. The field paths to update. Currently supported field paths: + * + * - `last_read_time` + * + * When the `last_read_time` is before the latest message create time, the + * space appears as unread in the UI. + * + * To mark the space as read, set `last_read_time` to any value later (larger) + * than the latest message create time. The `last_read_time` is coerced to + * match the latest message create time. Note that the space read state only + * affects the read state of messages that are visible in the space's + * top-level conversation. Replies in threads are unaffected by this + * timestamp, and instead rely on the thread read state. + * + * @return \Google\Apps\Chat\V1\UpdateSpaceReadStateRequest + * + * @experimental + */ + public static function build(\Google\Apps\Chat\V1\SpaceReadState $spaceReadState, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setSpaceReadState($spaceReadState) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Chat\V1\SpaceReadState $space_read_state + * Required. The space read state and fields to update. + * Only supports updating read state for the calling user. + * To refer to the calling user, set one of the following: + * - The `me` alias. For example, `users/me/spaces/{space}/spaceReadState`. + * - Their Workspace email address. For example, + * `users/user@example.com/spaces/{space}/spaceReadState`. + * - Their user id. For example, + * `users/123456789/spaces/{space}/spaceReadState`. + * Format: users/{user}/spaces/{space}/spaceReadState + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The field paths to update. Currently supported field paths: + * - `last_read_time` + * When the `last_read_time` is before the latest message create time, the + * space appears as unread in the UI. + * To mark the space as read, set `last_read_time` to any value later (larger) + * than the latest message create time. The `last_read_time` is coerced to + * match the latest message create time. Note that the space read state only + * affects the read state of messages that are visible in the space's + * top-level conversation. Replies in threads are unaffected by this + * timestamp, and instead rely on the thread read state. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\SpaceReadState::initOnce(); + parent::__construct($data); + } + + /** + * Required. The space read state and fields to update. + * Only supports updating read state for the calling user. + * To refer to the calling user, set one of the following: + * - The `me` alias. For example, `users/me/spaces/{space}/spaceReadState`. + * - Their Workspace email address. For example, + * `users/user@example.com/spaces/{space}/spaceReadState`. + * - Their user id. For example, + * `users/123456789/spaces/{space}/spaceReadState`. + * Format: users/{user}/spaces/{space}/spaceReadState + * + * Generated from protobuf field .google.chat.v1.SpaceReadState space_read_state = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Apps\Chat\V1\SpaceReadState|null + */ + public function getSpaceReadState() + { + return $this->space_read_state; + } + + public function hasSpaceReadState() + { + return isset($this->space_read_state); + } + + public function clearSpaceReadState() + { + unset($this->space_read_state); + } + + /** + * Required. The space read state and fields to update. + * Only supports updating read state for the calling user. + * To refer to the calling user, set one of the following: + * - The `me` alias. For example, `users/me/spaces/{space}/spaceReadState`. + * - Their Workspace email address. For example, + * `users/user@example.com/spaces/{space}/spaceReadState`. + * - Their user id. For example, + * `users/123456789/spaces/{space}/spaceReadState`. + * Format: users/{user}/spaces/{space}/spaceReadState + * + * Generated from protobuf field .google.chat.v1.SpaceReadState space_read_state = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Apps\Chat\V1\SpaceReadState $var + * @return $this + */ + public function setSpaceReadState($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\SpaceReadState::class); + $this->space_read_state = $var; + + return $this; + } + + /** + * Required. The field paths to update. Currently supported field paths: + * - `last_read_time` + * When the `last_read_time` is before the latest message create time, the + * space appears as unread in the UI. + * To mark the space as read, set `last_read_time` to any value later (larger) + * than the latest message create time. The `last_read_time` is coerced to + * match the latest message create time. Note that the space read state only + * affects the read state of messages that are visible in the space's + * top-level conversation. Replies in threads are unaffected by this + * timestamp, and instead rely on the thread read state. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. The field paths to update. Currently supported field paths: + * - `last_read_time` + * When the `last_read_time` is before the latest message create time, the + * space appears as unread in the UI. + * To mark the space as read, set `last_read_time` to any value later (larger) + * than the latest message create time. The `last_read_time` is coerced to + * match the latest message create time. Note that the space read state only + * affects the read state of messages that are visible in the space's + * top-level conversation. Replies in threads are unaffected by this + * timestamp, and instead rely on the thread read state. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Chat/V1/gapic_metadata.json b/AppsChat/src/Chat/V1/gapic_metadata.json index 8d2fed5a4092..d94cea6ab2e5 100644 --- a/AppsChat/src/Chat/V1/gapic_metadata.json +++ b/AppsChat/src/Chat/V1/gapic_metadata.json @@ -80,6 +80,16 @@ "getSpace" ] }, + "GetSpaceReadState": { + "methods": [ + "getSpaceReadState" + ] + }, + "GetThreadReadState": { + "methods": [ + "getThreadReadState" + ] + }, "ListMemberships": { "methods": [ "listMemberships" @@ -105,6 +115,11 @@ "setUpSpace" ] }, + "UpdateMembership": { + "methods": [ + "updateMembership" + ] + }, "UpdateMessage": { "methods": [ "updateMessage" @@ -115,6 +130,11 @@ "updateSpace" ] }, + "UpdateSpaceReadState": { + "methods": [ + "updateSpaceReadState" + ] + }, "UploadAttachment": { "methods": [ "uploadAttachment" diff --git a/AppsChat/src/Chat/V1/resources/chat_service_client_config.json b/AppsChat/src/Chat/V1/resources/chat_service_client_config.json index dfc25d11fb1d..f1134ba2ce70 100644 --- a/AppsChat/src/Chat/V1/resources/chat_service_client_config.json +++ b/AppsChat/src/Chat/V1/resources/chat_service_client_config.json @@ -98,6 +98,16 @@ "retry_codes_name": "retry_policy_1_codes", "retry_params_name": "retry_policy_1_params" }, + "GetSpaceReadState": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetThreadReadState": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, "ListMemberships": { "timeout_millis": 30000, "retry_codes_name": "retry_policy_1_codes", @@ -123,6 +133,11 @@ "retry_codes_name": "retry_policy_1_codes", "retry_params_name": "retry_policy_1_params" }, + "UpdateMembership": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, "UpdateMessage": { "timeout_millis": 30000, "retry_codes_name": "retry_policy_1_codes", @@ -133,6 +148,11 @@ "retry_codes_name": "retry_policy_1_codes", "retry_params_name": "retry_policy_1_params" }, + "UpdateSpaceReadState": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, "UploadAttachment": { "timeout_millis": 30000, "retry_codes_name": "retry_policy_1_codes", diff --git a/AppsChat/src/Chat/V1/resources/chat_service_descriptor_config.php b/AppsChat/src/Chat/V1/resources/chat_service_descriptor_config.php index 9e77fdd75081..daa891eb9118 100644 --- a/AppsChat/src/Chat/V1/resources/chat_service_descriptor_config.php +++ b/AppsChat/src/Chat/V1/resources/chat_service_descriptor_config.php @@ -175,6 +175,30 @@ ], ], ], + 'GetSpaceReadState' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Apps\Chat\V1\SpaceReadState', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetThreadReadState' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Apps\Chat\V1\ThreadReadState', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], 'ListMemberships' => [ 'pageStreaming' => [ 'requestPageTokenGetMethod' => 'getPageToken', @@ -251,6 +275,19 @@ 'callType' => \Google\ApiCore\Call::UNARY_CALL, 'responseType' => 'Google\Apps\Chat\V1\Space', ], + 'UpdateMembership' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Apps\Chat\V1\Membership', + 'headerParams' => [ + [ + 'keyName' => 'membership.name', + 'fieldAccessors' => [ + 'getMembership', + 'getName', + ], + ], + ], + ], 'UpdateMessage' => [ 'callType' => \Google\ApiCore\Call::UNARY_CALL, 'responseType' => 'Google\Apps\Chat\V1\Message', @@ -277,6 +314,19 @@ ], ], ], + 'UpdateSpaceReadState' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Apps\Chat\V1\SpaceReadState', + 'headerParams' => [ + [ + 'keyName' => 'space_read_state.name', + 'fieldAccessors' => [ + 'getSpaceReadState', + 'getName', + ], + ], + ], + ], 'UploadAttachment' => [ 'callType' => \Google\ApiCore\Call::UNARY_CALL, 'responseType' => 'Google\Apps\Chat\V1\UploadAttachmentResponse', @@ -296,7 +346,9 @@ 'quotedMessageMetadata' => 'spaces/{space}/messages/{message}/quotedMessageMetadata/{quoted_message_metadata}', 'reaction' => 'spaces/{space}/messages/{message}/reactions/{reaction}', 'space' => 'spaces/{space}', + 'spaceReadState' => 'users/{user}/spaces/{space}/spaceReadState', 'thread' => 'spaces/{space}/threads/{thread}', + 'threadReadState' => 'users/{user}/spaces/{space}/threads/{thread}/threadReadState', ], ], ], diff --git a/AppsChat/src/Chat/V1/resources/chat_service_rest_client_config.php b/AppsChat/src/Chat/V1/resources/chat_service_rest_client_config.php index 591234af557b..a4fdec701035 100644 --- a/AppsChat/src/Chat/V1/resources/chat_service_rest_client_config.php +++ b/AppsChat/src/Chat/V1/resources/chat_service_rest_client_config.php @@ -168,6 +168,28 @@ ], ], ], + 'GetSpaceReadState' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=users/*/spaces/*/spaceReadState}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetThreadReadState' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=users/*/spaces/*/threads/*/threadReadState}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], 'ListMemberships' => [ 'method' => 'get', 'uriTemplate' => '/v1/{parent=spaces/*}/members', @@ -210,6 +232,22 @@ 'uriTemplate' => '/v1/spaces:setup', 'body' => '*', ], + 'UpdateMembership' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{membership.name=spaces/*/members/*}', + 'body' => 'membership', + 'placeholders' => [ + 'membership.name' => [ + 'getters' => [ + 'getMembership', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], 'UpdateMessage' => [ 'method' => 'put', 'uriTemplate' => '/v1/{message.name=spaces/*/messages/*}', @@ -243,6 +281,22 @@ ], ], ], + 'UpdateSpaceReadState' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{space_read_state.name=users/*/spaces/*/spaceReadState}', + 'body' => 'space_read_state', + 'placeholders' => [ + 'space_read_state.name' => [ + 'getters' => [ + 'getSpaceReadState', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], 'UploadAttachment' => [ 'method' => 'post', 'uriTemplate' => '/v1/{parent=spaces/*}/attachments:upload', diff --git a/AppsChat/tests/Unit/V1/Client/ChatServiceClientTest.php b/AppsChat/tests/Unit/V1/Client/ChatServiceClientTest.php index 39b216d86be8..b85a6671b62d 100644 --- a/AppsChat/tests/Unit/V1/Client/ChatServiceClientTest.php +++ b/AppsChat/tests/Unit/V1/Client/ChatServiceClientTest.php @@ -42,7 +42,9 @@ use Google\Apps\Chat\V1\GetAttachmentRequest; use Google\Apps\Chat\V1\GetMembershipRequest; use Google\Apps\Chat\V1\GetMessageRequest; +use Google\Apps\Chat\V1\GetSpaceReadStateRequest; use Google\Apps\Chat\V1\GetSpaceRequest; +use Google\Apps\Chat\V1\GetThreadReadStateRequest; use Google\Apps\Chat\V1\ListMembershipsRequest; use Google\Apps\Chat\V1\ListMembershipsResponse; use Google\Apps\Chat\V1\ListMessagesRequest; @@ -56,10 +58,15 @@ use Google\Apps\Chat\V1\Reaction; use Google\Apps\Chat\V1\SetUpSpaceRequest; use Google\Apps\Chat\V1\Space; +use Google\Apps\Chat\V1\SpaceReadState; +use Google\Apps\Chat\V1\ThreadReadState; +use Google\Apps\Chat\V1\UpdateMembershipRequest; use Google\Apps\Chat\V1\UpdateMessageRequest; +use Google\Apps\Chat\V1\UpdateSpaceReadStateRequest; use Google\Apps\Chat\V1\UpdateSpaceRequest; use Google\Apps\Chat\V1\UploadAttachmentRequest; use Google\Apps\Chat\V1\UploadAttachmentResponse; +use Google\Protobuf\FieldMask; use Google\Protobuf\GPBEmpty; use Google\Rpc\Code; use stdClass; @@ -1073,6 +1080,136 @@ public function getSpaceExceptionTest() $this->assertTrue($transport->isExhausted()); } + /** @test */ + public function getSpaceReadStateTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new SpaceReadState(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->spaceReadStateName('[USER]', '[SPACE]'); + $request = (new GetSpaceReadStateRequest())->setName($formattedName); + $response = $gapicClient->getSpaceReadState($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.chat.v1.ChatService/GetSpaceReadState', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSpaceReadStateExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->spaceReadStateName('[USER]', '[SPACE]'); + $request = (new GetSpaceReadStateRequest())->setName($formattedName); + try { + $gapicClient->getSpaceReadState($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getThreadReadStateTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new ThreadReadState(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->threadReadStateName('[USER]', '[SPACE]', '[THREAD]'); + $request = (new GetThreadReadStateRequest())->setName($formattedName); + $response = $gapicClient->getThreadReadState($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.chat.v1.ChatService/GetThreadReadState', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getThreadReadStateExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->threadReadStateName('[USER]', '[SPACE]', '[THREAD]'); + $request = (new GetThreadReadStateRequest())->setName($formattedName); + try { + $gapicClient->getThreadReadState($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + /** @test */ public function listMembershipsTest() { @@ -1428,6 +1565,75 @@ public function setUpSpaceExceptionTest() $this->assertTrue($transport->isExhausted()); } + /** @test */ + public function updateMembershipTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new Membership(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $membership = new Membership(); + $updateMask = new FieldMask(); + $request = (new UpdateMembershipRequest())->setMembership($membership)->setUpdateMask($updateMask); + $response = $gapicClient->updateMembership($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.chat.v1.ChatService/UpdateMembership', $actualFuncCall); + $actualValue = $actualRequestObject->getMembership(); + $this->assertProtobufEquals($membership, $actualValue); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateMembershipExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $membership = new Membership(); + $updateMask = new FieldMask(); + $request = (new UpdateMembershipRequest())->setMembership($membership)->setUpdateMask($updateMask); + try { + $gapicClient->updateMembership($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + /** @test */ public function updateMessageTest() { @@ -1582,6 +1788,75 @@ public function updateSpaceExceptionTest() $this->assertTrue($transport->isExhausted()); } + /** @test */ + public function updateSpaceReadStateTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new SpaceReadState(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $spaceReadState = new SpaceReadState(); + $updateMask = new FieldMask(); + $request = (new UpdateSpaceReadStateRequest())->setSpaceReadState($spaceReadState)->setUpdateMask($updateMask); + $response = $gapicClient->updateSpaceReadState($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.chat.v1.ChatService/UpdateSpaceReadState', $actualFuncCall); + $actualValue = $actualRequestObject->getSpaceReadState(); + $this->assertProtobufEquals($spaceReadState, $actualValue); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateSpaceReadStateExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $spaceReadState = new SpaceReadState(); + $updateMask = new FieldMask(); + $request = (new UpdateSpaceReadStateRequest())->setSpaceReadState($spaceReadState)->setUpdateMask($updateMask); + try { + $gapicClient->updateSpaceReadState($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + /** @test */ public function uploadAttachmentTest() { diff --git a/AppsEventsSubscriptions/VERSION b/AppsEventsSubscriptions/VERSION index 6e8bf73aa550..17e51c385ea3 100644 --- a/AppsEventsSubscriptions/VERSION +++ b/AppsEventsSubscriptions/VERSION @@ -1 +1 @@ -0.1.0 +0.1.1 diff --git a/AppsMeet/VERSION b/AppsMeet/VERSION index 0ea3a944b399..0c62199f16ac 100644 --- a/AppsMeet/VERSION +++ b/AppsMeet/VERSION @@ -1 +1 @@ -0.2.0 +0.2.1 diff --git a/ArtifactRegistry/VERSION b/ArtifactRegistry/VERSION index b6160487433b..844f6a91acb9 100644 --- a/ArtifactRegistry/VERSION +++ b/ArtifactRegistry/VERSION @@ -1 +1 @@ -0.6.2 +0.6.3 diff --git a/Asset/VERSION b/Asset/VERSION index 15b989e398fc..41c11ffb730c 100644 --- a/Asset/VERSION +++ b/Asset/VERSION @@ -1 +1 @@ -1.16.0 +1.16.1 diff --git a/AssuredWorkloads/VERSION b/AssuredWorkloads/VERSION index bc859cbd6d99..1a96df19c09a 100644 --- a/AssuredWorkloads/VERSION +++ b/AssuredWorkloads/VERSION @@ -1 +1 @@ -0.11.2 +0.11.3 diff --git a/AutoMl/VERSION b/AutoMl/VERSION index fdd3be6df54a..266146b87cbc 100644 --- a/AutoMl/VERSION +++ b/AutoMl/VERSION @@ -1 +1 @@ -1.6.2 +1.6.3 diff --git a/BareMetalSolution/VERSION b/BareMetalSolution/VERSION index b6160487433b..844f6a91acb9 100644 --- a/BareMetalSolution/VERSION +++ b/BareMetalSolution/VERSION @@ -1 +1 @@ -0.6.2 +0.6.3 diff --git a/Batch/VERSION b/Batch/VERSION index 19270385eaf7..c3f65805f7b7 100644 --- a/Batch/VERSION +++ b/Batch/VERSION @@ -1 +1 @@ -0.16.5 +0.16.6 diff --git a/BeyondCorpAppConnections/VERSION b/BeyondCorpAppConnections/VERSION index 2b7c5ae01848..17b2ccd9bf90 100644 --- a/BeyondCorpAppConnections/VERSION +++ b/BeyondCorpAppConnections/VERSION @@ -1 +1 @@ -0.4.2 +0.4.3 diff --git a/BeyondCorpAppConnectors/VERSION b/BeyondCorpAppConnectors/VERSION index 2b7c5ae01848..17b2ccd9bf90 100644 --- a/BeyondCorpAppConnectors/VERSION +++ b/BeyondCorpAppConnectors/VERSION @@ -1 +1 @@ -0.4.2 +0.4.3 diff --git a/BeyondCorpAppGateways/VERSION b/BeyondCorpAppGateways/VERSION index 2b7c5ae01848..17b2ccd9bf90 100644 --- a/BeyondCorpAppGateways/VERSION +++ b/BeyondCorpAppGateways/VERSION @@ -1 +1 @@ -0.4.2 +0.4.3 diff --git a/BeyondCorpClientConnectorServices/VERSION b/BeyondCorpClientConnectorServices/VERSION index 2b7c5ae01848..17b2ccd9bf90 100644 --- a/BeyondCorpClientConnectorServices/VERSION +++ b/BeyondCorpClientConnectorServices/VERSION @@ -1 +1 @@ -0.4.2 +0.4.3 diff --git a/BeyondCorpClientGateways/VERSION b/BeyondCorpClientGateways/VERSION index 2b7c5ae01848..17b2ccd9bf90 100644 --- a/BeyondCorpClientGateways/VERSION +++ b/BeyondCorpClientGateways/VERSION @@ -1 +1 @@ -0.4.2 +0.4.3 diff --git a/BigQueryAnalyticsHub/VERSION b/BigQueryAnalyticsHub/VERSION index 8f0916f768f0..4b9fcbec101a 100644 --- a/BigQueryAnalyticsHub/VERSION +++ b/BigQueryAnalyticsHub/VERSION @@ -1 +1 @@ -0.5.0 +0.5.1 diff --git a/BigQueryConnection/VERSION b/BigQueryConnection/VERSION index 4cda8f19edc7..8af85beb5159 100644 --- a/BigQueryConnection/VERSION +++ b/BigQueryConnection/VERSION @@ -1 +1 @@ -1.5.2 +1.5.3 diff --git a/BigQueryDataExchange/VERSION b/BigQueryDataExchange/VERSION index 2b7c5ae01848..17b2ccd9bf90 100644 --- a/BigQueryDataExchange/VERSION +++ b/BigQueryDataExchange/VERSION @@ -1 +1 @@ -0.4.2 +0.4.3 diff --git a/BigQueryDataPolicies/VERSION b/BigQueryDataPolicies/VERSION index cb0c939a936f..be14282b7fff 100644 --- a/BigQueryDataPolicies/VERSION +++ b/BigQueryDataPolicies/VERSION @@ -1 +1 @@ -0.5.2 +0.5.3 diff --git a/BigQueryDataTransfer/VERSION b/BigQueryDataTransfer/VERSION index 53adb84c8220..a7ee35a3ea70 100644 --- a/BigQueryDataTransfer/VERSION +++ b/BigQueryDataTransfer/VERSION @@ -1 +1 @@ -1.8.2 +1.8.3 diff --git a/BigQueryMigration/VERSION b/BigQueryMigration/VERSION index 2b7c5ae01848..17b2ccd9bf90 100644 --- a/BigQueryMigration/VERSION +++ b/BigQueryMigration/VERSION @@ -1 +1 @@ -0.4.2 +0.4.3 diff --git a/BigQueryReservation/VERSION b/BigQueryReservation/VERSION index 1892b9267677..31e5c843497c 100644 --- a/BigQueryReservation/VERSION +++ b/BigQueryReservation/VERSION @@ -1 +1 @@ -1.3.2 +1.3.3 diff --git a/BigQueryStorage/VERSION b/BigQueryStorage/VERSION index 4dae2985b58c..5ad2491cf880 100644 --- a/BigQueryStorage/VERSION +++ b/BigQueryStorage/VERSION @@ -1 +1 @@ -1.10.1 +1.10.2 diff --git a/Billing/VERSION b/Billing/VERSION index d615fd0c04ab..158c74729336 100644 --- a/Billing/VERSION +++ b/Billing/VERSION @@ -1 +1 @@ -1.9.4 +1.9.5 diff --git a/BillingBudgets/VERSION b/BillingBudgets/VERSION index 9df886c42a1e..428b770e3e23 100644 --- a/BillingBudgets/VERSION +++ b/BillingBudgets/VERSION @@ -1 +1 @@ -1.4.2 +1.4.3 diff --git a/BinaryAuthorization/VERSION b/BinaryAuthorization/VERSION index b60d71966ae9..7ada0d303f3e 100644 --- a/BinaryAuthorization/VERSION +++ b/BinaryAuthorization/VERSION @@ -1 +1 @@ -0.8.4 +0.8.5 diff --git a/Build/VERSION b/Build/VERSION index 04a373efe6ba..2a0970ca757c 100644 --- a/Build/VERSION +++ b/Build/VERSION @@ -1 +1 @@ -0.16.0 +0.16.1 diff --git a/CHANGELOG.md b/CHANGELOG.md index c5ba1f2de3a5..751aceb2c074 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,1171 @@ # Changelog +## 0.243.0 + +
google/cloud-compute 1.16.2 + + + +
+ +
google/cloud-config 0.5.0 + + + +### Features + +* Annotations are now supported to help client tools identify deployments during automation ([0a27dbb](https://github.com/googleapis/google-cloud-php/commit/0a27dbbbda4ee70a6e65d6975066a407b071c62f)) +* Infrastructure manager supports 1.2.3, 1.3.10, 1.4.7, 1.5.7 versions of Terraform when creating a preview of a deployment ([#7251](https://github.com/googleapis/google-cloud-php/issues/7251)) ([0a27dbb](https://github.com/googleapis/google-cloud-php/commit/0a27dbbbda4ee70a6e65d6975066a407b071c62f)) + +
+ +
google/cloud-monitoring 1.10.1 + + + +### Bug Fixes + +* Defined class prefix of GMON for Objective C ([#7256](https://github.com/googleapis/google-cloud-php/issues/7256)) ([d120277](https://github.com/googleapis/google-cloud-php/commit/d12027711154292c14917c6ef76382fc7fca2dab)) + +
+ +
google/cloud-recaptcha-enterprise 1.12.0 + + + +### Features + +* Add Fraud Prevention settings field ([#7252](https://github.com/googleapis/google-cloud-php/issues/7252)) ([d65086e](https://github.com/googleapis/google-cloud-php/commit/d65086eea0e1b90f24f04d7085c5769679f75250)) + +
+ +
google/cloud-secret-manager 1.15.0 + + + +### Features + +* Add Secret Version Delayed Destroy changes for client libraries ([#7250](https://github.com/googleapis/google-cloud-php/issues/7250)) ([6744443](https://github.com/googleapis/google-cloud-php/commit/6744443c0689dd56d6b7882d7c444a1fc2f07179)) + + +### Documentation + +* Users can now enable secret version delayed destruction ([6744443](https://github.com/googleapis/google-cloud-php/commit/6744443c0689dd56d6b7882d7c444a1fc2f07179)) + +
+ +
google/cloud-spanner 1.76.0 + + + +### Features + +* Add `RESOURCE_EXHAUSTED` to the list of retryable error codes ([#7259](https://github.com/googleapis/google-cloud-php/issues/7259)) ([389ab2d](https://github.com/googleapis/google-cloud-php/commit/389ab2df8050901de3f8c6a29705a43307367416)) +* Improved latency for executeStreaminSql calls ([#7254](https://github.com/googleapis/google-cloud-php/issues/7254)) ([6d164d9](https://github.com/googleapis/google-cloud-php/commit/6d164d92ffd8160de15bb8bd73c43e78008c4aac)) + +
+ +
google/cloud-storage-control 0.1.0 + + + +### Features + +* Introduce StorageControl ([#7245](https://github.com/googleapis/google-cloud-php/issues/7245)) ([5cd4215](https://github.com/googleapis/google-cloud-php/commit/5cd4215e4c17b57081a2133882464225b962ac56)) + +
+ +## 0.242.0 + +
google/cloud-access-approval 1.2.3 + + + +
+ +
google/access-context-manager 0.5.3 + + + +
+ +
google/cloud-advisorynotifications 0.8.1 + + + +
+ +
google/cloud-ai-platform 0.37.1 + + + +
+ +
google/cloud-alloydb 0.10.1 + + + +
+ +
google/analytics-admin 0.22.3 + + + +
+ +
google/analytics-data 0.16.3 + + + +
+ +
google/cloud-api-gateway 1.3.3 + + + +
+ +
google/cloud-api-keys 0.4.3 + + + +
+ +
google/cloud-apigee-connect 1.2.3 + + + +
+ +
google/cloud-apigee-registry 0.5.3 + + + +
+ +
google/cloud-appengine-admin 1.3.3 + + + +
+ +
google/cloud-apphub 0.1.1 + + + +
+ +
google/apps-chat 0.1.0 + + + +### Features + +* Add Chat read state APIs ([#7246](https://github.com/googleapis/google-cloud-php/issues/7246)) ([ac1be59](https://github.com/googleapis/google-cloud-php/commit/ac1be59cb699fd99ff0783fe2029281b5659dc59)) +* Introduce AppsChat ([#7215](https://github.com/googleapis/google-cloud-php/issues/7215)) ([b0c6cc9](https://github.com/googleapis/google-cloud-php/commit/b0c6cc9f994ea9b5a0be3492efffbcf0171855f7)) + +
+ +
google/apps-events-subscriptions 0.1.1 + + + +
+ +
google/apps-meet 0.2.1 + + + +
+ +
google/cloud-artifact-registry 0.6.3 + + + +
+ +
google/cloud-asset 1.16.1 + + + +
+ +
google/cloud-assured-workloads 0.11.3 + + + +
+ +
google/cloud-automl 1.6.3 + + + +
+ +
google/cloud-bare-metal-solution 0.6.3 + + + +
+ +
google/cloud-batch 0.16.6 + + + +
+ +
google/cloud-beyondcorp-appconnections 0.4.3 + + + +
+ +
google/cloud-beyondcorp-appconnectors 0.4.3 + + + +
+ +
google/cloud-beyondcorp-appgateways 0.4.3 + + + +
+ +
google/cloud-beyondcorp-clientconnectorservices 0.4.3 + + + +
+ +
google/cloud-beyondcorp-clientgateways 0.4.3 + + + +
+ +
google/cloud-bigquery-analyticshub 0.5.1 + + + +
+ +
google/cloud-bigquery-connection 1.5.3 + + + +
+ +
google/cloud-bigquery-data-exchange 0.4.3 + + + +
+ +
google/cloud-bigquery-datapolicies 0.5.3 + + + +
+ +
google/cloud-bigquerydatatransfer 1.8.3 + + + +### Bug Fixes + +* Mark parent/name fields with the REQUIRED field_behavior annotation ([#7236](https://github.com/googleapis/google-cloud-php/issues/7236)) ([1c5846d](https://github.com/googleapis/google-cloud-php/commit/1c5846d9ae3ded5ca6fab3e637daba8a1254a72d)) + +
+ +
google/cloud-bigquery-migration 0.4.3 + + + +
+ +
google/cloud-bigquery-reservation 1.3.3 + + + +
+ +
google/cloud-bigquery-storage 1.10.2 + + + +
+ +
google/cloud-billing 1.9.5 + + + +
+ +
google/cloud-billing-budgets 1.4.3 + + + +
+ +
google/cloud-binary-authorization 0.8.5 + + + +
+ +
google/cloud-build 0.16.1 + + + +
+ +
google/cloud-certificate-manager 0.7.1 + + + +
+ +
google/cloud-channel 1.9.3 + + + +
+ +
google/cloud-commerce-consumer-procurement 0.2.3 + + + +
+ +
google/cloud-compute 1.16.1 + + + +
+ +
google/cloud-confidentialcomputing 0.8.1 + + + +
+ +
google/cloud-config 0.4.1 + + + +
+ +
google/cloud-contact-center-insights 1.9.3 + + + +
+ +
google/cloud-container 1.30.1 + + + +
+ +
google/cloud-container-analysis 0.5.5 + + + +
+ +
google/cloud-cloudcontrolspartner 0.1.1 + + + +
+ +
google/cloud-core 1.58.0 + + + +### Features + +* **logging:** Add trace to logging on cloud run ([#6764](https://github.com/googleapis/google-cloud-php/issues/6764)) ([2505ec3](https://github.com/googleapis/google-cloud-php/commit/2505ec330ef7cd0d255f5d35a146c3986f19002b)) + +
+ +
google/cloud-data-catalog 1.10.1 + + + +
+ +
google/cloud-datacatalog-lineage 0.5.3 + + + +
+ +
google/cloud-data-fusion 0.6.3 + + + +
+ +
google/cloud-datalabeling 0.5.3 + + + +
+ +
google/cloud-dataflow 0.6.2 + + + +
+ +
google/cloud-dataform 0.4.3 + + + +
+ +
google/cloud-dataplex 0.15.1 + + + +
+ +
google/cloud-dataproc 3.13.2 + + + +
+ +
google/cloud-dataproc-metastore 0.11.3 + + + +
+ +
google/cloud-datastore 1.28.1 + + + +
+ +
google/cloud-datastore-admin 0.8.3 + + + +
+ +
google/cloud-datastream 1.5.3 + + + +
+ +
google/cloud-debugger 1.8.5 + + + +
+ +
google/cloud-deploy 0.18.0 + + + +### Features + +* Add Skaffold remote config support for GCB repos ([#7248](https://github.com/googleapis/google-cloud-php/issues/7248)) ([297615a](https://github.com/googleapis/google-cloud-php/commit/297615a04871d366d425ede8a20a456f41d88bb9)) + + +### Documentation + +* Clarified related comments ([297615a](https://github.com/googleapis/google-cloud-php/commit/297615a04871d366d425ede8a20a456f41d88bb9)) + +
+ +
google/cloud-dialogflow 1.12.1 + + + +
+ +
google/cloud-dialogflow-cx 0.3.2 + + + +
+ +
google/cloud-discoveryengine 0.11.1 + + + +
+ +
google/cloud-dlp 1.13.1 + + + +
+ +
google/cloud-dms 1.5.3 + + + +
+ +
google/cloud-document-ai 1.12.0 + + + +### Features + +* A new field `foundation_model_tuning_options` is added to message `.google.cloud.documentai.v1.TrainProcessorVersionRequest` ([6bec4cc](https://github.com/googleapis/google-cloud-php/commit/6bec4ccb10adaca9d34aec67cc06bede58a8d04f)) +* A new message `FoundationModelTuningOptions` is added ([#7241](https://github.com/googleapis/google-cloud-php/issues/7241)) ([6bec4cc](https://github.com/googleapis/google-cloud-php/commit/6bec4ccb10adaca9d34aec67cc06bede58a8d04f)) + + +### Documentation + +* Updated comments ([6bec4cc](https://github.com/googleapis/google-cloud-php/commit/6bec4ccb10adaca9d34aec67cc06bede58a8d04f)) + +
+ +
google/cloud-domains 0.5.3 + + + +
+ +
google/cloud-edgenetwork 0.3.4 + + + +
+ +
google/cloud-error-reporting 0.22.4 + + + +
+ +
google/cloud-essential-contacts 0.4.3 + + + +
+ +
google/cloud-eventarc 1.3.3 + + + +
+ +
google/cloud-eventarc-publishing 0.6.2 + + + +
+ +
google/cloud-filestore 1.5.5 + + + +
+ +
google/cloud-firestore 1.43.1 + + + +
+ +
google/cloud-functions 1.6.3 + + + +
+ +
google/cloud-gsuite-addons 0.3.3 + + + +
+ +
google/cloud-gke-backup 0.7.1 + + + +
+ +
google/cloud-gke-connect-gateway 0.4.2 + + + +
+ +
google/cloud-gke-hub 0.9.3 + + + +
+ +
google/cloud-gke-multi-cloud 0.5.3 + + + +
+ +
google/grafeas 0.10.1 + + + +
+ +
google/cloud-iam 0.5.3 + + + +
+ +
google/cloud-iam-credentials 1.2.3 + + + +
+ +
google/cloud-iap 1.4.3 + + + +
+ +
google/cloud-ids 0.5.3 + + + +
+ +
google/cloud-iot 1.7.3 + + + +
+ +
google/cloud-kms 1.21.3 + + + +### Documentation + +* In google.cloud.kms.v1.PublicKey, pem field is always populated ([#7240](https://github.com/googleapis/google-cloud-php/issues/7240)) ([704630f](https://github.com/googleapis/google-cloud-php/commit/704630fe93226c27365679e3834450251f44e8dd)) + +
+ +
google/cloud-kms-inventory 0.4.3 + + + +
+ +
google/cloud-language 0.32.4 + + + +
+ +
google/cloud-life-sciences 0.6.3 + + + +
+ +
google/cloud-logging 1.30.0 + + + +### Features + +* **logging:** Add trace to logging on cloud run ([#6764](https://github.com/googleapis/google-cloud-php/issues/6764)) ([2505ec3](https://github.com/googleapis/google-cloud-php/commit/2505ec330ef7cd0d255f5d35a146c3986f19002b)) + +
+ +
google/longrunning 0.4.1 + + + +
+ +
google/cloud-managed-identities 1.3.3 + + + +
+ +
google/cloud-media-translation 0.4.2 + + + +
+ +
google/cloud-memcache 1.3.3 + + + +
+ +
google/cloud-migrationcenter 0.4.3 + + + +
+ +
google/cloud-monitoring 1.10.0 + + + +### Features + +* Added CloudRun, GkeNamespace, GkeWorkload, GkeService, and BasicService service types ([#7237](https://github.com/googleapis/google-cloud-php/issues/7237)) ([f80eb13](https://github.com/googleapis/google-cloud-php/commit/f80eb133b2c866dfc3d92637792ad2147164d523)) + + +### Documentation + +* Updated comments ([2060f2d](https://github.com/googleapis/google-cloud-php/commit/2060f2df4a4fc57d94d00acb274fcc2a9d75952c)) +* Updated comments accordingly ([f80eb13](https://github.com/googleapis/google-cloud-php/commit/f80eb133b2c866dfc3d92637792ad2147164d523)) +* Various updates ([2060f2d](https://github.com/googleapis/google-cloud-php/commit/2060f2df4a4fc57d94d00acb274fcc2a9d75952c)) + +
+ +
google/cloud-netapp 0.2.5 + + + +
+ +
google/cloud-network-connectivity 1.5.3 + + + +
+ +
google/cloud-network-management 1.7.1 + + + +
+ +
google/cloud-network-security 0.6.3 + + + +
+ +
google/cloud-notebooks 0.7.3 + + + +
+ +
google/cloud-optimization 0.6.3 + + + +
+ +
google/cloud-orchestration-airflow 1.6.2 + + + +
+ +
google/cloud-org-policy 0.6.3 + + + +
+ +
google/cloud-osconfig 1.3.3 + + + +
+ +
google/cloud-oslogin 1.9.3 + + + +
+ +
google/cloud-parallelstore 0.1.1 + + + +
+ +
google/cloud-policysimulator 0.2.3 + + + +
+ +
google/cloud-policy-troubleshooter 1.3.2 + + + +
+ +
google/cloud-policytroubleshooter-iam 0.2.3 + + + +
+ +
google/cloud-private-catalog 0.4.2 + + + +
+ +
google/cloud-profiler 1.4.1 + + + +
+ +
google/cloud-pubsub 2.1.1 + + + +
+ +
google/cloud-quotas 0.2.1 + + + +### Documentation + +* Update contact_email doc to not check permission of the email account ([#7247](https://github.com/googleapis/google-cloud-php/issues/7247)) ([10e53e7](https://github.com/googleapis/google-cloud-php/commit/10e53e78e48aab887edea903521e9909dc0d7cc1)) + +
+ +
google/cloud-rapidmigrationassessment 0.3.3 + + + +
+ +
google/cloud-recaptcha-enterprise 1.11.1 + + + +### Documentation + +* Fixed the description of ListFirewallPoliciesResponse ([#7238](https://github.com/googleapis/google-cloud-php/issues/7238)) ([6e75ee1](https://github.com/googleapis/google-cloud-php/commit/6e75ee1d0100aaf992d0bb40d8d08cdca7a30a93)) + +
+ +
google/cloud-recommendations-ai 0.7.3 + + + +
+ +
google/cloud-recommender 1.11.3 + + + +
+ +
google/cloud-redis 1.9.3 + + + +
+ +
google/cloud-redis-cluster 0.2.3 + + + +
+ +
google/cloud-resource-manager 0.8.3 + + + +
+ +
google/cloud-resource-settings 1.2.3 + + + +
+ +
google/cloud-retail 1.6.2 + + + +
+ +
google/cloud-run 0.9.1 + + + +
+ +
google/cloud-scheduler 1.10.3 + + + +
+ +
google/cloud-secret-manager 1.14.2 + + + +
+ +
google/cloud-securesourcemanager 0.2.3 + + + +
+ +
google/cloud-security-center 1.28.0 + + + +### Features + +* Add cloud_armor field to finding's list of attributes ([#7242](https://github.com/googleapis/google-cloud-php/issues/7242)) ([06be47c](https://github.com/googleapis/google-cloud-php/commit/06be47c5a18ccec2953962672e4cebe5c7735f6f)) + +
+ +
google/cloud-securitycentermanagement 0.2.6 + + + +
+ +
google/cloud-security-private-ca 1.7.1 + + + +
+ +
google/cloud-security-public-ca 0.3.3 + + + +
+ +
google/cloud-service-control 1.4.2 + + + +
+ +
google/cloud-service-directory 1.3.3 + + + +
+ +
google/cloud-servicehealth 0.1.4 + + + +
+ +
google/cloud-service-management 1.3.3 + + + +
+ +
google/cloud-service-usage 1.3.2 + + + +
+ +
google/cloud-shell 1.3.3 + + + +
+ +
google/shopping-css 0.2.4 + + + +
+ +
google/shopping-merchant-inventories 0.4.1 + + + +
+ +
google/shopping-merchant-quota 0.1.1 + + + +
+ +
google/shopping-merchant-reports 0.7.1 + + + +
+ +
google/cloud-spanner 1.75.2 + + + +
+ +
google/cloud-speech 1.18.1 + + + +
+ +
google/cloud-sql-admin 0.16.1 + + + +
+ +
google/cloud-storage 1.41.3 + + + +
+ +
google/cloud-storageinsights 0.3.3 + + + +
+ +
google/cloud-storage-transfer 1.4.3 + + + +
+ +
google/cloud-support 0.2.3 + + + +
+ +
google/cloud-talent 1.3.3 + + + +
+ +
google/cloud-tasks 1.14.4 + + + +
+ +
google/cloud-telcoautomation 0.2.3 + + + +
+ +
google/cloud-text-to-speech 1.8.3 + + + +
+ +
google/cloud-tpu 1.4.3 + + + +
+ +
google/cloud-trace 1.8.4 + + + +
+ +
google/cloud-translate 1.17.5 + + + +
+ +
google/cloud-videointelligence 1.15.3 + + + +
+ +
google/cloud-video-live-stream 0.7.3 + + + +
+ +
google/cloud-video-stitcher 0.8.3 + + + +
+ +
google/cloud-video-transcoder 0.10.3 + + + +
+ +
google/cloud-vision 1.9.2 + + + +
+ +
google/cloud-vm-migration 0.6.3 + + + +
+ +
google/cloud-vmware-engine 0.5.4 + + + +
+ +
google/cloud-vpc-access 1.3.3 + + + +
+ +
google/cloud-web-risk 1.5.3 + + + +
+ +
google/cloud-web-security-scanner 0.8.3 + + + +
+ +
google/cloud-workflows 0.5.3 + + + +
+ ## 0.241.0
google/cloud-batch 0.16.5 diff --git a/CertificateManager/VERSION b/CertificateManager/VERSION index faef31a4357c..39e898a4f952 100644 --- a/CertificateManager/VERSION +++ b/CertificateManager/VERSION @@ -1 +1 @@ -0.7.0 +0.7.1 diff --git a/Channel/VERSION b/Channel/VERSION index 8fdcf3869464..77fee73a8cf9 100644 --- a/Channel/VERSION +++ b/Channel/VERSION @@ -1 +1 @@ -1.9.2 +1.9.3 diff --git a/CommerceConsumerProcurement/VERSION b/CommerceConsumerProcurement/VERSION index ee1372d33a29..7179039691ce 100644 --- a/CommerceConsumerProcurement/VERSION +++ b/CommerceConsumerProcurement/VERSION @@ -1 +1 @@ -0.2.2 +0.2.3 diff --git a/Compute/VERSION b/Compute/VERSION index 15b989e398fc..4a02d2c3170b 100644 --- a/Compute/VERSION +++ b/Compute/VERSION @@ -1 +1 @@ -1.16.0 +1.16.2 diff --git a/Compute/src/V1/Client/AcceleratorTypesClient.php b/Compute/src/V1/Client/AcceleratorTypesClient.php index 018de93e1540..7123486abeb8 100644 --- a/Compute/src/V1/Client/AcceleratorTypesClient.php +++ b/Compute/src/V1/Client/AcceleratorTypesClient.php @@ -106,7 +106,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/AddressesClient.php b/Compute/src/V1/Client/AddressesClient.php index ae5f3c7f9191..4c13d632b254 100644 --- a/Compute/src/V1/Client/AddressesClient.php +++ b/Compute/src/V1/Client/AddressesClient.php @@ -115,7 +115,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/AutoscalersClient.php b/Compute/src/V1/Client/AutoscalersClient.php index 3b2f08bafa77..6e2fb6238518 100644 --- a/Compute/src/V1/Client/AutoscalersClient.php +++ b/Compute/src/V1/Client/AutoscalersClient.php @@ -115,7 +115,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/BackendBucketsClient.php b/Compute/src/V1/Client/BackendBucketsClient.php index a9078039bda7..b11c594acbc4 100644 --- a/Compute/src/V1/Client/BackendBucketsClient.php +++ b/Compute/src/V1/Client/BackendBucketsClient.php @@ -127,7 +127,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/BackendServicesClient.php b/Compute/src/V1/Client/BackendServicesClient.php index 9cb5f05744a1..9c308b500c61 100644 --- a/Compute/src/V1/Client/BackendServicesClient.php +++ b/Compute/src/V1/Client/BackendServicesClient.php @@ -136,7 +136,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/DiskTypesClient.php b/Compute/src/V1/Client/DiskTypesClient.php index 0095e6a9307b..18d2c0299e90 100644 --- a/Compute/src/V1/Client/DiskTypesClient.php +++ b/Compute/src/V1/Client/DiskTypesClient.php @@ -103,7 +103,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/DisksClient.php b/Compute/src/V1/Client/DisksClient.php index e3f349e245ce..fa9e7d1bff02 100644 --- a/Compute/src/V1/Client/DisksClient.php +++ b/Compute/src/V1/Client/DisksClient.php @@ -139,7 +139,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/ExternalVpnGatewaysClient.php b/Compute/src/V1/Client/ExternalVpnGatewaysClient.php index 9cffa601442d..a78dea2ffce5 100644 --- a/Compute/src/V1/Client/ExternalVpnGatewaysClient.php +++ b/Compute/src/V1/Client/ExternalVpnGatewaysClient.php @@ -114,7 +114,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/FirewallPoliciesClient.php b/Compute/src/V1/Client/FirewallPoliciesClient.php index 8d713cc70e18..15538477a9de 100644 --- a/Compute/src/V1/Client/FirewallPoliciesClient.php +++ b/Compute/src/V1/Client/FirewallPoliciesClient.php @@ -142,7 +142,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/FirewallsClient.php b/Compute/src/V1/Client/FirewallsClient.php index d9f9eb6aa0be..e9bd6402834f 100644 --- a/Compute/src/V1/Client/FirewallsClient.php +++ b/Compute/src/V1/Client/FirewallsClient.php @@ -113,7 +113,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/ForwardingRulesClient.php b/Compute/src/V1/Client/ForwardingRulesClient.php index 7dd0f2271da6..0a57dc9da2c5 100644 --- a/Compute/src/V1/Client/ForwardingRulesClient.php +++ b/Compute/src/V1/Client/ForwardingRulesClient.php @@ -117,7 +117,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/GlobalAddressesClient.php b/Compute/src/V1/Client/GlobalAddressesClient.php index 3e4bd624212a..f320067e3e6c 100644 --- a/Compute/src/V1/Client/GlobalAddressesClient.php +++ b/Compute/src/V1/Client/GlobalAddressesClient.php @@ -113,7 +113,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/GlobalForwardingRulesClient.php b/Compute/src/V1/Client/GlobalForwardingRulesClient.php index 8ad6dc6b8eb0..b540552dd865 100644 --- a/Compute/src/V1/Client/GlobalForwardingRulesClient.php +++ b/Compute/src/V1/Client/GlobalForwardingRulesClient.php @@ -115,7 +115,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/GlobalNetworkEndpointGroupsClient.php b/Compute/src/V1/Client/GlobalNetworkEndpointGroupsClient.php index 20c2b86ef969..a5b161020f30 100644 --- a/Compute/src/V1/Client/GlobalNetworkEndpointGroupsClient.php +++ b/Compute/src/V1/Client/GlobalNetworkEndpointGroupsClient.php @@ -115,7 +115,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/GlobalOperationsClient.php b/Compute/src/V1/Client/GlobalOperationsClient.php index 393e8b1cbef7..0093b203ae83 100644 --- a/Compute/src/V1/Client/GlobalOperationsClient.php +++ b/Compute/src/V1/Client/GlobalOperationsClient.php @@ -107,7 +107,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/GlobalOrganizationOperationsClient.php b/Compute/src/V1/Client/GlobalOrganizationOperationsClient.php index 39ddea999f9c..43e410c3220c 100644 --- a/Compute/src/V1/Client/GlobalOrganizationOperationsClient.php +++ b/Compute/src/V1/Client/GlobalOrganizationOperationsClient.php @@ -103,7 +103,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/GlobalPublicDelegatedPrefixesClient.php b/Compute/src/V1/Client/GlobalPublicDelegatedPrefixesClient.php index 250c8bb1ea69..3d8bf036459f 100644 --- a/Compute/src/V1/Client/GlobalPublicDelegatedPrefixesClient.php +++ b/Compute/src/V1/Client/GlobalPublicDelegatedPrefixesClient.php @@ -111,7 +111,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/HealthChecksClient.php b/Compute/src/V1/Client/HealthChecksClient.php index 0462d46d0077..b77833615c89 100644 --- a/Compute/src/V1/Client/HealthChecksClient.php +++ b/Compute/src/V1/Client/HealthChecksClient.php @@ -115,7 +115,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/ImageFamilyViewsClient.php b/Compute/src/V1/Client/ImageFamilyViewsClient.php index 18b3cf73e4f6..19430ed31531 100644 --- a/Compute/src/V1/Client/ImageFamilyViewsClient.php +++ b/Compute/src/V1/Client/ImageFamilyViewsClient.php @@ -98,7 +98,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/ImagesClient.php b/Compute/src/V1/Client/ImagesClient.php index 8ff40113c8a0..fd8e47a03eb4 100644 --- a/Compute/src/V1/Client/ImagesClient.php +++ b/Compute/src/V1/Client/ImagesClient.php @@ -125,7 +125,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/InstanceGroupManagersClient.php b/Compute/src/V1/Client/InstanceGroupManagersClient.php index 1514d7d365a6..2981a3fb7585 100644 --- a/Compute/src/V1/Client/InstanceGroupManagersClient.php +++ b/Compute/src/V1/Client/InstanceGroupManagersClient.php @@ -141,7 +141,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/InstanceGroupsClient.php b/Compute/src/V1/Client/InstanceGroupsClient.php index 02456a05c30e..f16ad4e32e5c 100644 --- a/Compute/src/V1/Client/InstanceGroupsClient.php +++ b/Compute/src/V1/Client/InstanceGroupsClient.php @@ -119,7 +119,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/InstanceTemplatesClient.php b/Compute/src/V1/Client/InstanceTemplatesClient.php index b81d6d4c09e8..46e805993660 100644 --- a/Compute/src/V1/Client/InstanceTemplatesClient.php +++ b/Compute/src/V1/Client/InstanceTemplatesClient.php @@ -119,7 +119,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/InstancesClient.php b/Compute/src/V1/Client/InstancesClient.php index fd1123362a76..a64052a89195 100644 --- a/Compute/src/V1/Client/InstancesClient.php +++ b/Compute/src/V1/Client/InstancesClient.php @@ -205,7 +205,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/InstantSnapshotsClient.php b/Compute/src/V1/Client/InstantSnapshotsClient.php index 7630ca83dbcc..1c5d71f0b965 100644 --- a/Compute/src/V1/Client/InstantSnapshotsClient.php +++ b/Compute/src/V1/Client/InstantSnapshotsClient.php @@ -121,7 +121,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/InterconnectAttachmentsClient.php b/Compute/src/V1/Client/InterconnectAttachmentsClient.php index c2b34f523ddc..ceb7a6025538 100644 --- a/Compute/src/V1/Client/InterconnectAttachmentsClient.php +++ b/Compute/src/V1/Client/InterconnectAttachmentsClient.php @@ -115,7 +115,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/InterconnectLocationsClient.php b/Compute/src/V1/Client/InterconnectLocationsClient.php index 82a5deeca64d..88af4f7b1b08 100644 --- a/Compute/src/V1/Client/InterconnectLocationsClient.php +++ b/Compute/src/V1/Client/InterconnectLocationsClient.php @@ -101,7 +101,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/InterconnectRemoteLocationsClient.php b/Compute/src/V1/Client/InterconnectRemoteLocationsClient.php index b5b57af9de1c..f08b0facc2df 100644 --- a/Compute/src/V1/Client/InterconnectRemoteLocationsClient.php +++ b/Compute/src/V1/Client/InterconnectRemoteLocationsClient.php @@ -101,7 +101,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/InterconnectsClient.php b/Compute/src/V1/Client/InterconnectsClient.php index 8c8637fdebad..9130d1e3c4b1 100644 --- a/Compute/src/V1/Client/InterconnectsClient.php +++ b/Compute/src/V1/Client/InterconnectsClient.php @@ -119,7 +119,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/LicenseCodesClient.php b/Compute/src/V1/Client/LicenseCodesClient.php index fe42120a5e38..5528f944bee8 100644 --- a/Compute/src/V1/Client/LicenseCodesClient.php +++ b/Compute/src/V1/Client/LicenseCodesClient.php @@ -101,7 +101,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/LicensesClient.php b/Compute/src/V1/Client/LicensesClient.php index c9464716b816..742d34f1f73e 100644 --- a/Compute/src/V1/Client/LicensesClient.php +++ b/Compute/src/V1/Client/LicensesClient.php @@ -117,7 +117,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/MachineImagesClient.php b/Compute/src/V1/Client/MachineImagesClient.php index b0b6e522b8de..e00295f9bdc6 100644 --- a/Compute/src/V1/Client/MachineImagesClient.php +++ b/Compute/src/V1/Client/MachineImagesClient.php @@ -117,7 +117,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/MachineTypesClient.php b/Compute/src/V1/Client/MachineTypesClient.php index 3983f4d4f83a..170704115b34 100644 --- a/Compute/src/V1/Client/MachineTypesClient.php +++ b/Compute/src/V1/Client/MachineTypesClient.php @@ -103,7 +103,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/NetworkAttachmentsClient.php b/Compute/src/V1/Client/NetworkAttachmentsClient.php index 0b76fe7b4623..31afa702f873 100644 --- a/Compute/src/V1/Client/NetworkAttachmentsClient.php +++ b/Compute/src/V1/Client/NetworkAttachmentsClient.php @@ -121,7 +121,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/NetworkEdgeSecurityServicesClient.php b/Compute/src/V1/Client/NetworkEdgeSecurityServicesClient.php index b37790773331..f535e617cf73 100644 --- a/Compute/src/V1/Client/NetworkEdgeSecurityServicesClient.php +++ b/Compute/src/V1/Client/NetworkEdgeSecurityServicesClient.php @@ -111,7 +111,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/NetworkEndpointGroupsClient.php b/Compute/src/V1/Client/NetworkEndpointGroupsClient.php index 23f90d1dceb8..f76cee0f73f5 100644 --- a/Compute/src/V1/Client/NetworkEndpointGroupsClient.php +++ b/Compute/src/V1/Client/NetworkEndpointGroupsClient.php @@ -120,7 +120,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/NetworkFirewallPoliciesClient.php b/Compute/src/V1/Client/NetworkFirewallPoliciesClient.php index 893f115f033d..c3feeef644b4 100644 --- a/Compute/src/V1/Client/NetworkFirewallPoliciesClient.php +++ b/Compute/src/V1/Client/NetworkFirewallPoliciesClient.php @@ -137,7 +137,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/NetworksClient.php b/Compute/src/V1/Client/NetworksClient.php index e3fe12941d18..6a7143814753 100644 --- a/Compute/src/V1/Client/NetworksClient.php +++ b/Compute/src/V1/Client/NetworksClient.php @@ -124,7 +124,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/NodeGroupsClient.php b/Compute/src/V1/Client/NodeGroupsClient.php index 9334ab19f9fc..f715a6778eff 100644 --- a/Compute/src/V1/Client/NodeGroupsClient.php +++ b/Compute/src/V1/Client/NodeGroupsClient.php @@ -131,7 +131,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/NodeTemplatesClient.php b/Compute/src/V1/Client/NodeTemplatesClient.php index 835e2f26a1ec..405ac3d1006b 100644 --- a/Compute/src/V1/Client/NodeTemplatesClient.php +++ b/Compute/src/V1/Client/NodeTemplatesClient.php @@ -119,7 +119,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/NodeTypesClient.php b/Compute/src/V1/Client/NodeTypesClient.php index c40514d0b0b5..f8a501a1dbb0 100644 --- a/Compute/src/V1/Client/NodeTypesClient.php +++ b/Compute/src/V1/Client/NodeTypesClient.php @@ -103,7 +103,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/PacketMirroringsClient.php b/Compute/src/V1/Client/PacketMirroringsClient.php index d2617674734b..2f58d920ef8c 100644 --- a/Compute/src/V1/Client/PacketMirroringsClient.php +++ b/Compute/src/V1/Client/PacketMirroringsClient.php @@ -116,7 +116,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/ProjectsClient.php b/Compute/src/V1/Client/ProjectsClient.php index be86546f2c0b..f58e0dbffb8b 100644 --- a/Compute/src/V1/Client/ProjectsClient.php +++ b/Compute/src/V1/Client/ProjectsClient.php @@ -129,7 +129,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/PublicAdvertisedPrefixesClient.php b/Compute/src/V1/Client/PublicAdvertisedPrefixesClient.php index 4a303872be71..94fd6452c59a 100644 --- a/Compute/src/V1/Client/PublicAdvertisedPrefixesClient.php +++ b/Compute/src/V1/Client/PublicAdvertisedPrefixesClient.php @@ -115,7 +115,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/PublicDelegatedPrefixesClient.php b/Compute/src/V1/Client/PublicDelegatedPrefixesClient.php index 1278ada2e4cd..50170d8b584a 100644 --- a/Compute/src/V1/Client/PublicDelegatedPrefixesClient.php +++ b/Compute/src/V1/Client/PublicDelegatedPrefixesClient.php @@ -117,7 +117,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/RegionAutoscalersClient.php b/Compute/src/V1/Client/RegionAutoscalersClient.php index f073813abdf4..5913b2d2c56d 100644 --- a/Compute/src/V1/Client/RegionAutoscalersClient.php +++ b/Compute/src/V1/Client/RegionAutoscalersClient.php @@ -113,7 +113,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/RegionBackendServicesClient.php b/Compute/src/V1/Client/RegionBackendServicesClient.php index a36018d2f8a5..a2b886035294 100644 --- a/Compute/src/V1/Client/RegionBackendServicesClient.php +++ b/Compute/src/V1/Client/RegionBackendServicesClient.php @@ -128,7 +128,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/RegionCommitmentsClient.php b/Compute/src/V1/Client/RegionCommitmentsClient.php index 2f73162d4605..7bc009a23d5f 100644 --- a/Compute/src/V1/Client/RegionCommitmentsClient.php +++ b/Compute/src/V1/Client/RegionCommitmentsClient.php @@ -111,7 +111,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/RegionDiskTypesClient.php b/Compute/src/V1/Client/RegionDiskTypesClient.php index 33605ec270b5..a2770e96ec02 100644 --- a/Compute/src/V1/Client/RegionDiskTypesClient.php +++ b/Compute/src/V1/Client/RegionDiskTypesClient.php @@ -101,7 +101,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/RegionDisksClient.php b/Compute/src/V1/Client/RegionDisksClient.php index 510372c98a58..c3f8c08a62f7 100644 --- a/Compute/src/V1/Client/RegionDisksClient.php +++ b/Compute/src/V1/Client/RegionDisksClient.php @@ -137,7 +137,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/RegionHealthCheckServicesClient.php b/Compute/src/V1/Client/RegionHealthCheckServicesClient.php index f12b9057cd42..73d00c933699 100644 --- a/Compute/src/V1/Client/RegionHealthCheckServicesClient.php +++ b/Compute/src/V1/Client/RegionHealthCheckServicesClient.php @@ -111,7 +111,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/RegionHealthChecksClient.php b/Compute/src/V1/Client/RegionHealthChecksClient.php index f41ff8027800..ce7e536c45ba 100644 --- a/Compute/src/V1/Client/RegionHealthChecksClient.php +++ b/Compute/src/V1/Client/RegionHealthChecksClient.php @@ -113,7 +113,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/RegionInstanceGroupManagersClient.php b/Compute/src/V1/Client/RegionInstanceGroupManagersClient.php index 8e0b6ac82a4d..36f54abcb0bd 100644 --- a/Compute/src/V1/Client/RegionInstanceGroupManagersClient.php +++ b/Compute/src/V1/Client/RegionInstanceGroupManagersClient.php @@ -139,7 +139,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/RegionInstanceGroupsClient.php b/Compute/src/V1/Client/RegionInstanceGroupsClient.php index 38db223c16ca..1310135cbab0 100644 --- a/Compute/src/V1/Client/RegionInstanceGroupsClient.php +++ b/Compute/src/V1/Client/RegionInstanceGroupsClient.php @@ -109,7 +109,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/RegionInstanceTemplatesClient.php b/Compute/src/V1/Client/RegionInstanceTemplatesClient.php index b956ad325355..6c311d35be58 100644 --- a/Compute/src/V1/Client/RegionInstanceTemplatesClient.php +++ b/Compute/src/V1/Client/RegionInstanceTemplatesClient.php @@ -109,7 +109,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/RegionInstancesClient.php b/Compute/src/V1/Client/RegionInstancesClient.php index 0ae31f446f5d..e06dd9aa7930 100644 --- a/Compute/src/V1/Client/RegionInstancesClient.php +++ b/Compute/src/V1/Client/RegionInstancesClient.php @@ -101,7 +101,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/RegionInstantSnapshotsClient.php b/Compute/src/V1/Client/RegionInstantSnapshotsClient.php index c6b57a6036d0..2abae1233e2b 100644 --- a/Compute/src/V1/Client/RegionInstantSnapshotsClient.php +++ b/Compute/src/V1/Client/RegionInstantSnapshotsClient.php @@ -119,7 +119,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/RegionNetworkEndpointGroupsClient.php b/Compute/src/V1/Client/RegionNetworkEndpointGroupsClient.php index 0858a68eddc0..e5727481fc3d 100644 --- a/Compute/src/V1/Client/RegionNetworkEndpointGroupsClient.php +++ b/Compute/src/V1/Client/RegionNetworkEndpointGroupsClient.php @@ -115,7 +115,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/RegionNetworkFirewallPoliciesClient.php b/Compute/src/V1/Client/RegionNetworkFirewallPoliciesClient.php index 794a0fa8c14d..61587e52da6e 100644 --- a/Compute/src/V1/Client/RegionNetworkFirewallPoliciesClient.php +++ b/Compute/src/V1/Client/RegionNetworkFirewallPoliciesClient.php @@ -140,7 +140,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/RegionNotificationEndpointsClient.php b/Compute/src/V1/Client/RegionNotificationEndpointsClient.php index 2e99e0fde9c7..8b02f44bfef5 100644 --- a/Compute/src/V1/Client/RegionNotificationEndpointsClient.php +++ b/Compute/src/V1/Client/RegionNotificationEndpointsClient.php @@ -109,7 +109,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/RegionOperationsClient.php b/Compute/src/V1/Client/RegionOperationsClient.php index 8b75eb535b36..92dd739bd74d 100644 --- a/Compute/src/V1/Client/RegionOperationsClient.php +++ b/Compute/src/V1/Client/RegionOperationsClient.php @@ -105,7 +105,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/RegionSecurityPoliciesClient.php b/Compute/src/V1/Client/RegionSecurityPoliciesClient.php index e4b61e836219..b25152cd021b 100644 --- a/Compute/src/V1/Client/RegionSecurityPoliciesClient.php +++ b/Compute/src/V1/Client/RegionSecurityPoliciesClient.php @@ -120,7 +120,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/RegionSslCertificatesClient.php b/Compute/src/V1/Client/RegionSslCertificatesClient.php index fa3be54fda1f..47f0a4339c8a 100644 --- a/Compute/src/V1/Client/RegionSslCertificatesClient.php +++ b/Compute/src/V1/Client/RegionSslCertificatesClient.php @@ -109,7 +109,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/RegionSslPoliciesClient.php b/Compute/src/V1/Client/RegionSslPoliciesClient.php index 4be919527d9d..c06c4118c4a0 100644 --- a/Compute/src/V1/Client/RegionSslPoliciesClient.php +++ b/Compute/src/V1/Client/RegionSslPoliciesClient.php @@ -114,7 +114,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/RegionTargetHttpProxiesClient.php b/Compute/src/V1/Client/RegionTargetHttpProxiesClient.php index a268ad306217..1d5114eac0b8 100644 --- a/Compute/src/V1/Client/RegionTargetHttpProxiesClient.php +++ b/Compute/src/V1/Client/RegionTargetHttpProxiesClient.php @@ -111,7 +111,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/RegionTargetHttpsProxiesClient.php b/Compute/src/V1/Client/RegionTargetHttpsProxiesClient.php index c767a9e49cdf..9d9789004718 100644 --- a/Compute/src/V1/Client/RegionTargetHttpsProxiesClient.php +++ b/Compute/src/V1/Client/RegionTargetHttpsProxiesClient.php @@ -115,7 +115,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/RegionTargetTcpProxiesClient.php b/Compute/src/V1/Client/RegionTargetTcpProxiesClient.php index 68da407c2c10..794d3d042fc3 100644 --- a/Compute/src/V1/Client/RegionTargetTcpProxiesClient.php +++ b/Compute/src/V1/Client/RegionTargetTcpProxiesClient.php @@ -109,7 +109,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/RegionUrlMapsClient.php b/Compute/src/V1/Client/RegionUrlMapsClient.php index 4576eaf9b293..c32882775c0a 100644 --- a/Compute/src/V1/Client/RegionUrlMapsClient.php +++ b/Compute/src/V1/Client/RegionUrlMapsClient.php @@ -116,7 +116,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/RegionZonesClient.php b/Compute/src/V1/Client/RegionZonesClient.php index 76ba5748bddf..680b1aa3824a 100644 --- a/Compute/src/V1/Client/RegionZonesClient.php +++ b/Compute/src/V1/Client/RegionZonesClient.php @@ -98,7 +98,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/RegionsClient.php b/Compute/src/V1/Client/RegionsClient.php index dcc5ec6c5a22..96fc3f6b948d 100644 --- a/Compute/src/V1/Client/RegionsClient.php +++ b/Compute/src/V1/Client/RegionsClient.php @@ -101,7 +101,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/ReservationsClient.php b/Compute/src/V1/Client/ReservationsClient.php index ab9445355c82..8097ea103f97 100644 --- a/Compute/src/V1/Client/ReservationsClient.php +++ b/Compute/src/V1/Client/ReservationsClient.php @@ -123,7 +123,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/ResourcePoliciesClient.php b/Compute/src/V1/Client/ResourcePoliciesClient.php index be52a34455db..a3e2e1b49a2c 100644 --- a/Compute/src/V1/Client/ResourcePoliciesClient.php +++ b/Compute/src/V1/Client/ResourcePoliciesClient.php @@ -121,7 +121,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/RoutersClient.php b/Compute/src/V1/Client/RoutersClient.php index 7a8874961d08..90c3f4c51228 100644 --- a/Compute/src/V1/Client/RoutersClient.php +++ b/Compute/src/V1/Client/RoutersClient.php @@ -126,7 +126,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/RoutesClient.php b/Compute/src/V1/Client/RoutesClient.php index 87a5e38b947b..54b3ac6abfa1 100644 --- a/Compute/src/V1/Client/RoutesClient.php +++ b/Compute/src/V1/Client/RoutesClient.php @@ -109,7 +109,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/SecurityPoliciesClient.php b/Compute/src/V1/Client/SecurityPoliciesClient.php index 441fd6b62f02..21aeb29e6e53 100644 --- a/Compute/src/V1/Client/SecurityPoliciesClient.php +++ b/Compute/src/V1/Client/SecurityPoliciesClient.php @@ -127,7 +127,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/ServiceAttachmentsClient.php b/Compute/src/V1/Client/ServiceAttachmentsClient.php index 9853e2f77c65..a18d832105bb 100644 --- a/Compute/src/V1/Client/ServiceAttachmentsClient.php +++ b/Compute/src/V1/Client/ServiceAttachmentsClient.php @@ -121,7 +121,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/SnapshotSettingsServiceClient.php b/Compute/src/V1/Client/SnapshotSettingsServiceClient.php index b33f9c7053e0..a4184857f310 100644 --- a/Compute/src/V1/Client/SnapshotSettingsServiceClient.php +++ b/Compute/src/V1/Client/SnapshotSettingsServiceClient.php @@ -104,7 +104,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/SnapshotsClient.php b/Compute/src/V1/Client/SnapshotsClient.php index 8292da6a809e..d639ccdca5c8 100644 --- a/Compute/src/V1/Client/SnapshotsClient.php +++ b/Compute/src/V1/Client/SnapshotsClient.php @@ -119,7 +119,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/SslCertificatesClient.php b/Compute/src/V1/Client/SslCertificatesClient.php index 7e52886d20dc..4b705db636a7 100644 --- a/Compute/src/V1/Client/SslCertificatesClient.php +++ b/Compute/src/V1/Client/SslCertificatesClient.php @@ -111,7 +111,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/SslPoliciesClient.php b/Compute/src/V1/Client/SslPoliciesClient.php index 447ce2d65813..cfbf83d5946c 100644 --- a/Compute/src/V1/Client/SslPoliciesClient.php +++ b/Compute/src/V1/Client/SslPoliciesClient.php @@ -116,7 +116,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/SubnetworksClient.php b/Compute/src/V1/Client/SubnetworksClient.php index 48164b4f7bca..de1765330fb0 100644 --- a/Compute/src/V1/Client/SubnetworksClient.php +++ b/Compute/src/V1/Client/SubnetworksClient.php @@ -127,7 +127,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/TargetGrpcProxiesClient.php b/Compute/src/V1/Client/TargetGrpcProxiesClient.php index 61386dee42a1..048efa419b3b 100644 --- a/Compute/src/V1/Client/TargetGrpcProxiesClient.php +++ b/Compute/src/V1/Client/TargetGrpcProxiesClient.php @@ -111,7 +111,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/TargetHttpProxiesClient.php b/Compute/src/V1/Client/TargetHttpProxiesClient.php index e8ca7a24467e..04f961ac7fcf 100644 --- a/Compute/src/V1/Client/TargetHttpProxiesClient.php +++ b/Compute/src/V1/Client/TargetHttpProxiesClient.php @@ -115,7 +115,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/TargetHttpsProxiesClient.php b/Compute/src/V1/Client/TargetHttpsProxiesClient.php index 999449aa5ab2..c95f0c4ed7e0 100644 --- a/Compute/src/V1/Client/TargetHttpsProxiesClient.php +++ b/Compute/src/V1/Client/TargetHttpsProxiesClient.php @@ -123,7 +123,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/TargetInstancesClient.php b/Compute/src/V1/Client/TargetInstancesClient.php index cd1fd9757d80..4451b9625f56 100644 --- a/Compute/src/V1/Client/TargetInstancesClient.php +++ b/Compute/src/V1/Client/TargetInstancesClient.php @@ -113,7 +113,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/TargetPoolsClient.php b/Compute/src/V1/Client/TargetPoolsClient.php index b3e9443e119e..e5c24c2f1798 100644 --- a/Compute/src/V1/Client/TargetPoolsClient.php +++ b/Compute/src/V1/Client/TargetPoolsClient.php @@ -126,7 +126,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/TargetSslProxiesClient.php b/Compute/src/V1/Client/TargetSslProxiesClient.php index ee463988677e..86b46aafb42d 100644 --- a/Compute/src/V1/Client/TargetSslProxiesClient.php +++ b/Compute/src/V1/Client/TargetSslProxiesClient.php @@ -119,7 +119,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/TargetTcpProxiesClient.php b/Compute/src/V1/Client/TargetTcpProxiesClient.php index 76567a173e9d..8fa2766f31db 100644 --- a/Compute/src/V1/Client/TargetTcpProxiesClient.php +++ b/Compute/src/V1/Client/TargetTcpProxiesClient.php @@ -115,7 +115,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/TargetVpnGatewaysClient.php b/Compute/src/V1/Client/TargetVpnGatewaysClient.php index f5e9e8f44df9..cff46f2d46e3 100644 --- a/Compute/src/V1/Client/TargetVpnGatewaysClient.php +++ b/Compute/src/V1/Client/TargetVpnGatewaysClient.php @@ -113,7 +113,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/UrlMapsClient.php b/Compute/src/V1/Client/UrlMapsClient.php index 5e65818d9873..69d7d80e693a 100644 --- a/Compute/src/V1/Client/UrlMapsClient.php +++ b/Compute/src/V1/Client/UrlMapsClient.php @@ -120,7 +120,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/VpnGatewaysClient.php b/Compute/src/V1/Client/VpnGatewaysClient.php index 277fcc8b58e3..94f752985825 100644 --- a/Compute/src/V1/Client/VpnGatewaysClient.php +++ b/Compute/src/V1/Client/VpnGatewaysClient.php @@ -119,7 +119,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/VpnTunnelsClient.php b/Compute/src/V1/Client/VpnTunnelsClient.php index d4e0d089bbfb..a9cd4395ba42 100644 --- a/Compute/src/V1/Client/VpnTunnelsClient.php +++ b/Compute/src/V1/Client/VpnTunnelsClient.php @@ -113,7 +113,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/ZoneOperationsClient.php b/Compute/src/V1/Client/ZoneOperationsClient.php index 28a6c0edcd2e..2e7ff6f097c8 100644 --- a/Compute/src/V1/Client/ZoneOperationsClient.php +++ b/Compute/src/V1/Client/ZoneOperationsClient.php @@ -105,7 +105,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/ZonesClient.php b/Compute/src/V1/Client/ZonesClient.php index 9219a7e47fc0..e92d8cb66ea1 100644 --- a/Compute/src/V1/Client/ZonesClient.php +++ b/Compute/src/V1/Client/ZonesClient.php @@ -101,7 +101,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/ConfidentialComputing/VERSION b/ConfidentialComputing/VERSION index a3df0a6959e1..6f4eebdf6f68 100644 --- a/ConfidentialComputing/VERSION +++ b/ConfidentialComputing/VERSION @@ -1 +1 @@ -0.8.0 +0.8.1 diff --git a/Config/VERSION b/Config/VERSION index 1d0ba9ea182b..8f0916f768f0 100644 --- a/Config/VERSION +++ b/Config/VERSION @@ -1 +1 @@ -0.4.0 +0.5.0 diff --git a/Config/metadata/V1/Config.php b/Config/metadata/V1/Config.php index 60d2b172d494..87d54d274f6e 100644 Binary files a/Config/metadata/V1/Config.php and b/Config/metadata/V1/Config.php differ diff --git a/Config/src/V1/Deployment.php b/Config/src/V1/Deployment.php index d5297bcbd612..fab01d82f4b0 100644 --- a/Config/src/V1/Deployment.php +++ b/Config/src/V1/Deployment.php @@ -172,6 +172,15 @@ class Deployment extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.cloud.config.v1.QuotaValidation quota_validation = 23 [(.google.api.field_behavior) = OPTIONAL]; */ protected $quota_validation = 0; + /** + * Optional. Arbitrary key-value metadata storage e.g. to help client tools + * identify deployments during automation. See + * https://google.aip.dev/148#annotations for details on format and size + * limitations. + * + * Generated from protobuf field map annotations = 24 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $annotations; protected $blueprint; /** @@ -255,6 +264,11 @@ class Deployment extends \Google\Protobuf\Internal\Message * Optional. Input to control quota checks for resources in terraform * configuration files. There are limited resources on which quota validation * applies. + * @type array|\Google\Protobuf\Internal\MapField $annotations + * Optional. Arbitrary key-value metadata storage e.g. to help client tools + * identify deployments during automation. See + * https://google.aip.dev/148#annotations for details on format and size + * limitations. * } */ public function __construct($data = NULL) { @@ -981,6 +995,38 @@ public function setQuotaValidation($var) return $this; } + /** + * Optional. Arbitrary key-value metadata storage e.g. to help client tools + * identify deployments during automation. See + * https://google.aip.dev/148#annotations for details on format and size + * limitations. + * + * Generated from protobuf field map annotations = 24 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getAnnotations() + { + return $this->annotations; + } + + /** + * Optional. Arbitrary key-value metadata storage e.g. to help client tools + * identify deployments during automation. See + * https://google.aip.dev/148#annotations for details on format and size + * limitations. + * + * Generated from protobuf field map annotations = 24 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setAnnotations($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->annotations = $arr; + + return $this; + } + /** * @return string */ diff --git a/Config/src/V1/Preview.php b/Config/src/V1/Preview.php index e2ee4206c55c..4ad58204222f 100644 --- a/Config/src/V1/Preview.php +++ b/Config/src/V1/Preview.php @@ -137,6 +137,20 @@ class Preview extends \Google\Protobuf\Internal\Message * Generated from protobuf field string logs = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ protected $logs = ''; + /** + * Output only. The current Terraform version set on the preview. + * It is in the format of "Major.Minor.Patch", for example, "1.3.10". + * + * Generated from protobuf field string tf_version = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $tf_version = ''; + /** + * Optional. The user-specified Terraform version constraint. + * Example: "=1.3.10". + * + * Generated from protobuf field optional string tf_version_constraint = 19 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $tf_version_constraint = null; protected $blueprint; /** @@ -203,6 +217,12 @@ class Preview extends \Google\Protobuf\Internal\Message * Output only. Artifacts from preview. * @type string $logs * Output only. Location of preview logs in `gs://{bucket}/{object}` format. + * @type string $tf_version + * Output only. The current Terraform version set on the preview. + * It is in the format of "Major.Minor.Patch", for example, "1.3.10". + * @type string $tf_version_constraint + * Optional. The user-specified Terraform version constraint. + * Example: "=1.3.10". * } */ public function __construct($data = NULL) { @@ -755,6 +775,72 @@ public function setLogs($var) return $this; } + /** + * Output only. The current Terraform version set on the preview. + * It is in the format of "Major.Minor.Patch", for example, "1.3.10". + * + * Generated from protobuf field string tf_version = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getTfVersion() + { + return $this->tf_version; + } + + /** + * Output only. The current Terraform version set on the preview. + * It is in the format of "Major.Minor.Patch", for example, "1.3.10". + * + * Generated from protobuf field string tf_version = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setTfVersion($var) + { + GPBUtil::checkString($var, True); + $this->tf_version = $var; + + return $this; + } + + /** + * Optional. The user-specified Terraform version constraint. + * Example: "=1.3.10". + * + * Generated from protobuf field optional string tf_version_constraint = 19 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getTfVersionConstraint() + { + return isset($this->tf_version_constraint) ? $this->tf_version_constraint : ''; + } + + public function hasTfVersionConstraint() + { + return isset($this->tf_version_constraint); + } + + public function clearTfVersionConstraint() + { + unset($this->tf_version_constraint); + } + + /** + * Optional. The user-specified Terraform version constraint. + * Example: "=1.3.10". + * + * Generated from protobuf field optional string tf_version_constraint = 19 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setTfVersionConstraint($var) + { + GPBUtil::checkString($var, True); + $this->tf_version_constraint = $var; + + return $this; + } + /** * @return string */ diff --git a/Config/tests/Unit/V1/Client/ConfigClientTest.php b/Config/tests/Unit/V1/Client/ConfigClientTest.php index d306b73b3ddd..e0098efe69a6 100644 --- a/Config/tests/Unit/V1/Client/ConfigClientTest.php +++ b/Config/tests/Unit/V1/Client/ConfigClientTest.php @@ -299,6 +299,8 @@ public function createPreviewTest() $build = 'build94094958'; $errorLogs = 'errorLogs1635955078'; $logs = 'logs3327407'; + $tfVersion = 'tfVersion1712341003'; + $tfVersionConstraint = 'tfVersionConstraint594495121'; $expectedResponse = new Preview(); $expectedResponse->setName($name); $expectedResponse->setDeployment($deployment); @@ -308,6 +310,8 @@ public function createPreviewTest() $expectedResponse->setBuild($build); $expectedResponse->setErrorLogs($errorLogs); $expectedResponse->setLogs($logs); + $expectedResponse->setTfVersion($tfVersion); + $expectedResponse->setTfVersionConstraint($tfVersionConstraint); $anyResponse = new Any(); $anyResponse->setValue($expectedResponse->serializeToString()); $completeOperation = new Operation(); @@ -587,6 +591,8 @@ public function deletePreviewTest() $build = 'build94094958'; $errorLogs = 'errorLogs1635955078'; $logs = 'logs3327407'; + $tfVersion = 'tfVersion1712341003'; + $tfVersionConstraint = 'tfVersionConstraint594495121'; $expectedResponse = new Preview(); $expectedResponse->setName($name2); $expectedResponse->setDeployment($deployment); @@ -596,6 +602,8 @@ public function deletePreviewTest() $expectedResponse->setBuild($build); $expectedResponse->setErrorLogs($errorLogs); $expectedResponse->setLogs($logs); + $expectedResponse->setTfVersion($tfVersion); + $expectedResponse->setTfVersionConstraint($tfVersionConstraint); $anyResponse = new Any(); $anyResponse->setValue($expectedResponse->serializeToString()); $completeOperation = new Operation(); @@ -1132,6 +1140,8 @@ public function getPreviewTest() $build = 'build94094958'; $errorLogs = 'errorLogs1635955078'; $logs = 'logs3327407'; + $tfVersion = 'tfVersion1712341003'; + $tfVersionConstraint = 'tfVersionConstraint594495121'; $expectedResponse = new Preview(); $expectedResponse->setName($name2); $expectedResponse->setDeployment($deployment); @@ -1141,6 +1151,8 @@ public function getPreviewTest() $expectedResponse->setBuild($build); $expectedResponse->setErrorLogs($errorLogs); $expectedResponse->setLogs($logs); + $expectedResponse->setTfVersion($tfVersion); + $expectedResponse->setTfVersionConstraint($tfVersionConstraint); $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->previewName('[PROJECT]', '[LOCATION]', '[PREVIEW]'); diff --git a/ContactCenterInsights/VERSION b/ContactCenterInsights/VERSION index 8fdcf3869464..77fee73a8cf9 100644 --- a/ContactCenterInsights/VERSION +++ b/ContactCenterInsights/VERSION @@ -1 +1 @@ -1.9.2 +1.9.3 diff --git a/Container/VERSION b/Container/VERSION index 034552a83eeb..7f3c3affd72c 100644 --- a/Container/VERSION +++ b/Container/VERSION @@ -1 +1 @@ -1.30.0 +1.30.1 diff --git a/ContainerAnalysis/VERSION b/ContainerAnalysis/VERSION index 7d8568351b4f..d1d899fa33a0 100644 --- a/ContainerAnalysis/VERSION +++ b/ContainerAnalysis/VERSION @@ -1 +1 @@ -0.5.4 +0.5.5 diff --git a/ControlsPartner/VERSION b/ControlsPartner/VERSION index 6e8bf73aa550..17e51c385ea3 100644 --- a/ControlsPartner/VERSION +++ b/ControlsPartner/VERSION @@ -1 +1 @@ -0.1.0 +0.1.1 diff --git a/Core/VERSION b/Core/VERSION index 373aea97570a..79f82f6b8e0c 100644 --- a/Core/VERSION +++ b/Core/VERSION @@ -1 +1 @@ -1.57.0 +1.58.0 diff --git a/Core/src/Report/CloudRunMetadataProvider.php b/Core/src/Report/CloudRunMetadataProvider.php index aa09d3d24505..5b7d771924b4 100644 --- a/Core/src/Report/CloudRunMetadataProvider.php +++ b/Core/src/Report/CloudRunMetadataProvider.php @@ -39,6 +39,11 @@ class CloudRunMetadataProvider implements MetadataProviderInterface */ private $revisionId; + /** + * @var string + */ + private $traceId; + public function __construct(array $env) { $this->serviceId = isset($env['K_SERVICE']) @@ -47,6 +52,9 @@ public function __construct(array $env) $this->revisionId = isset($env['K_REVISION']) ? $env['K_REVISION'] : 'unknown-revision'; + $this->traceId = isset($env['HTTP_X_CLOUD_TRACE_CONTEXT']) + ? substr($env['HTTP_X_CLOUD_TRACE_CONTEXT'], 0, 32) + : null; $this->metadata = new Metadata(); } @@ -87,11 +95,13 @@ public function versionId() } /** - * not implemented - * @TODO + * Return the labels. We need to evaluate $_SERVER for each request. + * @return array */ public function labels() { - return []; + return !empty($this->traceId) + ? ['run.googleapis.com/trace_id' => $this->traceId ] + : []; } } diff --git a/Core/tests/Unit/Report/CloudRunMetadataProviderTest.php b/Core/tests/Unit/Report/CloudRunMetadataProviderTest.php index f23833b591e6..f355e62f39d2 100644 --- a/Core/tests/Unit/Report/CloudRunMetadataProviderTest.php +++ b/Core/tests/Unit/Report/CloudRunMetadataProviderTest.php @@ -29,10 +29,17 @@ public function testMetadataProvider() { $provider = new CloudRunMetadataProvider([ 'K_SERVICE' => 'my-service', - 'K_REVISION' => 'my-revision' + 'K_REVISION' => 'my-revision', + 'HTTP_X_CLOUD_TRACE_CONTEXT' => 'my-traceId' ]); $this->assertEquals('my-service', $provider->serviceId()); $this->assertEquals('my-revision', $provider->versionId()); + $this->assertEquals( + [ + 'run.googleapis.com/trace_id' => 'my-traceId' + ], + $provider->labels() + ); } public function testDefaults() @@ -40,5 +47,6 @@ public function testDefaults() $provider = new CloudRunMetadataProvider([]); $this->assertEquals('unknown-service', $provider->serviceId()); $this->assertEquals('unknown-revision', $provider->versionId()); + $this->assertEquals([], $provider->labels()); } } diff --git a/DataCatalog/VERSION b/DataCatalog/VERSION index 81c871de46b3..4dae2985b58c 100644 --- a/DataCatalog/VERSION +++ b/DataCatalog/VERSION @@ -1 +1 @@ -1.10.0 +1.10.1 diff --git a/DataCatalogLineage/VERSION b/DataCatalogLineage/VERSION index cb0c939a936f..be14282b7fff 100644 --- a/DataCatalogLineage/VERSION +++ b/DataCatalogLineage/VERSION @@ -1 +1 @@ -0.5.2 +0.5.3 diff --git a/DataFusion/VERSION b/DataFusion/VERSION index b6160487433b..844f6a91acb9 100644 --- a/DataFusion/VERSION +++ b/DataFusion/VERSION @@ -1 +1 @@ -0.6.2 +0.6.3 diff --git a/DataLabeling/VERSION b/DataLabeling/VERSION index cb0c939a936f..be14282b7fff 100644 --- a/DataLabeling/VERSION +++ b/DataLabeling/VERSION @@ -1 +1 @@ -0.5.2 +0.5.3 diff --git a/Dataflow/VERSION b/Dataflow/VERSION index ee6cdce3c290..b6160487433b 100644 --- a/Dataflow/VERSION +++ b/Dataflow/VERSION @@ -1 +1 @@ -0.6.1 +0.6.2 diff --git a/Dataform/VERSION b/Dataform/VERSION index 2b7c5ae01848..17b2ccd9bf90 100644 --- a/Dataform/VERSION +++ b/Dataform/VERSION @@ -1 +1 @@ -0.4.2 +0.4.3 diff --git a/Dataplex/VERSION b/Dataplex/VERSION index a5510516948f..e815b861f023 100644 --- a/Dataplex/VERSION +++ b/Dataplex/VERSION @@ -1 +1 @@ -0.15.0 +0.15.1 diff --git a/Dataproc/VERSION b/Dataproc/VERSION index c10780c628ad..3e388a4ac94a 100644 --- a/Dataproc/VERSION +++ b/Dataproc/VERSION @@ -1 +1 @@ -3.13.1 +3.13.2 diff --git a/DataprocMetastore/VERSION b/DataprocMetastore/VERSION index bc859cbd6d99..1a96df19c09a 100644 --- a/DataprocMetastore/VERSION +++ b/DataprocMetastore/VERSION @@ -1 +1 @@ -0.11.2 +0.11.3 diff --git a/Datastore/VERSION b/Datastore/VERSION index cfc730712d5d..450a687b2dae 100644 --- a/Datastore/VERSION +++ b/Datastore/VERSION @@ -1 +1 @@ -1.28.0 +1.28.1 diff --git a/Datastore/src/DatastoreClient.php b/Datastore/src/DatastoreClient.php index be00366fbc97..45b3e055c4d8 100644 --- a/Datastore/src/DatastoreClient.php +++ b/Datastore/src/DatastoreClient.php @@ -92,7 +92,7 @@ class DatastoreClient use ClientTrait; use DatastoreTrait; - const VERSION = '1.28.0'; + const VERSION = '1.28.1'; const FULL_CONTROL_SCOPE = 'https://www.googleapis.com/auth/datastore'; diff --git a/DatastoreAdmin/VERSION b/DatastoreAdmin/VERSION index 100435be135a..ee94dd834b53 100644 --- a/DatastoreAdmin/VERSION +++ b/DatastoreAdmin/VERSION @@ -1 +1 @@ -0.8.2 +0.8.3 diff --git a/Datastream/VERSION b/Datastream/VERSION index 4cda8f19edc7..8af85beb5159 100644 --- a/Datastream/VERSION +++ b/Datastream/VERSION @@ -1 +1 @@ -1.5.2 +1.5.3 diff --git a/Debugger/VERSION b/Debugger/VERSION index bfa363e76ed7..8decb929b986 100644 --- a/Debugger/VERSION +++ b/Debugger/VERSION @@ -1 +1 @@ -1.8.4 +1.8.5 diff --git a/Debugger/src/DebuggerClient.php b/Debugger/src/DebuggerClient.php index 8e7e46c614a7..54db26e5d2ce 100644 --- a/Debugger/src/DebuggerClient.php +++ b/Debugger/src/DebuggerClient.php @@ -40,7 +40,7 @@ class DebuggerClient { use ClientTrait; - const VERSION = '1.8.4'; + const VERSION = '1.8.5'; const FULL_CONTROL_SCOPE = 'https://www.googleapis.com/auth/cloud-platform'; const READ_ONLY_SCOPE = 'https://www.googleapis.com/auth/debugger.readonly'; diff --git a/Deploy/VERSION b/Deploy/VERSION index c3d16c1646bd..66333910a4be 100644 --- a/Deploy/VERSION +++ b/Deploy/VERSION @@ -1 +1 @@ -0.17.2 +0.18.0 diff --git a/Deploy/metadata/V1/CloudDeploy.php b/Deploy/metadata/V1/CloudDeploy.php index bb95f91b8ba5..0aaa65011208 100644 Binary files a/Deploy/metadata/V1/CloudDeploy.php and b/Deploy/metadata/V1/CloudDeploy.php differ diff --git a/Deploy/src/V1/Client/CloudDeployClient.php b/Deploy/src/V1/Client/CloudDeployClient.php index b50dd0b56486..4c8585ac7303 100644 --- a/Deploy/src/V1/Client/CloudDeployClient.php +++ b/Deploy/src/V1/Client/CloudDeployClient.php @@ -477,6 +477,27 @@ public static function releaseName(string $project, string $location, string $de ]); } + /** + * Formats a string containing the fully-qualified path to represent a repository + * resource. + * + * @param string $project + * @param string $location + * @param string $connection + * @param string $repository + * + * @return string The formatted repository resource. + */ + public static function repositoryName(string $project, string $location, string $connection, string $repository): string + { + return self::getPathTemplate('repository')->render([ + 'project' => $project, + 'location' => $location, + 'connection' => $connection, + 'repository' => $repository, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a rollout * resource. @@ -573,6 +594,7 @@ public static function workerPoolName(string $project, string $location, string * - location: projects/{project}/locations/{location} * - membership: projects/{project}/locations/{location}/memberships/{membership} * - release: projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/releases/{release} + * - repository: projects/{project}/locations/{location}/connections/{connection}/repositories/{repository} * - rollout: projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/releases/{release}/rollouts/{rollout} * - service: projects/{project}/locations/{location}/services/{service} * - target: projects/{project}/locations/{location}/targets/{target} diff --git a/Deploy/src/V1/Gapic/CloudDeployGapicClient.php b/Deploy/src/V1/Gapic/CloudDeployGapicClient.php index 9232e942df16..f8135096c136 100644 --- a/Deploy/src/V1/Gapic/CloudDeployGapicClient.php +++ b/Deploy/src/V1/Gapic/CloudDeployGapicClient.php @@ -192,6 +192,8 @@ class CloudDeployGapicClient private static $releaseNameTemplate; + private static $repositoryNameTemplate; + private static $rolloutNameTemplate; private static $serviceNameTemplate; @@ -361,6 +363,17 @@ private static function getReleaseNameTemplate() return self::$releaseNameTemplate; } + private static function getRepositoryNameTemplate() + { + if (self::$repositoryNameTemplate == null) { + self::$repositoryNameTemplate = new PathTemplate( + 'projects/{project}/locations/{location}/connections/{connection}/repositories/{repository}' + ); + } + + return self::$repositoryNameTemplate; + } + private static function getRolloutNameTemplate() { if (self::$rolloutNameTemplate == null) { @@ -421,6 +434,7 @@ private static function getPathTemplateMap() 'location' => self::getLocationNameTemplate(), 'membership' => self::getMembershipNameTemplate(), 'release' => self::getReleaseNameTemplate(), + 'repository' => self::getRepositoryNameTemplate(), 'rollout' => self::getRolloutNameTemplate(), 'service' => self::getServiceNameTemplate(), 'target' => self::getTargetNameTemplate(), @@ -691,6 +705,31 @@ public static function releaseName( ]); } + /** + * Formats a string containing the fully-qualified path to represent a repository + * resource. + * + * @param string $project + * @param string $location + * @param string $connection + * @param string $repository + * + * @return string The formatted repository resource. + */ + public static function repositoryName( + $project, + $location, + $connection, + $repository + ) { + return self::getRepositoryNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'connection' => $connection, + 'repository' => $repository, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a rollout * resource. @@ -792,6 +831,7 @@ public static function workerPoolName($project, $location, $workerPool) * - location: projects/{project}/locations/{location} * - membership: projects/{project}/locations/{location}/memberships/{membership} * - release: projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/releases/{release} + * - repository: projects/{project}/locations/{location}/connections/{connection}/repositories/{repository} * - rollout: projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/releases/{release}/rollouts/{rollout} * - service: projects/{project}/locations/{location}/services/{service} * - target: projects/{project}/locations/{location}/targets/{target} diff --git a/Deploy/src/V1/SkaffoldModules.php b/Deploy/src/V1/SkaffoldModules.php index cf6a9eb7228d..80cd38b13c24 100644 --- a/Deploy/src/V1/SkaffoldModules.php +++ b/Deploy/src/V1/SkaffoldModules.php @@ -35,6 +35,8 @@ class SkaffoldModules extends \Google\Protobuf\Internal\Message * Remote git repository containing the Skaffold Config modules. * @type \Google\Cloud\Deploy\V1\SkaffoldModules\SkaffoldGCSSource $google_cloud_storage * Cloud Storage bucket containing the Skaffold Config modules. + * @type \Google\Cloud\Deploy\V1\SkaffoldModules\SkaffoldGCBRepoSource $google_cloud_build_repo + * Cloud Build V2 repository containing the Skaffold Config modules. * } */ public function __construct($data = NULL) { @@ -130,6 +132,37 @@ public function setGoogleCloudStorage($var) return $this; } + /** + * Cloud Build V2 repository containing the Skaffold Config modules. + * + * Generated from protobuf field .google.cloud.deploy.v1.SkaffoldModules.SkaffoldGCBRepoSource google_cloud_build_repo = 4; + * @return \Google\Cloud\Deploy\V1\SkaffoldModules\SkaffoldGCBRepoSource|null + */ + public function getGoogleCloudBuildRepo() + { + return $this->readOneof(4); + } + + public function hasGoogleCloudBuildRepo() + { + return $this->hasOneof(4); + } + + /** + * Cloud Build V2 repository containing the Skaffold Config modules. + * + * Generated from protobuf field .google.cloud.deploy.v1.SkaffoldModules.SkaffoldGCBRepoSource google_cloud_build_repo = 4; + * @param \Google\Cloud\Deploy\V1\SkaffoldModules\SkaffoldGCBRepoSource $var + * @return $this + */ + public function setGoogleCloudBuildRepo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Deploy\V1\SkaffoldModules\SkaffoldGCBRepoSource::class); + $this->writeOneof(4, $var); + + return $this; + } + /** * @return string */ diff --git a/Deploy/src/V1/SkaffoldModules/SkaffoldGCBRepoSource.php b/Deploy/src/V1/SkaffoldModules/SkaffoldGCBRepoSource.php new file mode 100644 index 000000000000..0f4734229729 --- /dev/null +++ b/Deploy/src/V1/SkaffoldModules/SkaffoldGCBRepoSource.php @@ -0,0 +1,148 @@ +google.cloud.deploy.v1.SkaffoldModules.SkaffoldGCBRepoSource + */ +class SkaffoldGCBRepoSource extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the Cloud Build V2 Repository. + * Format is + * projects/{project}/locations/{location}/connections/{connection}/repositories/{repository}. + * + * Generated from protobuf field string repository = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $repository = ''; + /** + * Optional. Relative path from the repository root to the Skaffold Config + * file. + * + * Generated from protobuf field string path = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $path = ''; + /** + * Optional. Branch or tag to use when cloning the repository. + * + * Generated from protobuf field string ref = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $ref = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $repository + * Required. Name of the Cloud Build V2 Repository. + * Format is + * projects/{project}/locations/{location}/connections/{connection}/repositories/{repository}. + * @type string $path + * Optional. Relative path from the repository root to the Skaffold Config + * file. + * @type string $ref + * Optional. Branch or tag to use when cloning the repository. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Deploy\V1\CloudDeploy::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the Cloud Build V2 Repository. + * Format is + * projects/{project}/locations/{location}/connections/{connection}/repositories/{repository}. + * + * Generated from protobuf field string repository = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getRepository() + { + return $this->repository; + } + + /** + * Required. Name of the Cloud Build V2 Repository. + * Format is + * projects/{project}/locations/{location}/connections/{connection}/repositories/{repository}. + * + * Generated from protobuf field string repository = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setRepository($var) + { + GPBUtil::checkString($var, True); + $this->repository = $var; + + return $this; + } + + /** + * Optional. Relative path from the repository root to the Skaffold Config + * file. + * + * Generated from protobuf field string path = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPath() + { + return $this->path; + } + + /** + * Optional. Relative path from the repository root to the Skaffold Config + * file. + * + * Generated from protobuf field string path = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPath($var) + { + GPBUtil::checkString($var, True); + $this->path = $var; + + return $this; + } + + /** + * Optional. Branch or tag to use when cloning the repository. + * + * Generated from protobuf field string ref = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRef() + { + return $this->ref; + } + + /** + * Optional. Branch or tag to use when cloning the repository. + * + * Generated from protobuf field string ref = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRef($var) + { + GPBUtil::checkString($var, True); + $this->ref = $var; + + return $this; + } + +} + + diff --git a/Deploy/src/V1/SkaffoldModules/SkaffoldGitSource.php b/Deploy/src/V1/SkaffoldModules/SkaffoldGitSource.php index 423da6038864..53ae74f44aca 100644 --- a/Deploy/src/V1/SkaffoldModules/SkaffoldGitSource.php +++ b/Deploy/src/V1/SkaffoldModules/SkaffoldGitSource.php @@ -28,7 +28,7 @@ class SkaffoldGitSource extends \Google\Protobuf\Internal\Message */ private $path = ''; /** - * Optional. Git ref the package should be cloned from. + * Optional. Git branch or tag to use when cloning the repository. * * Generated from protobuf field string ref = 3 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -45,7 +45,7 @@ class SkaffoldGitSource extends \Google\Protobuf\Internal\Message * @type string $path * Optional. Relative path from the repository root to the Skaffold file. * @type string $ref - * Optional. Git ref the package should be cloned from. + * Optional. Git branch or tag to use when cloning the repository. * } */ public function __construct($data = NULL) { @@ -106,7 +106,7 @@ public function setPath($var) } /** - * Optional. Git ref the package should be cloned from. + * Optional. Git branch or tag to use when cloning the repository. * * Generated from protobuf field string ref = 3 [(.google.api.field_behavior) = OPTIONAL]; * @return string @@ -117,7 +117,7 @@ public function getRef() } /** - * Optional. Git ref the package should be cloned from. + * Optional. Git branch or tag to use when cloning the repository. * * Generated from protobuf field string ref = 3 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var diff --git a/Deploy/src/V1/resources/cloud_deploy_descriptor_config.php b/Deploy/src/V1/resources/cloud_deploy_descriptor_config.php index 159ec0077d96..1b7b7bbc3ac4 100644 --- a/Deploy/src/V1/resources/cloud_deploy_descriptor_config.php +++ b/Deploy/src/V1/resources/cloud_deploy_descriptor_config.php @@ -755,6 +755,7 @@ 'location' => 'projects/{project}/locations/{location}', 'membership' => 'projects/{project}/locations/{location}/memberships/{membership}', 'release' => 'projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/releases/{release}', + 'repository' => 'projects/{project}/locations/{location}/connections/{connection}/repositories/{repository}', 'rollout' => 'projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/releases/{release}/rollouts/{rollout}', 'service' => 'projects/{project}/locations/{location}/services/{service}', 'target' => 'projects/{project}/locations/{location}/targets/{target}', diff --git a/Deploy/src/V1/resources/cloud_deploy_rest_client_config.php b/Deploy/src/V1/resources/cloud_deploy_rest_client_config.php index 0efb87a7775f..febaff6b324f 100644 --- a/Deploy/src/V1/resources/cloud_deploy_rest_client_config.php +++ b/Deploy/src/V1/resources/cloud_deploy_rest_client_config.php @@ -550,6 +550,10 @@ 'method' => 'get', 'uriTemplate' => '/v1/{resource=projects/*/locations/*/targets/*}:getIamPolicy', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/customTargetTypes/*}:getIamPolicy', + ], ], 'placeholders' => [ 'resource' => [ @@ -569,6 +573,11 @@ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/targets/*}:setIamPolicy', 'body' => '*', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/customTargetTypes/*}:setIamPolicy', + 'body' => '*', + ], ], 'placeholders' => [ 'resource' => [ diff --git a/Dialogflow/VERSION b/Dialogflow/VERSION index 0eed1a29efd6..f8f4f03b3dcc 100644 --- a/Dialogflow/VERSION +++ b/Dialogflow/VERSION @@ -1 +1 @@ -1.12.0 +1.12.1 diff --git a/DialogflowCx/VERSION b/DialogflowCx/VERSION index 9e11b32fcaa9..d15723fbe8de 100644 --- a/DialogflowCx/VERSION +++ b/DialogflowCx/VERSION @@ -1 +1 @@ -0.3.1 +0.3.2 diff --git a/DiscoveryEngine/VERSION b/DiscoveryEngine/VERSION index d9df1bbc0c7b..af88ba824866 100644 --- a/DiscoveryEngine/VERSION +++ b/DiscoveryEngine/VERSION @@ -1 +1 @@ -0.11.0 +0.11.1 diff --git a/Dlp/VERSION b/Dlp/VERSION index feaae22bac7e..b50dd27dd92e 100644 --- a/Dlp/VERSION +++ b/Dlp/VERSION @@ -1 +1 @@ -1.13.0 +1.13.1 diff --git a/Dms/VERSION b/Dms/VERSION index 4cda8f19edc7..8af85beb5159 100644 --- a/Dms/VERSION +++ b/Dms/VERSION @@ -1 +1 @@ -1.5.2 +1.5.3 diff --git a/DocumentAi/VERSION b/DocumentAi/VERSION index 720c7384c619..0eed1a29efd6 100644 --- a/DocumentAi/VERSION +++ b/DocumentAi/VERSION @@ -1 +1 @@ -1.11.1 +1.12.0 diff --git a/DocumentAi/metadata/V1/DocumentProcessorService.php b/DocumentAi/metadata/V1/DocumentProcessorService.php index b7fff3bc1978..0471f41168e2 100644 Binary files a/DocumentAi/metadata/V1/DocumentProcessorService.php and b/DocumentAi/metadata/V1/DocumentProcessorService.php differ diff --git a/DocumentAi/samples/V1/DocumentProcessorServiceClient/batch_process_documents.php b/DocumentAi/samples/V1/DocumentProcessorServiceClient/batch_process_documents.php index 0160bd39a744..a09cdc4702a2 100644 --- a/DocumentAi/samples/V1/DocumentProcessorServiceClient/batch_process_documents.php +++ b/DocumentAi/samples/V1/DocumentProcessorServiceClient/batch_process_documents.php @@ -34,8 +34,7 @@ * LRO endpoint to batch process many documents. The output is written * to Cloud Storage as JSON in the [Document] format. * - * @param string $name The resource name of - * [Processor][google.cloud.documentai.v1.Processor] or + * @param string $name The resource name of [Processor][google.cloud.documentai.v1.Processor] or * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. * Format: `projects/{project}/locations/{location}/processors/{processor}`, * or diff --git a/DocumentAi/samples/V1/DocumentProcessorServiceClient/create_processor.php b/DocumentAi/samples/V1/DocumentProcessorServiceClient/create_processor.php index d43b36d2063f..4da1d5d88927 100644 --- a/DocumentAi/samples/V1/DocumentProcessorServiceClient/create_processor.php +++ b/DocumentAi/samples/V1/DocumentProcessorServiceClient/create_processor.php @@ -29,12 +29,11 @@ use Google\Cloud\DocumentAI\V1\Processor; /** - * Creates a processor from the - * [ProcessorType][google.cloud.documentai.v1.ProcessorType] provided. The - * processor will be at `ENABLED` state by default after its creation. + * Creates a processor from the [ProcessorType][google.cloud.documentai.v1.ProcessorType] provided. + * The processor will be at `ENABLED` state by default after its creation. * - * @param string $formattedParent The parent (project and location) under which to create the - * processor. Format: `projects/{project}/locations/{location}` + * @param string $formattedParent The parent (project and location) under which to create the processor. + * Format: `projects/{project}/locations/{location}` * Please see {@see DocumentProcessorServiceClient::locationName()} for help formatting this field. */ function create_processor_sample(string $formattedParent): void diff --git a/DocumentAi/samples/V1/DocumentProcessorServiceClient/evaluate_processor_version.php b/DocumentAi/samples/V1/DocumentProcessorServiceClient/evaluate_processor_version.php index 6e97be55dcf5..6ce9a0bd5bc0 100644 --- a/DocumentAi/samples/V1/DocumentProcessorServiceClient/evaluate_processor_version.php +++ b/DocumentAi/samples/V1/DocumentProcessorServiceClient/evaluate_processor_version.php @@ -34,9 +34,7 @@ * Evaluates a ProcessorVersion against annotated documents, producing an * Evaluation. * - * @param string $formattedProcessorVersion The resource name of the - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to - * evaluate. + * @param string $formattedProcessorVersion The resource name of the [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to evaluate. * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` * Please see {@see DocumentProcessorServiceClient::processorVersionName()} for help formatting this field. */ diff --git a/DocumentAi/samples/V1/DocumentProcessorServiceClient/fetch_processor_types.php b/DocumentAi/samples/V1/DocumentProcessorServiceClient/fetch_processor_types.php index ae701e7f169d..8289f03e2441 100644 --- a/DocumentAi/samples/V1/DocumentProcessorServiceClient/fetch_processor_types.php +++ b/DocumentAi/samples/V1/DocumentProcessorServiceClient/fetch_processor_types.php @@ -29,8 +29,7 @@ use Google\Cloud\DocumentAI\V1\FetchProcessorTypesResponse; /** - * Fetches processor types. Note that we don't use - * [ListProcessorTypes][google.cloud.documentai.v1.DocumentProcessorService.ListProcessorTypes] + * Fetches processor types. Note that we don't use [ListProcessorTypes][google.cloud.documentai.v1.DocumentProcessorService.ListProcessorTypes] * here, because it isn't paginated. * * @param string $formattedParent The location of processor types to list. diff --git a/DocumentAi/samples/V1/DocumentProcessorServiceClient/get_evaluation.php b/DocumentAi/samples/V1/DocumentProcessorServiceClient/get_evaluation.php index 5a9fd34e7829..93b7b12e58c2 100644 --- a/DocumentAi/samples/V1/DocumentProcessorServiceClient/get_evaluation.php +++ b/DocumentAi/samples/V1/DocumentProcessorServiceClient/get_evaluation.php @@ -31,8 +31,7 @@ /** * Retrieves a specific evaluation. * - * @param string $formattedName The resource name of the - * [Evaluation][google.cloud.documentai.v1.Evaluation] to get. + * @param string $formattedName The resource name of the [Evaluation][google.cloud.documentai.v1.Evaluation] to get. * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}/evaluations/{evaluation}` * Please see {@see DocumentProcessorServiceClient::evaluationName()} for help formatting this field. */ diff --git a/DocumentAi/samples/V1/DocumentProcessorServiceClient/list_evaluations.php b/DocumentAi/samples/V1/DocumentProcessorServiceClient/list_evaluations.php index 56204bee4cec..d9fd83952492 100644 --- a/DocumentAi/samples/V1/DocumentProcessorServiceClient/list_evaluations.php +++ b/DocumentAi/samples/V1/DocumentProcessorServiceClient/list_evaluations.php @@ -32,9 +32,7 @@ /** * Retrieves a set of evaluations for a given processor version. * - * @param string $formattedParent The resource name of the - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to list - * evaluations for. + * @param string $formattedParent The resource name of the [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to list evaluations for. * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` * Please see {@see DocumentProcessorServiceClient::processorVersionName()} for help formatting this field. */ diff --git a/DocumentAi/samples/V1/DocumentProcessorServiceClient/list_processor_versions.php b/DocumentAi/samples/V1/DocumentProcessorServiceClient/list_processor_versions.php index 6f255e825eef..fdbc0e346d93 100644 --- a/DocumentAi/samples/V1/DocumentProcessorServiceClient/list_processor_versions.php +++ b/DocumentAi/samples/V1/DocumentProcessorServiceClient/list_processor_versions.php @@ -32,9 +32,8 @@ /** * Lists all versions of a processor. * - * @param string $formattedParent The parent (project, location and processor) to list all - * versions. Format: - * `projects/{project}/locations/{location}/processors/{processor}` + * @param string $formattedParent The parent (project, location and processor) to list all versions. + * Format: `projects/{project}/locations/{location}/processors/{processor}` * Please see {@see DocumentProcessorServiceClient::processorName()} for help formatting this field. */ function list_processor_versions_sample(string $formattedParent): void diff --git a/DocumentAi/samples/V1/DocumentProcessorServiceClient/list_processors.php b/DocumentAi/samples/V1/DocumentProcessorServiceClient/list_processors.php index 8e44cb46fb8e..0aa0d1a6308b 100644 --- a/DocumentAi/samples/V1/DocumentProcessorServiceClient/list_processors.php +++ b/DocumentAi/samples/V1/DocumentProcessorServiceClient/list_processors.php @@ -32,8 +32,8 @@ /** * Lists all processors which belong to this project. * - * @param string $formattedParent The parent (project and location) which owns this collection of - * Processors. Format: `projects/{project}/locations/{location}` + * @param string $formattedParent The parent (project and location) which owns this collection of Processors. + * Format: `projects/{project}/locations/{location}` * Please see {@see DocumentProcessorServiceClient::locationName()} for help formatting this field. */ function list_processors_sample(string $formattedParent): void diff --git a/DocumentAi/samples/V1/DocumentProcessorServiceClient/process_document.php b/DocumentAi/samples/V1/DocumentProcessorServiceClient/process_document.php index 83301198db37..b408215b09af 100644 --- a/DocumentAi/samples/V1/DocumentProcessorServiceClient/process_document.php +++ b/DocumentAi/samples/V1/DocumentProcessorServiceClient/process_document.php @@ -31,15 +31,11 @@ /** * Processes a single document. * - * @param string $name The resource name of the - * [Processor][google.cloud.documentai.v1.Processor] or + * @param string $name The resource name of the [Processor][google.cloud.documentai.v1.Processor] or * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] - * to use for processing. If a - * [Processor][google.cloud.documentai.v1.Processor] is specified, the server - * will use its [default - * version][google.cloud.documentai.v1.Processor.default_processor_version]. - * Format: `projects/{project}/locations/{location}/processors/{processor}`, - * or + * to use for processing. If a [Processor][google.cloud.documentai.v1.Processor] is specified, the server will use + * its [default version][google.cloud.documentai.v1.Processor.default_processor_version]. Format: + * `projects/{project}/locations/{location}/processors/{processor}`, or * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` */ function process_document_sample(string $name): void diff --git a/DocumentAi/samples/V1/DocumentProcessorServiceClient/review_document.php b/DocumentAi/samples/V1/DocumentProcessorServiceClient/review_document.php index de14acf00be8..432799e813f9 100644 --- a/DocumentAi/samples/V1/DocumentProcessorServiceClient/review_document.php +++ b/DocumentAi/samples/V1/DocumentProcessorServiceClient/review_document.php @@ -34,9 +34,8 @@ * Send a document for Human Review. The input document should be processed by * the specified processor. * - * @param string $formattedHumanReviewConfig The resource name of the - * [HumanReviewConfig][google.cloud.documentai.v1.HumanReviewConfig] that the - * document will be reviewed with. Please see + * @param string $formattedHumanReviewConfig The resource name of the [HumanReviewConfig][google.cloud.documentai.v1.HumanReviewConfig] that the document will be + * reviewed with. Please see * {@see DocumentProcessorServiceClient::humanReviewConfigName()} for help formatting this field. */ function review_document_sample(string $formattedHumanReviewConfig): void diff --git a/DocumentAi/samples/V1/DocumentProcessorServiceClient/set_default_processor_version.php b/DocumentAi/samples/V1/DocumentProcessorServiceClient/set_default_processor_version.php index 4f6a0333c6bd..14dc833f029c 100644 --- a/DocumentAi/samples/V1/DocumentProcessorServiceClient/set_default_processor_version.php +++ b/DocumentAi/samples/V1/DocumentProcessorServiceClient/set_default_processor_version.php @@ -31,19 +31,14 @@ use Google\Rpc\Status; /** - * Set the default (active) version of a - * [Processor][google.cloud.documentai.v1.Processor] that will be used in - * [ProcessDocument][google.cloud.documentai.v1.DocumentProcessorService.ProcessDocument] - * and + * Set the default (active) version of a [Processor][google.cloud.documentai.v1.Processor] that will be used in + * [ProcessDocument][google.cloud.documentai.v1.DocumentProcessorService.ProcessDocument] and * [BatchProcessDocuments][google.cloud.documentai.v1.DocumentProcessorService.BatchProcessDocuments]. * - * @param string $formattedProcessor The resource name of the - * [Processor][google.cloud.documentai.v1.Processor] to change default - * version. Please see + * @param string $formattedProcessor The resource name of the [Processor][google.cloud.documentai.v1.Processor] to change default version. Please see * {@see DocumentProcessorServiceClient::processorName()} for help formatting this field. - * @param string $formattedDefaultProcessorVersion The resource name of child - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to use as - * default. Format: + * @param string $formattedDefaultProcessorVersion The resource name of child [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to use as default. + * Format: * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{version}` * Please see {@see DocumentProcessorServiceClient::processorVersionName()} for help formatting this field. */ diff --git a/DocumentAi/samples/V1/DocumentProcessorServiceClient/train_processor_version.php b/DocumentAi/samples/V1/DocumentProcessorServiceClient/train_processor_version.php index 17d67c3e5d87..001de10572ec 100644 --- a/DocumentAi/samples/V1/DocumentProcessorServiceClient/train_processor_version.php +++ b/DocumentAi/samples/V1/DocumentProcessorServiceClient/train_processor_version.php @@ -36,9 +36,8 @@ * Operation metadata is returned as * [TrainProcessorVersionMetadata][google.cloud.documentai.v1.TrainProcessorVersionMetadata]. * - * @param string $formattedParent The parent (project, location and processor) to create the new - * version for. Format: - * `projects/{project}/locations/{location}/processors/{processor}`. Please see + * @param string $formattedParent The parent (project, location and processor) to create the new version for. + * Format: `projects/{project}/locations/{location}/processors/{processor}`. Please see * {@see DocumentProcessorServiceClient::processorName()} for help formatting this field. */ function train_processor_version_sample(string $formattedParent): void diff --git a/DocumentAi/src/V1/BatchProcessMetadata/IndividualProcessStatus.php b/DocumentAi/src/V1/BatchProcessMetadata/IndividualProcessStatus.php index c269b8a5cc9d..49e03ee4c83c 100644 --- a/DocumentAi/src/V1/BatchProcessMetadata/IndividualProcessStatus.php +++ b/DocumentAi/src/V1/BatchProcessMetadata/IndividualProcessStatus.php @@ -16,9 +16,8 @@ class IndividualProcessStatus extends \Google\Protobuf\Internal\Message { /** - * The source of the document, same as the - * [input_gcs_source][google.cloud.documentai.v1.BatchProcessMetadata.IndividualProcessStatus.input_gcs_source] - * field in the request when the batch process started. + * The source of the document, same as the [input_gcs_source][google.cloud.documentai.v1.BatchProcessMetadata.IndividualProcessStatus.input_gcs_source] field in the + * request when the batch process started. * * Generated from protobuf field string input_gcs_source = 1; */ @@ -31,8 +30,8 @@ class IndividualProcessStatus extends \Google\Protobuf\Internal\Message private $status = null; /** * The Cloud Storage output destination (in the request as - * [DocumentOutputConfig.GcsOutputConfig.gcs_uri][google.cloud.documentai.v1.DocumentOutputConfig.GcsOutputConfig.gcs_uri]) - * of the processed document if it was successful, otherwise empty. + * [DocumentOutputConfig.GcsOutputConfig.gcs_uri][google.cloud.documentai.v1.DocumentOutputConfig.GcsOutputConfig.gcs_uri]) of the processed + * document if it was successful, otherwise empty. * * Generated from protobuf field string output_gcs_destination = 3; */ @@ -51,15 +50,14 @@ class IndividualProcessStatus extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $input_gcs_source - * The source of the document, same as the - * [input_gcs_source][google.cloud.documentai.v1.BatchProcessMetadata.IndividualProcessStatus.input_gcs_source] - * field in the request when the batch process started. + * The source of the document, same as the [input_gcs_source][google.cloud.documentai.v1.BatchProcessMetadata.IndividualProcessStatus.input_gcs_source] field in the + * request when the batch process started. * @type \Google\Rpc\Status $status * The status processing the document. * @type string $output_gcs_destination * The Cloud Storage output destination (in the request as - * [DocumentOutputConfig.GcsOutputConfig.gcs_uri][google.cloud.documentai.v1.DocumentOutputConfig.GcsOutputConfig.gcs_uri]) - * of the processed document if it was successful, otherwise empty. + * [DocumentOutputConfig.GcsOutputConfig.gcs_uri][google.cloud.documentai.v1.DocumentOutputConfig.GcsOutputConfig.gcs_uri]) of the processed + * document if it was successful, otherwise empty. * @type \Google\Cloud\DocumentAI\V1\HumanReviewStatus $human_review_status * The status of human review on the processed document. * } @@ -70,9 +68,8 @@ public function __construct($data = NULL) { } /** - * The source of the document, same as the - * [input_gcs_source][google.cloud.documentai.v1.BatchProcessMetadata.IndividualProcessStatus.input_gcs_source] - * field in the request when the batch process started. + * The source of the document, same as the [input_gcs_source][google.cloud.documentai.v1.BatchProcessMetadata.IndividualProcessStatus.input_gcs_source] field in the + * request when the batch process started. * * Generated from protobuf field string input_gcs_source = 1; * @return string @@ -83,9 +80,8 @@ public function getInputGcsSource() } /** - * The source of the document, same as the - * [input_gcs_source][google.cloud.documentai.v1.BatchProcessMetadata.IndividualProcessStatus.input_gcs_source] - * field in the request when the batch process started. + * The source of the document, same as the [input_gcs_source][google.cloud.documentai.v1.BatchProcessMetadata.IndividualProcessStatus.input_gcs_source] field in the + * request when the batch process started. * * Generated from protobuf field string input_gcs_source = 1; * @param string $var @@ -137,8 +133,8 @@ public function setStatus($var) /** * The Cloud Storage output destination (in the request as - * [DocumentOutputConfig.GcsOutputConfig.gcs_uri][google.cloud.documentai.v1.DocumentOutputConfig.GcsOutputConfig.gcs_uri]) - * of the processed document if it was successful, otherwise empty. + * [DocumentOutputConfig.GcsOutputConfig.gcs_uri][google.cloud.documentai.v1.DocumentOutputConfig.GcsOutputConfig.gcs_uri]) of the processed + * document if it was successful, otherwise empty. * * Generated from protobuf field string output_gcs_destination = 3; * @return string @@ -150,8 +146,8 @@ public function getOutputGcsDestination() /** * The Cloud Storage output destination (in the request as - * [DocumentOutputConfig.GcsOutputConfig.gcs_uri][google.cloud.documentai.v1.DocumentOutputConfig.GcsOutputConfig.gcs_uri]) - * of the processed document if it was successful, otherwise empty. + * [DocumentOutputConfig.GcsOutputConfig.gcs_uri][google.cloud.documentai.v1.DocumentOutputConfig.GcsOutputConfig.gcs_uri]) of the processed + * document if it was successful, otherwise empty. * * Generated from protobuf field string output_gcs_destination = 3; * @param string $var diff --git a/DocumentAi/src/V1/BatchProcessRequest.php b/DocumentAi/src/V1/BatchProcessRequest.php index 963bc1d14986..c97e6c96ae63 100644 --- a/DocumentAi/src/V1/BatchProcessRequest.php +++ b/DocumentAi/src/V1/BatchProcessRequest.php @@ -17,8 +17,7 @@ class BatchProcessRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The resource name of - * [Processor][google.cloud.documentai.v1.Processor] or + * Required. The resource name of [Processor][google.cloud.documentai.v1.Processor] or * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. * Format: `projects/{project}/locations/{location}/processors/{processor}`, * or @@ -68,8 +67,7 @@ class BatchProcessRequest extends \Google\Protobuf\Internal\Message private $labels; /** - * @param string $name Required. The resource name of - * [Processor][google.cloud.documentai.v1.Processor] or + * @param string $name Required. The resource name of [Processor][google.cloud.documentai.v1.Processor] or * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. * Format: `projects/{project}/locations/{location}/processors/{processor}`, * or @@ -92,8 +90,7 @@ public static function build(string $name): self * Optional. Data for populating the Message object. * * @type string $name - * Required. The resource name of - * [Processor][google.cloud.documentai.v1.Processor] or + * Required. The resource name of [Processor][google.cloud.documentai.v1.Processor] or * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. * Format: `projects/{project}/locations/{location}/processors/{processor}`, * or @@ -125,8 +122,7 @@ public function __construct($data = NULL) { } /** - * Required. The resource name of - * [Processor][google.cloud.documentai.v1.Processor] or + * Required. The resource name of [Processor][google.cloud.documentai.v1.Processor] or * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. * Format: `projects/{project}/locations/{location}/processors/{processor}`, * or @@ -141,8 +137,7 @@ public function getName() } /** - * Required. The resource name of - * [Processor][google.cloud.documentai.v1.Processor] or + * Required. The resource name of [Processor][google.cloud.documentai.v1.Processor] or * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. * Format: `projects/{project}/locations/{location}/processors/{processor}`, * or diff --git a/DocumentAi/src/V1/Client/DocumentProcessorServiceClient.php b/DocumentAi/src/V1/Client/DocumentProcessorServiceClient.php index ee2355f5ef2e..45299e42b25b 100644 --- a/DocumentAi/src/V1/Client/DocumentProcessorServiceClient.php +++ b/DocumentAi/src/V1/Client/DocumentProcessorServiceClient.php @@ -436,9 +436,8 @@ public function batchProcessDocuments(BatchProcessRequest $request, array $callO } /** - * Creates a processor from the - * [ProcessorType][google.cloud.documentai.v1.ProcessorType] provided. The - * processor will be at `ENABLED` state by default after its creation. + * Creates a processor from the [ProcessorType][google.cloud.documentai.v1.ProcessorType] provided. + * The processor will be at `ENABLED` state by default after its creation. * * The async variant is * {@see DocumentProcessorServiceClient::createProcessorAsync()} . @@ -630,8 +629,7 @@ public function evaluateProcessorVersion(EvaluateProcessorVersionRequest $reques } /** - * Fetches processor types. Note that we don't use - * [ListProcessorTypes][google.cloud.documentai.v1.DocumentProcessorService.ListProcessorTypes] + * Fetches processor types. Note that we don't use [ListProcessorTypes][google.cloud.documentai.v1.DocumentProcessorService.ListProcessorTypes] * here, because it isn't paginated. * * The async variant is @@ -930,10 +928,8 @@ public function reviewDocument(ReviewDocumentRequest $request, array $callOption } /** - * Set the default (active) version of a - * [Processor][google.cloud.documentai.v1.Processor] that will be used in - * [ProcessDocument][google.cloud.documentai.v1.DocumentProcessorService.ProcessDocument] - * and + * Set the default (active) version of a [Processor][google.cloud.documentai.v1.Processor] that will be used in + * [ProcessDocument][google.cloud.documentai.v1.DocumentProcessorService.ProcessDocument] and * [BatchProcessDocuments][google.cloud.documentai.v1.DocumentProcessorService.BatchProcessDocuments]. * * The async variant is diff --git a/DocumentAi/src/V1/CreateProcessorRequest.php b/DocumentAi/src/V1/CreateProcessorRequest.php index c68fac4ebfb3..a3e8a6c7c008 100644 --- a/DocumentAi/src/V1/CreateProcessorRequest.php +++ b/DocumentAi/src/V1/CreateProcessorRequest.php @@ -10,28 +10,24 @@ /** * Request message for the - * [CreateProcessor][google.cloud.documentai.v1.DocumentProcessorService.CreateProcessor] - * method. Notice this request is sent to a regionalized backend service. If the - * [ProcessorType][google.cloud.documentai.v1.ProcessorType] isn't available in - * that region, the creation fails. + * [CreateProcessor][google.cloud.documentai.v1.DocumentProcessorService.CreateProcessor] method. Notice + * this request is sent to a regionalized backend service. If the + * [ProcessorType][google.cloud.documentai.v1.ProcessorType] isn't available in that region, the creation fails. * * Generated from protobuf message google.cloud.documentai.v1.CreateProcessorRequest */ class CreateProcessorRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The parent (project and location) under which to create the - * processor. Format: `projects/{project}/locations/{location}` + * Required. The parent (project and location) under which to create the processor. + * Format: `projects/{project}/locations/{location}` * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ private $parent = ''; /** - * Required. The processor to be created, requires - * [Processor.type][google.cloud.documentai.v1.Processor.type] and - * [Processor.display_name][google.cloud.documentai.v1.Processor.display_name] - * to be set. Also, the - * [Processor.kms_key_name][google.cloud.documentai.v1.Processor.kms_key_name] + * Required. The processor to be created, requires [Processor.type][google.cloud.documentai.v1.Processor.type] and + * [Processor.display_name][google.cloud.documentai.v1.Processor.display_name] to be set. Also, the [Processor.kms_key_name][google.cloud.documentai.v1.Processor.kms_key_name] * field must be set if the processor is under CMEK. * * Generated from protobuf field .google.cloud.documentai.v1.Processor processor = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -39,14 +35,11 @@ class CreateProcessorRequest extends \Google\Protobuf\Internal\Message private $processor = null; /** - * @param string $parent Required. The parent (project and location) under which to create the - * processor. Format: `projects/{project}/locations/{location}` + * @param string $parent Required. The parent (project and location) under which to create the processor. + * Format: `projects/{project}/locations/{location}` * Please see {@see DocumentProcessorServiceClient::locationName()} for help formatting this field. - * @param \Google\Cloud\DocumentAI\V1\Processor $processor Required. The processor to be created, requires - * [Processor.type][google.cloud.documentai.v1.Processor.type] and - * [Processor.display_name][google.cloud.documentai.v1.Processor.display_name] - * to be set. Also, the - * [Processor.kms_key_name][google.cloud.documentai.v1.Processor.kms_key_name] + * @param \Google\Cloud\DocumentAI\V1\Processor $processor Required. The processor to be created, requires [Processor.type][google.cloud.documentai.v1.Processor.type] and + * [Processor.display_name][google.cloud.documentai.v1.Processor.display_name] to be set. Also, the [Processor.kms_key_name][google.cloud.documentai.v1.Processor.kms_key_name] * field must be set if the processor is under CMEK. * * @return \Google\Cloud\DocumentAI\V1\CreateProcessorRequest @@ -67,14 +60,11 @@ public static function build(string $parent, \Google\Cloud\DocumentAI\V1\Process * Optional. Data for populating the Message object. * * @type string $parent - * Required. The parent (project and location) under which to create the - * processor. Format: `projects/{project}/locations/{location}` + * Required. The parent (project and location) under which to create the processor. + * Format: `projects/{project}/locations/{location}` * @type \Google\Cloud\DocumentAI\V1\Processor $processor - * Required. The processor to be created, requires - * [Processor.type][google.cloud.documentai.v1.Processor.type] and - * [Processor.display_name][google.cloud.documentai.v1.Processor.display_name] - * to be set. Also, the - * [Processor.kms_key_name][google.cloud.documentai.v1.Processor.kms_key_name] + * Required. The processor to be created, requires [Processor.type][google.cloud.documentai.v1.Processor.type] and + * [Processor.display_name][google.cloud.documentai.v1.Processor.display_name] to be set. Also, the [Processor.kms_key_name][google.cloud.documentai.v1.Processor.kms_key_name] * field must be set if the processor is under CMEK. * } */ @@ -84,8 +74,8 @@ public function __construct($data = NULL) { } /** - * Required. The parent (project and location) under which to create the - * processor. Format: `projects/{project}/locations/{location}` + * Required. The parent (project and location) under which to create the processor. + * Format: `projects/{project}/locations/{location}` * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string @@ -96,8 +86,8 @@ public function getParent() } /** - * Required. The parent (project and location) under which to create the - * processor. Format: `projects/{project}/locations/{location}` + * Required. The parent (project and location) under which to create the processor. + * Format: `projects/{project}/locations/{location}` * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var @@ -112,11 +102,8 @@ public function setParent($var) } /** - * Required. The processor to be created, requires - * [Processor.type][google.cloud.documentai.v1.Processor.type] and - * [Processor.display_name][google.cloud.documentai.v1.Processor.display_name] - * to be set. Also, the - * [Processor.kms_key_name][google.cloud.documentai.v1.Processor.kms_key_name] + * Required. The processor to be created, requires [Processor.type][google.cloud.documentai.v1.Processor.type] and + * [Processor.display_name][google.cloud.documentai.v1.Processor.display_name] to be set. Also, the [Processor.kms_key_name][google.cloud.documentai.v1.Processor.kms_key_name] * field must be set if the processor is under CMEK. * * Generated from protobuf field .google.cloud.documentai.v1.Processor processor = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -138,11 +125,8 @@ public function clearProcessor() } /** - * Required. The processor to be created, requires - * [Processor.type][google.cloud.documentai.v1.Processor.type] and - * [Processor.display_name][google.cloud.documentai.v1.Processor.display_name] - * to be set. Also, the - * [Processor.kms_key_name][google.cloud.documentai.v1.Processor.kms_key_name] + * Required. The processor to be created, requires [Processor.type][google.cloud.documentai.v1.Processor.type] and + * [Processor.display_name][google.cloud.documentai.v1.Processor.display_name] to be set. Also, the [Processor.kms_key_name][google.cloud.documentai.v1.Processor.kms_key_name] * field must be set if the processor is under CMEK. * * Generated from protobuf field .google.cloud.documentai.v1.Processor processor = 2 [(.google.api.field_behavior) = REQUIRED]; diff --git a/DocumentAi/src/V1/DeleteProcessorMetadata.php b/DocumentAi/src/V1/DeleteProcessorMetadata.php index 95359c1f8ea2..0c4a43a40dbf 100644 --- a/DocumentAi/src/V1/DeleteProcessorMetadata.php +++ b/DocumentAi/src/V1/DeleteProcessorMetadata.php @@ -10,8 +10,7 @@ /** * The long-running operation metadata for the - * [DeleteProcessor][google.cloud.documentai.v1.DocumentProcessorService.DeleteProcessor] - * method. + * [DeleteProcessor][google.cloud.documentai.v1.DocumentProcessorService.DeleteProcessor] method. * * Generated from protobuf message google.cloud.documentai.v1.DeleteProcessorMetadata */ diff --git a/DocumentAi/src/V1/DeleteProcessorRequest.php b/DocumentAi/src/V1/DeleteProcessorRequest.php index 886e6f7d768b..eb2d18fe3429 100644 --- a/DocumentAi/src/V1/DeleteProcessorRequest.php +++ b/DocumentAi/src/V1/DeleteProcessorRequest.php @@ -10,8 +10,7 @@ /** * Request message for the - * [DeleteProcessor][google.cloud.documentai.v1.DocumentProcessorService.DeleteProcessor] - * method. + * [DeleteProcessor][google.cloud.documentai.v1.DocumentProcessorService.DeleteProcessor] method. * * Generated from protobuf message google.cloud.documentai.v1.DeleteProcessorRequest */ diff --git a/DocumentAi/src/V1/DisableProcessorMetadata.php b/DocumentAi/src/V1/DisableProcessorMetadata.php index 775058edf461..044c3e9c73b6 100644 --- a/DocumentAi/src/V1/DisableProcessorMetadata.php +++ b/DocumentAi/src/V1/DisableProcessorMetadata.php @@ -10,8 +10,7 @@ /** * The long-running operation metadata for the - * [DisableProcessor][google.cloud.documentai.v1.DocumentProcessorService.DisableProcessor] - * method. + * [DisableProcessor][google.cloud.documentai.v1.DocumentProcessorService.DisableProcessor] method. * * Generated from protobuf message google.cloud.documentai.v1.DisableProcessorMetadata */ diff --git a/DocumentAi/src/V1/DisableProcessorRequest.php b/DocumentAi/src/V1/DisableProcessorRequest.php index 55e51e24d0de..575dfe00ec56 100644 --- a/DocumentAi/src/V1/DisableProcessorRequest.php +++ b/DocumentAi/src/V1/DisableProcessorRequest.php @@ -10,8 +10,7 @@ /** * Request message for the - * [DisableProcessor][google.cloud.documentai.v1.DocumentProcessorService.DisableProcessor] - * method. + * [DisableProcessor][google.cloud.documentai.v1.DocumentProcessorService.DisableProcessor] method. * * Generated from protobuf message google.cloud.documentai.v1.DisableProcessorRequest */ diff --git a/DocumentAi/src/V1/DisableProcessorResponse.php b/DocumentAi/src/V1/DisableProcessorResponse.php index f1f15d776735..5b1db499a5d0 100644 --- a/DocumentAi/src/V1/DisableProcessorResponse.php +++ b/DocumentAi/src/V1/DisableProcessorResponse.php @@ -10,8 +10,8 @@ /** * Response message for the - * [DisableProcessor][google.cloud.documentai.v1.DocumentProcessorService.DisableProcessor] - * method. Intentionally empty proto for adding fields in future. + * [DisableProcessor][google.cloud.documentai.v1.DocumentProcessorService.DisableProcessor] method. + * Intentionally empty proto for adding fields in future. * * Generated from protobuf message google.cloud.documentai.v1.DisableProcessorResponse */ diff --git a/DocumentAi/src/V1/Document.php b/DocumentAi/src/V1/Document.php index 680a4cb3d531..1d12d75d8d18 100644 --- a/DocumentAi/src/V1/Document.php +++ b/DocumentAi/src/V1/Document.php @@ -45,25 +45,22 @@ class Document extends \Google\Protobuf\Internal\Message */ private $pages; /** - * A list of entities detected on - * [Document.text][google.cloud.documentai.v1.Document.text]. For document - * shards, entities in this list may cross shard boundaries. + * A list of entities detected on [Document.text][google.cloud.documentai.v1.Document.text]. For document shards, + * entities in this list may cross shard boundaries. * * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Entity entities = 7; */ private $entities; /** - * Placeholder. Relationship among - * [Document.entities][google.cloud.documentai.v1.Document.entities]. + * Placeholder. Relationship among [Document.entities][google.cloud.documentai.v1.Document.entities]. * * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.EntityRelation entity_relations = 8; */ private $entity_relations; /** - * Placeholder. A list of text corrections made to - * [Document.text][google.cloud.documentai.v1.Document.text]. This is usually - * used for annotating corrections to OCR mistakes. Text changes for a given - * revision may not overlap with each other. + * Placeholder. A list of text corrections made to [Document.text][google.cloud.documentai.v1.Document.text]. This + * is usually used for annotating corrections to OCR mistakes. Text changes + * for a given revision may not overlap with each other. * * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.TextChange text_changes = 14; */ @@ -114,17 +111,14 @@ class Document extends \Google\Protobuf\Internal\Message * @type array<\Google\Cloud\DocumentAI\V1\Document\Page>|\Google\Protobuf\Internal\RepeatedField $pages * Visual page layout for the [Document][google.cloud.documentai.v1.Document]. * @type array<\Google\Cloud\DocumentAI\V1\Document\Entity>|\Google\Protobuf\Internal\RepeatedField $entities - * A list of entities detected on - * [Document.text][google.cloud.documentai.v1.Document.text]. For document - * shards, entities in this list may cross shard boundaries. + * A list of entities detected on [Document.text][google.cloud.documentai.v1.Document.text]. For document shards, + * entities in this list may cross shard boundaries. * @type array<\Google\Cloud\DocumentAI\V1\Document\EntityRelation>|\Google\Protobuf\Internal\RepeatedField $entity_relations - * Placeholder. Relationship among - * [Document.entities][google.cloud.documentai.v1.Document.entities]. + * Placeholder. Relationship among [Document.entities][google.cloud.documentai.v1.Document.entities]. * @type array<\Google\Cloud\DocumentAI\V1\Document\TextChange>|\Google\Protobuf\Internal\RepeatedField $text_changes - * Placeholder. A list of text corrections made to - * [Document.text][google.cloud.documentai.v1.Document.text]. This is usually - * used for annotating corrections to OCR mistakes. Text changes for a given - * revision may not overlap with each other. + * Placeholder. A list of text corrections made to [Document.text][google.cloud.documentai.v1.Document.text]. This + * is usually used for annotating corrections to OCR mistakes. Text changes + * for a given revision may not overlap with each other. * @type \Google\Cloud\DocumentAI\V1\Document\ShardInfo $shard_info * Information about the sharding if this document is sharded part of a larger * document. If the document is not sharded, this message is not specified. @@ -322,9 +316,8 @@ public function setPages($var) } /** - * A list of entities detected on - * [Document.text][google.cloud.documentai.v1.Document.text]. For document - * shards, entities in this list may cross shard boundaries. + * A list of entities detected on [Document.text][google.cloud.documentai.v1.Document.text]. For document shards, + * entities in this list may cross shard boundaries. * * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Entity entities = 7; * @return \Google\Protobuf\Internal\RepeatedField @@ -335,9 +328,8 @@ public function getEntities() } /** - * A list of entities detected on - * [Document.text][google.cloud.documentai.v1.Document.text]. For document - * shards, entities in this list may cross shard boundaries. + * A list of entities detected on [Document.text][google.cloud.documentai.v1.Document.text]. For document shards, + * entities in this list may cross shard boundaries. * * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Entity entities = 7; * @param array<\Google\Cloud\DocumentAI\V1\Document\Entity>|\Google\Protobuf\Internal\RepeatedField $var @@ -352,8 +344,7 @@ public function setEntities($var) } /** - * Placeholder. Relationship among - * [Document.entities][google.cloud.documentai.v1.Document.entities]. + * Placeholder. Relationship among [Document.entities][google.cloud.documentai.v1.Document.entities]. * * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.EntityRelation entity_relations = 8; * @return \Google\Protobuf\Internal\RepeatedField @@ -364,8 +355,7 @@ public function getEntityRelations() } /** - * Placeholder. Relationship among - * [Document.entities][google.cloud.documentai.v1.Document.entities]. + * Placeholder. Relationship among [Document.entities][google.cloud.documentai.v1.Document.entities]. * * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.EntityRelation entity_relations = 8; * @param array<\Google\Cloud\DocumentAI\V1\Document\EntityRelation>|\Google\Protobuf\Internal\RepeatedField $var @@ -380,10 +370,9 @@ public function setEntityRelations($var) } /** - * Placeholder. A list of text corrections made to - * [Document.text][google.cloud.documentai.v1.Document.text]. This is usually - * used for annotating corrections to OCR mistakes. Text changes for a given - * revision may not overlap with each other. + * Placeholder. A list of text corrections made to [Document.text][google.cloud.documentai.v1.Document.text]. This + * is usually used for annotating corrections to OCR mistakes. Text changes + * for a given revision may not overlap with each other. * * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.TextChange text_changes = 14; * @return \Google\Protobuf\Internal\RepeatedField @@ -394,10 +383,9 @@ public function getTextChanges() } /** - * Placeholder. A list of text corrections made to - * [Document.text][google.cloud.documentai.v1.Document.text]. This is usually - * used for annotating corrections to OCR mistakes. Text changes for a given - * revision may not overlap with each other. + * Placeholder. A list of text corrections made to [Document.text][google.cloud.documentai.v1.Document.text]. This + * is usually used for annotating corrections to OCR mistakes. Text changes + * for a given revision may not overlap with each other. * * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.TextChange text_changes = 14; * @param array<\Google\Cloud\DocumentAI\V1\Document\TextChange>|\Google\Protobuf\Internal\RepeatedField $var diff --git a/DocumentAi/src/V1/Document/Entity.php b/DocumentAi/src/V1/Document/Entity.php index 57bd426eb317..7f9ee563e314 100644 --- a/DocumentAi/src/V1/Document/Entity.php +++ b/DocumentAi/src/V1/Document/Entity.php @@ -19,8 +19,7 @@ class Entity extends \Google\Protobuf\Internal\Message { /** * Optional. Provenance of the entity. - * Text anchor indexing into the - * [Document.text][google.cloud.documentai.v1.Document.text]. + * Text anchor indexing into the [Document.text][google.cloud.documentai.v1.Document.text]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.TextAnchor text_anchor = 1 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -50,8 +49,8 @@ class Entity extends \Google\Protobuf\Internal\Message */ private $confidence = 0.0; /** - * Optional. Represents the provenance of this entity wrt. the location on - * the page where it was found. + * Optional. Represents the provenance of this entity wrt. the location on the + * page where it was found. * * Generated from protobuf field .google.cloud.documentai.v1.Document.PageAnchor page_anchor = 6 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -64,8 +63,8 @@ class Entity extends \Google\Protobuf\Internal\Message */ private $id = ''; /** - * Optional. Normalized entity value. Absent if the extracted value could - * not be converted or the type (e.g. address) is not supported for certain + * Optional. Normalized entity value. Absent if the extracted value could not be + * converted or the type (e.g. address) is not supported for certain * parsers. This field is also only populated for certain supported document * types. * @@ -73,8 +72,8 @@ class Entity extends \Google\Protobuf\Internal\Message */ private $normalized_value = null; /** - * Optional. Entities can be nested to form a hierarchical data structure - * representing the content in the document. + * Optional. Entities can be nested to form a hierarchical data structure representing + * the content in the document. * * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Entity properties = 10 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -86,8 +85,7 @@ class Entity extends \Google\Protobuf\Internal\Message */ private $provenance = null; /** - * Optional. Whether the entity will be redacted for de-identification - * purposes. + * Optional. Whether the entity will be redacted for de-identification purposes. * * Generated from protobuf field bool redacted = 12 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -101,8 +99,7 @@ class Entity extends \Google\Protobuf\Internal\Message * * @type \Google\Cloud\DocumentAI\V1\Document\TextAnchor $text_anchor * Optional. Provenance of the entity. - * Text anchor indexing into the - * [Document.text][google.cloud.documentai.v1.Document.text]. + * Text anchor indexing into the [Document.text][google.cloud.documentai.v1.Document.text]. * @type string $type * Required. Entity type from a schema e.g. `Address`. * @type string $mention_text @@ -112,24 +109,23 @@ class Entity extends \Google\Protobuf\Internal\Message * @type float $confidence * Optional. Confidence of detected Schema entity. Range `[0, 1]`. * @type \Google\Cloud\DocumentAI\V1\Document\PageAnchor $page_anchor - * Optional. Represents the provenance of this entity wrt. the location on - * the page where it was found. + * Optional. Represents the provenance of this entity wrt. the location on the + * page where it was found. * @type string $id * Optional. Canonical id. This will be a unique value in the entity list * for this document. * @type \Google\Cloud\DocumentAI\V1\Document\Entity\NormalizedValue $normalized_value - * Optional. Normalized entity value. Absent if the extracted value could - * not be converted or the type (e.g. address) is not supported for certain + * Optional. Normalized entity value. Absent if the extracted value could not be + * converted or the type (e.g. address) is not supported for certain * parsers. This field is also only populated for certain supported document * types. * @type array<\Google\Cloud\DocumentAI\V1\Document\Entity>|\Google\Protobuf\Internal\RepeatedField $properties - * Optional. Entities can be nested to form a hierarchical data structure - * representing the content in the document. + * Optional. Entities can be nested to form a hierarchical data structure representing + * the content in the document. * @type \Google\Cloud\DocumentAI\V1\Document\Provenance $provenance * Optional. The history of this annotation. * @type bool $redacted - * Optional. Whether the entity will be redacted for de-identification - * purposes. + * Optional. Whether the entity will be redacted for de-identification purposes. * } */ public function __construct($data = NULL) { @@ -139,8 +135,7 @@ public function __construct($data = NULL) { /** * Optional. Provenance of the entity. - * Text anchor indexing into the - * [Document.text][google.cloud.documentai.v1.Document.text]. + * Text anchor indexing into the [Document.text][google.cloud.documentai.v1.Document.text]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.TextAnchor text_anchor = 1 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Cloud\DocumentAI\V1\Document\TextAnchor|null @@ -162,8 +157,7 @@ public function clearTextAnchor() /** * Optional. Provenance of the entity. - * Text anchor indexing into the - * [Document.text][google.cloud.documentai.v1.Document.text]. + * Text anchor indexing into the [Document.text][google.cloud.documentai.v1.Document.text]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.TextAnchor text_anchor = 1 [(.google.api.field_behavior) = OPTIONAL]; * @param \Google\Cloud\DocumentAI\V1\Document\TextAnchor $var @@ -282,8 +276,8 @@ public function setConfidence($var) } /** - * Optional. Represents the provenance of this entity wrt. the location on - * the page where it was found. + * Optional. Represents the provenance of this entity wrt. the location on the + * page where it was found. * * Generated from protobuf field .google.cloud.documentai.v1.Document.PageAnchor page_anchor = 6 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Cloud\DocumentAI\V1\Document\PageAnchor|null @@ -304,8 +298,8 @@ public function clearPageAnchor() } /** - * Optional. Represents the provenance of this entity wrt. the location on - * the page where it was found. + * Optional. Represents the provenance of this entity wrt. the location on the + * page where it was found. * * Generated from protobuf field .google.cloud.documentai.v1.Document.PageAnchor page_anchor = 6 [(.google.api.field_behavior) = OPTIONAL]; * @param \Google\Cloud\DocumentAI\V1\Document\PageAnchor $var @@ -348,8 +342,8 @@ public function setId($var) } /** - * Optional. Normalized entity value. Absent if the extracted value could - * not be converted or the type (e.g. address) is not supported for certain + * Optional. Normalized entity value. Absent if the extracted value could not be + * converted or the type (e.g. address) is not supported for certain * parsers. This field is also only populated for certain supported document * types. * @@ -372,8 +366,8 @@ public function clearNormalizedValue() } /** - * Optional. Normalized entity value. Absent if the extracted value could - * not be converted or the type (e.g. address) is not supported for certain + * Optional. Normalized entity value. Absent if the extracted value could not be + * converted or the type (e.g. address) is not supported for certain * parsers. This field is also only populated for certain supported document * types. * @@ -390,8 +384,8 @@ public function setNormalizedValue($var) } /** - * Optional. Entities can be nested to form a hierarchical data structure - * representing the content in the document. + * Optional. Entities can be nested to form a hierarchical data structure representing + * the content in the document. * * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Entity properties = 10 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Protobuf\Internal\RepeatedField @@ -402,8 +396,8 @@ public function getProperties() } /** - * Optional. Entities can be nested to form a hierarchical data structure - * representing the content in the document. + * Optional. Entities can be nested to form a hierarchical data structure representing + * the content in the document. * * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Entity properties = 10 [(.google.api.field_behavior) = OPTIONAL]; * @param array<\Google\Cloud\DocumentAI\V1\Document\Entity>|\Google\Protobuf\Internal\RepeatedField $var @@ -454,8 +448,7 @@ public function setProvenance($var) } /** - * Optional. Whether the entity will be redacted for de-identification - * purposes. + * Optional. Whether the entity will be redacted for de-identification purposes. * * Generated from protobuf field bool redacted = 12 [(.google.api.field_behavior) = OPTIONAL]; * @return bool @@ -466,8 +459,7 @@ public function getRedacted() } /** - * Optional. Whether the entity will be redacted for de-identification - * purposes. + * Optional. Whether the entity will be redacted for de-identification purposes. * * Generated from protobuf field bool redacted = 12 [(.google.api.field_behavior) = OPTIONAL]; * @param bool $var diff --git a/DocumentAi/src/V1/Document/EntityRelation.php b/DocumentAi/src/V1/Document/EntityRelation.php index 7669e0965bf4..a9a0a239a4ae 100644 --- a/DocumentAi/src/V1/Document/EntityRelation.php +++ b/DocumentAi/src/V1/Document/EntityRelation.php @@ -9,8 +9,7 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Relationship between - * [Entities][google.cloud.documentai.v1.Document.Entity]. + * Relationship between [Entities][google.cloud.documentai.v1.Document.Entity]. * * Generated from protobuf message google.cloud.documentai.v1.Document.EntityRelation */ diff --git a/DocumentAi/src/V1/Document/Page.php b/DocumentAi/src/V1/Document/Page.php index d9a35c1a6238..d783a0631b05 100644 --- a/DocumentAi/src/V1/Document/Page.php +++ b/DocumentAi/src/V1/Document/Page.php @@ -16,11 +16,9 @@ class Page extends \Google\Protobuf\Internal\Message { /** - * 1-based index for current - * [Page][google.cloud.documentai.v1.Document.Page] in a parent - * [Document][google.cloud.documentai.v1.Document]. Useful when a page is - * taken out of a [Document][google.cloud.documentai.v1.Document] for - * individual processing. + * 1-based index for current [Page][google.cloud.documentai.v1.Document.Page] in a parent [Document][google.cloud.documentai.v1.Document]. + * Useful when a page is taken out of a [Document][google.cloud.documentai.v1.Document] for individual + * processing. * * Generated from protobuf field int32 page_number = 1; */ @@ -138,11 +136,9 @@ class Page extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type int $page_number - * 1-based index for current - * [Page][google.cloud.documentai.v1.Document.Page] in a parent - * [Document][google.cloud.documentai.v1.Document]. Useful when a page is - * taken out of a [Document][google.cloud.documentai.v1.Document] for - * individual processing. + * 1-based index for current [Page][google.cloud.documentai.v1.Document.Page] in a parent [Document][google.cloud.documentai.v1.Document]. + * Useful when a page is taken out of a [Document][google.cloud.documentai.v1.Document] for individual + * processing. * @type \Google\Cloud\DocumentAI\V1\Document\Page\Image $image * Rendered image for this page. This image is preprocessed to remove any * skew, rotation, and distortions such that the annotation bounding boxes @@ -191,11 +187,9 @@ public function __construct($data = NULL) { } /** - * 1-based index for current - * [Page][google.cloud.documentai.v1.Document.Page] in a parent - * [Document][google.cloud.documentai.v1.Document]. Useful when a page is - * taken out of a [Document][google.cloud.documentai.v1.Document] for - * individual processing. + * 1-based index for current [Page][google.cloud.documentai.v1.Document.Page] in a parent [Document][google.cloud.documentai.v1.Document]. + * Useful when a page is taken out of a [Document][google.cloud.documentai.v1.Document] for individual + * processing. * * Generated from protobuf field int32 page_number = 1; * @return int @@ -206,11 +200,9 @@ public function getPageNumber() } /** - * 1-based index for current - * [Page][google.cloud.documentai.v1.Document.Page] in a parent - * [Document][google.cloud.documentai.v1.Document]. Useful when a page is - * taken out of a [Document][google.cloud.documentai.v1.Document] for - * individual processing. + * 1-based index for current [Page][google.cloud.documentai.v1.Document.Page] in a parent [Document][google.cloud.documentai.v1.Document]. + * Useful when a page is taken out of a [Document][google.cloud.documentai.v1.Document] for individual + * processing. * * Generated from protobuf field int32 page_number = 1; * @param int $var diff --git a/DocumentAi/src/V1/Document/Page/Block.php b/DocumentAi/src/V1/Document/Page/Block.php index 9db40cafb22a..6d7b6e90d732 100644 --- a/DocumentAi/src/V1/Document/Page/Block.php +++ b/DocumentAi/src/V1/Document/Page/Block.php @@ -17,8 +17,7 @@ class Block extends \Google\Protobuf\Internal\Message { /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Block][google.cloud.documentai.v1.Document.Page.Block]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [Block][google.cloud.documentai.v1.Document.Page.Block]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; */ @@ -44,8 +43,7 @@ class Block extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type \Google\Cloud\DocumentAI\V1\Document\Page\Layout $layout - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Block][google.cloud.documentai.v1.Document.Page.Block]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [Block][google.cloud.documentai.v1.Document.Page.Block]. * @type array<\Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage>|\Google\Protobuf\Internal\RepeatedField $detected_languages * A list of detected languages together with confidence. * @type \Google\Cloud\DocumentAI\V1\Document\Provenance $provenance @@ -58,8 +56,7 @@ public function __construct($data = NULL) { } /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Block][google.cloud.documentai.v1.Document.Page.Block]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [Block][google.cloud.documentai.v1.Document.Page.Block]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; * @return \Google\Cloud\DocumentAI\V1\Document\Page\Layout|null @@ -80,8 +77,7 @@ public function clearLayout() } /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Block][google.cloud.documentai.v1.Document.Page.Block]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [Block][google.cloud.documentai.v1.Document.Page.Block]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; * @param \Google\Cloud\DocumentAI\V1\Document\Page\Layout $var diff --git a/DocumentAi/src/V1/Document/Page/DetectedBarcode.php b/DocumentAi/src/V1/Document/Page/DetectedBarcode.php index e9f2aad81448..d1ba2db32d1b 100644 --- a/DocumentAi/src/V1/Document/Page/DetectedBarcode.php +++ b/DocumentAi/src/V1/Document/Page/DetectedBarcode.php @@ -16,15 +16,13 @@ class DetectedBarcode extends \Google\Protobuf\Internal\Message { /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [DetectedBarcode][google.cloud.documentai.v1.Document.Page.DetectedBarcode]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [DetectedBarcode][google.cloud.documentai.v1.Document.Page.DetectedBarcode]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; */ private $layout = null; /** - * Detailed barcode information of the - * [DetectedBarcode][google.cloud.documentai.v1.Document.Page.DetectedBarcode]. + * Detailed barcode information of the [DetectedBarcode][google.cloud.documentai.v1.Document.Page.DetectedBarcode]. * * Generated from protobuf field .google.cloud.documentai.v1.Barcode barcode = 2; */ @@ -37,11 +35,9 @@ class DetectedBarcode extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type \Google\Cloud\DocumentAI\V1\Document\Page\Layout $layout - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [DetectedBarcode][google.cloud.documentai.v1.Document.Page.DetectedBarcode]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [DetectedBarcode][google.cloud.documentai.v1.Document.Page.DetectedBarcode]. * @type \Google\Cloud\DocumentAI\V1\Barcode $barcode - * Detailed barcode information of the - * [DetectedBarcode][google.cloud.documentai.v1.Document.Page.DetectedBarcode]. + * Detailed barcode information of the [DetectedBarcode][google.cloud.documentai.v1.Document.Page.DetectedBarcode]. * } */ public function __construct($data = NULL) { @@ -50,8 +46,7 @@ public function __construct($data = NULL) { } /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [DetectedBarcode][google.cloud.documentai.v1.Document.Page.DetectedBarcode]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [DetectedBarcode][google.cloud.documentai.v1.Document.Page.DetectedBarcode]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; * @return \Google\Cloud\DocumentAI\V1\Document\Page\Layout|null @@ -72,8 +67,7 @@ public function clearLayout() } /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [DetectedBarcode][google.cloud.documentai.v1.Document.Page.DetectedBarcode]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [DetectedBarcode][google.cloud.documentai.v1.Document.Page.DetectedBarcode]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; * @param \Google\Cloud\DocumentAI\V1\Document\Page\Layout $var @@ -88,8 +82,7 @@ public function setLayout($var) } /** - * Detailed barcode information of the - * [DetectedBarcode][google.cloud.documentai.v1.Document.Page.DetectedBarcode]. + * Detailed barcode information of the [DetectedBarcode][google.cloud.documentai.v1.Document.Page.DetectedBarcode]. * * Generated from protobuf field .google.cloud.documentai.v1.Barcode barcode = 2; * @return \Google\Cloud\DocumentAI\V1\Barcode|null @@ -110,8 +103,7 @@ public function clearBarcode() } /** - * Detailed barcode information of the - * [DetectedBarcode][google.cloud.documentai.v1.Document.Page.DetectedBarcode]. + * Detailed barcode information of the [DetectedBarcode][google.cloud.documentai.v1.Document.Page.DetectedBarcode]. * * Generated from protobuf field .google.cloud.documentai.v1.Barcode barcode = 2; * @param \Google\Cloud\DocumentAI\V1\Barcode $var diff --git a/DocumentAi/src/V1/Document/Page/FormField.php b/DocumentAi/src/V1/Document/Page/FormField.php index ebc285d717cc..0bc6ad4e5ef1 100644 --- a/DocumentAi/src/V1/Document/Page/FormField.php +++ b/DocumentAi/src/V1/Document/Page/FormField.php @@ -16,16 +16,14 @@ class FormField extends \Google\Protobuf\Internal\Message { /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the - * [FormField][google.cloud.documentai.v1.Document.Page.FormField] name. - * e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the [FormField][google.cloud.documentai.v1.Document.Page.FormField] name. e.g. `Address`, `Email`, + * `Grand total`, `Phone number`, etc. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout field_name = 1; */ private $field_name = null; /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the - * [FormField][google.cloud.documentai.v1.Document.Page.FormField] value. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the [FormField][google.cloud.documentai.v1.Document.Page.FormField] value. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout field_value = 2; */ @@ -82,12 +80,10 @@ class FormField extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type \Google\Cloud\DocumentAI\V1\Document\Page\Layout $field_name - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the - * [FormField][google.cloud.documentai.v1.Document.Page.FormField] name. - * e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the [FormField][google.cloud.documentai.v1.Document.Page.FormField] name. e.g. `Address`, `Email`, + * `Grand total`, `Phone number`, etc. * @type \Google\Cloud\DocumentAI\V1\Document\Page\Layout $field_value - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the - * [FormField][google.cloud.documentai.v1.Document.Page.FormField] value. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the [FormField][google.cloud.documentai.v1.Document.Page.FormField] value. * @type array<\Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage>|\Google\Protobuf\Internal\RepeatedField $name_detected_languages * A list of detected languages for name together with confidence. * @type array<\Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage>|\Google\Protobuf\Internal\RepeatedField $value_detected_languages @@ -116,9 +112,8 @@ public function __construct($data = NULL) { } /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the - * [FormField][google.cloud.documentai.v1.Document.Page.FormField] name. - * e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the [FormField][google.cloud.documentai.v1.Document.Page.FormField] name. e.g. `Address`, `Email`, + * `Grand total`, `Phone number`, etc. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout field_name = 1; * @return \Google\Cloud\DocumentAI\V1\Document\Page\Layout|null @@ -139,9 +134,8 @@ public function clearFieldName() } /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the - * [FormField][google.cloud.documentai.v1.Document.Page.FormField] name. - * e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the [FormField][google.cloud.documentai.v1.Document.Page.FormField] name. e.g. `Address`, `Email`, + * `Grand total`, `Phone number`, etc. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout field_name = 1; * @param \Google\Cloud\DocumentAI\V1\Document\Page\Layout $var @@ -156,8 +150,7 @@ public function setFieldName($var) } /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the - * [FormField][google.cloud.documentai.v1.Document.Page.FormField] value. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the [FormField][google.cloud.documentai.v1.Document.Page.FormField] value. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout field_value = 2; * @return \Google\Cloud\DocumentAI\V1\Document\Page\Layout|null @@ -178,8 +171,7 @@ public function clearFieldValue() } /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the - * [FormField][google.cloud.documentai.v1.Document.Page.FormField] value. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the [FormField][google.cloud.documentai.v1.Document.Page.FormField] value. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout field_value = 2; * @param \Google\Cloud\DocumentAI\V1\Document\Page\Layout $var diff --git a/DocumentAi/src/V1/Document/Page/Layout.php b/DocumentAi/src/V1/Document/Page/Layout.php index 96282db495cb..dc7aca276aee 100644 --- a/DocumentAi/src/V1/Document/Page/Layout.php +++ b/DocumentAi/src/V1/Document/Page/Layout.php @@ -16,32 +16,27 @@ class Layout extends \Google\Protobuf\Internal\Message { /** - * Text anchor indexing into the - * [Document.text][google.cloud.documentai.v1.Document.text]. + * Text anchor indexing into the [Document.text][google.cloud.documentai.v1.Document.text]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.TextAnchor text_anchor = 1; */ private $text_anchor = null; /** - * Confidence of the current - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] within - * context of the object this layout is for. e.g. confidence can be for a - * single token, a table, a visual element, etc. depending on context. - * Range `[0, 1]`. + * Confidence of the current [Layout][google.cloud.documentai.v1.Document.Page.Layout] within context of the object this + * layout is for. e.g. confidence can be for a single token, a table, + * a visual element, etc. depending on context. Range `[0, 1]`. * * Generated from protobuf field float confidence = 2; */ private $confidence = 0.0; /** - * The bounding polygon for the - * [Layout][google.cloud.documentai.v1.Document.Page.Layout]. + * The bounding polygon for the [Layout][google.cloud.documentai.v1.Document.Page.Layout]. * * Generated from protobuf field .google.cloud.documentai.v1.BoundingPoly bounding_poly = 3; */ private $bounding_poly = null; /** - * Detected orientation for the - * [Layout][google.cloud.documentai.v1.Document.Page.Layout]. + * Detected orientation for the [Layout][google.cloud.documentai.v1.Document.Page.Layout]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout.Orientation orientation = 4; */ @@ -54,20 +49,15 @@ class Layout extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type \Google\Cloud\DocumentAI\V1\Document\TextAnchor $text_anchor - * Text anchor indexing into the - * [Document.text][google.cloud.documentai.v1.Document.text]. + * Text anchor indexing into the [Document.text][google.cloud.documentai.v1.Document.text]. * @type float $confidence - * Confidence of the current - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] within - * context of the object this layout is for. e.g. confidence can be for a - * single token, a table, a visual element, etc. depending on context. - * Range `[0, 1]`. + * Confidence of the current [Layout][google.cloud.documentai.v1.Document.Page.Layout] within context of the object this + * layout is for. e.g. confidence can be for a single token, a table, + * a visual element, etc. depending on context. Range `[0, 1]`. * @type \Google\Cloud\DocumentAI\V1\BoundingPoly $bounding_poly - * The bounding polygon for the - * [Layout][google.cloud.documentai.v1.Document.Page.Layout]. + * The bounding polygon for the [Layout][google.cloud.documentai.v1.Document.Page.Layout]. * @type int $orientation - * Detected orientation for the - * [Layout][google.cloud.documentai.v1.Document.Page.Layout]. + * Detected orientation for the [Layout][google.cloud.documentai.v1.Document.Page.Layout]. * } */ public function __construct($data = NULL) { @@ -76,8 +66,7 @@ public function __construct($data = NULL) { } /** - * Text anchor indexing into the - * [Document.text][google.cloud.documentai.v1.Document.text]. + * Text anchor indexing into the [Document.text][google.cloud.documentai.v1.Document.text]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.TextAnchor text_anchor = 1; * @return \Google\Cloud\DocumentAI\V1\Document\TextAnchor|null @@ -98,8 +87,7 @@ public function clearTextAnchor() } /** - * Text anchor indexing into the - * [Document.text][google.cloud.documentai.v1.Document.text]. + * Text anchor indexing into the [Document.text][google.cloud.documentai.v1.Document.text]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.TextAnchor text_anchor = 1; * @param \Google\Cloud\DocumentAI\V1\Document\TextAnchor $var @@ -114,11 +102,9 @@ public function setTextAnchor($var) } /** - * Confidence of the current - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] within - * context of the object this layout is for. e.g. confidence can be for a - * single token, a table, a visual element, etc. depending on context. - * Range `[0, 1]`. + * Confidence of the current [Layout][google.cloud.documentai.v1.Document.Page.Layout] within context of the object this + * layout is for. e.g. confidence can be for a single token, a table, + * a visual element, etc. depending on context. Range `[0, 1]`. * * Generated from protobuf field float confidence = 2; * @return float @@ -129,11 +115,9 @@ public function getConfidence() } /** - * Confidence of the current - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] within - * context of the object this layout is for. e.g. confidence can be for a - * single token, a table, a visual element, etc. depending on context. - * Range `[0, 1]`. + * Confidence of the current [Layout][google.cloud.documentai.v1.Document.Page.Layout] within context of the object this + * layout is for. e.g. confidence can be for a single token, a table, + * a visual element, etc. depending on context. Range `[0, 1]`. * * Generated from protobuf field float confidence = 2; * @param float $var @@ -148,8 +132,7 @@ public function setConfidence($var) } /** - * The bounding polygon for the - * [Layout][google.cloud.documentai.v1.Document.Page.Layout]. + * The bounding polygon for the [Layout][google.cloud.documentai.v1.Document.Page.Layout]. * * Generated from protobuf field .google.cloud.documentai.v1.BoundingPoly bounding_poly = 3; * @return \Google\Cloud\DocumentAI\V1\BoundingPoly|null @@ -170,8 +153,7 @@ public function clearBoundingPoly() } /** - * The bounding polygon for the - * [Layout][google.cloud.documentai.v1.Document.Page.Layout]. + * The bounding polygon for the [Layout][google.cloud.documentai.v1.Document.Page.Layout]. * * Generated from protobuf field .google.cloud.documentai.v1.BoundingPoly bounding_poly = 3; * @param \Google\Cloud\DocumentAI\V1\BoundingPoly $var @@ -186,8 +168,7 @@ public function setBoundingPoly($var) } /** - * Detected orientation for the - * [Layout][google.cloud.documentai.v1.Document.Page.Layout]. + * Detected orientation for the [Layout][google.cloud.documentai.v1.Document.Page.Layout]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout.Orientation orientation = 4; * @return int @@ -198,8 +179,7 @@ public function getOrientation() } /** - * Detected orientation for the - * [Layout][google.cloud.documentai.v1.Document.Page.Layout]. + * Detected orientation for the [Layout][google.cloud.documentai.v1.Document.Page.Layout]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout.Orientation orientation = 4; * @param int $var diff --git a/DocumentAi/src/V1/Document/Page/Line.php b/DocumentAi/src/V1/Document/Page/Line.php index cac636117910..7553c0232203 100644 --- a/DocumentAi/src/V1/Document/Page/Line.php +++ b/DocumentAi/src/V1/Document/Page/Line.php @@ -17,8 +17,7 @@ class Line extends \Google\Protobuf\Internal\Message { /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Line][google.cloud.documentai.v1.Document.Page.Line]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [Line][google.cloud.documentai.v1.Document.Page.Line]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; */ @@ -44,8 +43,7 @@ class Line extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type \Google\Cloud\DocumentAI\V1\Document\Page\Layout $layout - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Line][google.cloud.documentai.v1.Document.Page.Line]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [Line][google.cloud.documentai.v1.Document.Page.Line]. * @type array<\Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage>|\Google\Protobuf\Internal\RepeatedField $detected_languages * A list of detected languages together with confidence. * @type \Google\Cloud\DocumentAI\V1\Document\Provenance $provenance @@ -58,8 +56,7 @@ public function __construct($data = NULL) { } /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Line][google.cloud.documentai.v1.Document.Page.Line]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [Line][google.cloud.documentai.v1.Document.Page.Line]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; * @return \Google\Cloud\DocumentAI\V1\Document\Page\Layout|null @@ -80,8 +77,7 @@ public function clearLayout() } /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Line][google.cloud.documentai.v1.Document.Page.Line]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [Line][google.cloud.documentai.v1.Document.Page.Line]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; * @param \Google\Cloud\DocumentAI\V1\Document\Page\Layout $var diff --git a/DocumentAi/src/V1/Document/Page/Paragraph.php b/DocumentAi/src/V1/Document/Page/Paragraph.php index c22535ac9486..2d11cc1b091c 100644 --- a/DocumentAi/src/V1/Document/Page/Paragraph.php +++ b/DocumentAi/src/V1/Document/Page/Paragraph.php @@ -16,8 +16,7 @@ class Paragraph extends \Google\Protobuf\Internal\Message { /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Paragraph][google.cloud.documentai.v1.Document.Page.Paragraph]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [Paragraph][google.cloud.documentai.v1.Document.Page.Paragraph]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; */ @@ -43,8 +42,7 @@ class Paragraph extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type \Google\Cloud\DocumentAI\V1\Document\Page\Layout $layout - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Paragraph][google.cloud.documentai.v1.Document.Page.Paragraph]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [Paragraph][google.cloud.documentai.v1.Document.Page.Paragraph]. * @type array<\Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage>|\Google\Protobuf\Internal\RepeatedField $detected_languages * A list of detected languages together with confidence. * @type \Google\Cloud\DocumentAI\V1\Document\Provenance $provenance @@ -57,8 +55,7 @@ public function __construct($data = NULL) { } /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Paragraph][google.cloud.documentai.v1.Document.Page.Paragraph]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [Paragraph][google.cloud.documentai.v1.Document.Page.Paragraph]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; * @return \Google\Cloud\DocumentAI\V1\Document\Page\Layout|null @@ -79,8 +76,7 @@ public function clearLayout() } /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Paragraph][google.cloud.documentai.v1.Document.Page.Paragraph]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [Paragraph][google.cloud.documentai.v1.Document.Page.Paragraph]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; * @param \Google\Cloud\DocumentAI\V1\Document\Page\Layout $var diff --git a/DocumentAi/src/V1/Document/Page/Symbol.php b/DocumentAi/src/V1/Document/Page/Symbol.php index a2bc27bfde2a..2b4815fefcb5 100644 --- a/DocumentAi/src/V1/Document/Page/Symbol.php +++ b/DocumentAi/src/V1/Document/Page/Symbol.php @@ -16,8 +16,7 @@ class Symbol extends \Google\Protobuf\Internal\Message { /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Symbol][google.cloud.documentai.v1.Document.Page.Symbol]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [Symbol][google.cloud.documentai.v1.Document.Page.Symbol]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; */ @@ -36,8 +35,7 @@ class Symbol extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type \Google\Cloud\DocumentAI\V1\Document\Page\Layout $layout - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Symbol][google.cloud.documentai.v1.Document.Page.Symbol]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [Symbol][google.cloud.documentai.v1.Document.Page.Symbol]. * @type array<\Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage>|\Google\Protobuf\Internal\RepeatedField $detected_languages * A list of detected languages together with confidence. * } @@ -48,8 +46,7 @@ public function __construct($data = NULL) { } /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Symbol][google.cloud.documentai.v1.Document.Page.Symbol]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [Symbol][google.cloud.documentai.v1.Document.Page.Symbol]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; * @return \Google\Cloud\DocumentAI\V1\Document\Page\Layout|null @@ -70,8 +67,7 @@ public function clearLayout() } /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Symbol][google.cloud.documentai.v1.Document.Page.Symbol]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [Symbol][google.cloud.documentai.v1.Document.Page.Symbol]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; * @param \Google\Cloud\DocumentAI\V1\Document\Page\Layout $var diff --git a/DocumentAi/src/V1/Document/Page/Table.php b/DocumentAi/src/V1/Document/Page/Table.php index 3e9e5a4c50d4..c73fb0b00828 100644 --- a/DocumentAi/src/V1/Document/Page/Table.php +++ b/DocumentAi/src/V1/Document/Page/Table.php @@ -16,8 +16,7 @@ class Table extends \Google\Protobuf\Internal\Message { /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Table][google.cloud.documentai.v1.Document.Page.Table]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [Table][google.cloud.documentai.v1.Document.Page.Table]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; */ @@ -55,8 +54,7 @@ class Table extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type \Google\Cloud\DocumentAI\V1\Document\Page\Layout $layout - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Table][google.cloud.documentai.v1.Document.Page.Table]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [Table][google.cloud.documentai.v1.Document.Page.Table]. * @type array<\Google\Cloud\DocumentAI\V1\Document\Page\Table\TableRow>|\Google\Protobuf\Internal\RepeatedField $header_rows * Header rows of the table. * @type array<\Google\Cloud\DocumentAI\V1\Document\Page\Table\TableRow>|\Google\Protobuf\Internal\RepeatedField $body_rows @@ -73,8 +71,7 @@ public function __construct($data = NULL) { } /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Table][google.cloud.documentai.v1.Document.Page.Table]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [Table][google.cloud.documentai.v1.Document.Page.Table]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; * @return \Google\Cloud\DocumentAI\V1\Document\Page\Layout|null @@ -95,8 +92,7 @@ public function clearLayout() } /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Table][google.cloud.documentai.v1.Document.Page.Table]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [Table][google.cloud.documentai.v1.Document.Page.Table]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; * @param \Google\Cloud\DocumentAI\V1\Document\Page\Layout $var diff --git a/DocumentAi/src/V1/Document/Page/Table/TableCell.php b/DocumentAi/src/V1/Document/Page/Table/TableCell.php index 0339697c8857..696a1a17ad88 100644 --- a/DocumentAi/src/V1/Document/Page/Table/TableCell.php +++ b/DocumentAi/src/V1/Document/Page/Table/TableCell.php @@ -16,8 +16,7 @@ class TableCell extends \Google\Protobuf\Internal\Message { /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [TableCell][google.cloud.documentai.v1.Document.Page.Table.TableCell]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [TableCell][google.cloud.documentai.v1.Document.Page.Table.TableCell]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; */ @@ -48,8 +47,7 @@ class TableCell extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type \Google\Cloud\DocumentAI\V1\Document\Page\Layout $layout - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [TableCell][google.cloud.documentai.v1.Document.Page.Table.TableCell]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [TableCell][google.cloud.documentai.v1.Document.Page.Table.TableCell]. * @type int $row_span * How many rows this cell spans. * @type int $col_span @@ -64,8 +62,7 @@ public function __construct($data = NULL) { } /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [TableCell][google.cloud.documentai.v1.Document.Page.Table.TableCell]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [TableCell][google.cloud.documentai.v1.Document.Page.Table.TableCell]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; * @return \Google\Cloud\DocumentAI\V1\Document\Page\Layout|null @@ -86,8 +83,7 @@ public function clearLayout() } /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [TableCell][google.cloud.documentai.v1.Document.Page.Table.TableCell]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [TableCell][google.cloud.documentai.v1.Document.Page.Table.TableCell]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; * @param \Google\Cloud\DocumentAI\V1\Document\Page\Layout $var diff --git a/DocumentAi/src/V1/Document/Page/Token.php b/DocumentAi/src/V1/Document/Page/Token.php index 9c3e222bb6da..2f93fe847d26 100644 --- a/DocumentAi/src/V1/Document/Page/Token.php +++ b/DocumentAi/src/V1/Document/Page/Token.php @@ -16,15 +16,13 @@ class Token extends \Google\Protobuf\Internal\Message { /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Token][google.cloud.documentai.v1.Document.Page.Token]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [Token][google.cloud.documentai.v1.Document.Page.Token]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; */ private $layout = null; /** - * Detected break at the end of a - * [Token][google.cloud.documentai.v1.Document.Page.Token]. + * Detected break at the end of a [Token][google.cloud.documentai.v1.Document.Page.Token]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Token.DetectedBreak detected_break = 2; */ @@ -56,11 +54,9 @@ class Token extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type \Google\Cloud\DocumentAI\V1\Document\Page\Layout $layout - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Token][google.cloud.documentai.v1.Document.Page.Token]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [Token][google.cloud.documentai.v1.Document.Page.Token]. * @type \Google\Cloud\DocumentAI\V1\Document\Page\Token\DetectedBreak $detected_break - * Detected break at the end of a - * [Token][google.cloud.documentai.v1.Document.Page.Token]. + * Detected break at the end of a [Token][google.cloud.documentai.v1.Document.Page.Token]. * @type array<\Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage>|\Google\Protobuf\Internal\RepeatedField $detected_languages * A list of detected languages together with confidence. * @type \Google\Cloud\DocumentAI\V1\Document\Provenance $provenance @@ -75,8 +71,7 @@ public function __construct($data = NULL) { } /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Token][google.cloud.documentai.v1.Document.Page.Token]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [Token][google.cloud.documentai.v1.Document.Page.Token]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; * @return \Google\Cloud\DocumentAI\V1\Document\Page\Layout|null @@ -97,8 +92,7 @@ public function clearLayout() } /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Token][google.cloud.documentai.v1.Document.Page.Token]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [Token][google.cloud.documentai.v1.Document.Page.Token]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; * @param \Google\Cloud\DocumentAI\V1\Document\Page\Layout $var @@ -113,8 +107,7 @@ public function setLayout($var) } /** - * Detected break at the end of a - * [Token][google.cloud.documentai.v1.Document.Page.Token]. + * Detected break at the end of a [Token][google.cloud.documentai.v1.Document.Page.Token]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Token.DetectedBreak detected_break = 2; * @return \Google\Cloud\DocumentAI\V1\Document\Page\Token\DetectedBreak|null @@ -135,8 +128,7 @@ public function clearDetectedBreak() } /** - * Detected break at the end of a - * [Token][google.cloud.documentai.v1.Document.Page.Token]. + * Detected break at the end of a [Token][google.cloud.documentai.v1.Document.Page.Token]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Token.DetectedBreak detected_break = 2; * @param \Google\Cloud\DocumentAI\V1\Document\Page\Token\DetectedBreak $var diff --git a/DocumentAi/src/V1/Document/Page/Token/DetectedBreak.php b/DocumentAi/src/V1/Document/Page/Token/DetectedBreak.php index 826b142db9d3..f74d6c371237 100644 --- a/DocumentAi/src/V1/Document/Page/Token/DetectedBreak.php +++ b/DocumentAi/src/V1/Document/Page/Token/DetectedBreak.php @@ -9,8 +9,7 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Detected break at the end of a - * [Token][google.cloud.documentai.v1.Document.Page.Token]. + * Detected break at the end of a [Token][google.cloud.documentai.v1.Document.Page.Token]. * * Generated from protobuf message google.cloud.documentai.v1.Document.Page.Token.DetectedBreak */ diff --git a/DocumentAi/src/V1/Document/Page/Token/StyleInfo.php b/DocumentAi/src/V1/Document/Page/Token/StyleInfo.php index c86a19f223c7..4e3fa356cff6 100644 --- a/DocumentAi/src/V1/Document/Page/Token/StyleInfo.php +++ b/DocumentAi/src/V1/Document/Page/Token/StyleInfo.php @@ -22,9 +22,8 @@ class StyleInfo extends \Google\Protobuf\Internal\Message */ private $font_size = 0; /** - * Font size in pixels, equal to _unrounded - * [font_size][google.cloud.documentai.v1.Document.Page.Token.StyleInfo.font_size]_ - * * _resolution_ ÷ `72.0`. + * Font size in pixels, equal to _unrounded [font_size][google.cloud.documentai.v1.Document.Page.Token.StyleInfo.font_size]_ * + * _resolution_ ÷ `72.0`. * * Generated from protobuf field double pixel_font_size = 2; */ @@ -42,9 +41,8 @@ class StyleInfo extends \Google\Protobuf\Internal\Message */ private $font_type = ''; /** - * Whether the text is bold (equivalent to - * [font_weight][google.cloud.documentai.v1.Document.Page.Token.StyleInfo.font_weight] - * is at least `700`). + * Whether the text is bold (equivalent to [font_weight][google.cloud.documentai.v1.Document.Page.Token.StyleInfo.font_weight] is at least + * `700`). * * Generated from protobuf field bool bold = 5; */ @@ -120,17 +118,15 @@ class StyleInfo extends \Google\Protobuf\Internal\Message * @type int $font_size * Font size in points (`1` point is `¹â„₇₂` inches). * @type float $pixel_font_size - * Font size in pixels, equal to _unrounded - * [font_size][google.cloud.documentai.v1.Document.Page.Token.StyleInfo.font_size]_ - * * _resolution_ ÷ `72.0`. + * Font size in pixels, equal to _unrounded [font_size][google.cloud.documentai.v1.Document.Page.Token.StyleInfo.font_size]_ * + * _resolution_ ÷ `72.0`. * @type float $letter_spacing * Letter spacing in points. * @type string $font_type * Name or style of the font. * @type bool $bold - * Whether the text is bold (equivalent to - * [font_weight][google.cloud.documentai.v1.Document.Page.Token.StyleInfo.font_weight] - * is at least `700`). + * Whether the text is bold (equivalent to [font_weight][google.cloud.documentai.v1.Document.Page.Token.StyleInfo.font_weight] is at least + * `700`). * @type bool $italic * Whether the text is italic. * @type bool $underlined @@ -186,9 +182,8 @@ public function setFontSize($var) } /** - * Font size in pixels, equal to _unrounded - * [font_size][google.cloud.documentai.v1.Document.Page.Token.StyleInfo.font_size]_ - * * _resolution_ ÷ `72.0`. + * Font size in pixels, equal to _unrounded [font_size][google.cloud.documentai.v1.Document.Page.Token.StyleInfo.font_size]_ * + * _resolution_ ÷ `72.0`. * * Generated from protobuf field double pixel_font_size = 2; * @return float @@ -199,9 +194,8 @@ public function getPixelFontSize() } /** - * Font size in pixels, equal to _unrounded - * [font_size][google.cloud.documentai.v1.Document.Page.Token.StyleInfo.font_size]_ - * * _resolution_ ÷ `72.0`. + * Font size in pixels, equal to _unrounded [font_size][google.cloud.documentai.v1.Document.Page.Token.StyleInfo.font_size]_ * + * _resolution_ ÷ `72.0`. * * Generated from protobuf field double pixel_font_size = 2; * @param float $var @@ -268,9 +262,8 @@ public function setFontType($var) } /** - * Whether the text is bold (equivalent to - * [font_weight][google.cloud.documentai.v1.Document.Page.Token.StyleInfo.font_weight] - * is at least `700`). + * Whether the text is bold (equivalent to [font_weight][google.cloud.documentai.v1.Document.Page.Token.StyleInfo.font_weight] is at least + * `700`). * * Generated from protobuf field bool bold = 5; * @return bool @@ -281,9 +274,8 @@ public function getBold() } /** - * Whether the text is bold (equivalent to - * [font_weight][google.cloud.documentai.v1.Document.Page.Token.StyleInfo.font_weight] - * is at least `700`). + * Whether the text is bold (equivalent to [font_weight][google.cloud.documentai.v1.Document.Page.Token.StyleInfo.font_weight] is at least + * `700`). * * Generated from protobuf field bool bold = 5; * @param bool $var diff --git a/DocumentAi/src/V1/Document/Page/VisualElement.php b/DocumentAi/src/V1/Document/Page/VisualElement.php index 848278991249..68c3c902cee7 100644 --- a/DocumentAi/src/V1/Document/Page/VisualElement.php +++ b/DocumentAi/src/V1/Document/Page/VisualElement.php @@ -17,15 +17,13 @@ class VisualElement extends \Google\Protobuf\Internal\Message { /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [VisualElement][google.cloud.documentai.v1.Document.Page.VisualElement]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [VisualElement][google.cloud.documentai.v1.Document.Page.VisualElement]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; */ private $layout = null; /** - * Type of the - * [VisualElement][google.cloud.documentai.v1.Document.Page.VisualElement]. + * Type of the [VisualElement][google.cloud.documentai.v1.Document.Page.VisualElement]. * * Generated from protobuf field string type = 2; */ @@ -44,11 +42,9 @@ class VisualElement extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type \Google\Cloud\DocumentAI\V1\Document\Page\Layout $layout - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [VisualElement][google.cloud.documentai.v1.Document.Page.VisualElement]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [VisualElement][google.cloud.documentai.v1.Document.Page.VisualElement]. * @type string $type - * Type of the - * [VisualElement][google.cloud.documentai.v1.Document.Page.VisualElement]. + * Type of the [VisualElement][google.cloud.documentai.v1.Document.Page.VisualElement]. * @type array<\Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage>|\Google\Protobuf\Internal\RepeatedField $detected_languages * A list of detected languages together with confidence. * } @@ -59,8 +55,7 @@ public function __construct($data = NULL) { } /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [VisualElement][google.cloud.documentai.v1.Document.Page.VisualElement]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [VisualElement][google.cloud.documentai.v1.Document.Page.VisualElement]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; * @return \Google\Cloud\DocumentAI\V1\Document\Page\Layout|null @@ -81,8 +76,7 @@ public function clearLayout() } /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [VisualElement][google.cloud.documentai.v1.Document.Page.VisualElement]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [VisualElement][google.cloud.documentai.v1.Document.Page.VisualElement]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; * @param \Google\Cloud\DocumentAI\V1\Document\Page\Layout $var @@ -97,8 +91,7 @@ public function setLayout($var) } /** - * Type of the - * [VisualElement][google.cloud.documentai.v1.Document.Page.VisualElement]. + * Type of the [VisualElement][google.cloud.documentai.v1.Document.Page.VisualElement]. * * Generated from protobuf field string type = 2; * @return string @@ -109,8 +102,7 @@ public function getType() } /** - * Type of the - * [VisualElement][google.cloud.documentai.v1.Document.Page.VisualElement]. + * Type of the [VisualElement][google.cloud.documentai.v1.Document.Page.VisualElement]. * * Generated from protobuf field string type = 2; * @param string $var diff --git a/DocumentAi/src/V1/Document/PageAnchor.php b/DocumentAi/src/V1/Document/PageAnchor.php index c6524ec14f53..416be7aac5d0 100644 --- a/DocumentAi/src/V1/Document/PageAnchor.php +++ b/DocumentAi/src/V1/Document/PageAnchor.php @@ -9,10 +9,9 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Referencing the visual context of the entity in the - * [Document.pages][google.cloud.documentai.v1.Document.pages]. Page anchors - * can be cross-page, consist of multiple bounding polygons and optionally - * reference specific layout element types. + * Referencing the visual context of the entity in the [Document.pages][google.cloud.documentai.v1.Document.pages]. + * Page anchors can be cross-page, consist of multiple bounding polygons and + * optionally reference specific layout element types. * * Generated from protobuf message google.cloud.documentai.v1.Document.PageAnchor */ diff --git a/DocumentAi/src/V1/Document/PageAnchor/PageRef.php b/DocumentAi/src/V1/Document/PageAnchor/PageRef.php index f824b299a264..c0e7c2c2845e 100644 --- a/DocumentAi/src/V1/Document/PageAnchor/PageRef.php +++ b/DocumentAi/src/V1/Document/PageAnchor/PageRef.php @@ -16,9 +16,7 @@ class PageRef extends \Google\Protobuf\Internal\Message { /** - * Required. Index into the - * [Document.pages][google.cloud.documentai.v1.Document.pages] element, - * for example using + * Required. Index into the [Document.pages][google.cloud.documentai.v1.Document.pages] element, for example using * `[Document.pages][page_refs.page]` to locate the related page element. * This field is skipped when its value is the default `0`. See * https://developers.google.com/protocol-buffers/docs/proto3#json. @@ -27,32 +25,28 @@ class PageRef extends \Google\Protobuf\Internal\Message */ private $page = 0; /** - * Optional. The type of the layout element that is being referenced if - * any. + * Optional. The type of the layout element that is being referenced if any. * * Generated from protobuf field .google.cloud.documentai.v1.Document.PageAnchor.PageRef.LayoutType layout_type = 2 [(.google.api.field_behavior) = OPTIONAL]; */ private $layout_type = 0; /** - * Optional. Deprecated. Use - * [PageRef.bounding_poly][google.cloud.documentai.v1.Document.PageAnchor.PageRef.bounding_poly] - * instead. + * Optional. Deprecated. Use [PageRef.bounding_poly][google.cloud.documentai.v1.Document.PageAnchor.PageRef.bounding_poly] instead. * * Generated from protobuf field string layout_id = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; * @deprecated */ protected $layout_id = ''; /** - * Optional. Identifies the bounding polygon of a layout element on the - * page. If `layout_type` is set, the bounding polygon must be exactly the - * same to the layout element it's referring to. + * Optional. Identifies the bounding polygon of a layout element on the page. + * If `layout_type` is set, the bounding polygon must be exactly the same + * to the layout element it's referring to. * * Generated from protobuf field .google.cloud.documentai.v1.BoundingPoly bounding_poly = 4 [(.google.api.field_behavior) = OPTIONAL]; */ private $bounding_poly = null; /** - * Optional. Confidence of detected page element, if applicable. Range - * `[0, 1]`. + * Optional. Confidence of detected page element, if applicable. Range `[0, 1]`. * * Generated from protobuf field float confidence = 5 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -65,26 +59,20 @@ class PageRef extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type int|string $page - * Required. Index into the - * [Document.pages][google.cloud.documentai.v1.Document.pages] element, - * for example using + * Required. Index into the [Document.pages][google.cloud.documentai.v1.Document.pages] element, for example using * `[Document.pages][page_refs.page]` to locate the related page element. * This field is skipped when its value is the default `0`. See * https://developers.google.com/protocol-buffers/docs/proto3#json. * @type int $layout_type - * Optional. The type of the layout element that is being referenced if - * any. + * Optional. The type of the layout element that is being referenced if any. * @type string $layout_id - * Optional. Deprecated. Use - * [PageRef.bounding_poly][google.cloud.documentai.v1.Document.PageAnchor.PageRef.bounding_poly] - * instead. + * Optional. Deprecated. Use [PageRef.bounding_poly][google.cloud.documentai.v1.Document.PageAnchor.PageRef.bounding_poly] instead. * @type \Google\Cloud\DocumentAI\V1\BoundingPoly $bounding_poly - * Optional. Identifies the bounding polygon of a layout element on the - * page. If `layout_type` is set, the bounding polygon must be exactly the - * same to the layout element it's referring to. + * Optional. Identifies the bounding polygon of a layout element on the page. + * If `layout_type` is set, the bounding polygon must be exactly the same + * to the layout element it's referring to. * @type float $confidence - * Optional. Confidence of detected page element, if applicable. Range - * `[0, 1]`. + * Optional. Confidence of detected page element, if applicable. Range `[0, 1]`. * } */ public function __construct($data = NULL) { @@ -93,9 +81,7 @@ public function __construct($data = NULL) { } /** - * Required. Index into the - * [Document.pages][google.cloud.documentai.v1.Document.pages] element, - * for example using + * Required. Index into the [Document.pages][google.cloud.documentai.v1.Document.pages] element, for example using * `[Document.pages][page_refs.page]` to locate the related page element. * This field is skipped when its value is the default `0`. See * https://developers.google.com/protocol-buffers/docs/proto3#json. @@ -109,9 +95,7 @@ public function getPage() } /** - * Required. Index into the - * [Document.pages][google.cloud.documentai.v1.Document.pages] element, - * for example using + * Required. Index into the [Document.pages][google.cloud.documentai.v1.Document.pages] element, for example using * `[Document.pages][page_refs.page]` to locate the related page element. * This field is skipped when its value is the default `0`. See * https://developers.google.com/protocol-buffers/docs/proto3#json. @@ -129,8 +113,7 @@ public function setPage($var) } /** - * Optional. The type of the layout element that is being referenced if - * any. + * Optional. The type of the layout element that is being referenced if any. * * Generated from protobuf field .google.cloud.documentai.v1.Document.PageAnchor.PageRef.LayoutType layout_type = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return int @@ -141,8 +124,7 @@ public function getLayoutType() } /** - * Optional. The type of the layout element that is being referenced if - * any. + * Optional. The type of the layout element that is being referenced if any. * * Generated from protobuf field .google.cloud.documentai.v1.Document.PageAnchor.PageRef.LayoutType layout_type = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param int $var @@ -157,9 +139,7 @@ public function setLayoutType($var) } /** - * Optional. Deprecated. Use - * [PageRef.bounding_poly][google.cloud.documentai.v1.Document.PageAnchor.PageRef.bounding_poly] - * instead. + * Optional. Deprecated. Use [PageRef.bounding_poly][google.cloud.documentai.v1.Document.PageAnchor.PageRef.bounding_poly] instead. * * Generated from protobuf field string layout_id = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; * @return string @@ -172,9 +152,7 @@ public function getLayoutId() } /** - * Optional. Deprecated. Use - * [PageRef.bounding_poly][google.cloud.documentai.v1.Document.PageAnchor.PageRef.bounding_poly] - * instead. + * Optional. Deprecated. Use [PageRef.bounding_poly][google.cloud.documentai.v1.Document.PageAnchor.PageRef.bounding_poly] instead. * * Generated from protobuf field string layout_id = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; * @param string $var @@ -191,9 +169,9 @@ public function setLayoutId($var) } /** - * Optional. Identifies the bounding polygon of a layout element on the - * page. If `layout_type` is set, the bounding polygon must be exactly the - * same to the layout element it's referring to. + * Optional. Identifies the bounding polygon of a layout element on the page. + * If `layout_type` is set, the bounding polygon must be exactly the same + * to the layout element it's referring to. * * Generated from protobuf field .google.cloud.documentai.v1.BoundingPoly bounding_poly = 4 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Cloud\DocumentAI\V1\BoundingPoly|null @@ -214,9 +192,9 @@ public function clearBoundingPoly() } /** - * Optional. Identifies the bounding polygon of a layout element on the - * page. If `layout_type` is set, the bounding polygon must be exactly the - * same to the layout element it's referring to. + * Optional. Identifies the bounding polygon of a layout element on the page. + * If `layout_type` is set, the bounding polygon must be exactly the same + * to the layout element it's referring to. * * Generated from protobuf field .google.cloud.documentai.v1.BoundingPoly bounding_poly = 4 [(.google.api.field_behavior) = OPTIONAL]; * @param \Google\Cloud\DocumentAI\V1\BoundingPoly $var @@ -231,8 +209,7 @@ public function setBoundingPoly($var) } /** - * Optional. Confidence of detected page element, if applicable. Range - * `[0, 1]`. + * Optional. Confidence of detected page element, if applicable. Range `[0, 1]`. * * Generated from protobuf field float confidence = 5 [(.google.api.field_behavior) = OPTIONAL]; * @return float @@ -243,8 +220,7 @@ public function getConfidence() } /** - * Optional. Confidence of detected page element, if applicable. Range - * `[0, 1]`. + * Optional. Confidence of detected page element, if applicable. Range `[0, 1]`. * * Generated from protobuf field float confidence = 5 [(.google.api.field_behavior) = OPTIONAL]; * @param float $var diff --git a/DocumentAi/src/V1/Document/PageAnchor/PageRef/LayoutType.php b/DocumentAi/src/V1/Document/PageAnchor/PageRef/LayoutType.php index 221ebd633975..57636ed532aa 100644 --- a/DocumentAi/src/V1/Document/PageAnchor/PageRef/LayoutType.php +++ b/DocumentAi/src/V1/Document/PageAnchor/PageRef/LayoutType.php @@ -20,56 +20,43 @@ class LayoutType */ const LAYOUT_TYPE_UNSPECIFIED = 0; /** - * References a - * [Page.blocks][google.cloud.documentai.v1.Document.Page.blocks] - * element. + * References a [Page.blocks][google.cloud.documentai.v1.Document.Page.blocks] element. * * Generated from protobuf enum BLOCK = 1; */ const BLOCK = 1; /** - * References a - * [Page.paragraphs][google.cloud.documentai.v1.Document.Page.paragraphs] - * element. + * References a [Page.paragraphs][google.cloud.documentai.v1.Document.Page.paragraphs] element. * * Generated from protobuf enum PARAGRAPH = 2; */ const PARAGRAPH = 2; /** - * References a - * [Page.lines][google.cloud.documentai.v1.Document.Page.lines] element. + * References a [Page.lines][google.cloud.documentai.v1.Document.Page.lines] element. * * Generated from protobuf enum LINE = 3; */ const LINE = 3; /** - * References a - * [Page.tokens][google.cloud.documentai.v1.Document.Page.tokens] - * element. + * References a [Page.tokens][google.cloud.documentai.v1.Document.Page.tokens] element. * * Generated from protobuf enum TOKEN = 4; */ const TOKEN = 4; /** - * References a - * [Page.visual_elements][google.cloud.documentai.v1.Document.Page.visual_elements] - * element. + * References a [Page.visual_elements][google.cloud.documentai.v1.Document.Page.visual_elements] element. * * Generated from protobuf enum VISUAL_ELEMENT = 5; */ const VISUAL_ELEMENT = 5; /** - * Refrrences a - * [Page.tables][google.cloud.documentai.v1.Document.Page.tables] - * element. + * Refrrences a [Page.tables][google.cloud.documentai.v1.Document.Page.tables] element. * * Generated from protobuf enum TABLE = 6; */ const TABLE = 6; /** - * References a - * [Page.form_fields][google.cloud.documentai.v1.Document.Page.form_fields] - * element. + * References a [Page.form_fields][google.cloud.documentai.v1.Document.Page.form_fields] element. * * Generated from protobuf enum FORM_FIELD = 7; */ diff --git a/DocumentAi/src/V1/Document/ShardInfo.php b/DocumentAi/src/V1/Document/ShardInfo.php index 5468362e5902..ceb0ffbd1b07 100644 --- a/DocumentAi/src/V1/Document/ShardInfo.php +++ b/DocumentAi/src/V1/Document/ShardInfo.php @@ -30,8 +30,7 @@ class ShardInfo extends \Google\Protobuf\Internal\Message */ private $shard_count = 0; /** - * The index of the first character in - * [Document.text][google.cloud.documentai.v1.Document.text] in the overall + * The index of the first character in [Document.text][google.cloud.documentai.v1.Document.text] in the overall * document global text. * * Generated from protobuf field int64 text_offset = 3; @@ -49,8 +48,7 @@ class ShardInfo extends \Google\Protobuf\Internal\Message * @type int|string $shard_count * Total number of shards. * @type int|string $text_offset - * The index of the first character in - * [Document.text][google.cloud.documentai.v1.Document.text] in the overall + * The index of the first character in [Document.text][google.cloud.documentai.v1.Document.text] in the overall * document global text. * } */ @@ -112,8 +110,7 @@ public function setShardCount($var) } /** - * The index of the first character in - * [Document.text][google.cloud.documentai.v1.Document.text] in the overall + * The index of the first character in [Document.text][google.cloud.documentai.v1.Document.text] in the overall * document global text. * * Generated from protobuf field int64 text_offset = 3; @@ -125,8 +122,7 @@ public function getTextOffset() } /** - * The index of the first character in - * [Document.text][google.cloud.documentai.v1.Document.text] in the overall + * The index of the first character in [Document.text][google.cloud.documentai.v1.Document.text] in the overall * document global text. * * Generated from protobuf field int64 text_offset = 3; diff --git a/DocumentAi/src/V1/Document/Style.php b/DocumentAi/src/V1/Document/Style.php index ffbf6a13ecb1..6375ff7fccbe 100644 --- a/DocumentAi/src/V1/Document/Style.php +++ b/DocumentAi/src/V1/Document/Style.php @@ -17,8 +17,7 @@ class Style extends \Google\Protobuf\Internal\Message { /** - * Text anchor indexing into the - * [Document.text][google.cloud.documentai.v1.Document.text]. + * Text anchor indexing into the [Document.text][google.cloud.documentai.v1.Document.text]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.TextAnchor text_anchor = 1; */ @@ -79,8 +78,7 @@ class Style extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type \Google\Cloud\DocumentAI\V1\Document\TextAnchor $text_anchor - * Text anchor indexing into the - * [Document.text][google.cloud.documentai.v1.Document.text]. + * Text anchor indexing into the [Document.text][google.cloud.documentai.v1.Document.text]. * @type \Google\Type\Color $color * Text color. * @type \Google\Type\Color $background_color @@ -109,8 +107,7 @@ public function __construct($data = NULL) { } /** - * Text anchor indexing into the - * [Document.text][google.cloud.documentai.v1.Document.text]. + * Text anchor indexing into the [Document.text][google.cloud.documentai.v1.Document.text]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.TextAnchor text_anchor = 1; * @return \Google\Cloud\DocumentAI\V1\Document\TextAnchor|null @@ -131,8 +128,7 @@ public function clearTextAnchor() } /** - * Text anchor indexing into the - * [Document.text][google.cloud.documentai.v1.Document.text]. + * Text anchor indexing into the [Document.text][google.cloud.documentai.v1.Document.text]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.TextAnchor text_anchor = 1; * @param \Google\Cloud\DocumentAI\V1\Document\TextAnchor $var diff --git a/DocumentAi/src/V1/Document/TextAnchor.php b/DocumentAi/src/V1/Document/TextAnchor.php index 5655e0477ede..b7c04a37cd21 100644 --- a/DocumentAi/src/V1/Document/TextAnchor.php +++ b/DocumentAi/src/V1/Document/TextAnchor.php @@ -9,16 +9,14 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Text reference indexing into the - * [Document.text][google.cloud.documentai.v1.Document.text]. + * Text reference indexing into the [Document.text][google.cloud.documentai.v1.Document.text]. * * Generated from protobuf message google.cloud.documentai.v1.Document.TextAnchor */ class TextAnchor extends \Google\Protobuf\Internal\Message { /** - * The text segments from the - * [Document.text][google.cloud.documentai.v1.Document.text]. + * The text segments from the [Document.text][google.cloud.documentai.v1.Document.text]. * * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.TextAnchor.TextSegment text_segments = 1; */ @@ -39,8 +37,7 @@ class TextAnchor extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type array<\Google\Cloud\DocumentAI\V1\Document\TextAnchor\TextSegment>|\Google\Protobuf\Internal\RepeatedField $text_segments - * The text segments from the - * [Document.text][google.cloud.documentai.v1.Document.text]. + * The text segments from the [Document.text][google.cloud.documentai.v1.Document.text]. * @type string $content * Contains the content of the text span so that users do * not have to look it up in the text_segments. It is always @@ -53,8 +50,7 @@ public function __construct($data = NULL) { } /** - * The text segments from the - * [Document.text][google.cloud.documentai.v1.Document.text]. + * The text segments from the [Document.text][google.cloud.documentai.v1.Document.text]. * * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.TextAnchor.TextSegment text_segments = 1; * @return \Google\Protobuf\Internal\RepeatedField @@ -65,8 +61,7 @@ public function getTextSegments() } /** - * The text segments from the - * [Document.text][google.cloud.documentai.v1.Document.text]. + * The text segments from the [Document.text][google.cloud.documentai.v1.Document.text]. * * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.TextAnchor.TextSegment text_segments = 1; * @param array<\Google\Cloud\DocumentAI\V1\Document\TextAnchor\TextSegment>|\Google\Protobuf\Internal\RepeatedField $var diff --git a/DocumentAi/src/V1/Document/TextAnchor/TextSegment.php b/DocumentAi/src/V1/Document/TextAnchor/TextSegment.php index 0af2a77b2bc1..eec03dab8f9a 100644 --- a/DocumentAi/src/V1/Document/TextAnchor/TextSegment.php +++ b/DocumentAi/src/V1/Document/TextAnchor/TextSegment.php @@ -9,27 +9,22 @@ use Google\Protobuf\Internal\GPBUtil; /** - * A text segment in the - * [Document.text][google.cloud.documentai.v1.Document.text]. The indices - * may be out of bounds which indicate that the text extends into another - * document shard for large sharded documents. See - * [ShardInfo.text_offset][google.cloud.documentai.v1.Document.ShardInfo.text_offset] + * A text segment in the [Document.text][google.cloud.documentai.v1.Document.text]. The indices may be out of bounds + * which indicate that the text extends into another document shard for + * large sharded documents. See [ShardInfo.text_offset][google.cloud.documentai.v1.Document.ShardInfo.text_offset] * * Generated from protobuf message google.cloud.documentai.v1.Document.TextAnchor.TextSegment */ class TextSegment extends \Google\Protobuf\Internal\Message { /** - * [TextSegment][google.cloud.documentai.v1.Document.TextAnchor.TextSegment] - * start UTF-8 char index in the - * [Document.text][google.cloud.documentai.v1.Document.text]. + * [TextSegment][google.cloud.documentai.v1.Document.TextAnchor.TextSegment] start UTF-8 char index in the [Document.text][google.cloud.documentai.v1.Document.text]. * * Generated from protobuf field int64 start_index = 1; */ private $start_index = 0; /** - * [TextSegment][google.cloud.documentai.v1.Document.TextAnchor.TextSegment] - * half open end UTF-8 char index in the + * [TextSegment][google.cloud.documentai.v1.Document.TextAnchor.TextSegment] half open end UTF-8 char index in the * [Document.text][google.cloud.documentai.v1.Document.text]. * * Generated from protobuf field int64 end_index = 2; @@ -43,12 +38,9 @@ class TextSegment extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type int|string $start_index - * [TextSegment][google.cloud.documentai.v1.Document.TextAnchor.TextSegment] - * start UTF-8 char index in the - * [Document.text][google.cloud.documentai.v1.Document.text]. + * [TextSegment][google.cloud.documentai.v1.Document.TextAnchor.TextSegment] start UTF-8 char index in the [Document.text][google.cloud.documentai.v1.Document.text]. * @type int|string $end_index - * [TextSegment][google.cloud.documentai.v1.Document.TextAnchor.TextSegment] - * half open end UTF-8 char index in the + * [TextSegment][google.cloud.documentai.v1.Document.TextAnchor.TextSegment] half open end UTF-8 char index in the * [Document.text][google.cloud.documentai.v1.Document.text]. * } */ @@ -58,9 +50,7 @@ public function __construct($data = NULL) { } /** - * [TextSegment][google.cloud.documentai.v1.Document.TextAnchor.TextSegment] - * start UTF-8 char index in the - * [Document.text][google.cloud.documentai.v1.Document.text]. + * [TextSegment][google.cloud.documentai.v1.Document.TextAnchor.TextSegment] start UTF-8 char index in the [Document.text][google.cloud.documentai.v1.Document.text]. * * Generated from protobuf field int64 start_index = 1; * @return int|string @@ -71,9 +61,7 @@ public function getStartIndex() } /** - * [TextSegment][google.cloud.documentai.v1.Document.TextAnchor.TextSegment] - * start UTF-8 char index in the - * [Document.text][google.cloud.documentai.v1.Document.text]. + * [TextSegment][google.cloud.documentai.v1.Document.TextAnchor.TextSegment] start UTF-8 char index in the [Document.text][google.cloud.documentai.v1.Document.text]. * * Generated from protobuf field int64 start_index = 1; * @param int|string $var @@ -88,8 +76,7 @@ public function setStartIndex($var) } /** - * [TextSegment][google.cloud.documentai.v1.Document.TextAnchor.TextSegment] - * half open end UTF-8 char index in the + * [TextSegment][google.cloud.documentai.v1.Document.TextAnchor.TextSegment] half open end UTF-8 char index in the * [Document.text][google.cloud.documentai.v1.Document.text]. * * Generated from protobuf field int64 end_index = 2; @@ -101,8 +88,7 @@ public function getEndIndex() } /** - * [TextSegment][google.cloud.documentai.v1.Document.TextAnchor.TextSegment] - * half open end UTF-8 char index in the + * [TextSegment][google.cloud.documentai.v1.Document.TextAnchor.TextSegment] half open end UTF-8 char index in the * [Document.text][google.cloud.documentai.v1.Document.text]. * * Generated from protobuf field int64 end_index = 2; diff --git a/DocumentAi/src/V1/Document/TextChange.php b/DocumentAi/src/V1/Document/TextChange.php index ad2ef3ef1be5..691263416988 100644 --- a/DocumentAi/src/V1/Document/TextChange.php +++ b/DocumentAi/src/V1/Document/TextChange.php @@ -17,9 +17,8 @@ class TextChange extends \Google\Protobuf\Internal\Message { /** * Provenance of the correction. - * Text anchor indexing into the - * [Document.text][google.cloud.documentai.v1.Document.text]. There can - * only be a single `TextAnchor.text_segments` element. If the start and + * Text anchor indexing into the [Document.text][google.cloud.documentai.v1.Document.text]. There can only be a + * single `TextAnchor.text_segments` element. If the start and * end index of the text segment are the same, the text change is inserted * before that index. * @@ -48,9 +47,8 @@ class TextChange extends \Google\Protobuf\Internal\Message * * @type \Google\Cloud\DocumentAI\V1\Document\TextAnchor $text_anchor * Provenance of the correction. - * Text anchor indexing into the - * [Document.text][google.cloud.documentai.v1.Document.text]. There can - * only be a single `TextAnchor.text_segments` element. If the start and + * Text anchor indexing into the [Document.text][google.cloud.documentai.v1.Document.text]. There can only be a + * single `TextAnchor.text_segments` element. If the start and * end index of the text segment are the same, the text change is inserted * before that index. * @type string $changed_text @@ -66,9 +64,8 @@ public function __construct($data = NULL) { /** * Provenance of the correction. - * Text anchor indexing into the - * [Document.text][google.cloud.documentai.v1.Document.text]. There can - * only be a single `TextAnchor.text_segments` element. If the start and + * Text anchor indexing into the [Document.text][google.cloud.documentai.v1.Document.text]. There can only be a + * single `TextAnchor.text_segments` element. If the start and * end index of the text segment are the same, the text change is inserted * before that index. * @@ -92,9 +89,8 @@ public function clearTextAnchor() /** * Provenance of the correction. - * Text anchor indexing into the - * [Document.text][google.cloud.documentai.v1.Document.text]. There can - * only be a single `TextAnchor.text_segments` element. If the start and + * Text anchor indexing into the [Document.text][google.cloud.documentai.v1.Document.text]. There can only be a + * single `TextAnchor.text_segments` element. If the start and * end index of the text segment are the same, the text change is inserted * before that index. * diff --git a/DocumentAi/src/V1/EnableProcessorMetadata.php b/DocumentAi/src/V1/EnableProcessorMetadata.php index 8883938b22c3..4321d7eb4090 100644 --- a/DocumentAi/src/V1/EnableProcessorMetadata.php +++ b/DocumentAi/src/V1/EnableProcessorMetadata.php @@ -10,8 +10,7 @@ /** * The long-running operation metadata for the - * [EnableProcessor][google.cloud.documentai.v1.DocumentProcessorService.EnableProcessor] - * method. + * [EnableProcessor][google.cloud.documentai.v1.DocumentProcessorService.EnableProcessor] method. * * Generated from protobuf message google.cloud.documentai.v1.EnableProcessorMetadata */ diff --git a/DocumentAi/src/V1/EnableProcessorRequest.php b/DocumentAi/src/V1/EnableProcessorRequest.php index 69f0290c3ae4..797214123655 100644 --- a/DocumentAi/src/V1/EnableProcessorRequest.php +++ b/DocumentAi/src/V1/EnableProcessorRequest.php @@ -10,8 +10,7 @@ /** * Request message for the - * [EnableProcessor][google.cloud.documentai.v1.DocumentProcessorService.EnableProcessor] - * method. + * [EnableProcessor][google.cloud.documentai.v1.DocumentProcessorService.EnableProcessor] method. * * Generated from protobuf message google.cloud.documentai.v1.EnableProcessorRequest */ diff --git a/DocumentAi/src/V1/EnableProcessorResponse.php b/DocumentAi/src/V1/EnableProcessorResponse.php index 573c89ac5fa2..fb2ad3323e41 100644 --- a/DocumentAi/src/V1/EnableProcessorResponse.php +++ b/DocumentAi/src/V1/EnableProcessorResponse.php @@ -10,8 +10,8 @@ /** * Response message for the - * [EnableProcessor][google.cloud.documentai.v1.DocumentProcessorService.EnableProcessor] - * method. Intentionally empty proto for adding fields in future. + * [EnableProcessor][google.cloud.documentai.v1.DocumentProcessorService.EnableProcessor] method. + * Intentionally empty proto for adding fields in future. * * Generated from protobuf message google.cloud.documentai.v1.EnableProcessorResponse */ diff --git a/DocumentAi/src/V1/EvaluateProcessorVersionRequest.php b/DocumentAi/src/V1/EvaluateProcessorVersionRequest.php index bd08972c749c..a7f5d5e64ecd 100644 --- a/DocumentAi/src/V1/EvaluateProcessorVersionRequest.php +++ b/DocumentAi/src/V1/EvaluateProcessorVersionRequest.php @@ -9,35 +9,29 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Evaluates the given - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] against the - * supplied documents. + * Evaluates the given [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] against the supplied documents. * * Generated from protobuf message google.cloud.documentai.v1.EvaluateProcessorVersionRequest */ class EvaluateProcessorVersionRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The resource name of the - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to - * evaluate. + * Required. The resource name of the [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to evaluate. * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` * * Generated from protobuf field string processor_version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ private $processor_version = ''; /** - * Optional. The documents used in the evaluation. If unspecified, use the - * processor's dataset as evaluation input. + * Optional. The documents used in the evaluation. If unspecified, use the processor's + * dataset as evaluation input. * * Generated from protobuf field .google.cloud.documentai.v1.BatchDocumentsInputConfig evaluation_documents = 3 [(.google.api.field_behavior) = OPTIONAL]; */ private $evaluation_documents = null; /** - * @param string $processorVersion Required. The resource name of the - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to - * evaluate. + * @param string $processorVersion Required. The resource name of the [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to evaluate. * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` * Please see {@see DocumentProcessorServiceClient::processorVersionName()} for help formatting this field. * @@ -58,13 +52,11 @@ public static function build(string $processorVersion): self * Optional. Data for populating the Message object. * * @type string $processor_version - * Required. The resource name of the - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to - * evaluate. + * Required. The resource name of the [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to evaluate. * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` * @type \Google\Cloud\DocumentAI\V1\BatchDocumentsInputConfig $evaluation_documents - * Optional. The documents used in the evaluation. If unspecified, use the - * processor's dataset as evaluation input. + * Optional. The documents used in the evaluation. If unspecified, use the processor's + * dataset as evaluation input. * } */ public function __construct($data = NULL) { @@ -73,9 +65,7 @@ public function __construct($data = NULL) { } /** - * Required. The resource name of the - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to - * evaluate. + * Required. The resource name of the [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to evaluate. * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` * * Generated from protobuf field string processor_version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { @@ -87,9 +77,7 @@ public function getProcessorVersion() } /** - * Required. The resource name of the - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to - * evaluate. + * Required. The resource name of the [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to evaluate. * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` * * Generated from protobuf field string processor_version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { @@ -105,8 +93,8 @@ public function setProcessorVersion($var) } /** - * Optional. The documents used in the evaluation. If unspecified, use the - * processor's dataset as evaluation input. + * Optional. The documents used in the evaluation. If unspecified, use the processor's + * dataset as evaluation input. * * Generated from protobuf field .google.cloud.documentai.v1.BatchDocumentsInputConfig evaluation_documents = 3 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Cloud\DocumentAI\V1\BatchDocumentsInputConfig|null @@ -127,8 +115,8 @@ public function clearEvaluationDocuments() } /** - * Optional. The documents used in the evaluation. If unspecified, use the - * processor's dataset as evaluation input. + * Optional. The documents used in the evaluation. If unspecified, use the processor's + * dataset as evaluation input. * * Generated from protobuf field .google.cloud.documentai.v1.BatchDocumentsInputConfig evaluation_documents = 3 [(.google.api.field_behavior) = OPTIONAL]; * @param \Google\Cloud\DocumentAI\V1\BatchDocumentsInputConfig $var diff --git a/DocumentAi/src/V1/FetchProcessorTypesRequest.php b/DocumentAi/src/V1/FetchProcessorTypesRequest.php index 679b71159dac..47792e9acdf2 100644 --- a/DocumentAi/src/V1/FetchProcessorTypesRequest.php +++ b/DocumentAi/src/V1/FetchProcessorTypesRequest.php @@ -10,9 +10,8 @@ /** * Request message for the - * [FetchProcessorTypes][google.cloud.documentai.v1.DocumentProcessorService.FetchProcessorTypes] - * method. Some processor types may require the project be added to an - * allowlist. + * [FetchProcessorTypes][google.cloud.documentai.v1.DocumentProcessorService.FetchProcessorTypes] method. + * Some processor types may require the project be added to an allowlist. * * Generated from protobuf message google.cloud.documentai.v1.FetchProcessorTypesRequest */ diff --git a/DocumentAi/src/V1/FetchProcessorTypesResponse.php b/DocumentAi/src/V1/FetchProcessorTypesResponse.php index dd5747eca369..812b11f22a0f 100644 --- a/DocumentAi/src/V1/FetchProcessorTypesResponse.php +++ b/DocumentAi/src/V1/FetchProcessorTypesResponse.php @@ -10,8 +10,7 @@ /** * Response message for the - * [FetchProcessorTypes][google.cloud.documentai.v1.DocumentProcessorService.FetchProcessorTypes] - * method. + * [FetchProcessorTypes][google.cloud.documentai.v1.DocumentProcessorService.FetchProcessorTypes] method. * * Generated from protobuf message google.cloud.documentai.v1.FetchProcessorTypesResponse */ diff --git a/DocumentAi/src/V1/Gapic/DocumentProcessorServiceGapicClient.php b/DocumentAi/src/V1/Gapic/DocumentProcessorServiceGapicClient.php index 685be49314c0..38e3a24c9cea 100644 --- a/DocumentAi/src/V1/Gapic/DocumentProcessorServiceGapicClient.php +++ b/DocumentAi/src/V1/Gapic/DocumentProcessorServiceGapicClient.php @@ -77,6 +77,7 @@ use Google\Cloud\DocumentAI\V1\TrainProcessorVersionMetadata; use Google\Cloud\DocumentAI\V1\TrainProcessorVersionRequest; use Google\Cloud\DocumentAI\V1\TrainProcessorVersionRequest\CustomDocumentExtractionOptions; +use Google\Cloud\DocumentAI\V1\TrainProcessorVersionRequest\FoundationModelTuningOptions; use Google\Cloud\DocumentAI\V1\TrainProcessorVersionRequest\InputData; use Google\Cloud\DocumentAI\V1\UndeployProcessorVersionRequest; use Google\Cloud\Location\GetLocationRequest; @@ -610,8 +611,7 @@ public function __construct(array $options = []) * } * ``` * - * @param string $name Required. The resource name of - * [Processor][google.cloud.documentai.v1.Processor] or + * @param string $name Required. The resource name of [Processor][google.cloud.documentai.v1.Processor] or * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. * Format: `projects/{project}/locations/{location}/processors/{processor}`, * or @@ -692,9 +692,8 @@ public function batchProcessDocuments($name, array $optionalArgs = []) } /** - * Creates a processor from the - * [ProcessorType][google.cloud.documentai.v1.ProcessorType] provided. The - * processor will be at `ENABLED` state by default after its creation. + * Creates a processor from the [ProcessorType][google.cloud.documentai.v1.ProcessorType] provided. + * The processor will be at `ENABLED` state by default after its creation. * * Sample code: * ``` @@ -708,13 +707,10 @@ public function batchProcessDocuments($name, array $optionalArgs = []) * } * ``` * - * @param string $parent Required. The parent (project and location) under which to create the - * processor. Format: `projects/{project}/locations/{location}` - * @param Processor $processor Required. The processor to be created, requires - * [Processor.type][google.cloud.documentai.v1.Processor.type] and - * [Processor.display_name][google.cloud.documentai.v1.Processor.display_name] - * to be set. Also, the - * [Processor.kms_key_name][google.cloud.documentai.v1.Processor.kms_key_name] + * @param string $parent Required. The parent (project and location) under which to create the processor. + * Format: `projects/{project}/locations/{location}` + * @param Processor $processor Required. The processor to be created, requires [Processor.type][google.cloud.documentai.v1.Processor.type] and + * [Processor.display_name][google.cloud.documentai.v1.Processor.display_name] to be set. Also, the [Processor.kms_key_name][google.cloud.documentai.v1.Processor.kms_key_name] * field must be set if the processor is under CMEK. * @param array $optionalArgs { * Optional. @@ -1156,16 +1152,14 @@ public function enableProcessor($name, array $optionalArgs = []) * } * ``` * - * @param string $processorVersion Required. The resource name of the - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to - * evaluate. + * @param string $processorVersion Required. The resource name of the [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to evaluate. * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` * @param array $optionalArgs { * Optional. * * @type BatchDocumentsInputConfig $evaluationDocuments - * Optional. The documents used in the evaluation. If unspecified, use the - * processor's dataset as evaluation input. + * Optional. The documents used in the evaluation. If unspecified, use the processor's + * dataset as evaluation input. * @type RetrySettings|array $retrySettings * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an * associative array of retry settings parameters. See the documentation on @@ -1205,8 +1199,7 @@ public function evaluateProcessorVersion( } /** - * Fetches processor types. Note that we don't use - * [ListProcessorTypes][google.cloud.documentai.v1.DocumentProcessorService.ListProcessorTypes] + * Fetches processor types. Note that we don't use [ListProcessorTypes][google.cloud.documentai.v1.DocumentProcessorService.ListProcessorTypes] * here, because it isn't paginated. * * Sample code: @@ -1269,8 +1262,7 @@ public function fetchProcessorTypes($parent, array $optionalArgs = []) * } * ``` * - * @param string $name Required. The resource name of the - * [Evaluation][google.cloud.documentai.v1.Evaluation] to get. + * @param string $name Required. The resource name of the [Evaluation][google.cloud.documentai.v1.Evaluation] to get. * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}/evaluations/{evaluation}` * @param array $optionalArgs { * Optional. @@ -1475,9 +1467,7 @@ public function getProcessorVersion($name, array $optionalArgs = []) * } * ``` * - * @param string $parent Required. The resource name of the - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to list - * evaluations for. + * @param string $parent Required. The resource name of the [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to list evaluations for. * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` * @param array $optionalArgs { * Optional. @@ -1633,9 +1623,8 @@ public function listProcessorTypes($parent, array $optionalArgs = []) * } * ``` * - * @param string $parent Required. The parent (project, location and processor) to list all - * versions. Format: - * `projects/{project}/locations/{location}/processors/{processor}` + * @param string $parent Required. The parent (project, location and processor) to list all versions. + * Format: `projects/{project}/locations/{location}/processors/{processor}` * @param array $optionalArgs { * Optional. * @@ -1712,8 +1701,8 @@ public function listProcessorVersions($parent, array $optionalArgs = []) * } * ``` * - * @param string $parent Required. The parent (project and location) which owns this collection of - * Processors. Format: `projects/{project}/locations/{location}` + * @param string $parent Required. The parent (project and location) which owns this collection of Processors. + * Format: `projects/{project}/locations/{location}` * @param array $optionalArgs { * Optional. * @@ -1778,15 +1767,11 @@ public function listProcessors($parent, array $optionalArgs = []) * } * ``` * - * @param string $name Required. The resource name of the - * [Processor][google.cloud.documentai.v1.Processor] or + * @param string $name Required. The resource name of the [Processor][google.cloud.documentai.v1.Processor] or * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] - * to use for processing. If a - * [Processor][google.cloud.documentai.v1.Processor] is specified, the server - * will use its [default - * version][google.cloud.documentai.v1.Processor.default_processor_version]. - * Format: `projects/{project}/locations/{location}/processors/{processor}`, - * or + * to use for processing. If a [Processor][google.cloud.documentai.v1.Processor] is specified, the server will use + * its [default version][google.cloud.documentai.v1.Processor.default_processor_version]. Format: + * `projects/{project}/locations/{location}/processors/{processor}`, or * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` * @param array $optionalArgs { * Optional. @@ -1801,8 +1786,7 @@ public function listProcessors($parent, array $optionalArgs = []) * Whether human review should be skipped for this request. Default to * `false`. * @type FieldMask $fieldMask - * Specifies which fields to include in the - * [ProcessResponse.document][google.cloud.documentai.v1.ProcessResponse.document] + * Specifies which fields to include in the [ProcessResponse.document][google.cloud.documentai.v1.ProcessResponse.document] * output. Only supports top-level document and pages field, so it must be in * the form of `{document_field_name}` or `pages.{page_field_name}`. * @type ProcessOptions $processOptions @@ -1912,9 +1896,8 @@ public function processDocument($name, array $optionalArgs = []) * } * ``` * - * @param string $humanReviewConfig Required. The resource name of the - * [HumanReviewConfig][google.cloud.documentai.v1.HumanReviewConfig] that the - * document will be reviewed with. + * @param string $humanReviewConfig Required. The resource name of the [HumanReviewConfig][google.cloud.documentai.v1.HumanReviewConfig] that the document will be + * reviewed with. * @param array $optionalArgs { * Optional. * @@ -1976,10 +1959,8 @@ public function reviewDocument($humanReviewConfig, array $optionalArgs = []) } /** - * Set the default (active) version of a - * [Processor][google.cloud.documentai.v1.Processor] that will be used in - * [ProcessDocument][google.cloud.documentai.v1.DocumentProcessorService.ProcessDocument] - * and + * Set the default (active) version of a [Processor][google.cloud.documentai.v1.Processor] that will be used in + * [ProcessDocument][google.cloud.documentai.v1.DocumentProcessorService.ProcessDocument] and * [BatchProcessDocuments][google.cloud.documentai.v1.DocumentProcessorService.BatchProcessDocuments]. * * Sample code: @@ -2019,12 +2000,9 @@ public function reviewDocument($humanReviewConfig, array $optionalArgs = []) * } * ``` * - * @param string $processor Required. The resource name of the - * [Processor][google.cloud.documentai.v1.Processor] to change default - * version. - * @param string $defaultProcessorVersion Required. The resource name of child - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to use as - * default. Format: + * @param string $processor Required. The resource name of the [Processor][google.cloud.documentai.v1.Processor] to change default version. + * @param string $defaultProcessorVersion Required. The resource name of child [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to use as default. + * Format: * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{version}` * @param array $optionalArgs { * Optional. @@ -2105,23 +2083,23 @@ public function setDefaultProcessorVersion( * } * ``` * - * @param string $parent Required. The parent (project, location and processor) to create the new - * version for. Format: - * `projects/{project}/locations/{location}/processors/{processor}`. + * @param string $parent Required. The parent (project, location and processor) to create the new version for. + * Format: `projects/{project}/locations/{location}/processors/{processor}`. * @param ProcessorVersion $processorVersion Required. The processor version to be created. * @param array $optionalArgs { * Optional. * * @type CustomDocumentExtractionOptions $customDocumentExtractionOptions * Options to control Custom Document Extraction (CDE) Processor. + * @type FoundationModelTuningOptions $foundationModelTuningOptions + * Options to control foundation model tuning of a processor. * @type DocumentSchema $documentSchema * Optional. The schema the processor version will be trained with. * @type InputData $inputData - * Optional. The input data used to train the - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. + * Optional. The input data used to train the [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. * @type string $baseProcessorVersion - * Optional. The processor version to use as a base for training. This - * processor version must be a child of `parent`. Format: + * Optional. The processor version to use as a base for training. This processor version + * must be a child of `parent`. Format: * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`. * @type RetrySettings|array $retrySettings * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an @@ -2149,6 +2127,12 @@ public function trainProcessorVersion( ); } + if (isset($optionalArgs['foundationModelTuningOptions'])) { + $request->setFoundationModelTuningOptions( + $optionalArgs['foundationModelTuningOptions'] + ); + } + if (isset($optionalArgs['documentSchema'])) { $request->setDocumentSchema($optionalArgs['documentSchema']); } diff --git a/DocumentAi/src/V1/GetEvaluationRequest.php b/DocumentAi/src/V1/GetEvaluationRequest.php index 3f6b6397979c..f29706db5760 100644 --- a/DocumentAi/src/V1/GetEvaluationRequest.php +++ b/DocumentAi/src/V1/GetEvaluationRequest.php @@ -16,8 +16,7 @@ class GetEvaluationRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The resource name of the - * [Evaluation][google.cloud.documentai.v1.Evaluation] to get. + * Required. The resource name of the [Evaluation][google.cloud.documentai.v1.Evaluation] to get. * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}/evaluations/{evaluation}` * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { @@ -25,8 +24,7 @@ class GetEvaluationRequest extends \Google\Protobuf\Internal\Message private $name = ''; /** - * @param string $name Required. The resource name of the - * [Evaluation][google.cloud.documentai.v1.Evaluation] to get. + * @param string $name Required. The resource name of the [Evaluation][google.cloud.documentai.v1.Evaluation] to get. * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}/evaluations/{evaluation}` * Please see {@see DocumentProcessorServiceClient::evaluationName()} for help formatting this field. * @@ -47,8 +45,7 @@ public static function build(string $name): self * Optional. Data for populating the Message object. * * @type string $name - * Required. The resource name of the - * [Evaluation][google.cloud.documentai.v1.Evaluation] to get. + * Required. The resource name of the [Evaluation][google.cloud.documentai.v1.Evaluation] to get. * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}/evaluations/{evaluation}` * } */ @@ -58,8 +55,7 @@ public function __construct($data = NULL) { } /** - * Required. The resource name of the - * [Evaluation][google.cloud.documentai.v1.Evaluation] to get. + * Required. The resource name of the [Evaluation][google.cloud.documentai.v1.Evaluation] to get. * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}/evaluations/{evaluation}` * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { @@ -71,8 +67,7 @@ public function getName() } /** - * Required. The resource name of the - * [Evaluation][google.cloud.documentai.v1.Evaluation] to get. + * Required. The resource name of the [Evaluation][google.cloud.documentai.v1.Evaluation] to get. * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}/evaluations/{evaluation}` * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { diff --git a/DocumentAi/src/V1/GetProcessorRequest.php b/DocumentAi/src/V1/GetProcessorRequest.php index a436dc92b9f1..b30cc50bfae5 100644 --- a/DocumentAi/src/V1/GetProcessorRequest.php +++ b/DocumentAi/src/V1/GetProcessorRequest.php @@ -9,8 +9,7 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Request message for the - * [GetProcessor][google.cloud.documentai.v1.DocumentProcessorService.GetProcessor] + * Request message for the [GetProcessor][google.cloud.documentai.v1.DocumentProcessorService.GetProcessor] * method. * * Generated from protobuf message google.cloud.documentai.v1.GetProcessorRequest diff --git a/DocumentAi/src/V1/GetProcessorTypeRequest.php b/DocumentAi/src/V1/GetProcessorTypeRequest.php index c93b93eddb47..3291e6d676c4 100644 --- a/DocumentAi/src/V1/GetProcessorTypeRequest.php +++ b/DocumentAi/src/V1/GetProcessorTypeRequest.php @@ -10,8 +10,7 @@ /** * Request message for the - * [GetProcessorType][google.cloud.documentai.v1.DocumentProcessorService.GetProcessorType] - * method. + * [GetProcessorType][google.cloud.documentai.v1.DocumentProcessorService.GetProcessorType] method. * * Generated from protobuf message google.cloud.documentai.v1.GetProcessorTypeRequest */ diff --git a/DocumentAi/src/V1/GetProcessorVersionRequest.php b/DocumentAi/src/V1/GetProcessorVersionRequest.php index 8596ab9e93dd..6e00df63688e 100644 --- a/DocumentAi/src/V1/GetProcessorVersionRequest.php +++ b/DocumentAi/src/V1/GetProcessorVersionRequest.php @@ -10,8 +10,7 @@ /** * Request message for the - * [GetProcessorVersion][google.cloud.documentai.v1.DocumentProcessorService.GetProcessorVersion] - * method. + * [GetProcessorVersion][google.cloud.documentai.v1.DocumentProcessorService.GetProcessorVersion] method. * * Generated from protobuf message google.cloud.documentai.v1.GetProcessorVersionRequest */ diff --git a/DocumentAi/src/V1/HumanReviewStatus.php b/DocumentAi/src/V1/HumanReviewStatus.php index d40f6f0f9913..7c05ed063c39 100644 --- a/DocumentAi/src/V1/HumanReviewStatus.php +++ b/DocumentAi/src/V1/HumanReviewStatus.php @@ -29,11 +29,9 @@ class HumanReviewStatus extends \Google\Protobuf\Internal\Message private $state_message = ''; /** * The name of the operation triggered by the processed document. This field - * is populated only when the - * [state][google.cloud.documentai.v1.HumanReviewStatus.state] is - * `HUMAN_REVIEW_IN_PROGRESS`. It has the same response type and metadata as - * the long-running operation returned by - * [ReviewDocument][google.cloud.documentai.v1.DocumentProcessorService.ReviewDocument]. + * is populated only when the [state][google.cloud.documentai.v1.HumanReviewStatus.state] is `HUMAN_REVIEW_IN_PROGRESS`. It has + * the same response type and metadata as the long-running operation returned + * by [ReviewDocument][google.cloud.documentai.v1.DocumentProcessorService.ReviewDocument]. * * Generated from protobuf field string human_review_operation = 3; */ @@ -51,11 +49,9 @@ class HumanReviewStatus extends \Google\Protobuf\Internal\Message * A message providing more details about the human review state. * @type string $human_review_operation * The name of the operation triggered by the processed document. This field - * is populated only when the - * [state][google.cloud.documentai.v1.HumanReviewStatus.state] is - * `HUMAN_REVIEW_IN_PROGRESS`. It has the same response type and metadata as - * the long-running operation returned by - * [ReviewDocument][google.cloud.documentai.v1.DocumentProcessorService.ReviewDocument]. + * is populated only when the [state][google.cloud.documentai.v1.HumanReviewStatus.state] is `HUMAN_REVIEW_IN_PROGRESS`. It has + * the same response type and metadata as the long-running operation returned + * by [ReviewDocument][google.cloud.documentai.v1.DocumentProcessorService.ReviewDocument]. * } */ public function __construct($data = NULL) { @@ -117,11 +113,9 @@ public function setStateMessage($var) /** * The name of the operation triggered by the processed document. This field - * is populated only when the - * [state][google.cloud.documentai.v1.HumanReviewStatus.state] is - * `HUMAN_REVIEW_IN_PROGRESS`. It has the same response type and metadata as - * the long-running operation returned by - * [ReviewDocument][google.cloud.documentai.v1.DocumentProcessorService.ReviewDocument]. + * is populated only when the [state][google.cloud.documentai.v1.HumanReviewStatus.state] is `HUMAN_REVIEW_IN_PROGRESS`. It has + * the same response type and metadata as the long-running operation returned + * by [ReviewDocument][google.cloud.documentai.v1.DocumentProcessorService.ReviewDocument]. * * Generated from protobuf field string human_review_operation = 3; * @return string @@ -133,11 +127,9 @@ public function getHumanReviewOperation() /** * The name of the operation triggered by the processed document. This field - * is populated only when the - * [state][google.cloud.documentai.v1.HumanReviewStatus.state] is - * `HUMAN_REVIEW_IN_PROGRESS`. It has the same response type and metadata as - * the long-running operation returned by - * [ReviewDocument][google.cloud.documentai.v1.DocumentProcessorService.ReviewDocument]. + * is populated only when the [state][google.cloud.documentai.v1.HumanReviewStatus.state] is `HUMAN_REVIEW_IN_PROGRESS`. It has + * the same response type and metadata as the long-running operation returned + * by [ReviewDocument][google.cloud.documentai.v1.DocumentProcessorService.ReviewDocument]. * * Generated from protobuf field string human_review_operation = 3; * @param string $var diff --git a/DocumentAi/src/V1/HumanReviewStatus/State.php b/DocumentAi/src/V1/HumanReviewStatus/State.php index 2cb38208abcf..5da0162c4568 100644 --- a/DocumentAi/src/V1/HumanReviewStatus/State.php +++ b/DocumentAi/src/V1/HumanReviewStatus/State.php @@ -41,8 +41,7 @@ class State const IN_PROGRESS = 3; /** * Some error happened during triggering human review, see the - * [state_message][google.cloud.documentai.v1.HumanReviewStatus.state_message] - * for details. + * [state_message][google.cloud.documentai.v1.HumanReviewStatus.state_message] for details. * * Generated from protobuf enum ERROR = 4; */ diff --git a/DocumentAi/src/V1/ListEvaluationsRequest.php b/DocumentAi/src/V1/ListEvaluationsRequest.php index 3ca00303ab73..ad9d039a546b 100644 --- a/DocumentAi/src/V1/ListEvaluationsRequest.php +++ b/DocumentAi/src/V1/ListEvaluationsRequest.php @@ -9,17 +9,14 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Retrieves a list of evaluations for a given - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. + * Retrieves a list of evaluations for a given [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. * * Generated from protobuf message google.cloud.documentai.v1.ListEvaluationsRequest */ class ListEvaluationsRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The resource name of the - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to list - * evaluations for. + * Required. The resource name of the [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to list evaluations for. * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { @@ -42,9 +39,7 @@ class ListEvaluationsRequest extends \Google\Protobuf\Internal\Message private $page_token = ''; /** - * @param string $parent Required. The resource name of the - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to list - * evaluations for. + * @param string $parent Required. The resource name of the [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to list evaluations for. * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` * Please see {@see DocumentProcessorServiceClient::processorVersionName()} for help formatting this field. * @@ -65,9 +60,7 @@ public static function build(string $parent): self * Optional. Data for populating the Message object. * * @type string $parent - * Required. The resource name of the - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to list - * evaluations for. + * Required. The resource name of the [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to list evaluations for. * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` * @type int $page_size * The standard list page size. @@ -84,9 +77,7 @@ public function __construct($data = NULL) { } /** - * Required. The resource name of the - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to list - * evaluations for. + * Required. The resource name of the [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to list evaluations for. * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { @@ -98,9 +89,7 @@ public function getParent() } /** - * Required. The resource name of the - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to list - * evaluations for. + * Required. The resource name of the [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to list evaluations for. * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { diff --git a/DocumentAi/src/V1/ListProcessorTypesRequest.php b/DocumentAi/src/V1/ListProcessorTypesRequest.php index f6a6ff74339f..4687d456a055 100644 --- a/DocumentAi/src/V1/ListProcessorTypesRequest.php +++ b/DocumentAi/src/V1/ListProcessorTypesRequest.php @@ -10,9 +10,8 @@ /** * Request message for the - * [ListProcessorTypes][google.cloud.documentai.v1.DocumentProcessorService.ListProcessorTypes] - * method. Some processor types may require the project be added to an - * allowlist. + * [ListProcessorTypes][google.cloud.documentai.v1.DocumentProcessorService.ListProcessorTypes] method. + * Some processor types may require the project be added to an allowlist. * * Generated from protobuf message google.cloud.documentai.v1.ListProcessorTypesRequest */ diff --git a/DocumentAi/src/V1/ListProcessorTypesResponse.php b/DocumentAi/src/V1/ListProcessorTypesResponse.php index cad6cb143783..1b5c2fca8332 100644 --- a/DocumentAi/src/V1/ListProcessorTypesResponse.php +++ b/DocumentAi/src/V1/ListProcessorTypesResponse.php @@ -10,8 +10,7 @@ /** * Response message for the - * [ListProcessorTypes][google.cloud.documentai.v1.DocumentProcessorService.ListProcessorTypes] - * method. + * [ListProcessorTypes][google.cloud.documentai.v1.DocumentProcessorService.ListProcessorTypes] method. * * Generated from protobuf message google.cloud.documentai.v1.ListProcessorTypesResponse */ diff --git a/DocumentAi/src/V1/ListProcessorVersionsRequest.php b/DocumentAi/src/V1/ListProcessorVersionsRequest.php index 0855408ca8f3..91005ac879f7 100644 --- a/DocumentAi/src/V1/ListProcessorVersionsRequest.php +++ b/DocumentAi/src/V1/ListProcessorVersionsRequest.php @@ -16,9 +16,8 @@ class ListProcessorVersionsRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The parent (project, location and processor) to list all - * versions. Format: - * `projects/{project}/locations/{location}/processors/{processor}` + * Required. The parent (project, location and processor) to list all versions. + * Format: `projects/{project}/locations/{location}/processors/{processor}` * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ @@ -40,9 +39,8 @@ class ListProcessorVersionsRequest extends \Google\Protobuf\Internal\Message private $page_token = ''; /** - * @param string $parent Required. The parent (project, location and processor) to list all - * versions. Format: - * `projects/{project}/locations/{location}/processors/{processor}` + * @param string $parent Required. The parent (project, location and processor) to list all versions. + * Format: `projects/{project}/locations/{location}/processors/{processor}` * Please see {@see DocumentProcessorServiceClient::processorName()} for help formatting this field. * * @return \Google\Cloud\DocumentAI\V1\ListProcessorVersionsRequest @@ -62,9 +60,8 @@ public static function build(string $parent): self * Optional. Data for populating the Message object. * * @type string $parent - * Required. The parent (project, location and processor) to list all - * versions. Format: - * `projects/{project}/locations/{location}/processors/{processor}` + * Required. The parent (project, location and processor) to list all versions. + * Format: `projects/{project}/locations/{location}/processors/{processor}` * @type int $page_size * The maximum number of processor versions to return. * If unspecified, at most `10` processor versions will be returned. @@ -80,9 +77,8 @@ public function __construct($data = NULL) { } /** - * Required. The parent (project, location and processor) to list all - * versions. Format: - * `projects/{project}/locations/{location}/processors/{processor}` + * Required. The parent (project, location and processor) to list all versions. + * Format: `projects/{project}/locations/{location}/processors/{processor}` * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string @@ -93,9 +89,8 @@ public function getParent() } /** - * Required. The parent (project, location and processor) to list all - * versions. Format: - * `projects/{project}/locations/{location}/processors/{processor}` + * Required. The parent (project, location and processor) to list all versions. + * Format: `projects/{project}/locations/{location}/processors/{processor}` * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var diff --git a/DocumentAi/src/V1/ListProcessorsRequest.php b/DocumentAi/src/V1/ListProcessorsRequest.php index ed6ea01b0f2c..4b0946a0f25f 100644 --- a/DocumentAi/src/V1/ListProcessorsRequest.php +++ b/DocumentAi/src/V1/ListProcessorsRequest.php @@ -16,8 +16,8 @@ class ListProcessorsRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The parent (project and location) which owns this collection of - * Processors. Format: `projects/{project}/locations/{location}` + * Required. The parent (project and location) which owns this collection of Processors. + * Format: `projects/{project}/locations/{location}` * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ @@ -39,8 +39,8 @@ class ListProcessorsRequest extends \Google\Protobuf\Internal\Message private $page_token = ''; /** - * @param string $parent Required. The parent (project and location) which owns this collection of - * Processors. Format: `projects/{project}/locations/{location}` + * @param string $parent Required. The parent (project and location) which owns this collection of Processors. + * Format: `projects/{project}/locations/{location}` * Please see {@see DocumentProcessorServiceClient::locationName()} for help formatting this field. * * @return \Google\Cloud\DocumentAI\V1\ListProcessorsRequest @@ -60,8 +60,8 @@ public static function build(string $parent): self * Optional. Data for populating the Message object. * * @type string $parent - * Required. The parent (project and location) which owns this collection of - * Processors. Format: `projects/{project}/locations/{location}` + * Required. The parent (project and location) which owns this collection of Processors. + * Format: `projects/{project}/locations/{location}` * @type int $page_size * The maximum number of processors to return. * If unspecified, at most `50` processors will be returned. @@ -77,8 +77,8 @@ public function __construct($data = NULL) { } /** - * Required. The parent (project and location) which owns this collection of - * Processors. Format: `projects/{project}/locations/{location}` + * Required. The parent (project and location) which owns this collection of Processors. + * Format: `projects/{project}/locations/{location}` * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string @@ -89,8 +89,8 @@ public function getParent() } /** - * Required. The parent (project and location) which owns this collection of - * Processors. Format: `projects/{project}/locations/{location}` + * Required. The parent (project and location) which owns this collection of Processors. + * Format: `projects/{project}/locations/{location}` * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var diff --git a/DocumentAi/src/V1/ListProcessorsResponse.php b/DocumentAi/src/V1/ListProcessorsResponse.php index bd8c34e6e2f1..626893ecbab0 100644 --- a/DocumentAi/src/V1/ListProcessorsResponse.php +++ b/DocumentAi/src/V1/ListProcessorsResponse.php @@ -10,8 +10,7 @@ /** * Response message for the - * [ListProcessors][google.cloud.documentai.v1.DocumentProcessorService.ListProcessors] - * method. + * [ListProcessors][google.cloud.documentai.v1.DocumentProcessorService.ListProcessors] method. * * Generated from protobuf message google.cloud.documentai.v1.ListProcessorsResponse */ diff --git a/DocumentAi/src/V1/OcrConfig.php b/DocumentAi/src/V1/OcrConfig.php index aa89f0c91389..30f924135328 100644 --- a/DocumentAi/src/V1/OcrConfig.php +++ b/DocumentAi/src/V1/OcrConfig.php @@ -55,9 +55,7 @@ class OcrConfig extends \Google\Protobuf\Internal\Message private $enable_symbol = false; /** * Turn on font identification model and return font style information. - * Deprecated, use - * [PremiumFeatures.compute_style_info][google.cloud.documentai.v1.OcrConfig.PremiumFeatures.compute_style_info] - * instead. + * Deprecated, use [PremiumFeatures.compute_style_info][google.cloud.documentai.v1.OcrConfig.PremiumFeatures.compute_style_info] instead. * * Generated from protobuf field bool compute_style_info = 8 [deprecated = true]; * @deprecated @@ -103,9 +101,7 @@ class OcrConfig extends \Google\Protobuf\Internal\Message * Includes symbol level OCR information if set to true. * @type bool $compute_style_info * Turn on font identification model and return font style information. - * Deprecated, use - * [PremiumFeatures.compute_style_info][google.cloud.documentai.v1.OcrConfig.PremiumFeatures.compute_style_info] - * instead. + * Deprecated, use [PremiumFeatures.compute_style_info][google.cloud.documentai.v1.OcrConfig.PremiumFeatures.compute_style_info] instead. * @type bool $disable_character_boxes_detection * Turn off character box detector in OCR engine. Character box detection is * enabled by default in OCR 2.0 (and later) processors. @@ -276,9 +272,7 @@ public function setEnableSymbol($var) /** * Turn on font identification model and return font style information. - * Deprecated, use - * [PremiumFeatures.compute_style_info][google.cloud.documentai.v1.OcrConfig.PremiumFeatures.compute_style_info] - * instead. + * Deprecated, use [PremiumFeatures.compute_style_info][google.cloud.documentai.v1.OcrConfig.PremiumFeatures.compute_style_info] instead. * * Generated from protobuf field bool compute_style_info = 8 [deprecated = true]; * @return bool @@ -292,9 +286,7 @@ public function getComputeStyleInfo() /** * Turn on font identification model and return font style information. - * Deprecated, use - * [PremiumFeatures.compute_style_info][google.cloud.documentai.v1.OcrConfig.PremiumFeatures.compute_style_info] - * instead. + * Deprecated, use [PremiumFeatures.compute_style_info][google.cloud.documentai.v1.OcrConfig.PremiumFeatures.compute_style_info] instead. * * Generated from protobuf field bool compute_style_info = 8 [deprecated = true]; * @param bool $var diff --git a/DocumentAi/src/V1/ProcessOptions.php b/DocumentAi/src/V1/ProcessOptions.php index 04141b7386a6..f5261cb564e1 100644 --- a/DocumentAi/src/V1/ProcessOptions.php +++ b/DocumentAi/src/V1/ProcessOptions.php @@ -23,11 +23,9 @@ class ProcessOptions extends \Google\Protobuf\Internal\Message */ private $ocr_config = null; /** - * Optional. Override the schema of the - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. Will - * return an Invalid Argument error if this field is set when the underlying - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] doesn't - * support schema override. + * Optional. Override the schema of the [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. Will return an Invalid + * Argument error if this field is set when the underlying + * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] doesn't support schema override. * * Generated from protobuf field .google.cloud.documentai.v1.DocumentSchema schema_override = 8 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -51,11 +49,9 @@ class ProcessOptions extends \Google\Protobuf\Internal\Message * Only applicable to `OCR_PROCESSOR` and `FORM_PARSER_PROCESSOR`. * Returns error if set on other processor types. * @type \Google\Cloud\DocumentAI\V1\DocumentSchema $schema_override - * Optional. Override the schema of the - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. Will - * return an Invalid Argument error if this field is set when the underlying - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] doesn't - * support schema override. + * Optional. Override the schema of the [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. Will return an Invalid + * Argument error if this field is set when the underlying + * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] doesn't support schema override. * } */ public function __construct($data = NULL) { @@ -197,11 +193,9 @@ public function setOcrConfig($var) } /** - * Optional. Override the schema of the - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. Will - * return an Invalid Argument error if this field is set when the underlying - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] doesn't - * support schema override. + * Optional. Override the schema of the [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. Will return an Invalid + * Argument error if this field is set when the underlying + * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] doesn't support schema override. * * Generated from protobuf field .google.cloud.documentai.v1.DocumentSchema schema_override = 8 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Cloud\DocumentAI\V1\DocumentSchema|null @@ -222,11 +216,9 @@ public function clearSchemaOverride() } /** - * Optional. Override the schema of the - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. Will - * return an Invalid Argument error if this field is set when the underlying - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] doesn't - * support schema override. + * Optional. Override the schema of the [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. Will return an Invalid + * Argument error if this field is set when the underlying + * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] doesn't support schema override. * * Generated from protobuf field .google.cloud.documentai.v1.DocumentSchema schema_override = 8 [(.google.api.field_behavior) = OPTIONAL]; * @param \Google\Cloud\DocumentAI\V1\DocumentSchema $var diff --git a/DocumentAi/src/V1/ProcessRequest.php b/DocumentAi/src/V1/ProcessRequest.php index 80d84227d6ab..77b8d1de93dc 100644 --- a/DocumentAi/src/V1/ProcessRequest.php +++ b/DocumentAi/src/V1/ProcessRequest.php @@ -10,23 +10,18 @@ /** * Request message for the - * [ProcessDocument][google.cloud.documentai.v1.DocumentProcessorService.ProcessDocument] - * method. + * [ProcessDocument][google.cloud.documentai.v1.DocumentProcessorService.ProcessDocument] method. * * Generated from protobuf message google.cloud.documentai.v1.ProcessRequest */ class ProcessRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The resource name of the - * [Processor][google.cloud.documentai.v1.Processor] or + * Required. The resource name of the [Processor][google.cloud.documentai.v1.Processor] or * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] - * to use for processing. If a - * [Processor][google.cloud.documentai.v1.Processor] is specified, the server - * will use its [default - * version][google.cloud.documentai.v1.Processor.default_processor_version]. - * Format: `projects/{project}/locations/{location}/processors/{processor}`, - * or + * to use for processing. If a [Processor][google.cloud.documentai.v1.Processor] is specified, the server will use + * its [default version][google.cloud.documentai.v1.Processor.default_processor_version]. Format: + * `projects/{project}/locations/{location}/processors/{processor}`, or * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { @@ -40,8 +35,7 @@ class ProcessRequest extends \Google\Protobuf\Internal\Message */ private $skip_human_review = false; /** - * Specifies which fields to include in the - * [ProcessResponse.document][google.cloud.documentai.v1.ProcessResponse.document] + * Specifies which fields to include in the [ProcessResponse.document][google.cloud.documentai.v1.ProcessResponse.document] * output. Only supports top-level document and pages field, so it must be in * the form of `{document_field_name}` or `pages.{page_field_name}`. * @@ -67,15 +61,11 @@ class ProcessRequest extends \Google\Protobuf\Internal\Message protected $source; /** - * @param string $name Required. The resource name of the - * [Processor][google.cloud.documentai.v1.Processor] or + * @param string $name Required. The resource name of the [Processor][google.cloud.documentai.v1.Processor] or * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] - * to use for processing. If a - * [Processor][google.cloud.documentai.v1.Processor] is specified, the server - * will use its [default - * version][google.cloud.documentai.v1.Processor.default_processor_version]. - * Format: `projects/{project}/locations/{location}/processors/{processor}`, - * or + * to use for processing. If a [Processor][google.cloud.documentai.v1.Processor] is specified, the server will use + * its [default version][google.cloud.documentai.v1.Processor.default_processor_version]. Format: + * `projects/{project}/locations/{location}/processors/{processor}`, or * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` * * @return \Google\Cloud\DocumentAI\V1\ProcessRequest @@ -101,22 +91,17 @@ public static function build(string $name): self * @type \Google\Cloud\DocumentAI\V1\GcsDocument $gcs_document * A raw document on Google Cloud Storage. * @type string $name - * Required. The resource name of the - * [Processor][google.cloud.documentai.v1.Processor] or + * Required. The resource name of the [Processor][google.cloud.documentai.v1.Processor] or * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] - * to use for processing. If a - * [Processor][google.cloud.documentai.v1.Processor] is specified, the server - * will use its [default - * version][google.cloud.documentai.v1.Processor.default_processor_version]. - * Format: `projects/{project}/locations/{location}/processors/{processor}`, - * or + * to use for processing. If a [Processor][google.cloud.documentai.v1.Processor] is specified, the server will use + * its [default version][google.cloud.documentai.v1.Processor.default_processor_version]. Format: + * `projects/{project}/locations/{location}/processors/{processor}`, or * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` * @type bool $skip_human_review * Whether human review should be skipped for this request. Default to * `false`. * @type \Google\Protobuf\FieldMask $field_mask - * Specifies which fields to include in the - * [ProcessResponse.document][google.cloud.documentai.v1.ProcessResponse.document] + * Specifies which fields to include in the [ProcessResponse.document][google.cloud.documentai.v1.ProcessResponse.document] * output. Only supports top-level document and pages field, so it must be in * the form of `{document_field_name}` or `pages.{page_field_name}`. * @type \Google\Cloud\DocumentAI\V1\ProcessOptions $process_options @@ -228,15 +213,11 @@ public function setGcsDocument($var) } /** - * Required. The resource name of the - * [Processor][google.cloud.documentai.v1.Processor] or + * Required. The resource name of the [Processor][google.cloud.documentai.v1.Processor] or * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] - * to use for processing. If a - * [Processor][google.cloud.documentai.v1.Processor] is specified, the server - * will use its [default - * version][google.cloud.documentai.v1.Processor.default_processor_version]. - * Format: `projects/{project}/locations/{location}/processors/{processor}`, - * or + * to use for processing. If a [Processor][google.cloud.documentai.v1.Processor] is specified, the server will use + * its [default version][google.cloud.documentai.v1.Processor.default_processor_version]. Format: + * `projects/{project}/locations/{location}/processors/{processor}`, or * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { @@ -248,15 +229,11 @@ public function getName() } /** - * Required. The resource name of the - * [Processor][google.cloud.documentai.v1.Processor] or + * Required. The resource name of the [Processor][google.cloud.documentai.v1.Processor] or * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] - * to use for processing. If a - * [Processor][google.cloud.documentai.v1.Processor] is specified, the server - * will use its [default - * version][google.cloud.documentai.v1.Processor.default_processor_version]. - * Format: `projects/{project}/locations/{location}/processors/{processor}`, - * or + * to use for processing. If a [Processor][google.cloud.documentai.v1.Processor] is specified, the server will use + * its [default version][google.cloud.documentai.v1.Processor.default_processor_version]. Format: + * `projects/{project}/locations/{location}/processors/{processor}`, or * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { @@ -300,8 +277,7 @@ public function setSkipHumanReview($var) } /** - * Specifies which fields to include in the - * [ProcessResponse.document][google.cloud.documentai.v1.ProcessResponse.document] + * Specifies which fields to include in the [ProcessResponse.document][google.cloud.documentai.v1.ProcessResponse.document] * output. Only supports top-level document and pages field, so it must be in * the form of `{document_field_name}` or `pages.{page_field_name}`. * @@ -324,8 +300,7 @@ public function clearFieldMask() } /** - * Specifies which fields to include in the - * [ProcessResponse.document][google.cloud.documentai.v1.ProcessResponse.document] + * Specifies which fields to include in the [ProcessResponse.document][google.cloud.documentai.v1.ProcessResponse.document] * output. Only supports top-level document and pages field, so it must be in * the form of `{document_field_name}` or `pages.{page_field_name}`. * diff --git a/DocumentAi/src/V1/ProcessResponse.php b/DocumentAi/src/V1/ProcessResponse.php index bf2379e49104..297d6a35b52d 100644 --- a/DocumentAi/src/V1/ProcessResponse.php +++ b/DocumentAi/src/V1/ProcessResponse.php @@ -10,8 +10,7 @@ /** * Response message for the - * [ProcessDocument][google.cloud.documentai.v1.DocumentProcessorService.ProcessDocument] - * method. + * [ProcessDocument][google.cloud.documentai.v1.DocumentProcessorService.ProcessDocument] method. * * Generated from protobuf message google.cloud.documentai.v1.ProcessResponse */ diff --git a/DocumentAi/src/V1/Processor.php b/DocumentAi/src/V1/Processor.php index 1c0793461805..3c4ff0be7656 100644 --- a/DocumentAi/src/V1/Processor.php +++ b/DocumentAi/src/V1/Processor.php @@ -56,8 +56,7 @@ class Processor extends \Google\Protobuf\Internal\Message */ private $processor_version_aliases; /** - * Output only. Immutable. The http endpoint that can be called to invoke - * processing. + * Output only. Immutable. The http endpoint that can be called to invoke processing. * * Generated from protobuf field string process_endpoint = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; */ @@ -98,8 +97,7 @@ class Processor extends \Google\Protobuf\Internal\Message * @type array<\Google\Cloud\DocumentAI\V1\ProcessorVersionAlias>|\Google\Protobuf\Internal\RepeatedField $processor_version_aliases * Output only. The processor version aliases. * @type string $process_endpoint - * Output only. Immutable. The http endpoint that can be called to invoke - * processing. + * Output only. Immutable. The http endpoint that can be called to invoke processing. * @type \Google\Protobuf\Timestamp $create_time * The time the processor was created. * @type string $kms_key_name @@ -275,8 +273,7 @@ public function setProcessorVersionAliases($var) } /** - * Output only. Immutable. The http endpoint that can be called to invoke - * processing. + * Output only. Immutable. The http endpoint that can be called to invoke processing. * * Generated from protobuf field string process_endpoint = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; * @return string @@ -287,8 +284,7 @@ public function getProcessEndpoint() } /** - * Output only. Immutable. The http endpoint that can be called to invoke - * processing. + * Output only. Immutable. The http endpoint that can be called to invoke processing. * * Generated from protobuf field string process_endpoint = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; * @param string $var diff --git a/DocumentAi/src/V1/ReviewDocumentOperationMetadata.php b/DocumentAi/src/V1/ReviewDocumentOperationMetadata.php index 5be3e52f8db9..7f22bdf322c6 100644 --- a/DocumentAi/src/V1/ReviewDocumentOperationMetadata.php +++ b/DocumentAi/src/V1/ReviewDocumentOperationMetadata.php @@ -10,8 +10,7 @@ /** * The long-running operation metadata for the - * [ReviewDocument][google.cloud.documentai.v1.DocumentProcessorService.ReviewDocument] - * method. + * [ReviewDocument][google.cloud.documentai.v1.DocumentProcessorService.ReviewDocument] method. * * Generated from protobuf message google.cloud.documentai.v1.ReviewDocumentOperationMetadata */ diff --git a/DocumentAi/src/V1/ReviewDocumentRequest.php b/DocumentAi/src/V1/ReviewDocumentRequest.php index e91cdc317a00..ca1664b39c8e 100644 --- a/DocumentAi/src/V1/ReviewDocumentRequest.php +++ b/DocumentAi/src/V1/ReviewDocumentRequest.php @@ -10,17 +10,15 @@ /** * Request message for the - * [ReviewDocument][google.cloud.documentai.v1.DocumentProcessorService.ReviewDocument] - * method. + * [ReviewDocument][google.cloud.documentai.v1.DocumentProcessorService.ReviewDocument] method. * * Generated from protobuf message google.cloud.documentai.v1.ReviewDocumentRequest */ class ReviewDocumentRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The resource name of the - * [HumanReviewConfig][google.cloud.documentai.v1.HumanReviewConfig] that the - * document will be reviewed with. + * Required. The resource name of the [HumanReviewConfig][google.cloud.documentai.v1.HumanReviewConfig] that the document will be + * reviewed with. * * Generated from protobuf field string human_review_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ @@ -46,9 +44,8 @@ class ReviewDocumentRequest extends \Google\Protobuf\Internal\Message protected $source; /** - * @param string $humanReviewConfig Required. The resource name of the - * [HumanReviewConfig][google.cloud.documentai.v1.HumanReviewConfig] that the - * document will be reviewed with. Please see + * @param string $humanReviewConfig Required. The resource name of the [HumanReviewConfig][google.cloud.documentai.v1.HumanReviewConfig] that the document will be + * reviewed with. Please see * {@see DocumentProcessorServiceClient::humanReviewConfigName()} for help formatting this field. * * @return \Google\Cloud\DocumentAI\V1\ReviewDocumentRequest @@ -70,9 +67,8 @@ public static function build(string $humanReviewConfig): self * @type \Google\Cloud\DocumentAI\V1\Document $inline_document * An inline document proto. * @type string $human_review_config - * Required. The resource name of the - * [HumanReviewConfig][google.cloud.documentai.v1.HumanReviewConfig] that the - * document will be reviewed with. + * Required. The resource name of the [HumanReviewConfig][google.cloud.documentai.v1.HumanReviewConfig] that the document will be + * reviewed with. * @type bool $enable_schema_validation * Whether the validation should be performed on the ad-hoc review request. * @type int $priority @@ -118,9 +114,8 @@ public function setInlineDocument($var) } /** - * Required. The resource name of the - * [HumanReviewConfig][google.cloud.documentai.v1.HumanReviewConfig] that the - * document will be reviewed with. + * Required. The resource name of the [HumanReviewConfig][google.cloud.documentai.v1.HumanReviewConfig] that the document will be + * reviewed with. * * Generated from protobuf field string human_review_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string @@ -131,9 +126,8 @@ public function getHumanReviewConfig() } /** - * Required. The resource name of the - * [HumanReviewConfig][google.cloud.documentai.v1.HumanReviewConfig] that the - * document will be reviewed with. + * Required. The resource name of the [HumanReviewConfig][google.cloud.documentai.v1.HumanReviewConfig] that the document will be + * reviewed with. * * Generated from protobuf field string human_review_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var diff --git a/DocumentAi/src/V1/ReviewDocumentResponse.php b/DocumentAi/src/V1/ReviewDocumentResponse.php index e6ab07dbc3c3..076819827de5 100644 --- a/DocumentAi/src/V1/ReviewDocumentResponse.php +++ b/DocumentAi/src/V1/ReviewDocumentResponse.php @@ -10,8 +10,7 @@ /** * Response message for the - * [ReviewDocument][google.cloud.documentai.v1.DocumentProcessorService.ReviewDocument] - * method. + * [ReviewDocument][google.cloud.documentai.v1.DocumentProcessorService.ReviewDocument] method. * * Generated from protobuf message google.cloud.documentai.v1.ReviewDocumentResponse */ diff --git a/DocumentAi/src/V1/SetDefaultProcessorVersionRequest.php b/DocumentAi/src/V1/SetDefaultProcessorVersionRequest.php index 7f3deceb62b8..14de7ad1d620 100644 --- a/DocumentAi/src/V1/SetDefaultProcessorVersionRequest.php +++ b/DocumentAi/src/V1/SetDefaultProcessorVersionRequest.php @@ -18,17 +18,14 @@ class SetDefaultProcessorVersionRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The resource name of the - * [Processor][google.cloud.documentai.v1.Processor] to change default - * version. + * Required. The resource name of the [Processor][google.cloud.documentai.v1.Processor] to change default version. * * Generated from protobuf field string processor = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ private $processor = ''; /** - * Required. The resource name of child - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to use as - * default. Format: + * Required. The resource name of child [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to use as default. + * Format: * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{version}` * * Generated from protobuf field string default_processor_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { @@ -42,13 +39,10 @@ class SetDefaultProcessorVersionRequest extends \Google\Protobuf\Internal\Messag * Optional. Data for populating the Message object. * * @type string $processor - * Required. The resource name of the - * [Processor][google.cloud.documentai.v1.Processor] to change default - * version. + * Required. The resource name of the [Processor][google.cloud.documentai.v1.Processor] to change default version. * @type string $default_processor_version - * Required. The resource name of child - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to use as - * default. Format: + * Required. The resource name of child [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to use as default. + * Format: * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{version}` * } */ @@ -58,9 +52,7 @@ public function __construct($data = NULL) { } /** - * Required. The resource name of the - * [Processor][google.cloud.documentai.v1.Processor] to change default - * version. + * Required. The resource name of the [Processor][google.cloud.documentai.v1.Processor] to change default version. * * Generated from protobuf field string processor = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string @@ -71,9 +63,7 @@ public function getProcessor() } /** - * Required. The resource name of the - * [Processor][google.cloud.documentai.v1.Processor] to change default - * version. + * Required. The resource name of the [Processor][google.cloud.documentai.v1.Processor] to change default version. * * Generated from protobuf field string processor = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var @@ -88,9 +78,8 @@ public function setProcessor($var) } /** - * Required. The resource name of child - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to use as - * default. Format: + * Required. The resource name of child [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to use as default. + * Format: * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{version}` * * Generated from protobuf field string default_processor_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { @@ -102,9 +91,8 @@ public function getDefaultProcessorVersion() } /** - * Required. The resource name of child - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to use as - * default. Format: + * Required. The resource name of child [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to use as default. + * Format: * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{version}` * * Generated from protobuf field string default_processor_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { diff --git a/DocumentAi/src/V1/TrainProcessorVersionRequest.php b/DocumentAi/src/V1/TrainProcessorVersionRequest.php index 22e07c88db8d..7c79a6bd7bb9 100644 --- a/DocumentAi/src/V1/TrainProcessorVersionRequest.php +++ b/DocumentAi/src/V1/TrainProcessorVersionRequest.php @@ -18,9 +18,8 @@ class TrainProcessorVersionRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The parent (project, location and processor) to create the new - * version for. Format: - * `projects/{project}/locations/{location}/processors/{processor}`. + * Required. The parent (project, location and processor) to create the new version for. + * Format: `projects/{project}/locations/{location}/processors/{processor}`. * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ @@ -38,15 +37,14 @@ class TrainProcessorVersionRequest extends \Google\Protobuf\Internal\Message */ private $document_schema = null; /** - * Optional. The input data used to train the - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. + * Optional. The input data used to train the [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. * * Generated from protobuf field .google.cloud.documentai.v1.TrainProcessorVersionRequest.InputData input_data = 4 [(.google.api.field_behavior) = OPTIONAL]; */ private $input_data = null; /** - * Optional. The processor version to use as a base for training. This - * processor version must be a child of `parent`. Format: + * Optional. The processor version to use as a base for training. This processor version + * must be a child of `parent`. Format: * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`. * * Generated from protobuf field string base_processor_version = 8 [(.google.api.field_behavior) = OPTIONAL]; @@ -55,9 +53,8 @@ class TrainProcessorVersionRequest extends \Google\Protobuf\Internal\Message protected $processor_flags; /** - * @param string $parent Required. The parent (project, location and processor) to create the new - * version for. Format: - * `projects/{project}/locations/{location}/processors/{processor}`. Please see + * @param string $parent Required. The parent (project, location and processor) to create the new version for. + * Format: `projects/{project}/locations/{location}/processors/{processor}`. Please see * {@see DocumentProcessorServiceClient::processorName()} for help formatting this field. * @param \Google\Cloud\DocumentAI\V1\ProcessorVersion $processorVersion Required. The processor version to be created. * @@ -80,20 +77,20 @@ public static function build(string $parent, \Google\Cloud\DocumentAI\V1\Process * * @type \Google\Cloud\DocumentAI\V1\TrainProcessorVersionRequest\CustomDocumentExtractionOptions $custom_document_extraction_options * Options to control Custom Document Extraction (CDE) Processor. + * @type \Google\Cloud\DocumentAI\V1\TrainProcessorVersionRequest\FoundationModelTuningOptions $foundation_model_tuning_options + * Options to control foundation model tuning of a processor. * @type string $parent - * Required. The parent (project, location and processor) to create the new - * version for. Format: - * `projects/{project}/locations/{location}/processors/{processor}`. + * Required. The parent (project, location and processor) to create the new version for. + * Format: `projects/{project}/locations/{location}/processors/{processor}`. * @type \Google\Cloud\DocumentAI\V1\ProcessorVersion $processor_version * Required. The processor version to be created. * @type \Google\Cloud\DocumentAI\V1\DocumentSchema $document_schema * Optional. The schema the processor version will be trained with. * @type \Google\Cloud\DocumentAI\V1\TrainProcessorVersionRequest\InputData $input_data - * Optional. The input data used to train the - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. + * Optional. The input data used to train the [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. * @type string $base_processor_version - * Optional. The processor version to use as a base for training. This - * processor version must be a child of `parent`. Format: + * Optional. The processor version to use as a base for training. This processor version + * must be a child of `parent`. Format: * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`. * } */ @@ -134,9 +131,39 @@ public function setCustomDocumentExtractionOptions($var) } /** - * Required. The parent (project, location and processor) to create the new - * version for. Format: - * `projects/{project}/locations/{location}/processors/{processor}`. + * Options to control foundation model tuning of a processor. + * + * Generated from protobuf field .google.cloud.documentai.v1.TrainProcessorVersionRequest.FoundationModelTuningOptions foundation_model_tuning_options = 12; + * @return \Google\Cloud\DocumentAI\V1\TrainProcessorVersionRequest\FoundationModelTuningOptions|null + */ + public function getFoundationModelTuningOptions() + { + return $this->readOneof(12); + } + + public function hasFoundationModelTuningOptions() + { + return $this->hasOneof(12); + } + + /** + * Options to control foundation model tuning of a processor. + * + * Generated from protobuf field .google.cloud.documentai.v1.TrainProcessorVersionRequest.FoundationModelTuningOptions foundation_model_tuning_options = 12; + * @param \Google\Cloud\DocumentAI\V1\TrainProcessorVersionRequest\FoundationModelTuningOptions $var + * @return $this + */ + public function setFoundationModelTuningOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\TrainProcessorVersionRequest\FoundationModelTuningOptions::class); + $this->writeOneof(12, $var); + + return $this; + } + + /** + * Required. The parent (project, location and processor) to create the new version for. + * Format: `projects/{project}/locations/{location}/processors/{processor}`. * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string @@ -147,9 +174,8 @@ public function getParent() } /** - * Required. The parent (project, location and processor) to create the new - * version for. Format: - * `projects/{project}/locations/{location}/processors/{processor}`. + * Required. The parent (project, location and processor) to create the new version for. + * Format: `projects/{project}/locations/{location}/processors/{processor}`. * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var @@ -236,8 +262,7 @@ public function setDocumentSchema($var) } /** - * Optional. The input data used to train the - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. + * Optional. The input data used to train the [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. * * Generated from protobuf field .google.cloud.documentai.v1.TrainProcessorVersionRequest.InputData input_data = 4 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Cloud\DocumentAI\V1\TrainProcessorVersionRequest\InputData|null @@ -258,8 +283,7 @@ public function clearInputData() } /** - * Optional. The input data used to train the - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. + * Optional. The input data used to train the [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. * * Generated from protobuf field .google.cloud.documentai.v1.TrainProcessorVersionRequest.InputData input_data = 4 [(.google.api.field_behavior) = OPTIONAL]; * @param \Google\Cloud\DocumentAI\V1\TrainProcessorVersionRequest\InputData $var @@ -274,8 +298,8 @@ public function setInputData($var) } /** - * Optional. The processor version to use as a base for training. This - * processor version must be a child of `parent`. Format: + * Optional. The processor version to use as a base for training. This processor version + * must be a child of `parent`. Format: * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`. * * Generated from protobuf field string base_processor_version = 8 [(.google.api.field_behavior) = OPTIONAL]; @@ -287,8 +311,8 @@ public function getBaseProcessorVersion() } /** - * Optional. The processor version to use as a base for training. This - * processor version must be a child of `parent`. Format: + * Optional. The processor version to use as a base for training. This processor version + * must be a child of `parent`. Format: * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`. * * Generated from protobuf field string base_processor_version = 8 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/DocumentAi/src/V1/TrainProcessorVersionRequest/FoundationModelTuningOptions.php b/DocumentAi/src/V1/TrainProcessorVersionRequest/FoundationModelTuningOptions.php new file mode 100644 index 000000000000..4bf65b9547f3 --- /dev/null +++ b/DocumentAi/src/V1/TrainProcessorVersionRequest/FoundationModelTuningOptions.php @@ -0,0 +1,114 @@ +google.cloud.documentai.v1.TrainProcessorVersionRequest.FoundationModelTuningOptions + */ +class FoundationModelTuningOptions extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The number of steps to run for model tuning. Valid values are between + * 1 and 400. If not provided, recommended steps will be used. + * + * Generated from protobuf field int32 train_steps = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $train_steps = 0; + /** + * Optional. The multiplier to apply to the recommended learning rate. Valid values + * are between 0.1 and 10. If not provided, recommended learning rate will + * be used. + * + * Generated from protobuf field float learning_rate_multiplier = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $learning_rate_multiplier = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $train_steps + * Optional. The number of steps to run for model tuning. Valid values are between + * 1 and 400. If not provided, recommended steps will be used. + * @type float $learning_rate_multiplier + * Optional. The multiplier to apply to the recommended learning rate. Valid values + * are between 0.1 and 10. If not provided, recommended learning rate will + * be used. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The number of steps to run for model tuning. Valid values are between + * 1 and 400. If not provided, recommended steps will be used. + * + * Generated from protobuf field int32 train_steps = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getTrainSteps() + { + return $this->train_steps; + } + + /** + * Optional. The number of steps to run for model tuning. Valid values are between + * 1 and 400. If not provided, recommended steps will be used. + * + * Generated from protobuf field int32 train_steps = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setTrainSteps($var) + { + GPBUtil::checkInt32($var); + $this->train_steps = $var; + + return $this; + } + + /** + * Optional. The multiplier to apply to the recommended learning rate. Valid values + * are between 0.1 and 10. If not provided, recommended learning rate will + * be used. + * + * Generated from protobuf field float learning_rate_multiplier = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return float + */ + public function getLearningRateMultiplier() + { + return $this->learning_rate_multiplier; + } + + /** + * Optional. The multiplier to apply to the recommended learning rate. Valid values + * are between 0.1 and 10. If not provided, recommended learning rate will + * be used. + * + * Generated from protobuf field float learning_rate_multiplier = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param float $var + * @return $this + */ + public function setLearningRateMultiplier($var) + { + GPBUtil::checkFloat($var); + $this->learning_rate_multiplier = $var; + + return $this; + } + +} + + diff --git a/DocumentAi/src/V1/TrainProcessorVersionRequest/InputData.php b/DocumentAi/src/V1/TrainProcessorVersionRequest/InputData.php index c82fa1453462..856f8daaf9ed 100644 --- a/DocumentAi/src/V1/TrainProcessorVersionRequest/InputData.php +++ b/DocumentAi/src/V1/TrainProcessorVersionRequest/InputData.php @@ -9,8 +9,7 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The input data used to train a new - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. + * The input data used to train a new [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. * * Generated from protobuf message google.cloud.documentai.v1.TrainProcessorVersionRequest.InputData */ diff --git a/Domains/VERSION b/Domains/VERSION index cb0c939a936f..be14282b7fff 100644 --- a/Domains/VERSION +++ b/Domains/VERSION @@ -1 +1 @@ -0.5.2 +0.5.3 diff --git a/EdgeNetwork/VERSION b/EdgeNetwork/VERSION index 1c09c74e221c..42045acae20f 100644 --- a/EdgeNetwork/VERSION +++ b/EdgeNetwork/VERSION @@ -1 +1 @@ -0.3.3 +0.3.4 diff --git a/ErrorReporting/VERSION b/ErrorReporting/VERSION index d90746a79af3..4240544f330c 100644 --- a/ErrorReporting/VERSION +++ b/ErrorReporting/VERSION @@ -1 +1 @@ -0.22.3 +0.22.4 diff --git a/EssentialContacts/VERSION b/EssentialContacts/VERSION index 2b7c5ae01848..17b2ccd9bf90 100644 --- a/EssentialContacts/VERSION +++ b/EssentialContacts/VERSION @@ -1 +1 @@ -0.4.2 +0.4.3 diff --git a/Eventarc/VERSION b/Eventarc/VERSION index 1892b9267677..31e5c843497c 100644 --- a/Eventarc/VERSION +++ b/Eventarc/VERSION @@ -1 +1 @@ -1.3.2 +1.3.3 diff --git a/EventarcPublishing/VERSION b/EventarcPublishing/VERSION index ee6cdce3c290..b6160487433b 100644 --- a/EventarcPublishing/VERSION +++ b/EventarcPublishing/VERSION @@ -1 +1 @@ -0.6.1 +0.6.2 diff --git a/Filestore/VERSION b/Filestore/VERSION index 94fe62c2740f..9075be495155 100644 --- a/Filestore/VERSION +++ b/Filestore/VERSION @@ -1 +1 @@ -1.5.4 +1.5.5 diff --git a/Firestore/VERSION b/Firestore/VERSION index b978278f05f5..3987c472943e 100644 --- a/Firestore/VERSION +++ b/Firestore/VERSION @@ -1 +1 @@ -1.43.0 +1.43.1 diff --git a/Firestore/src/FirestoreClient.php b/Firestore/src/FirestoreClient.php index 472f865cce52..6a40f213eaa7 100644 --- a/Firestore/src/FirestoreClient.php +++ b/Firestore/src/FirestoreClient.php @@ -75,7 +75,7 @@ class FirestoreClient use SnapshotTrait; use ValidateTrait; - const VERSION = '1.43.0'; + const VERSION = '1.43.1'; const DEFAULT_DATABASE = '(default)'; diff --git a/Functions/VERSION b/Functions/VERSION index fdd3be6df54a..266146b87cbc 100644 --- a/Functions/VERSION +++ b/Functions/VERSION @@ -1 +1 @@ -1.6.2 +1.6.3 diff --git a/GSuiteAddOns/VERSION b/GSuiteAddOns/VERSION index d15723fbe8de..1c09c74e221c 100644 --- a/GSuiteAddOns/VERSION +++ b/GSuiteAddOns/VERSION @@ -1 +1 @@ -0.3.2 +0.3.3 diff --git a/GkeBackup/VERSION b/GkeBackup/VERSION index faef31a4357c..39e898a4f952 100644 --- a/GkeBackup/VERSION +++ b/GkeBackup/VERSION @@ -1 +1 @@ -0.7.0 +0.7.1 diff --git a/GkeConnectGateway/VERSION b/GkeConnectGateway/VERSION index 267577d47e49..2b7c5ae01848 100644 --- a/GkeConnectGateway/VERSION +++ b/GkeConnectGateway/VERSION @@ -1 +1 @@ -0.4.1 +0.4.2 diff --git a/GkeHub/VERSION b/GkeHub/VERSION index 2003b639c400..965065db5b84 100644 --- a/GkeHub/VERSION +++ b/GkeHub/VERSION @@ -1 +1 @@ -0.9.2 +0.9.3 diff --git a/GkeMultiCloud/VERSION b/GkeMultiCloud/VERSION index cb0c939a936f..be14282b7fff 100644 --- a/GkeMultiCloud/VERSION +++ b/GkeMultiCloud/VERSION @@ -1 +1 @@ -0.5.2 +0.5.3 diff --git a/Grafeas/VERSION b/Grafeas/VERSION index 78bc1abd14f2..571215736a66 100644 --- a/Grafeas/VERSION +++ b/Grafeas/VERSION @@ -1 +1 @@ -0.10.0 +0.10.1 diff --git a/Iam/VERSION b/Iam/VERSION index cb0c939a936f..be14282b7fff 100644 --- a/Iam/VERSION +++ b/Iam/VERSION @@ -1 +1 @@ -0.5.2 +0.5.3 diff --git a/IamCredentials/VERSION b/IamCredentials/VERSION index 23aa8390630c..0495c4a88cae 100644 --- a/IamCredentials/VERSION +++ b/IamCredentials/VERSION @@ -1 +1 @@ -1.2.2 +1.2.3 diff --git a/Iap/VERSION b/Iap/VERSION index 9df886c42a1e..428b770e3e23 100644 --- a/Iap/VERSION +++ b/Iap/VERSION @@ -1 +1 @@ -1.4.2 +1.4.3 diff --git a/Ids/VERSION b/Ids/VERSION index cb0c939a936f..be14282b7fff 100644 --- a/Ids/VERSION +++ b/Ids/VERSION @@ -1 +1 @@ -0.5.2 +0.5.3 diff --git a/Iot/VERSION b/Iot/VERSION index f8a696c8dc56..661e7aeadf36 100644 --- a/Iot/VERSION +++ b/Iot/VERSION @@ -1 +1 @@ -1.7.2 +1.7.3 diff --git a/Kms/VERSION b/Kms/VERSION index 0369d0b1e932..bae5c7f667c9 100644 --- a/Kms/VERSION +++ b/Kms/VERSION @@ -1 +1 @@ -1.21.2 +1.21.3 diff --git a/Kms/src/V1/PublicKey.php b/Kms/src/V1/PublicKey.php index b02369ca8c8f..89ac65e6a3b6 100644 --- a/Kms/src/V1/PublicKey.php +++ b/Kms/src/V1/PublicKey.php @@ -18,12 +18,10 @@ class PublicKey extends \Google\Protobuf\Internal\Message { /** - * A public key encoded in PEM format, populated only when - * [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey] - * returns one key. For more information, see the [RFC - * 7468](https://tools.ietf.org/html/rfc7468) sections for [General - * Considerations](https://tools.ietf.org/html/rfc7468#section-2) and [Textual - * Encoding of Subject Public Key Info] + * The public key, encoded in PEM format. For more information, see the + * [RFC 7468](https://tools.ietf.org/html/rfc7468) sections for + * [General Considerations](https://tools.ietf.org/html/rfc7468#section-2) and + * [Textual Encoding of Subject Public Key Info] * (https://tools.ietf.org/html/rfc7468#section-13). * * Generated from protobuf field string pem = 1; @@ -38,10 +36,8 @@ class PublicKey extends \Google\Protobuf\Internal\Message */ private $algorithm = 0; /** - * Integrity verification field: A CRC32C checksum of the returned - * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. It is only populated - * when [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey] - * returns one key. An integrity check of + * Integrity verification field. A CRC32C checksum of the returned + * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. An integrity check of * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] can be performed by * computing the CRC32C checksum of * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] and comparing your @@ -81,22 +77,18 @@ class PublicKey extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $pem - * A public key encoded in PEM format, populated only when - * [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey] - * returns one key. For more information, see the [RFC - * 7468](https://tools.ietf.org/html/rfc7468) sections for [General - * Considerations](https://tools.ietf.org/html/rfc7468#section-2) and [Textual - * Encoding of Subject Public Key Info] + * The public key, encoded in PEM format. For more information, see the + * [RFC 7468](https://tools.ietf.org/html/rfc7468) sections for + * [General Considerations](https://tools.ietf.org/html/rfc7468#section-2) and + * [Textual Encoding of Subject Public Key Info] * (https://tools.ietf.org/html/rfc7468#section-13). * @type int $algorithm * The * [Algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] * associated with this key. * @type \Google\Protobuf\Int64Value $pem_crc32c - * Integrity verification field: A CRC32C checksum of the returned - * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. It is only populated - * when [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey] - * returns one key. An integrity check of + * Integrity verification field. A CRC32C checksum of the returned + * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. An integrity check of * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] can be performed by * computing the CRC32C checksum of * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] and comparing your @@ -124,12 +116,10 @@ public function __construct($data = NULL) { } /** - * A public key encoded in PEM format, populated only when - * [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey] - * returns one key. For more information, see the [RFC - * 7468](https://tools.ietf.org/html/rfc7468) sections for [General - * Considerations](https://tools.ietf.org/html/rfc7468#section-2) and [Textual - * Encoding of Subject Public Key Info] + * The public key, encoded in PEM format. For more information, see the + * [RFC 7468](https://tools.ietf.org/html/rfc7468) sections for + * [General Considerations](https://tools.ietf.org/html/rfc7468#section-2) and + * [Textual Encoding of Subject Public Key Info] * (https://tools.ietf.org/html/rfc7468#section-13). * * Generated from protobuf field string pem = 1; @@ -141,12 +131,10 @@ public function getPem() } /** - * A public key encoded in PEM format, populated only when - * [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey] - * returns one key. For more information, see the [RFC - * 7468](https://tools.ietf.org/html/rfc7468) sections for [General - * Considerations](https://tools.ietf.org/html/rfc7468#section-2) and [Textual - * Encoding of Subject Public Key Info] + * The public key, encoded in PEM format. For more information, see the + * [RFC 7468](https://tools.ietf.org/html/rfc7468) sections for + * [General Considerations](https://tools.ietf.org/html/rfc7468#section-2) and + * [Textual Encoding of Subject Public Key Info] * (https://tools.ietf.org/html/rfc7468#section-13). * * Generated from protobuf field string pem = 1; @@ -192,10 +180,8 @@ public function setAlgorithm($var) } /** - * Integrity verification field: A CRC32C checksum of the returned - * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. It is only populated - * when [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey] - * returns one key. An integrity check of + * Integrity verification field. A CRC32C checksum of the returned + * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. An integrity check of * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] can be performed by * computing the CRC32C checksum of * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] and comparing your @@ -229,10 +215,8 @@ public function clearPemCrc32C() /** * Returns the unboxed value from getPemCrc32C() - * Integrity verification field: A CRC32C checksum of the returned - * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. It is only populated - * when [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey] - * returns one key. An integrity check of + * Integrity verification field. A CRC32C checksum of the returned + * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. An integrity check of * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] can be performed by * computing the CRC32C checksum of * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] and comparing your @@ -254,10 +238,8 @@ public function getPemCrc32CValue() } /** - * Integrity verification field: A CRC32C checksum of the returned - * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. It is only populated - * when [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey] - * returns one key. An integrity check of + * Integrity verification field. A CRC32C checksum of the returned + * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. An integrity check of * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] can be performed by * computing the CRC32C checksum of * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] and comparing your @@ -285,10 +267,8 @@ public function setPemCrc32C($var) /** * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - * Integrity verification field: A CRC32C checksum of the returned - * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. It is only populated - * when [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey] - * returns one key. An integrity check of + * Integrity verification field. A CRC32C checksum of the returned + * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. An integrity check of * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] can be performed by * computing the CRC32C checksum of * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] and comparing your diff --git a/KmsInventory/VERSION b/KmsInventory/VERSION index 2b7c5ae01848..17b2ccd9bf90 100644 --- a/KmsInventory/VERSION +++ b/KmsInventory/VERSION @@ -1 +1 @@ -0.4.2 +0.4.3 diff --git a/Language/VERSION b/Language/VERSION index d721c76847ae..eb7713622c21 100644 --- a/Language/VERSION +++ b/Language/VERSION @@ -1 +1 @@ -0.32.3 +0.32.4 diff --git a/Language/src/LanguageClient.php b/Language/src/LanguageClient.php index 4f568d5a24c2..da5050b90376 100644 --- a/Language/src/LanguageClient.php +++ b/Language/src/LanguageClient.php @@ -46,7 +46,7 @@ class LanguageClient ClientTrait::jsonDecode insteadof RetryDeciderTrait; } - const VERSION = '0.32.3'; + const VERSION = '0.32.4'; const FULL_CONTROL_SCOPE = 'https://www.googleapis.com/auth/cloud-platform'; diff --git a/LifeSciences/VERSION b/LifeSciences/VERSION index b6160487433b..844f6a91acb9 100644 --- a/LifeSciences/VERSION +++ b/LifeSciences/VERSION @@ -1 +1 @@ -0.6.2 +0.6.3 diff --git a/Logging/VERSION b/Logging/VERSION index 93f9beed36e7..034552a83eeb 100644 --- a/Logging/VERSION +++ b/Logging/VERSION @@ -1 +1 @@ -1.29.4 +1.30.0 diff --git a/Logging/composer.json b/Logging/composer.json index dd38cea71c3f..5a0414702806 100644 --- a/Logging/composer.json +++ b/Logging/composer.json @@ -5,7 +5,7 @@ "minimum-stability": "stable", "require": { "php": "^8.0", - "google/cloud-core": "^1.52.7", + "google/cloud-core": "^1.58", "google/gax": "^1.30" }, "require-dev": { diff --git a/Logging/src/LoggingClient.php b/Logging/src/LoggingClient.php index 4431a271a48d..4279511b1168 100644 --- a/Logging/src/LoggingClient.php +++ b/Logging/src/LoggingClient.php @@ -70,7 +70,7 @@ class LoggingClient use ArrayTrait; use ClientTrait; - const VERSION = '1.29.4'; + const VERSION = '1.30.0'; const FULL_CONTROL_SCOPE = 'https://www.googleapis.com/auth/logging.admin'; const READ_ONLY_SCOPE = 'https://www.googleapis.com/auth/logging.read'; diff --git a/Logging/src/PsrLogger.php b/Logging/src/PsrLogger.php index ce3f0a18bb67..a6e694d0f426 100644 --- a/Logging/src/PsrLogger.php +++ b/Logging/src/PsrLogger.php @@ -403,6 +403,10 @@ public function log($level, Stringable|string $message, array $context = []): vo $options['trace'] = $labels['appengine.googleapis.com/trace_id']; } + if (isset($labels['run.googleapis.com/trace_id'])) { + $options['trace'] = + $labels['run.googleapis.com/trace_id']; + } } // Adding MonitoredResource $resource = $this->metadataProvider->monitoredResource(); diff --git a/Logging/tests/Unit/PsrLoggerBatchTest.php b/Logging/tests/Unit/PsrLoggerBatchTest.php index 1bab1c9c091b..e1e9e03502bc 100644 --- a/Logging/tests/Unit/PsrLoggerBatchTest.php +++ b/Logging/tests/Unit/PsrLoggerBatchTest.php @@ -18,6 +18,7 @@ namespace Google\Cloud\Logging\Tests\Unit; use Google\Cloud\Core\Batch\BatchRunner; +use Google\Cloud\Core\Report\CloudRunMetadataProvider; use Google\Cloud\Core\Report\GAEFlexMetadataProvider; use Google\Cloud\Logging\Connection\Rest; use Google\Cloud\Logging\Entry; @@ -90,8 +91,9 @@ public function testSend( /** * @dataProvider traceIdProvider */ - public function testTraceIdLabelOnGAEFlex( + public function testTraceIdLabelOnServerlessPlatforms( $traceId, + $metadataProviderClass, $labels, $expectedLabels ) { @@ -125,7 +127,7 @@ public function testTraceIdLabelOnGAEFlex( [ 'batchEnabled' => true, 'batchRunner' => $this->runner->reveal(), - 'metadataProvider' => new GAEFlexMetadataProvider($server) + 'metadataProvider' => new $metadataProviderClass($server) ] ); @@ -187,16 +189,25 @@ public function traceIdProvider() return [ [ '', + GAEFlexMetadataProvider::class, [], [], ], [ str_repeat('x', 32), + GAEFlexMetadataProvider::class, [], ['appengine.googleapis.com/trace_id' => str_repeat('x', 32)] ], [ str_repeat('x', 32), + CloudRunMetadataProvider::class, + [], + ['run.googleapis.com/trace_id' => str_repeat('x', 32)] + ], + [ + str_repeat('x', 32), + GAEFlexMetadataProvider::class, ['myKey' => 'myVal'], [ 'appengine.googleapis.com/trace_id' => str_repeat('x', 32), diff --git a/LongRunning/VERSION b/LongRunning/VERSION index 1d0ba9ea182b..267577d47e49 100644 --- a/LongRunning/VERSION +++ b/LongRunning/VERSION @@ -1 +1 @@ -0.4.0 +0.4.1 diff --git a/LongRunning/composer.json b/LongRunning/composer.json index 8a7dae7bae9e..55971d8a6ab3 100644 --- a/LongRunning/composer.json +++ b/LongRunning/composer.json @@ -3,7 +3,7 @@ "description": "Google LongRunning Client for PHP", "license": "Apache-2.0", "minimum-stability": "stable", - "version": "0.4.0", + "version": "0.4.1", "autoload": { "psr-4": { "Google\\ApiCore\\LongRunning\\": "src/ApiCore/LongRunning", diff --git a/ManagedIdentities/VERSION b/ManagedIdentities/VERSION index 1892b9267677..31e5c843497c 100644 --- a/ManagedIdentities/VERSION +++ b/ManagedIdentities/VERSION @@ -1 +1 @@ -1.3.2 +1.3.3 diff --git a/MediaTranslation/VERSION b/MediaTranslation/VERSION index 267577d47e49..2b7c5ae01848 100644 --- a/MediaTranslation/VERSION +++ b/MediaTranslation/VERSION @@ -1 +1 @@ -0.4.1 +0.4.2 diff --git a/Memcache/VERSION b/Memcache/VERSION index 1892b9267677..31e5c843497c 100644 --- a/Memcache/VERSION +++ b/Memcache/VERSION @@ -1 +1 @@ -1.3.2 +1.3.3 diff --git a/MigrationCenter/VERSION b/MigrationCenter/VERSION index 2b7c5ae01848..17b2ccd9bf90 100644 --- a/MigrationCenter/VERSION +++ b/MigrationCenter/VERSION @@ -1 +1 @@ -0.4.2 +0.4.3 diff --git a/Monitoring/VERSION b/Monitoring/VERSION index 8fdcf3869464..4dae2985b58c 100644 --- a/Monitoring/VERSION +++ b/Monitoring/VERSION @@ -1 +1 @@ -1.9.2 +1.10.1 diff --git a/Monitoring/metadata/V3/Common.php b/Monitoring/metadata/V3/Common.php index 2164fb3c8760..0fef40d6d109 100644 Binary files a/Monitoring/metadata/V3/Common.php and b/Monitoring/metadata/V3/Common.php differ diff --git a/Monitoring/metadata/V3/Service.php b/Monitoring/metadata/V3/Service.php index 1627dee4f7a7..ffa79a3a9746 100644 Binary files a/Monitoring/metadata/V3/Service.php and b/Monitoring/metadata/V3/Service.php differ diff --git a/Monitoring/metadata/V3/Uptime.php b/Monitoring/metadata/V3/Uptime.php index 36ba869253e4..528518b81c80 100644 Binary files a/Monitoring/metadata/V3/Uptime.php and b/Monitoring/metadata/V3/Uptime.php differ diff --git a/Monitoring/src/V3/Client/UptimeCheckServiceClient.php b/Monitoring/src/V3/Client/UptimeCheckServiceClient.php index 678287407dd8..17e4d2b2270e 100644 --- a/Monitoring/src/V3/Client/UptimeCheckServiceClient.php +++ b/Monitoring/src/V3/Client/UptimeCheckServiceClient.php @@ -134,6 +134,25 @@ public static function folderUptimeCheckConfigName(string $folder, string $uptim ]); } + /** + * Formats a string containing the fully-qualified path to represent a function + * resource. + * + * @param string $project + * @param string $location + * @param string $function + * + * @return string The formatted function resource. + */ + public static function functionName(string $project, string $location, string $function): string + { + return self::getPathTemplate('function')->render([ + 'project' => $project, + 'location' => $location, + 'function' => $function, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a * organization_uptime_check_config resource. @@ -190,6 +209,7 @@ public static function uptimeCheckConfigName(string $project, string $uptimeChec * The following name formats are supported: * Template: Pattern * - folderUptimeCheckConfig: folders/{folder}/uptimeCheckConfigs/{uptime_check_config} + * - function: projects/{project}/locations/{location}/functions/{function} * - organizationUptimeCheckConfig: organizations/{organization}/uptimeCheckConfigs/{uptime_check_config} * - projectUptimeCheckConfig: projects/{project}/uptimeCheckConfigs/{uptime_check_config} * - uptimeCheckConfig: projects/{project}/uptimeCheckConfigs/{uptime_check_config} diff --git a/Monitoring/src/V3/Gapic/UptimeCheckServiceGapicClient.php b/Monitoring/src/V3/Gapic/UptimeCheckServiceGapicClient.php index b1432f8b2ff9..88d26a215cac 100644 --- a/Monitoring/src/V3/Gapic/UptimeCheckServiceGapicClient.php +++ b/Monitoring/src/V3/Gapic/UptimeCheckServiceGapicClient.php @@ -108,6 +108,8 @@ class UptimeCheckServiceGapicClient private static $folderUptimeCheckConfigNameTemplate; + private static $functionNameTemplate; + private static $organizationUptimeCheckConfigNameTemplate; private static $projectUptimeCheckConfigNameTemplate; @@ -144,6 +146,15 @@ private static function getFolderUptimeCheckConfigNameTemplate() return self::$folderUptimeCheckConfigNameTemplate; } + private static function getFunctionNameTemplate() + { + if (self::$functionNameTemplate == null) { + self::$functionNameTemplate = new PathTemplate('projects/{project}/locations/{location}/functions/{function}'); + } + + return self::$functionNameTemplate; + } + private static function getOrganizationUptimeCheckConfigNameTemplate() { if (self::$organizationUptimeCheckConfigNameTemplate == null) { @@ -176,6 +187,7 @@ private static function getPathTemplateMap() if (self::$pathTemplateMap == null) { self::$pathTemplateMap = [ 'folderUptimeCheckConfig' => self::getFolderUptimeCheckConfigNameTemplate(), + 'function' => self::getFunctionNameTemplate(), 'organizationUptimeCheckConfig' => self::getOrganizationUptimeCheckConfigNameTemplate(), 'projectUptimeCheckConfig' => self::getProjectUptimeCheckConfigNameTemplate(), 'uptimeCheckConfig' => self::getUptimeCheckConfigNameTemplate(), @@ -202,6 +214,25 @@ public static function folderUptimeCheckConfigName($folder, $uptimeCheckConfig) ]); } + /** + * Formats a string containing the fully-qualified path to represent a function + * resource. + * + * @param string $project + * @param string $location + * @param string $function + * + * @return string The formatted function resource. + */ + public static function functionName($project, $location, $function) + { + return self::getFunctionNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'function' => $function, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a * organization_uptime_check_config resource. @@ -258,6 +289,7 @@ public static function uptimeCheckConfigName($project, $uptimeCheckConfig) * The following name formats are supported: * Template: Pattern * - folderUptimeCheckConfig: folders/{folder}/uptimeCheckConfigs/{uptime_check_config} + * - function: projects/{project}/locations/{location}/functions/{function} * - organizationUptimeCheckConfig: organizations/{organization}/uptimeCheckConfigs/{uptime_check_config} * - projectUptimeCheckConfig: projects/{project}/uptimeCheckConfigs/{uptime_check_config} * - uptimeCheckConfig: projects/{project}/uptimeCheckConfigs/{uptime_check_config} diff --git a/Monitoring/src/V3/Service.php b/Monitoring/src/V3/Service.php index af568f611c2a..dcb2edbbd5c6 100644 --- a/Monitoring/src/V3/Service.php +++ b/Monitoring/src/V3/Service.php @@ -20,10 +20,10 @@ class Service extends \Google\Protobuf\Internal\Message { /** - * Resource name for this Service. The format is: + * Identifier. Resource name for this Service. The format is: * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] * - * Generated from protobuf field string name = 1; + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; */ private $name = ''; /** @@ -32,6 +32,15 @@ class Service extends \Google\Protobuf\Internal\Message * Generated from protobuf field string display_name = 2; */ private $display_name = ''; + /** + * Message that contains the service type and service labels of this service + * if it is a basic service. + * Documentation and examples + * [here](https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli). + * + * Generated from protobuf field .google.monitoring.v3.Service.BasicService basic_service = 19; + */ + private $basic_service = null; /** * Configuration for how to query telemetry on a Service. * @@ -58,7 +67,7 @@ class Service extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $name - * Resource name for this Service. The format is: + * Identifier. Resource name for this Service. The format is: * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] * @type string $display_name * Name used for UI elements listing this Service. @@ -76,6 +85,19 @@ class Service extends \Google\Protobuf\Internal\Message * Type used for canonical services scoped to an Istio mesh. * Metrics for Istio are * [documented here](https://istio.io/latest/docs/reference/config/metrics/) + * @type \Google\Cloud\Monitoring\V3\Service\CloudRun $cloud_run + * Type used for Cloud Run services. + * @type \Google\Cloud\Monitoring\V3\Service\GkeNamespace $gke_namespace + * Type used for GKE Namespaces. + * @type \Google\Cloud\Monitoring\V3\Service\GkeWorkload $gke_workload + * Type used for GKE Workloads. + * @type \Google\Cloud\Monitoring\V3\Service\GkeService $gke_service + * Type used for GKE Services (the Kubernetes concept of a service). + * @type \Google\Cloud\Monitoring\V3\Service\BasicService $basic_service + * Message that contains the service type and service labels of this service + * if it is a basic service. + * Documentation and examples + * [here](https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli). * @type \Google\Cloud\Monitoring\V3\Service\Telemetry $telemetry * Configuration for how to query telemetry on a Service. * @type array|\Google\Protobuf\Internal\MapField $user_labels @@ -93,10 +115,10 @@ public function __construct($data = NULL) { } /** - * Resource name for this Service. The format is: + * Identifier. Resource name for this Service. The format is: * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] * - * Generated from protobuf field string name = 1; + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * @return string */ public function getName() @@ -105,10 +127,10 @@ public function getName() } /** - * Resource name for this Service. The format is: + * Identifier. Resource name for this Service. The format is: * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] * - * Generated from protobuf field string name = 1; + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * @param string $var * @return $this */ @@ -336,6 +358,172 @@ public function setIstioCanonicalService($var) return $this; } + /** + * Type used for Cloud Run services. + * + * Generated from protobuf field .google.monitoring.v3.Service.CloudRun cloud_run = 12; + * @return \Google\Cloud\Monitoring\V3\Service\CloudRun|null + */ + public function getCloudRun() + { + return $this->readOneof(12); + } + + public function hasCloudRun() + { + return $this->hasOneof(12); + } + + /** + * Type used for Cloud Run services. + * + * Generated from protobuf field .google.monitoring.v3.Service.CloudRun cloud_run = 12; + * @param \Google\Cloud\Monitoring\V3\Service\CloudRun $var + * @return $this + */ + public function setCloudRun($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\Service\CloudRun::class); + $this->writeOneof(12, $var); + + return $this; + } + + /** + * Type used for GKE Namespaces. + * + * Generated from protobuf field .google.monitoring.v3.Service.GkeNamespace gke_namespace = 15; + * @return \Google\Cloud\Monitoring\V3\Service\GkeNamespace|null + */ + public function getGkeNamespace() + { + return $this->readOneof(15); + } + + public function hasGkeNamespace() + { + return $this->hasOneof(15); + } + + /** + * Type used for GKE Namespaces. + * + * Generated from protobuf field .google.monitoring.v3.Service.GkeNamespace gke_namespace = 15; + * @param \Google\Cloud\Monitoring\V3\Service\GkeNamespace $var + * @return $this + */ + public function setGkeNamespace($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\Service\GkeNamespace::class); + $this->writeOneof(15, $var); + + return $this; + } + + /** + * Type used for GKE Workloads. + * + * Generated from protobuf field .google.monitoring.v3.Service.GkeWorkload gke_workload = 16; + * @return \Google\Cloud\Monitoring\V3\Service\GkeWorkload|null + */ + public function getGkeWorkload() + { + return $this->readOneof(16); + } + + public function hasGkeWorkload() + { + return $this->hasOneof(16); + } + + /** + * Type used for GKE Workloads. + * + * Generated from protobuf field .google.monitoring.v3.Service.GkeWorkload gke_workload = 16; + * @param \Google\Cloud\Monitoring\V3\Service\GkeWorkload $var + * @return $this + */ + public function setGkeWorkload($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\Service\GkeWorkload::class); + $this->writeOneof(16, $var); + + return $this; + } + + /** + * Type used for GKE Services (the Kubernetes concept of a service). + * + * Generated from protobuf field .google.monitoring.v3.Service.GkeService gke_service = 17; + * @return \Google\Cloud\Monitoring\V3\Service\GkeService|null + */ + public function getGkeService() + { + return $this->readOneof(17); + } + + public function hasGkeService() + { + return $this->hasOneof(17); + } + + /** + * Type used for GKE Services (the Kubernetes concept of a service). + * + * Generated from protobuf field .google.monitoring.v3.Service.GkeService gke_service = 17; + * @param \Google\Cloud\Monitoring\V3\Service\GkeService $var + * @return $this + */ + public function setGkeService($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\Service\GkeService::class); + $this->writeOneof(17, $var); + + return $this; + } + + /** + * Message that contains the service type and service labels of this service + * if it is a basic service. + * Documentation and examples + * [here](https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli). + * + * Generated from protobuf field .google.monitoring.v3.Service.BasicService basic_service = 19; + * @return \Google\Cloud\Monitoring\V3\Service\BasicService|null + */ + public function getBasicService() + { + return $this->basic_service; + } + + public function hasBasicService() + { + return isset($this->basic_service); + } + + public function clearBasicService() + { + unset($this->basic_service); + } + + /** + * Message that contains the service type and service labels of this service + * if it is a basic service. + * Documentation and examples + * [here](https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli). + * + * Generated from protobuf field .google.monitoring.v3.Service.BasicService basic_service = 19; + * @param \Google\Cloud\Monitoring\V3\Service\BasicService $var + * @return $this + */ + public function setBasicService($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\Service\BasicService::class); + $this->basic_service = $var; + + return $this; + } + /** * Configuration for how to query telemetry on a Service. * diff --git a/Monitoring/src/V3/Service/AppEngine.php b/Monitoring/src/V3/Service/AppEngine.php index e9cc9b68dbb0..a6f569054113 100644 --- a/Monitoring/src/V3/Service/AppEngine.php +++ b/Monitoring/src/V3/Service/AppEngine.php @@ -17,8 +17,8 @@ class AppEngine extends \Google\Protobuf\Internal\Message { /** * The ID of the App Engine module underlying this service. Corresponds to - * the `module_id` resource label in the `gae_app` monitored resource: - * https://cloud.google.com/monitoring/api/resources#tag_gae_app + * the `module_id` resource label in the [`gae_app` monitored + * resource](https://cloud.google.com/monitoring/api/resources#tag_gae_app). * * Generated from protobuf field string module_id = 1; */ @@ -32,8 +32,8 @@ class AppEngine extends \Google\Protobuf\Internal\Message * * @type string $module_id * The ID of the App Engine module underlying this service. Corresponds to - * the `module_id` resource label in the `gae_app` monitored resource: - * https://cloud.google.com/monitoring/api/resources#tag_gae_app + * the `module_id` resource label in the [`gae_app` monitored + * resource](https://cloud.google.com/monitoring/api/resources#tag_gae_app). * } */ public function __construct($data = NULL) { @@ -43,8 +43,8 @@ public function __construct($data = NULL) { /** * The ID of the App Engine module underlying this service. Corresponds to - * the `module_id` resource label in the `gae_app` monitored resource: - * https://cloud.google.com/monitoring/api/resources#tag_gae_app + * the `module_id` resource label in the [`gae_app` monitored + * resource](https://cloud.google.com/monitoring/api/resources#tag_gae_app). * * Generated from protobuf field string module_id = 1; * @return string @@ -56,8 +56,8 @@ public function getModuleId() /** * The ID of the App Engine module underlying this service. Corresponds to - * the `module_id` resource label in the `gae_app` monitored resource: - * https://cloud.google.com/monitoring/api/resources#tag_gae_app + * the `module_id` resource label in the [`gae_app` monitored + * resource](https://cloud.google.com/monitoring/api/resources#tag_gae_app). * * Generated from protobuf field string module_id = 1; * @param string $var diff --git a/Monitoring/src/V3/Service/BasicService.php b/Monitoring/src/V3/Service/BasicService.php new file mode 100644 index 000000000000..4b370e8c9a9a --- /dev/null +++ b/Monitoring/src/V3/Service/BasicService.php @@ -0,0 +1,130 @@ +google.monitoring.v3.Service.BasicService + */ +class BasicService extends \Google\Protobuf\Internal\Message +{ + /** + * The type of service that this basic service defines, e.g. + * APP_ENGINE service type. + * Documentation and valid values + * [here](https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli). + * + * Generated from protobuf field string service_type = 1; + */ + private $service_type = ''; + /** + * Labels that specify the resource that emits the monitoring data which + * is used for SLO reporting of this `Service`. + * Documentation and valid values for given service types + * [here](https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli). + * + * Generated from protobuf field map service_labels = 2; + */ + private $service_labels; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $service_type + * The type of service that this basic service defines, e.g. + * APP_ENGINE service type. + * Documentation and valid values + * [here](https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli). + * @type array|\Google\Protobuf\Internal\MapField $service_labels + * Labels that specify the resource that emits the monitoring data which + * is used for SLO reporting of this `Service`. + * Documentation and valid values for given service types + * [here](https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Service::initOnce(); + parent::__construct($data); + } + + /** + * The type of service that this basic service defines, e.g. + * APP_ENGINE service type. + * Documentation and valid values + * [here](https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli). + * + * Generated from protobuf field string service_type = 1; + * @return string + */ + public function getServiceType() + { + return $this->service_type; + } + + /** + * The type of service that this basic service defines, e.g. + * APP_ENGINE service type. + * Documentation and valid values + * [here](https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli). + * + * Generated from protobuf field string service_type = 1; + * @param string $var + * @return $this + */ + public function setServiceType($var) + { + GPBUtil::checkString($var, True); + $this->service_type = $var; + + return $this; + } + + /** + * Labels that specify the resource that emits the monitoring data which + * is used for SLO reporting of this `Service`. + * Documentation and valid values for given service types + * [here](https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli). + * + * Generated from protobuf field map service_labels = 2; + * @return \Google\Protobuf\Internal\MapField + */ + public function getServiceLabels() + { + return $this->service_labels; + } + + /** + * Labels that specify the resource that emits the monitoring data which + * is used for SLO reporting of this `Service`. + * Documentation and valid values for given service types + * [here](https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli). + * + * Generated from protobuf field map service_labels = 2; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setServiceLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->service_labels = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(BasicService::class, \Google\Cloud\Monitoring\V3\Service_BasicService::class); + diff --git a/Monitoring/src/V3/Service/CloudEndpoints.php b/Monitoring/src/V3/Service/CloudEndpoints.php index e8b9a3a8a690..dbaf9668a6af 100644 --- a/Monitoring/src/V3/Service/CloudEndpoints.php +++ b/Monitoring/src/V3/Service/CloudEndpoints.php @@ -17,8 +17,8 @@ class CloudEndpoints extends \Google\Protobuf\Internal\Message { /** * The name of the Cloud Endpoints service underlying this service. - * Corresponds to the `service` resource label in the `api` monitored - * resource: https://cloud.google.com/monitoring/api/resources#tag_api + * Corresponds to the `service` resource label in the [`api` monitored + * resource](https://cloud.google.com/monitoring/api/resources#tag_api). * * Generated from protobuf field string service = 1; */ @@ -32,8 +32,8 @@ class CloudEndpoints extends \Google\Protobuf\Internal\Message * * @type string $service * The name of the Cloud Endpoints service underlying this service. - * Corresponds to the `service` resource label in the `api` monitored - * resource: https://cloud.google.com/monitoring/api/resources#tag_api + * Corresponds to the `service` resource label in the [`api` monitored + * resource](https://cloud.google.com/monitoring/api/resources#tag_api). * } */ public function __construct($data = NULL) { @@ -43,8 +43,8 @@ public function __construct($data = NULL) { /** * The name of the Cloud Endpoints service underlying this service. - * Corresponds to the `service` resource label in the `api` monitored - * resource: https://cloud.google.com/monitoring/api/resources#tag_api + * Corresponds to the `service` resource label in the [`api` monitored + * resource](https://cloud.google.com/monitoring/api/resources#tag_api). * * Generated from protobuf field string service = 1; * @return string @@ -56,8 +56,8 @@ public function getService() /** * The name of the Cloud Endpoints service underlying this service. - * Corresponds to the `service` resource label in the `api` monitored - * resource: https://cloud.google.com/monitoring/api/resources#tag_api + * Corresponds to the `service` resource label in the [`api` monitored + * resource](https://cloud.google.com/monitoring/api/resources#tag_api). * * Generated from protobuf field string service = 1; * @param string $var diff --git a/Monitoring/src/V3/Service/CloudRun.php b/Monitoring/src/V3/Service/CloudRun.php new file mode 100644 index 000000000000..666cdeeb5271 --- /dev/null +++ b/Monitoring/src/V3/Service/CloudRun.php @@ -0,0 +1,120 @@ +google.monitoring.v3.Service.CloudRun + */ +class CloudRun extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the Cloud Run service. Corresponds to the `service_name` + * resource label in the [`cloud_run_revision` monitored + * resource](https://cloud.google.com/monitoring/api/resources#tag_cloud_run_revision). + * + * Generated from protobuf field string service_name = 1; + */ + private $service_name = ''; + /** + * The location the service is run. Corresponds to the `location` + * resource label in the [`cloud_run_revision` monitored + * resource](https://cloud.google.com/monitoring/api/resources#tag_cloud_run_revision). + * + * Generated from protobuf field string location = 2; + */ + private $location = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $service_name + * The name of the Cloud Run service. Corresponds to the `service_name` + * resource label in the [`cloud_run_revision` monitored + * resource](https://cloud.google.com/monitoring/api/resources#tag_cloud_run_revision). + * @type string $location + * The location the service is run. Corresponds to the `location` + * resource label in the [`cloud_run_revision` monitored + * resource](https://cloud.google.com/monitoring/api/resources#tag_cloud_run_revision). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Service::initOnce(); + parent::__construct($data); + } + + /** + * The name of the Cloud Run service. Corresponds to the `service_name` + * resource label in the [`cloud_run_revision` monitored + * resource](https://cloud.google.com/monitoring/api/resources#tag_cloud_run_revision). + * + * Generated from protobuf field string service_name = 1; + * @return string + */ + public function getServiceName() + { + return $this->service_name; + } + + /** + * The name of the Cloud Run service. Corresponds to the `service_name` + * resource label in the [`cloud_run_revision` monitored + * resource](https://cloud.google.com/monitoring/api/resources#tag_cloud_run_revision). + * + * Generated from protobuf field string service_name = 1; + * @param string $var + * @return $this + */ + public function setServiceName($var) + { + GPBUtil::checkString($var, True); + $this->service_name = $var; + + return $this; + } + + /** + * The location the service is run. Corresponds to the `location` + * resource label in the [`cloud_run_revision` monitored + * resource](https://cloud.google.com/monitoring/api/resources#tag_cloud_run_revision). + * + * Generated from protobuf field string location = 2; + * @return string + */ + public function getLocation() + { + return $this->location; + } + + /** + * The location the service is run. Corresponds to the `location` + * resource label in the [`cloud_run_revision` monitored + * resource](https://cloud.google.com/monitoring/api/resources#tag_cloud_run_revision). + * + * Generated from protobuf field string location = 2; + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CloudRun::class, \Google\Cloud\Monitoring\V3\Service_CloudRun::class); + diff --git a/Monitoring/src/V3/Service/Custom.php b/Monitoring/src/V3/Service/Custom.php index 08ba22af9c20..03fb8595f374 100644 --- a/Monitoring/src/V3/Service/Custom.php +++ b/Monitoring/src/V3/Service/Custom.php @@ -9,8 +9,9 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Custom view of service telemetry. Currently a place-holder pending final - * design. + * Use a custom service to designate a service that you want to monitor + * when none of the other service types (like App Engine, Cloud Run, or + * a GKE type) matches your intended service. * * Generated from protobuf message google.monitoring.v3.Service.Custom */ diff --git a/Monitoring/src/V3/Service/GkeNamespace.php b/Monitoring/src/V3/Service/GkeNamespace.php new file mode 100644 index 000000000000..0f995ffe7afb --- /dev/null +++ b/Monitoring/src/V3/Service/GkeNamespace.php @@ -0,0 +1,182 @@ +google.monitoring.v3.Service.GkeNamespace + */ +class GkeNamespace extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The project this resource lives in. For legacy services + * migrated from the `Custom` type, this may be a distinct project from the + * one parenting the service itself. + * + * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $project_id = ''; + /** + * The location of the parent cluster. This may be a zone or region. + * + * Generated from protobuf field string location = 2; + */ + private $location = ''; + /** + * The name of the parent cluster. + * + * Generated from protobuf field string cluster_name = 3; + */ + private $cluster_name = ''; + /** + * The name of this namespace. + * + * Generated from protobuf field string namespace_name = 4; + */ + private $namespace_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $project_id + * Output only. The project this resource lives in. For legacy services + * migrated from the `Custom` type, this may be a distinct project from the + * one parenting the service itself. + * @type string $location + * The location of the parent cluster. This may be a zone or region. + * @type string $cluster_name + * The name of the parent cluster. + * @type string $namespace_name + * The name of this namespace. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Service::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The project this resource lives in. For legacy services + * migrated from the `Custom` type, this may be a distinct project from the + * one parenting the service itself. + * + * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getProjectId() + { + return $this->project_id; + } + + /** + * Output only. The project this resource lives in. For legacy services + * migrated from the `Custom` type, this may be a distinct project from the + * one parenting the service itself. + * + * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setProjectId($var) + { + GPBUtil::checkString($var, True); + $this->project_id = $var; + + return $this; + } + + /** + * The location of the parent cluster. This may be a zone or region. + * + * Generated from protobuf field string location = 2; + * @return string + */ + public function getLocation() + { + return $this->location; + } + + /** + * The location of the parent cluster. This may be a zone or region. + * + * Generated from protobuf field string location = 2; + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + + /** + * The name of the parent cluster. + * + * Generated from protobuf field string cluster_name = 3; + * @return string + */ + public function getClusterName() + { + return $this->cluster_name; + } + + /** + * The name of the parent cluster. + * + * Generated from protobuf field string cluster_name = 3; + * @param string $var + * @return $this + */ + public function setClusterName($var) + { + GPBUtil::checkString($var, True); + $this->cluster_name = $var; + + return $this; + } + + /** + * The name of this namespace. + * + * Generated from protobuf field string namespace_name = 4; + * @return string + */ + public function getNamespaceName() + { + return $this->namespace_name; + } + + /** + * The name of this namespace. + * + * Generated from protobuf field string namespace_name = 4; + * @param string $var + * @return $this + */ + public function setNamespaceName($var) + { + GPBUtil::checkString($var, True); + $this->namespace_name = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(GkeNamespace::class, \Google\Cloud\Monitoring\V3\Service_GkeNamespace::class); + diff --git a/Monitoring/src/V3/Service/GkeService.php b/Monitoring/src/V3/Service/GkeService.php new file mode 100644 index 000000000000..a829d31af226 --- /dev/null +++ b/Monitoring/src/V3/Service/GkeService.php @@ -0,0 +1,219 @@ +google.monitoring.v3.Service.GkeService + */ +class GkeService extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The project this resource lives in. For legacy services + * migrated from the `Custom` type, this may be a distinct project from the + * one parenting the service itself. + * + * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $project_id = ''; + /** + * The location of the parent cluster. This may be a zone or region. + * + * Generated from protobuf field string location = 2; + */ + private $location = ''; + /** + * The name of the parent cluster. + * + * Generated from protobuf field string cluster_name = 3; + */ + private $cluster_name = ''; + /** + * The name of the parent namespace. + * + * Generated from protobuf field string namespace_name = 4; + */ + private $namespace_name = ''; + /** + * The name of this service. + * + * Generated from protobuf field string service_name = 5; + */ + private $service_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $project_id + * Output only. The project this resource lives in. For legacy services + * migrated from the `Custom` type, this may be a distinct project from the + * one parenting the service itself. + * @type string $location + * The location of the parent cluster. This may be a zone or region. + * @type string $cluster_name + * The name of the parent cluster. + * @type string $namespace_name + * The name of the parent namespace. + * @type string $service_name + * The name of this service. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Service::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The project this resource lives in. For legacy services + * migrated from the `Custom` type, this may be a distinct project from the + * one parenting the service itself. + * + * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getProjectId() + { + return $this->project_id; + } + + /** + * Output only. The project this resource lives in. For legacy services + * migrated from the `Custom` type, this may be a distinct project from the + * one parenting the service itself. + * + * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setProjectId($var) + { + GPBUtil::checkString($var, True); + $this->project_id = $var; + + return $this; + } + + /** + * The location of the parent cluster. This may be a zone or region. + * + * Generated from protobuf field string location = 2; + * @return string + */ + public function getLocation() + { + return $this->location; + } + + /** + * The location of the parent cluster. This may be a zone or region. + * + * Generated from protobuf field string location = 2; + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + + /** + * The name of the parent cluster. + * + * Generated from protobuf field string cluster_name = 3; + * @return string + */ + public function getClusterName() + { + return $this->cluster_name; + } + + /** + * The name of the parent cluster. + * + * Generated from protobuf field string cluster_name = 3; + * @param string $var + * @return $this + */ + public function setClusterName($var) + { + GPBUtil::checkString($var, True); + $this->cluster_name = $var; + + return $this; + } + + /** + * The name of the parent namespace. + * + * Generated from protobuf field string namespace_name = 4; + * @return string + */ + public function getNamespaceName() + { + return $this->namespace_name; + } + + /** + * The name of the parent namespace. + * + * Generated from protobuf field string namespace_name = 4; + * @param string $var + * @return $this + */ + public function setNamespaceName($var) + { + GPBUtil::checkString($var, True); + $this->namespace_name = $var; + + return $this; + } + + /** + * The name of this service. + * + * Generated from protobuf field string service_name = 5; + * @return string + */ + public function getServiceName() + { + return $this->service_name; + } + + /** + * The name of this service. + * + * Generated from protobuf field string service_name = 5; + * @param string $var + * @return $this + */ + public function setServiceName($var) + { + GPBUtil::checkString($var, True); + $this->service_name = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(GkeService::class, \Google\Cloud\Monitoring\V3\Service_GkeService::class); + diff --git a/Monitoring/src/V3/Service/GkeWorkload.php b/Monitoring/src/V3/Service/GkeWorkload.php new file mode 100644 index 000000000000..e8c33e9f50f4 --- /dev/null +++ b/Monitoring/src/V3/Service/GkeWorkload.php @@ -0,0 +1,250 @@ +google.monitoring.v3.Service.GkeWorkload + */ +class GkeWorkload extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The project this resource lives in. For legacy services + * migrated from the `Custom` type, this may be a distinct project from the + * one parenting the service itself. + * + * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $project_id = ''; + /** + * The location of the parent cluster. This may be a zone or region. + * + * Generated from protobuf field string location = 2; + */ + private $location = ''; + /** + * The name of the parent cluster. + * + * Generated from protobuf field string cluster_name = 3; + */ + private $cluster_name = ''; + /** + * The name of the parent namespace. + * + * Generated from protobuf field string namespace_name = 4; + */ + private $namespace_name = ''; + /** + * The type of this workload (for example, "Deployment" or "DaemonSet") + * + * Generated from protobuf field string top_level_controller_type = 5; + */ + private $top_level_controller_type = ''; + /** + * The name of this workload. + * + * Generated from protobuf field string top_level_controller_name = 6; + */ + private $top_level_controller_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $project_id + * Output only. The project this resource lives in. For legacy services + * migrated from the `Custom` type, this may be a distinct project from the + * one parenting the service itself. + * @type string $location + * The location of the parent cluster. This may be a zone or region. + * @type string $cluster_name + * The name of the parent cluster. + * @type string $namespace_name + * The name of the parent namespace. + * @type string $top_level_controller_type + * The type of this workload (for example, "Deployment" or "DaemonSet") + * @type string $top_level_controller_name + * The name of this workload. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Service::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The project this resource lives in. For legacy services + * migrated from the `Custom` type, this may be a distinct project from the + * one parenting the service itself. + * + * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getProjectId() + { + return $this->project_id; + } + + /** + * Output only. The project this resource lives in. For legacy services + * migrated from the `Custom` type, this may be a distinct project from the + * one parenting the service itself. + * + * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setProjectId($var) + { + GPBUtil::checkString($var, True); + $this->project_id = $var; + + return $this; + } + + /** + * The location of the parent cluster. This may be a zone or region. + * + * Generated from protobuf field string location = 2; + * @return string + */ + public function getLocation() + { + return $this->location; + } + + /** + * The location of the parent cluster. This may be a zone or region. + * + * Generated from protobuf field string location = 2; + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + + /** + * The name of the parent cluster. + * + * Generated from protobuf field string cluster_name = 3; + * @return string + */ + public function getClusterName() + { + return $this->cluster_name; + } + + /** + * The name of the parent cluster. + * + * Generated from protobuf field string cluster_name = 3; + * @param string $var + * @return $this + */ + public function setClusterName($var) + { + GPBUtil::checkString($var, True); + $this->cluster_name = $var; + + return $this; + } + + /** + * The name of the parent namespace. + * + * Generated from protobuf field string namespace_name = 4; + * @return string + */ + public function getNamespaceName() + { + return $this->namespace_name; + } + + /** + * The name of the parent namespace. + * + * Generated from protobuf field string namespace_name = 4; + * @param string $var + * @return $this + */ + public function setNamespaceName($var) + { + GPBUtil::checkString($var, True); + $this->namespace_name = $var; + + return $this; + } + + /** + * The type of this workload (for example, "Deployment" or "DaemonSet") + * + * Generated from protobuf field string top_level_controller_type = 5; + * @return string + */ + public function getTopLevelControllerType() + { + return $this->top_level_controller_type; + } + + /** + * The type of this workload (for example, "Deployment" or "DaemonSet") + * + * Generated from protobuf field string top_level_controller_type = 5; + * @param string $var + * @return $this + */ + public function setTopLevelControllerType($var) + { + GPBUtil::checkString($var, True); + $this->top_level_controller_type = $var; + + return $this; + } + + /** + * The name of this workload. + * + * Generated from protobuf field string top_level_controller_name = 6; + * @return string + */ + public function getTopLevelControllerName() + { + return $this->top_level_controller_name; + } + + /** + * The name of this workload. + * + * Generated from protobuf field string top_level_controller_name = 6; + * @param string $var + * @return $this + */ + public function setTopLevelControllerName($var) + { + GPBUtil::checkString($var, True); + $this->top_level_controller_name = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(GkeWorkload::class, \Google\Cloud\Monitoring\V3\Service_GkeWorkload::class); + diff --git a/Monitoring/src/V3/ServiceLevelObjective.php b/Monitoring/src/V3/ServiceLevelObjective.php index 38ca81f6b3ae..30c09f3bd178 100644 --- a/Monitoring/src/V3/ServiceLevelObjective.php +++ b/Monitoring/src/V3/ServiceLevelObjective.php @@ -21,10 +21,10 @@ class ServiceLevelObjective extends \Google\Protobuf\Internal\Message { /** - * Resource name for this `ServiceLevelObjective`. The format is: + * Identifier. Resource name for this `ServiceLevelObjective`. The format is: * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] * - * Generated from protobuf field string name = 1; + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; */ private $name = ''; /** @@ -68,7 +68,7 @@ class ServiceLevelObjective extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $name - * Resource name for this `ServiceLevelObjective`. The format is: + * Identifier. Resource name for this `ServiceLevelObjective`. The format is: * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] * @type string $display_name * Name used for UI elements listing this SLO. @@ -101,10 +101,10 @@ public function __construct($data = NULL) { } /** - * Resource name for this `ServiceLevelObjective`. The format is: + * Identifier. Resource name for this `ServiceLevelObjective`. The format is: * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] * - * Generated from protobuf field string name = 1; + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * @return string */ public function getName() @@ -113,10 +113,10 @@ public function getName() } /** - * Resource name for this `ServiceLevelObjective`. The format is: + * Identifier. Resource name for this `ServiceLevelObjective`. The format is: * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] * - * Generated from protobuf field string name = 1; + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * @param string $var * @return $this */ diff --git a/Monitoring/src/V3/SyntheticMonitorTarget.php b/Monitoring/src/V3/SyntheticMonitorTarget.php new file mode 100644 index 000000000000..8bbfac0f1098 --- /dev/null +++ b/Monitoring/src/V3/SyntheticMonitorTarget.php @@ -0,0 +1,75 @@ +google.monitoring.v3.SyntheticMonitorTarget + */ +class SyntheticMonitorTarget extends \Google\Protobuf\Internal\Message +{ + protected $target; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Monitoring\V3\SyntheticMonitorTarget\CloudFunctionV2Target $cloud_function_v2 + * Target a Synthetic Monitor GCFv2 instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Uptime::initOnce(); + parent::__construct($data); + } + + /** + * Target a Synthetic Monitor GCFv2 instance. + * + * Generated from protobuf field .google.monitoring.v3.SyntheticMonitorTarget.CloudFunctionV2Target cloud_function_v2 = 1; + * @return \Google\Cloud\Monitoring\V3\SyntheticMonitorTarget\CloudFunctionV2Target|null + */ + public function getCloudFunctionV2() + { + return $this->readOneof(1); + } + + public function hasCloudFunctionV2() + { + return $this->hasOneof(1); + } + + /** + * Target a Synthetic Monitor GCFv2 instance. + * + * Generated from protobuf field .google.monitoring.v3.SyntheticMonitorTarget.CloudFunctionV2Target cloud_function_v2 = 1; + * @param \Google\Cloud\Monitoring\V3\SyntheticMonitorTarget\CloudFunctionV2Target $var + * @return $this + */ + public function setCloudFunctionV2($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\SyntheticMonitorTarget\CloudFunctionV2Target::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getTarget() + { + return $this->whichOneof("target"); + } + +} + diff --git a/Monitoring/src/V3/SyntheticMonitorTarget/CloudFunctionV2Target.php b/Monitoring/src/V3/SyntheticMonitorTarget/CloudFunctionV2Target.php new file mode 100644 index 000000000000..3b8b2cb16e55 --- /dev/null +++ b/Monitoring/src/V3/SyntheticMonitorTarget/CloudFunctionV2Target.php @@ -0,0 +1,134 @@ +google.monitoring.v3.SyntheticMonitorTarget.CloudFunctionV2Target + */ +class CloudFunctionV2Target extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Fully qualified GCFv2 resource name + * i.e. `projects/{project}/locations/{location}/functions/{function}` + * Required. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $name = ''; + /** + * Output only. The `cloud_run_revision` Monitored Resource associated with + * the GCFv2. The Synthetic Monitor execution results (metrics, logs, and + * spans) are reported against this Monitored Resource. This field is output + * only. + * + * Generated from protobuf field .google.api.MonitoredResource cloud_run_revision = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $cloud_run_revision = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Fully qualified GCFv2 resource name + * i.e. `projects/{project}/locations/{location}/functions/{function}` + * Required. + * @type \Google\Api\MonitoredResource $cloud_run_revision + * Output only. The `cloud_run_revision` Monitored Resource associated with + * the GCFv2. The Synthetic Monitor execution results (metrics, logs, and + * spans) are reported against this Monitored Resource. This field is output + * only. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Uptime::initOnce(); + parent::__construct($data); + } + + /** + * Required. Fully qualified GCFv2 resource name + * i.e. `projects/{project}/locations/{location}/functions/{function}` + * Required. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Fully qualified GCFv2 resource name + * i.e. `projects/{project}/locations/{location}/functions/{function}` + * Required. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The `cloud_run_revision` Monitored Resource associated with + * the GCFv2. The Synthetic Monitor execution results (metrics, logs, and + * spans) are reported against this Monitored Resource. This field is output + * only. + * + * Generated from protobuf field .google.api.MonitoredResource cloud_run_revision = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Api\MonitoredResource|null + */ + public function getCloudRunRevision() + { + return $this->cloud_run_revision; + } + + public function hasCloudRunRevision() + { + return isset($this->cloud_run_revision); + } + + public function clearCloudRunRevision() + { + unset($this->cloud_run_revision); + } + + /** + * Output only. The `cloud_run_revision` Monitored Resource associated with + * the GCFv2. The Synthetic Monitor execution results (metrics, logs, and + * spans) are reported against this Monitored Resource. This field is output + * only. + * + * Generated from protobuf field .google.api.MonitoredResource cloud_run_revision = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Api\MonitoredResource $var + * @return $this + */ + public function setCloudRunRevision($var) + { + GPBUtil::checkMessage($var, \Google\Api\MonitoredResource::class); + $this->cloud_run_revision = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CloudFunctionV2Target::class, \Google\Cloud\Monitoring\V3\SyntheticMonitorTarget_CloudFunctionV2Target::class); + diff --git a/Monitoring/src/V3/UptimeCheckConfig.php b/Monitoring/src/V3/UptimeCheckConfig.php index 9f24019200cb..4ecc880f0b4c 100644 --- a/Monitoring/src/V3/UptimeCheckConfig.php +++ b/Monitoring/src/V3/UptimeCheckConfig.php @@ -17,7 +17,8 @@ class UptimeCheckConfig extends \Google\Protobuf\Internal\Message { /** - * A unique resource name for this Uptime check configuration. The format is: + * Identifier. A unique resource name for this Uptime check configuration. The + * format is: * projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID] * `[PROJECT_ID_OR_NUMBER]` is the Workspace host project associated with the * Uptime check. @@ -25,7 +26,7 @@ class UptimeCheckConfig extends \Google\Protobuf\Internal\Message * on create, the resource name is assigned by the server and included in the * response. * - * Generated from protobuf field string name = 1; + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; */ private $name = ''; /** @@ -119,7 +120,8 @@ class UptimeCheckConfig extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $name - * A unique resource name for this Uptime check configuration. The format is: + * Identifier. A unique resource name for this Uptime check configuration. The + * format is: * projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID] * `[PROJECT_ID_OR_NUMBER]` is the Workspace host project associated with the * Uptime check. @@ -145,6 +147,8 @@ class UptimeCheckConfig extends \Google\Protobuf\Internal\Message * `cloud_run_revision` * @type \Google\Cloud\Monitoring\V3\UptimeCheckConfig\ResourceGroup $resource_group * The group resource associated with the configuration. + * @type \Google\Cloud\Monitoring\V3\SyntheticMonitorTarget $synthetic_monitor + * Specifies a Synthetic Monitor to invoke. * @type \Google\Cloud\Monitoring\V3\UptimeCheckConfig\HttpCheck $http_check * Contains information needed to make an HTTP or HTTPS check. * @type \Google\Cloud\Monitoring\V3\UptimeCheckConfig\TcpCheck $tcp_check @@ -196,7 +200,8 @@ public function __construct($data = NULL) { } /** - * A unique resource name for this Uptime check configuration. The format is: + * Identifier. A unique resource name for this Uptime check configuration. The + * format is: * projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID] * `[PROJECT_ID_OR_NUMBER]` is the Workspace host project associated with the * Uptime check. @@ -204,7 +209,7 @@ public function __construct($data = NULL) { * on create, the resource name is assigned by the server and included in the * response. * - * Generated from protobuf field string name = 1; + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * @return string */ public function getName() @@ -213,7 +218,8 @@ public function getName() } /** - * A unique resource name for this Uptime check configuration. The format is: + * Identifier. A unique resource name for this Uptime check configuration. The + * format is: * projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID] * `[PROJECT_ID_OR_NUMBER]` is the Workspace host project associated with the * Uptime check. @@ -221,7 +227,7 @@ public function getName() * on create, the resource name is assigned by the server and included in the * response. * - * Generated from protobuf field string name = 1; + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * @param string $var * @return $this */ @@ -347,6 +353,37 @@ public function setResourceGroup($var) return $this; } + /** + * Specifies a Synthetic Monitor to invoke. + * + * Generated from protobuf field .google.monitoring.v3.SyntheticMonitorTarget synthetic_monitor = 21; + * @return \Google\Cloud\Monitoring\V3\SyntheticMonitorTarget|null + */ + public function getSyntheticMonitor() + { + return $this->readOneof(21); + } + + public function hasSyntheticMonitor() + { + return $this->hasOneof(21); + } + + /** + * Specifies a Synthetic Monitor to invoke. + * + * Generated from protobuf field .google.monitoring.v3.SyntheticMonitorTarget synthetic_monitor = 21; + * @param \Google\Cloud\Monitoring\V3\SyntheticMonitorTarget $var + * @return $this + */ + public function setSyntheticMonitor($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\SyntheticMonitorTarget::class); + $this->writeOneof(21, $var); + + return $this; + } + /** * Contains information needed to make an HTTP or HTTPS check. * diff --git a/Monitoring/src/V3/UptimeCheckConfig/HttpCheck.php b/Monitoring/src/V3/UptimeCheckConfig/HttpCheck.php index 69bbea563f5d..923cfc8ff0b1 100644 --- a/Monitoring/src/V3/UptimeCheckConfig/HttpCheck.php +++ b/Monitoring/src/V3/UptimeCheckConfig/HttpCheck.php @@ -50,6 +50,7 @@ class HttpCheck extends \Google\Protobuf\Internal\Message /** * The authentication information. Optional when creating an HTTP check; * defaults to empty. + * Do not set both `auth_method` and `auth_info`. * * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication auth_info = 4; */ @@ -138,6 +139,7 @@ class HttpCheck extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.PingConfig ping_config = 12; */ private $ping_config = null; + protected $auth_method; /** * Constructor. @@ -164,6 +166,7 @@ class HttpCheck extends \Google\Protobuf\Internal\Message * @type \Google\Cloud\Monitoring\V3\UptimeCheckConfig\HttpCheck\BasicAuthentication $auth_info * The authentication information. Optional when creating an HTTP check; * defaults to empty. + * Do not set both `auth_method` and `auth_info`. * @type bool $mask_headers * Boolean specifying whether to encrypt the header information. * Encryption should be specified for any headers related to authentication @@ -216,6 +219,10 @@ class HttpCheck extends \Google\Protobuf\Internal\Message * pass if the HTTP status code is 200-299. * @type \Google\Cloud\Monitoring\V3\UptimeCheckConfig\PingConfig $ping_config * Contains information needed to add pings to an HTTP check. + * @type \Google\Cloud\Monitoring\V3\UptimeCheckConfig\HttpCheck\ServiceAgentAuthentication $service_agent_authentication + * If specified, Uptime will generate and attach an OIDC JWT token for the + * Monitoring service agent service account as an `Authorization` header + * in the HTTP request when probing. * } */ public function __construct($data = NULL) { @@ -346,6 +353,7 @@ public function setPort($var) /** * The authentication information. Optional when creating an HTTP check; * defaults to empty. + * Do not set both `auth_method` and `auth_info`. * * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication auth_info = 4; * @return \Google\Cloud\Monitoring\V3\UptimeCheckConfig\HttpCheck\BasicAuthentication|null @@ -368,6 +376,7 @@ public function clearAuthInfo() /** * The authentication information. Optional when creating an HTTP check; * defaults to empty. + * Do not set both `auth_method` and `auth_info`. * * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication auth_info = 4; * @param \Google\Cloud\Monitoring\V3\UptimeCheckConfig\HttpCheck\BasicAuthentication $var @@ -671,6 +680,49 @@ public function setPingConfig($var) return $this; } + /** + * If specified, Uptime will generate and attach an OIDC JWT token for the + * Monitoring service agent service account as an `Authorization` header + * in the HTTP request when probing. + * + * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.HttpCheck.ServiceAgentAuthentication service_agent_authentication = 14; + * @return \Google\Cloud\Monitoring\V3\UptimeCheckConfig\HttpCheck\ServiceAgentAuthentication|null + */ + public function getServiceAgentAuthentication() + { + return $this->readOneof(14); + } + + public function hasServiceAgentAuthentication() + { + return $this->hasOneof(14); + } + + /** + * If specified, Uptime will generate and attach an OIDC JWT token for the + * Monitoring service agent service account as an `Authorization` header + * in the HTTP request when probing. + * + * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.HttpCheck.ServiceAgentAuthentication service_agent_authentication = 14; + * @param \Google\Cloud\Monitoring\V3\UptimeCheckConfig\HttpCheck\ServiceAgentAuthentication $var + * @return $this + */ + public function setServiceAgentAuthentication($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\UptimeCheckConfig\HttpCheck\ServiceAgentAuthentication::class); + $this->writeOneof(14, $var); + + return $this; + } + + /** + * @return string + */ + public function getAuthMethod() + { + return $this->whichOneof("auth_method"); + } + } // Adding a class alias for backwards compatibility with the previous class name. diff --git a/Monitoring/src/V3/UptimeCheckConfig/HttpCheck/ServiceAgentAuthentication.php b/Monitoring/src/V3/UptimeCheckConfig/HttpCheck/ServiceAgentAuthentication.php new file mode 100644 index 000000000000..2dfc502b4bbb --- /dev/null +++ b/Monitoring/src/V3/UptimeCheckConfig/HttpCheck/ServiceAgentAuthentication.php @@ -0,0 +1,74 @@ +google.monitoring.v3.UptimeCheckConfig.HttpCheck.ServiceAgentAuthentication + */ +class ServiceAgentAuthentication extends \Google\Protobuf\Internal\Message +{ + /** + * Type of authentication. + * + * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.HttpCheck.ServiceAgentAuthentication.ServiceAgentAuthenticationType type = 1; + */ + private $type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * Type of authentication. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Uptime::initOnce(); + parent::__construct($data); + } + + /** + * Type of authentication. + * + * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.HttpCheck.ServiceAgentAuthentication.ServiceAgentAuthenticationType type = 1; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Type of authentication. + * + * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.HttpCheck.ServiceAgentAuthentication.ServiceAgentAuthenticationType type = 1; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Monitoring\V3\UptimeCheckConfig\HttpCheck\ServiceAgentAuthentication\ServiceAgentAuthenticationType::class); + $this->type = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ServiceAgentAuthentication::class, \Google\Cloud\Monitoring\V3\UptimeCheckConfig_HttpCheck_ServiceAgentAuthentication::class); + diff --git a/Monitoring/src/V3/UptimeCheckConfig/HttpCheck/ServiceAgentAuthentication/ServiceAgentAuthenticationType.php b/Monitoring/src/V3/UptimeCheckConfig/HttpCheck/ServiceAgentAuthentication/ServiceAgentAuthenticationType.php new file mode 100644 index 000000000000..8b14271b462a --- /dev/null +++ b/Monitoring/src/V3/UptimeCheckConfig/HttpCheck/ServiceAgentAuthentication/ServiceAgentAuthenticationType.php @@ -0,0 +1,57 @@ +google.monitoring.v3.UptimeCheckConfig.HttpCheck.ServiceAgentAuthentication.ServiceAgentAuthenticationType + */ +class ServiceAgentAuthenticationType +{ + /** + * Default value, will result in OIDC Authentication. + * + * Generated from protobuf enum SERVICE_AGENT_AUTHENTICATION_TYPE_UNSPECIFIED = 0; + */ + const SERVICE_AGENT_AUTHENTICATION_TYPE_UNSPECIFIED = 0; + /** + * OIDC Authentication + * + * Generated from protobuf enum OIDC_TOKEN = 1; + */ + const OIDC_TOKEN = 1; + + private static $valueToName = [ + self::SERVICE_AGENT_AUTHENTICATION_TYPE_UNSPECIFIED => 'SERVICE_AGENT_AUTHENTICATION_TYPE_UNSPECIFIED', + self::OIDC_TOKEN => 'OIDC_TOKEN', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ServiceAgentAuthenticationType::class, \Google\Cloud\Monitoring\V3\UptimeCheckConfig_HttpCheck_ServiceAgentAuthentication_ServiceAgentAuthenticationType::class); + diff --git a/Monitoring/src/V3/resources/uptime_check_service_descriptor_config.php b/Monitoring/src/V3/resources/uptime_check_service_descriptor_config.php index a9dbc7aa7817..e1d4dafc1ca4 100644 --- a/Monitoring/src/V3/resources/uptime_check_service_descriptor_config.php +++ b/Monitoring/src/V3/resources/uptime_check_service_descriptor_config.php @@ -106,6 +106,7 @@ ], 'templateMap' => [ 'folderUptimeCheckConfig' => 'folders/{folder}/uptimeCheckConfigs/{uptime_check_config}', + 'function' => 'projects/{project}/locations/{location}/functions/{function}', 'organizationUptimeCheckConfig' => 'organizations/{organization}/uptimeCheckConfigs/{uptime_check_config}', 'projectUptimeCheckConfig' => 'projects/{project}/uptimeCheckConfigs/{uptime_check_config}', 'uptimeCheckConfig' => 'projects/{project}/uptimeCheckConfigs/{uptime_check_config}', diff --git a/NetApp/VERSION b/NetApp/VERSION index abd410582dea..3a4036fb450f 100644 --- a/NetApp/VERSION +++ b/NetApp/VERSION @@ -1 +1 @@ -0.2.4 +0.2.5 diff --git a/NetworkConnectivity/VERSION b/NetworkConnectivity/VERSION index 4cda8f19edc7..8af85beb5159 100644 --- a/NetworkConnectivity/VERSION +++ b/NetworkConnectivity/VERSION @@ -1 +1 @@ -1.5.2 +1.5.3 diff --git a/NetworkManagement/VERSION b/NetworkManagement/VERSION index bd8bf882d061..943f9cbc4ec7 100644 --- a/NetworkManagement/VERSION +++ b/NetworkManagement/VERSION @@ -1 +1 @@ -1.7.0 +1.7.1 diff --git a/NetworkSecurity/VERSION b/NetworkSecurity/VERSION index b6160487433b..844f6a91acb9 100644 --- a/NetworkSecurity/VERSION +++ b/NetworkSecurity/VERSION @@ -1 +1 @@ -0.6.2 +0.6.3 diff --git a/Notebooks/VERSION b/Notebooks/VERSION index 7486fdbc50b3..f38fc5393ff6 100644 --- a/Notebooks/VERSION +++ b/Notebooks/VERSION @@ -1 +1 @@ -0.7.2 +0.7.3 diff --git a/Optimization/VERSION b/Optimization/VERSION index b6160487433b..844f6a91acb9 100644 --- a/Optimization/VERSION +++ b/Optimization/VERSION @@ -1 +1 @@ -0.6.2 +0.6.3 diff --git a/OrchestrationAirflow/VERSION b/OrchestrationAirflow/VERSION index 9c6d6293b1a8..fdd3be6df54a 100644 --- a/OrchestrationAirflow/VERSION +++ b/OrchestrationAirflow/VERSION @@ -1 +1 @@ -1.6.1 +1.6.2 diff --git a/OrgPolicy/VERSION b/OrgPolicy/VERSION index b6160487433b..844f6a91acb9 100644 --- a/OrgPolicy/VERSION +++ b/OrgPolicy/VERSION @@ -1 +1 @@ -0.6.2 +0.6.3 diff --git a/OsConfig/VERSION b/OsConfig/VERSION index 1892b9267677..31e5c843497c 100644 --- a/OsConfig/VERSION +++ b/OsConfig/VERSION @@ -1 +1 @@ -1.3.2 +1.3.3 diff --git a/OsLogin/VERSION b/OsLogin/VERSION index 8fdcf3869464..77fee73a8cf9 100644 --- a/OsLogin/VERSION +++ b/OsLogin/VERSION @@ -1 +1 @@ -1.9.2 +1.9.3 diff --git a/Parallelstore/VERSION b/Parallelstore/VERSION index 6e8bf73aa550..17e51c385ea3 100644 --- a/Parallelstore/VERSION +++ b/Parallelstore/VERSION @@ -1 +1 @@ -0.1.0 +0.1.1 diff --git a/PolicySimulator/VERSION b/PolicySimulator/VERSION index ee1372d33a29..7179039691ce 100644 --- a/PolicySimulator/VERSION +++ b/PolicySimulator/VERSION @@ -1 +1 @@ -0.2.2 +0.2.3 diff --git a/PolicyTroubleshooter/VERSION b/PolicyTroubleshooter/VERSION index 3a3cd8cc8b07..1892b9267677 100644 --- a/PolicyTroubleshooter/VERSION +++ b/PolicyTroubleshooter/VERSION @@ -1 +1 @@ -1.3.1 +1.3.2 diff --git a/PolicyTroubleshooterIam/VERSION b/PolicyTroubleshooterIam/VERSION index ee1372d33a29..7179039691ce 100644 --- a/PolicyTroubleshooterIam/VERSION +++ b/PolicyTroubleshooterIam/VERSION @@ -1 +1 @@ -0.2.2 +0.2.3 diff --git a/PrivateCatalog/VERSION b/PrivateCatalog/VERSION index 267577d47e49..2b7c5ae01848 100644 --- a/PrivateCatalog/VERSION +++ b/PrivateCatalog/VERSION @@ -1 +1 @@ -0.4.1 +0.4.2 diff --git a/Profiler/VERSION b/Profiler/VERSION index 88c5fb891dcf..347f5833ee6d 100644 --- a/Profiler/VERSION +++ b/Profiler/VERSION @@ -1 +1 @@ -1.4.0 +1.4.1 diff --git a/PubSub/VERSION b/PubSub/VERSION index 7ec1d6db4087..3e3c2f1e5edb 100644 --- a/PubSub/VERSION +++ b/PubSub/VERSION @@ -1 +1 @@ -2.1.0 +2.1.1 diff --git a/Quotas/VERSION b/Quotas/VERSION index 0ea3a944b399..0c62199f16ac 100644 --- a/Quotas/VERSION +++ b/Quotas/VERSION @@ -1 +1 @@ -0.2.0 +0.2.1 diff --git a/Quotas/src/V1/QuotaPreference.php b/Quotas/src/V1/QuotaPreference.php index 8d6834043a21..fde3b44c65a7 100644 --- a/Quotas/src/V1/QuotaPreference.php +++ b/Quotas/src/V1/QuotaPreference.php @@ -97,15 +97,14 @@ class QuotaPreference extends \Google\Protobuf\Internal\Message */ protected $justification = ''; /** - * Input only. An email address that can be used for quota related - * communication between the Google Cloud and the user in case the Google - * Cloud needs further information to make a decision on whether the user - * preferred quota can be granted. - * The email address is optional for decrease quota preferences. In another - * word, QuotaConfig.preferred_value is smaller than the - * QuotaDetails.reset_value. It is required for increase quota preferences. - * The Google account for the email address must have quota update permission - * for the project, folder or organization this quota preference is for. + * Input only. An email address that can be used to contact the the user, in + * case Google Cloud needs more information to make a decision before + * additional quota can be granted. + * When requesting a quota increase, the email address is required. + * When requesting a quota decrease, the email address is optional. + * For example, the email address is optional when the + * `QuotaConfig.preferred_value` is smaller than the + * `QuotaDetails.reset_value`. * * Generated from protobuf field string contact_email = 12 [(.google.api.field_behavior) = INPUT_ONLY]; */ @@ -157,15 +156,14 @@ class QuotaPreference extends \Google\Protobuf\Internal\Message * @type string $justification * The reason / justification for this quota preference. * @type string $contact_email - * Input only. An email address that can be used for quota related - * communication between the Google Cloud and the user in case the Google - * Cloud needs further information to make a decision on whether the user - * preferred quota can be granted. - * The email address is optional for decrease quota preferences. In another - * word, QuotaConfig.preferred_value is smaller than the - * QuotaDetails.reset_value. It is required for increase quota preferences. - * The Google account for the email address must have quota update permission - * for the project, folder or organization this quota preference is for. + * Input only. An email address that can be used to contact the the user, in + * case Google Cloud needs more information to make a decision before + * additional quota can be granted. + * When requesting a quota increase, the email address is required. + * When requesting a quota decrease, the email address is optional. + * For example, the email address is optional when the + * `QuotaConfig.preferred_value` is smaller than the + * `QuotaDetails.reset_value`. * } */ public function __construct($data = NULL) { @@ -502,15 +500,14 @@ public function setJustification($var) } /** - * Input only. An email address that can be used for quota related - * communication between the Google Cloud and the user in case the Google - * Cloud needs further information to make a decision on whether the user - * preferred quota can be granted. - * The email address is optional for decrease quota preferences. In another - * word, QuotaConfig.preferred_value is smaller than the - * QuotaDetails.reset_value. It is required for increase quota preferences. - * The Google account for the email address must have quota update permission - * for the project, folder or organization this quota preference is for. + * Input only. An email address that can be used to contact the the user, in + * case Google Cloud needs more information to make a decision before + * additional quota can be granted. + * When requesting a quota increase, the email address is required. + * When requesting a quota decrease, the email address is optional. + * For example, the email address is optional when the + * `QuotaConfig.preferred_value` is smaller than the + * `QuotaDetails.reset_value`. * * Generated from protobuf field string contact_email = 12 [(.google.api.field_behavior) = INPUT_ONLY]; * @return string @@ -521,15 +518,14 @@ public function getContactEmail() } /** - * Input only. An email address that can be used for quota related - * communication between the Google Cloud and the user in case the Google - * Cloud needs further information to make a decision on whether the user - * preferred quota can be granted. - * The email address is optional for decrease quota preferences. In another - * word, QuotaConfig.preferred_value is smaller than the - * QuotaDetails.reset_value. It is required for increase quota preferences. - * The Google account for the email address must have quota update permission - * for the project, folder or organization this quota preference is for. + * Input only. An email address that can be used to contact the the user, in + * case Google Cloud needs more information to make a decision before + * additional quota can be granted. + * When requesting a quota increase, the email address is required. + * When requesting a quota decrease, the email address is optional. + * For example, the email address is optional when the + * `QuotaConfig.preferred_value` is smaller than the + * `QuotaDetails.reset_value`. * * Generated from protobuf field string contact_email = 12 [(.google.api.field_behavior) = INPUT_ONLY]; * @param string $var diff --git a/RapidMigrationAssessment/VERSION b/RapidMigrationAssessment/VERSION index d15723fbe8de..1c09c74e221c 100644 --- a/RapidMigrationAssessment/VERSION +++ b/RapidMigrationAssessment/VERSION @@ -1 +1 @@ -0.3.2 +0.3.3 diff --git a/RecaptchaEnterprise/VERSION b/RecaptchaEnterprise/VERSION index 1cac385c6cb8..0eed1a29efd6 100644 --- a/RecaptchaEnterprise/VERSION +++ b/RecaptchaEnterprise/VERSION @@ -1 +1 @@ -1.11.0 +1.12.0 diff --git a/RecaptchaEnterprise/metadata/V1/Recaptchaenterprise.php b/RecaptchaEnterprise/metadata/V1/Recaptchaenterprise.php index 8d57cc36a40b..969a45bf2739 100644 Binary files a/RecaptchaEnterprise/metadata/V1/Recaptchaenterprise.php and b/RecaptchaEnterprise/metadata/V1/Recaptchaenterprise.php differ diff --git a/RecaptchaEnterprise/src/V1/Event.php b/RecaptchaEnterprise/src/V1/Event.php index dd520e9e0e4a..95c5df6a7b2c 100644 --- a/RecaptchaEnterprise/src/V1/Event.php +++ b/RecaptchaEnterprise/src/V1/Event.php @@ -119,6 +119,12 @@ class Event extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.UserInfo user_info = 15 [(.google.api.field_behavior) = OPTIONAL]; */ private $user_info = null; + /** + * Optional. The Fraud Prevention setting for this assessment. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.Event.FraudPrevention fraud_prevention = 17 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $fraud_prevention = 0; /** * Constructor. @@ -173,6 +179,8 @@ class Event extends \Google\Protobuf\Internal\Message * can be identified. They are often identified through the use of an account * for logged-in requests or login/registration requests, or by providing user * identifiers for guest actions like checkout. + * @type int $fraud_prevention + * Optional. The Fraud Prevention setting for this assessment. * } */ public function __construct($data = NULL) { @@ -606,5 +614,31 @@ public function setUserInfo($var) return $this; } + /** + * Optional. The Fraud Prevention setting for this assessment. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.Event.FraudPrevention fraud_prevention = 17 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getFraudPrevention() + { + return $this->fraud_prevention; + } + + /** + * Optional. The Fraud Prevention setting for this assessment. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.Event.FraudPrevention fraud_prevention = 17 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setFraudPrevention($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\RecaptchaEnterprise\V1\Event\FraudPrevention::class); + $this->fraud_prevention = $var; + + return $this; + } + } diff --git a/RecaptchaEnterprise/src/V1/Event/FraudPrevention.php b/RecaptchaEnterprise/src/V1/Event/FraudPrevention.php new file mode 100644 index 000000000000..5650681f23e6 --- /dev/null +++ b/RecaptchaEnterprise/src/V1/Event/FraudPrevention.php @@ -0,0 +1,70 @@ +google.cloud.recaptchaenterprise.v1.Event.FraudPrevention + */ +class FraudPrevention +{ + /** + * Default, unspecified setting. If opted in for automatic detection, + * `fraud_prevention_assessment` is returned based on the request. + * Otherwise, `fraud_prevention_assessment` is returned if + * `transaction_data` is present in the `Event` and Fraud Prevention is + * enabled in the Google Cloud console. + * + * Generated from protobuf enum FRAUD_PREVENTION_UNSPECIFIED = 0; + */ + const FRAUD_PREVENTION_UNSPECIFIED = 0; + /** + * Enable Fraud Prevention for this assessment, if Fraud Prevention is + * enabled in the Google Cloud console. + * + * Generated from protobuf enum ENABLED = 1; + */ + const ENABLED = 1; + /** + * Disable Fraud Prevention for this assessment, regardless of opt-in + * status or Google Cloud console settings. + * + * Generated from protobuf enum DISABLED = 2; + */ + const DISABLED = 2; + + private static $valueToName = [ + self::FRAUD_PREVENTION_UNSPECIFIED => 'FRAUD_PREVENTION_UNSPECIFIED', + self::ENABLED => 'ENABLED', + self::DISABLED => 'DISABLED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(FraudPrevention::class, \Google\Cloud\RecaptchaEnterprise\V1\Event_FraudPrevention::class); + diff --git a/RecaptchaEnterprise/src/V1/ListFirewallPoliciesResponse.php b/RecaptchaEnterprise/src/V1/ListFirewallPoliciesResponse.php index c70d5fc76668..13b8d06b50ae 100644 --- a/RecaptchaEnterprise/src/V1/ListFirewallPoliciesResponse.php +++ b/RecaptchaEnterprise/src/V1/ListFirewallPoliciesResponse.php @@ -9,7 +9,7 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Response to request to list firewall policies belonging to a key. + * Response to request to list firewall policies belonging to a project. * * Generated from protobuf message google.cloud.recaptchaenterprise.v1.ListFirewallPoliciesResponse */ diff --git a/RecommendationEngine/VERSION b/RecommendationEngine/VERSION index 7486fdbc50b3..f38fc5393ff6 100644 --- a/RecommendationEngine/VERSION +++ b/RecommendationEngine/VERSION @@ -1 +1 @@ -0.7.2 +0.7.3 diff --git a/Recommender/VERSION b/Recommender/VERSION index ca7176690dd6..0a5af26df3fd 100644 --- a/Recommender/VERSION +++ b/Recommender/VERSION @@ -1 +1 @@ -1.11.2 +1.11.3 diff --git a/Redis/VERSION b/Redis/VERSION index 8fdcf3869464..77fee73a8cf9 100644 --- a/Redis/VERSION +++ b/Redis/VERSION @@ -1 +1 @@ -1.9.2 +1.9.3 diff --git a/RedisCluster/VERSION b/RedisCluster/VERSION index ee1372d33a29..7179039691ce 100644 --- a/RedisCluster/VERSION +++ b/RedisCluster/VERSION @@ -1 +1 @@ -0.2.2 +0.2.3 diff --git a/ResourceManager/VERSION b/ResourceManager/VERSION index 100435be135a..ee94dd834b53 100644 --- a/ResourceManager/VERSION +++ b/ResourceManager/VERSION @@ -1 +1 @@ -0.8.2 +0.8.3 diff --git a/ResourceSettings/VERSION b/ResourceSettings/VERSION index 23aa8390630c..0495c4a88cae 100644 --- a/ResourceSettings/VERSION +++ b/ResourceSettings/VERSION @@ -1 +1 @@ -1.2.2 +1.2.3 diff --git a/Retail/VERSION b/Retail/VERSION index 9c6d6293b1a8..fdd3be6df54a 100644 --- a/Retail/VERSION +++ b/Retail/VERSION @@ -1 +1 @@ -1.6.1 +1.6.2 diff --git a/Run/VERSION b/Run/VERSION index ac39a106c485..f374f6662e9a 100644 --- a/Run/VERSION +++ b/Run/VERSION @@ -1 +1 @@ -0.9.0 +0.9.1 diff --git a/Scheduler/VERSION b/Scheduler/VERSION index 5ad2491cf880..587c5f0c7309 100644 --- a/Scheduler/VERSION +++ b/Scheduler/VERSION @@ -1 +1 @@ -1.10.2 +1.10.3 diff --git a/SecretManager/VERSION b/SecretManager/VERSION index 63e799cf451b..141f2e805beb 100644 --- a/SecretManager/VERSION +++ b/SecretManager/VERSION @@ -1 +1 @@ -1.14.1 +1.15.0 diff --git a/SecretManager/metadata/V1/Resources.php b/SecretManager/metadata/V1/Resources.php index 6033f84c64ab..17447424407f 100644 Binary files a/SecretManager/metadata/V1/Resources.php and b/SecretManager/metadata/V1/Resources.php differ diff --git a/SecretManager/metadata/V1/Service.php b/SecretManager/metadata/V1/Service.php index 19f886966a4d..720a08a68ac8 100644 --- a/SecretManager/metadata/V1/Service.php +++ b/SecretManager/metadata/V1/Service.php @@ -25,11 +25,10 @@ public static function initOnce() { \GPBMetadata\Google\Protobuf\FieldMask::initOnce(); $pool->internalAddGeneratedFile( ' -) -+google/cloud/secretmanager/v1/service.protogoogle.cloud.secretmanager.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto-google/cloud/secretmanager/v1/resources.protogoogle/iam/v1/iam_policy.protogoogle/iam/v1/policy.protogoogle/protobuf/empty.proto google/protobuf/field_mask.proto"Ÿ -ListSecretsRequestC -parent ( B3àAúA- -+cloudresourcemanager.googleapis.com/Project +¦0 ++google/cloud/secretmanager/v1/service.protogoogle.cloud.secretmanager.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto-google/cloud/secretmanager/v1/resources.protogoogle/iam/v1/iam_policy.protogoogle/iam/v1/policy.protogoogle/protobuf/empty.proto google/protobuf/field_mask.proto"— +ListSecretsRequest; +parent ( B+àAúA%#secretmanager.googleapis.com/Secret page_size (BàA page_token ( BàA @@ -38,10 +37,9 @@ public static function initOnce() { secrets ( 2%.google.cloud.secretmanager.v1.Secret next_page_token (  -total_size ("® -CreateSecretRequestC -parent ( B3àAúA- -+cloudresourcemanager.googleapis.com/Project +total_size ("¦ +CreateSecretRequest; +parent ( B+àAúA%#secretmanager.googleapis.com/Secret secret_id ( BàA: secret ( 2%.google.cloud.secretmanager.v1.SecretBàA"š AddSecretVersionRequest; @@ -91,23 +89,23 @@ public static function initOnce() { DestroySecretVersionRequest@ name ( B2àAúA, *secretmanager.googleapis.com/SecretVersion -etag ( BàA2Ï -SecretManagerService¦ - ListSecrets1.google.cloud.secretmanager.v1.ListSecretsRequest2.google.cloud.secretmanager.v1.ListSecretsResponse"0ÚAparent‚Óä“!/v1/{parent=projects/*}/secrets´ - CreateSecret2.google.cloud.secretmanager.v1.CreateSecretRequest%.google.cloud.secretmanager.v1.Secret"IÚAparent,secret_id,secret‚Óä“)"/v1/{parent=projects/*}/secrets:secret -AddSecretVersion6.google.cloud.secretmanager.v1.AddSecretVersionRequest,.google.cloud.secretmanager.v1.SecretVersion"HÚAparent,payload‚Óä“1",/v1/{parent=projects/*/secrets/*}:addVersion:*“ - GetSecret/.google.cloud.secretmanager.v1.GetSecretRequest%.google.cloud.secretmanager.v1.Secret".ÚAname‚Óä“!/v1/{name=projects/*/secrets/*}¶ - UpdateSecret2.google.cloud.secretmanager.v1.UpdateSecretRequest%.google.cloud.secretmanager.v1.Secret"KÚAsecret,update_mask‚Óä“02&/v1/{secret.name=projects/*/secrets/*}:secretŠ - DeleteSecret2.google.cloud.secretmanager.v1.DeleteSecretRequest.google.protobuf.Empty".ÚAname‚Óä“!*/v1/{name=projects/*/secrets/*}Æ -ListSecretVersions8.google.cloud.secretmanager.v1.ListSecretVersionsRequest9.google.cloud.secretmanager.v1.ListSecretVersionsResponse";ÚAparent‚Óä“,*/v1/{parent=projects/*/secrets/*}/versions³ -GetSecretVersion6.google.cloud.secretmanager.v1.GetSecretVersionRequest,.google.cloud.secretmanager.v1.SecretVersion"9ÚAname‚Óä“,*/v1/{name=projects/*/secrets/*/versions/*}Î -AccessSecretVersion9.google.cloud.secretmanager.v1.AccessSecretVersionRequest:.google.cloud.secretmanager.v1.AccessSecretVersionResponse"@ÚAname‚Óä“31/v1/{name=projects/*/secrets/*/versions/*}:accessÆ -DisableSecretVersion:.google.cloud.secretmanager.v1.DisableSecretVersionRequest,.google.cloud.secretmanager.v1.SecretVersion"DÚAname‚Óä“7"2/v1/{name=projects/*/secrets/*/versions/*}:disable:*à -EnableSecretVersion9.google.cloud.secretmanager.v1.EnableSecretVersionRequest,.google.cloud.secretmanager.v1.SecretVersion"CÚAname‚Óä“6"1/v1/{name=projects/*/secrets/*/versions/*}:enable:*Æ -DestroySecretVersion:.google.cloud.secretmanager.v1.DestroySecretVersionRequest,.google.cloud.secretmanager.v1.SecretVersion"DÚAname‚Óä“7"2/v1/{name=projects/*/secrets/*/versions/*}:destroy:*† - SetIamPolicy".google.iam.v1.SetIamPolicyRequest.google.iam.v1.Policy";‚Óä“5"0/v1/{resource=projects/*/secrets/*}:setIamPolicy:*ƒ - GetIamPolicy".google.iam.v1.GetIamPolicyRequest.google.iam.v1.Policy"8‚Óä“20/v1/{resource=projects/*/secrets/*}:getIamPolicy¬ -TestIamPermissions(.google.iam.v1.TestIamPermissionsRequest).google.iam.v1.TestIamPermissionsResponse"A‚Óä“;"6/v1/{resource=projects/*/secrets/*}:testIamPermissions:*PÊAsecretmanager.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBè +etag ( BàA2è +SecretManagerServiceÕ + ListSecrets1.google.cloud.secretmanager.v1.ListSecretsRequest2.google.cloud.secretmanager.v1.ListSecretsResponse"_ÚAparent‚Óä“P/v1/{parent=projects/*}/secretsZ-+/v1/{parent=projects/*/locations/*}/secretsì + CreateSecret2.google.cloud.secretmanager.v1.CreateSecretRequest%.google.cloud.secretmanager.v1.Secret"€ÚAparent,secret_id,secret‚Óä“`"/v1/{parent=projects/*}/secrets:secretZ5"+/v1/{parent=projects/*/locations/*}/secrets:secret‚ +AddSecretVersion6.google.cloud.secretmanager.v1.AddSecretVersionRequest,.google.cloud.secretmanager.v1.SecretVersion"‡ÚAparent,payload‚Óä“p",/v1/{parent=projects/*/secrets/*}:addVersion:*Z="8/v1/{parent=projects/*/locations/*/secrets/*}:addVersion:* + GetSecret/.google.cloud.secretmanager.v1.GetSecretRequest%.google.cloud.secretmanager.v1.Secret"]ÚAname‚Óä“P/v1/{name=projects/*/secrets/*}Z-+/v1/{name=projects/*/locations/*/secrets/*}õ + UpdateSecret2.google.cloud.secretmanager.v1.UpdateSecretRequest%.google.cloud.secretmanager.v1.Secret"‰ÚAsecret,update_mask‚Óä“n2&/v1/{secret.name=projects/*/secrets/*}:secretZ<22/v1/{secret.name=projects/*/locations/*/secrets/*}:secret¹ + DeleteSecret2.google.cloud.secretmanager.v1.DeleteSecretRequest.google.protobuf.Empty"]ÚAname‚Óä“P*/v1/{name=projects/*/secrets/*}Z-*+/v1/{name=projects/*/locations/*/secrets/*}€ +ListSecretVersions8.google.cloud.secretmanager.v1.ListSecretVersionsRequest9.google.cloud.secretmanager.v1.ListSecretVersionsResponse"uÚAparent‚Óä“f*/v1/{parent=projects/*/secrets/*}/versionsZ86/v1/{parent=projects/*/locations/*/secrets/*}/versionsí +GetSecretVersion6.google.cloud.secretmanager.v1.GetSecretVersionRequest,.google.cloud.secretmanager.v1.SecretVersion"sÚAname‚Óä“f*/v1/{name=projects/*/secrets/*/versions/*}Z86/v1/{name=projects/*/locations/*/secrets/*/versions/*} +AccessSecretVersion9.google.cloud.secretmanager.v1.AccessSecretVersionRequest:.google.cloud.secretmanager.v1.AccessSecretVersionResponse"ÚAname‚Óä“t1/v1/{name=projects/*/secrets/*/versions/*}:accessZ?=/v1/{name=projects/*/locations/*/secrets/*/versions/*}:accessŒ +DisableSecretVersion:.google.cloud.secretmanager.v1.DisableSecretVersionRequest,.google.cloud.secretmanager.v1.SecretVersion"‰ÚAname‚Óä“|"2/v1/{name=projects/*/secrets/*/versions/*}:disable:*ZC">/v1/{name=projects/*/locations/*/secrets/*/versions/*}:disable:*ˆ +EnableSecretVersion9.google.cloud.secretmanager.v1.EnableSecretVersionRequest,.google.cloud.secretmanager.v1.SecretVersion"‡ÚAname‚Óä“z"1/v1/{name=projects/*/secrets/*/versions/*}:enable:*ZB"=/v1/{name=projects/*/locations/*/secrets/*/versions/*}:enable:*Œ +DestroySecretVersion:.google.cloud.secretmanager.v1.DestroySecretVersionRequest,.google.cloud.secretmanager.v1.SecretVersion"‰ÚAname‚Óä“|"2/v1/{name=projects/*/secrets/*/versions/*}:destroy:*ZC">/v1/{name=projects/*/locations/*/secrets/*/versions/*}:destroy:*É + SetIamPolicy".google.iam.v1.SetIamPolicyRequest.google.iam.v1.Policy"~‚Óä“x"0/v1/{resource=projects/*/secrets/*}:setIamPolicy:*ZA"setReplication($secretReplication); + $secret = new Secret(); $request = (new CreateSecretRequest()) ->setParent($formattedParent) ->setSecretId($secretId) diff --git a/SecretManager/samples/V1/SecretManagerServiceClient/destroy_secret_version.php b/SecretManager/samples/V1/SecretManagerServiceClient/destroy_secret_version.php index c341d3064e85..63e0830a6867 100644 --- a/SecretManager/samples/V1/SecretManagerServiceClient/destroy_secret_version.php +++ b/SecretManager/samples/V1/SecretManagerServiceClient/destroy_secret_version.php @@ -38,7 +38,8 @@ * * @param string $formattedName The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to destroy in - * the format `projects/*/secrets/*/versions/*`. Please see + * the format `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. Please see * {@see SecretManagerServiceClient::secretVersionName()} for help formatting this field. */ function destroy_secret_version_sample(string $formattedName): void diff --git a/SecretManager/samples/V1/SecretManagerServiceClient/disable_secret_version.php b/SecretManager/samples/V1/SecretManagerServiceClient/disable_secret_version.php index 187ea02b7839..e3986eaf84ae 100644 --- a/SecretManager/samples/V1/SecretManagerServiceClient/disable_secret_version.php +++ b/SecretManager/samples/V1/SecretManagerServiceClient/disable_secret_version.php @@ -37,7 +37,8 @@ * * @param string $formattedName The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to disable in - * the format `projects/*/secrets/*/versions/*`. Please see + * the format `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. Please see * {@see SecretManagerServiceClient::secretVersionName()} for help formatting this field. */ function disable_secret_version_sample(string $formattedName): void diff --git a/SecretManager/samples/V1/SecretManagerServiceClient/enable_secret_version.php b/SecretManager/samples/V1/SecretManagerServiceClient/enable_secret_version.php index 0f30e13556da..73e4d6dfce4a 100644 --- a/SecretManager/samples/V1/SecretManagerServiceClient/enable_secret_version.php +++ b/SecretManager/samples/V1/SecretManagerServiceClient/enable_secret_version.php @@ -37,7 +37,8 @@ * * @param string $formattedName The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to enable in - * the format `projects/*/secrets/*/versions/*`. Please see + * the format `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. Please see * {@see SecretManagerServiceClient::secretVersionName()} for help formatting this field. */ function enable_secret_version_sample(string $formattedName): void diff --git a/SecretManager/samples/V1/SecretManagerServiceClient/get_secret.php b/SecretManager/samples/V1/SecretManagerServiceClient/get_secret.php index 14f0523fb22d..abe188f790eb 100644 --- a/SecretManager/samples/V1/SecretManagerServiceClient/get_secret.php +++ b/SecretManager/samples/V1/SecretManagerServiceClient/get_secret.php @@ -33,7 +33,7 @@ * * @param string $formattedName The resource name of the * [Secret][google.cloud.secretmanager.v1.Secret], in the format - * `projects/*/secrets/*`. Please see + * `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. Please see * {@see SecretManagerServiceClient::secretName()} for help formatting this field. */ function get_secret_sample(string $formattedName): void diff --git a/SecretManager/samples/V1/SecretManagerServiceClient/get_secret_version.php b/SecretManager/samples/V1/SecretManagerServiceClient/get_secret_version.php index a7baf9974bed..0ac985a33767 100644 --- a/SecretManager/samples/V1/SecretManagerServiceClient/get_secret_version.php +++ b/SecretManager/samples/V1/SecretManagerServiceClient/get_secret_version.php @@ -37,10 +37,13 @@ * * @param string $formattedName The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format - * `projects/*/secrets/*/versions/*`. + * `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. * - * `projects/*/secrets/*/versions/latest` is an alias to the most recently - * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. Please see + * `projects/*/secrets/*/versions/latest` or + * `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most + * recently created + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. Please see * {@see SecretManagerServiceClient::secretVersionName()} for help formatting this field. */ function get_secret_version_sample(string $formattedName): void diff --git a/SecretManager/samples/V1/SecretManagerServiceClient/list_secret_versions.php b/SecretManager/samples/V1/SecretManagerServiceClient/list_secret_versions.php index 60a231f14b50..b074fa02d896 100644 --- a/SecretManager/samples/V1/SecretManagerServiceClient/list_secret_versions.php +++ b/SecretManager/samples/V1/SecretManagerServiceClient/list_secret_versions.php @@ -36,7 +36,7 @@ * @param string $formattedParent The resource name of the * [Secret][google.cloud.secretmanager.v1.Secret] associated with the * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] to list, in - * the format `projects/*/secrets/*`. Please see + * the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. Please see * {@see SecretManagerServiceClient::secretName()} for help formatting this field. */ function list_secret_versions_sample(string $formattedParent): void diff --git a/SecretManager/samples/V1/SecretManagerServiceClient/list_secrets.php b/SecretManager/samples/V1/SecretManagerServiceClient/list_secrets.php index dfd1cf50ca86..a4bf43cb2334 100644 --- a/SecretManager/samples/V1/SecretManagerServiceClient/list_secrets.php +++ b/SecretManager/samples/V1/SecretManagerServiceClient/list_secrets.php @@ -33,9 +33,9 @@ * Lists [Secrets][google.cloud.secretmanager.v1.Secret]. * * @param string $formattedParent The resource name of the project associated with the - * [Secrets][google.cloud.secretmanager.v1.Secret], in the format - * `projects/*`. Please see - * {@see SecretManagerServiceClient::projectName()} for help formatting this field. + * [Secrets][google.cloud.secretmanager.v1.Secret], in the format `projects/*` + * or `projects/*/locations/*` + * Please see {@see SecretManagerServiceClient::projectName()} for help formatting this field. */ function list_secrets_sample(string $formattedParent): void { diff --git a/SecretManager/samples/V1/SecretManagerServiceClient/update_secret.php b/SecretManager/samples/V1/SecretManagerServiceClient/update_secret.php index a38220555f73..84430ff273a5 100644 --- a/SecretManager/samples/V1/SecretManagerServiceClient/update_secret.php +++ b/SecretManager/samples/V1/SecretManagerServiceClient/update_secret.php @@ -25,7 +25,6 @@ // [START secretmanager_v1_generated_SecretManagerService_UpdateSecret_sync] use Google\ApiCore\ApiException; use Google\Cloud\SecretManager\V1\Client\SecretManagerServiceClient; -use Google\Cloud\SecretManager\V1\Replication; use Google\Cloud\SecretManager\V1\Secret; use Google\Cloud\SecretManager\V1\UpdateSecretRequest; use Google\Protobuf\FieldMask; @@ -46,9 +45,7 @@ function update_secret_sample(): void $secretManagerServiceClient = new SecretManagerServiceClient(); // Prepare the request message. - $secretReplication = new Replication(); - $secret = (new Secret()) - ->setReplication($secretReplication); + $secret = new Secret(); $updateMask = new FieldMask(); $request = (new UpdateSecretRequest()) ->setSecret($secret) diff --git a/SecretManager/src/V1/AccessSecretVersionRequest.php b/SecretManager/src/V1/AccessSecretVersionRequest.php index 022c5103edae..39b085553f0b 100644 --- a/SecretManager/src/V1/AccessSecretVersionRequest.php +++ b/SecretManager/src/V1/AccessSecretVersionRequest.php @@ -19,9 +19,12 @@ class AccessSecretVersionRequest extends \Google\Protobuf\Internal\Message /** * Required. The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format - * `projects/*/secrets/*/versions/*`. - * `projects/*/secrets/*/versions/latest` is an alias to the most recently - * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. + * `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. + * `projects/*/secrets/*/versions/latest` or + * `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most + * recently created + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ @@ -30,10 +33,13 @@ class AccessSecretVersionRequest extends \Google\Protobuf\Internal\Message /** * @param string $name Required. The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format - * `projects/*/secrets/*/versions/*`. + * `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. * - * `projects/*/secrets/*/versions/latest` is an alias to the most recently - * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. Please see + * `projects/*/secrets/*/versions/latest` or + * `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most + * recently created + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. Please see * {@see SecretManagerServiceClient::secretVersionName()} for help formatting this field. * * @return \Google\Cloud\SecretManager\V1\AccessSecretVersionRequest @@ -55,9 +61,12 @@ public static function build(string $name): self * @type string $name * Required. The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format - * `projects/*/secrets/*/versions/*`. - * `projects/*/secrets/*/versions/latest` is an alias to the most recently - * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. + * `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. + * `projects/*/secrets/*/versions/latest` or + * `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most + * recently created + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. * } */ public function __construct($data = NULL) { @@ -68,9 +77,12 @@ public function __construct($data = NULL) { /** * Required. The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format - * `projects/*/secrets/*/versions/*`. - * `projects/*/secrets/*/versions/latest` is an alias to the most recently - * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. + * `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. + * `projects/*/secrets/*/versions/latest` or + * `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most + * recently created + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string @@ -83,9 +95,12 @@ public function getName() /** * Required. The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format - * `projects/*/secrets/*/versions/*`. - * `projects/*/secrets/*/versions/latest` is an alias to the most recently - * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. + * `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. + * `projects/*/secrets/*/versions/latest` or + * `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most + * recently created + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var diff --git a/SecretManager/src/V1/AccessSecretVersionResponse.php b/SecretManager/src/V1/AccessSecretVersionResponse.php index e5b0ae63fb21..05ba2a7b5571 100644 --- a/SecretManager/src/V1/AccessSecretVersionResponse.php +++ b/SecretManager/src/V1/AccessSecretVersionResponse.php @@ -19,7 +19,8 @@ class AccessSecretVersionResponse extends \Google\Protobuf\Internal\Message /** * The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format - * `projects/*/secrets/*/versions/*`. + * `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. * * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { */ @@ -40,7 +41,8 @@ class AccessSecretVersionResponse extends \Google\Protobuf\Internal\Message * @type string $name * The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format - * `projects/*/secrets/*/versions/*`. + * `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. * @type \Google\Cloud\SecretManager\V1\SecretPayload $payload * Secret payload * } @@ -53,7 +55,8 @@ public function __construct($data = NULL) { /** * The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format - * `projects/*/secrets/*/versions/*`. + * `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. * * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { * @return string @@ -66,7 +69,8 @@ public function getName() /** * The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format - * `projects/*/secrets/*/versions/*`. + * `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. * * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { * @param string $var diff --git a/SecretManager/src/V1/AddSecretVersionRequest.php b/SecretManager/src/V1/AddSecretVersionRequest.php index 44da58621e23..4e6fbe5e99ae 100644 --- a/SecretManager/src/V1/AddSecretVersionRequest.php +++ b/SecretManager/src/V1/AddSecretVersionRequest.php @@ -20,7 +20,7 @@ class AddSecretVersionRequest extends \Google\Protobuf\Internal\Message * Required. The resource name of the * [Secret][google.cloud.secretmanager.v1.Secret] to associate with the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format - * `projects/*/secrets/*`. + * `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ @@ -37,7 +37,7 @@ class AddSecretVersionRequest extends \Google\Protobuf\Internal\Message * @param string $parent Required. The resource name of the * [Secret][google.cloud.secretmanager.v1.Secret] to associate with the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format - * `projects/*/secrets/*`. Please see + * `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. Please see * {@see SecretManagerServiceClient::secretName()} for help formatting this field. * @param \Google\Cloud\SecretManager\V1\SecretPayload $payload Required. The secret payload of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. @@ -63,7 +63,7 @@ public static function build(string $parent, \Google\Cloud\SecretManager\V1\Secr * Required. The resource name of the * [Secret][google.cloud.secretmanager.v1.Secret] to associate with the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format - * `projects/*/secrets/*`. + * `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. * @type \Google\Cloud\SecretManager\V1\SecretPayload $payload * Required. The secret payload of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. @@ -78,7 +78,7 @@ public function __construct($data = NULL) { * Required. The resource name of the * [Secret][google.cloud.secretmanager.v1.Secret] to associate with the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format - * `projects/*/secrets/*`. + * `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string @@ -92,7 +92,7 @@ public function getParent() * Required. The resource name of the * [Secret][google.cloud.secretmanager.v1.Secret] to associate with the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format - * `projects/*/secrets/*`. + * `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var diff --git a/SecretManager/src/V1/Client/SecretManagerServiceClient.php b/SecretManager/src/V1/Client/SecretManagerServiceClient.php index 3232855ab61f..d7041c336da1 100644 --- a/SecretManager/src/V1/Client/SecretManagerServiceClient.php +++ b/SecretManager/src/V1/Client/SecretManagerServiceClient.php @@ -136,6 +136,23 @@ private static function getClientDefaults() ]; } + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName(string $project, string $location): string + { + return self::getPathTemplate('location')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a project * resource. @@ -151,6 +168,82 @@ public static function projectName(string $project): string ]); } + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_secret resource. + * + * @param string $project + * @param string $location + * @param string $secret + * + * @return string The formatted project_location_secret resource. + */ + public static function projectLocationSecretName(string $project, string $location, string $secret): string + { + return self::getPathTemplate('projectLocationSecret')->render([ + 'project' => $project, + 'location' => $location, + 'secret' => $secret, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_secret_secret_version resource. + * + * @param string $project + * @param string $location + * @param string $secret + * @param string $secretVersion + * + * @return string The formatted project_location_secret_secret_version resource. + */ + public static function projectLocationSecretSecretVersionName(string $project, string $location, string $secret, string $secretVersion): string + { + return self::getPathTemplate('projectLocationSecretSecretVersion')->render([ + 'project' => $project, + 'location' => $location, + 'secret' => $secret, + 'secret_version' => $secretVersion, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_secret resource. + * + * @param string $project + * @param string $secret + * + * @return string The formatted project_secret resource. + */ + public static function projectSecretName(string $project, string $secret): string + { + return self::getPathTemplate('projectSecret')->render([ + 'project' => $project, + 'secret' => $secret, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_secret_secret_version resource. + * + * @param string $project + * @param string $secret + * @param string $secretVersion + * + * @return string The formatted project_secret_secret_version resource. + */ + public static function projectSecretSecretVersionName(string $project, string $secret, string $secretVersion): string + { + return self::getPathTemplate('projectSecretSecretVersion')->render([ + 'project' => $project, + 'secret' => $secret, + 'secret_version' => $secretVersion, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a secret * resource. @@ -208,7 +301,12 @@ public static function topicName(string $project, string $topic): string * Parses a formatted name string and returns an associative array of the components in the name. * The following name formats are supported: * Template: Pattern + * - location: projects/{project}/locations/{location} * - project: projects/{project} + * - projectLocationSecret: projects/{project}/locations/{location}/secrets/{secret} + * - projectLocationSecretSecretVersion: projects/{project}/locations/{location}/secrets/{secret}/versions/{secret_version} + * - projectSecret: projects/{project}/secrets/{secret} + * - projectSecretSecretVersion: projects/{project}/secrets/{secret}/versions/{secret_version} * - secret: projects/{project}/secrets/{secret} * - secretVersion: projects/{project}/secrets/{secret}/versions/{secret_version} * - topic: projects/{project}/topics/{topic} diff --git a/SecretManager/src/V1/CreateSecretRequest.php b/SecretManager/src/V1/CreateSecretRequest.php index df487a7b3aad..2047caaa1cfb 100644 --- a/SecretManager/src/V1/CreateSecretRequest.php +++ b/SecretManager/src/V1/CreateSecretRequest.php @@ -18,7 +18,8 @@ class CreateSecretRequest extends \Google\Protobuf\Internal\Message { /** * Required. The resource name of the project to associate with the - * [Secret][google.cloud.secretmanager.v1.Secret], in the format `projects/*`. + * [Secret][google.cloud.secretmanager.v1.Secret], in the format `projects/*` + * or `projects/*/locations/*`. * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ @@ -42,7 +43,8 @@ class CreateSecretRequest extends \Google\Protobuf\Internal\Message /** * @param string $parent Required. The resource name of the project to associate with the - * [Secret][google.cloud.secretmanager.v1.Secret], in the format `projects/*`. Please see + * [Secret][google.cloud.secretmanager.v1.Secret], in the format `projects/*` + * or `projects/*/locations/*`. Please see * {@see SecretManagerServiceClient::projectName()} for help formatting this field. * @param string $secretId Required. This must be unique within the project. * @@ -72,7 +74,8 @@ public static function build(string $parent, string $secretId, \Google\Cloud\Sec * * @type string $parent * Required. The resource name of the project to associate with the - * [Secret][google.cloud.secretmanager.v1.Secret], in the format `projects/*`. + * [Secret][google.cloud.secretmanager.v1.Secret], in the format `projects/*` + * or `projects/*/locations/*`. * @type string $secret_id * Required. This must be unique within the project. * A secret ID is a string with a maximum length of 255 characters and can @@ -90,7 +93,8 @@ public function __construct($data = NULL) { /** * Required. The resource name of the project to associate with the - * [Secret][google.cloud.secretmanager.v1.Secret], in the format `projects/*`. + * [Secret][google.cloud.secretmanager.v1.Secret], in the format `projects/*` + * or `projects/*/locations/*`. * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string @@ -102,7 +106,8 @@ public function getParent() /** * Required. The resource name of the project to associate with the - * [Secret][google.cloud.secretmanager.v1.Secret], in the format `projects/*`. + * [Secret][google.cloud.secretmanager.v1.Secret], in the format `projects/*` + * or `projects/*/locations/*`. * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var diff --git a/SecretManager/src/V1/DestroySecretVersionRequest.php b/SecretManager/src/V1/DestroySecretVersionRequest.php index 00eaf0dc2bb0..04d4aec6b7d6 100644 --- a/SecretManager/src/V1/DestroySecretVersionRequest.php +++ b/SecretManager/src/V1/DestroySecretVersionRequest.php @@ -19,7 +19,8 @@ class DestroySecretVersionRequest extends \Google\Protobuf\Internal\Message /** * Required. The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to destroy in - * the format `projects/*/secrets/*/versions/*`. + * the format `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ @@ -37,7 +38,8 @@ class DestroySecretVersionRequest extends \Google\Protobuf\Internal\Message /** * @param string $name Required. The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to destroy in - * the format `projects/*/secrets/*/versions/*`. Please see + * the format `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. Please see * {@see SecretManagerServiceClient::secretVersionName()} for help formatting this field. * * @return \Google\Cloud\SecretManager\V1\DestroySecretVersionRequest @@ -59,7 +61,8 @@ public static function build(string $name): self * @type string $name * Required. The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to destroy in - * the format `projects/*/secrets/*/versions/*`. + * the format `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. * @type string $etag * Optional. Etag of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request @@ -75,7 +78,8 @@ public function __construct($data = NULL) { /** * Required. The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to destroy in - * the format `projects/*/secrets/*/versions/*`. + * the format `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string @@ -88,7 +92,8 @@ public function getName() /** * Required. The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to destroy in - * the format `projects/*/secrets/*/versions/*`. + * the format `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var diff --git a/SecretManager/src/V1/DisableSecretVersionRequest.php b/SecretManager/src/V1/DisableSecretVersionRequest.php index fe7c574a3f2c..5662346c2c04 100644 --- a/SecretManager/src/V1/DisableSecretVersionRequest.php +++ b/SecretManager/src/V1/DisableSecretVersionRequest.php @@ -19,7 +19,8 @@ class DisableSecretVersionRequest extends \Google\Protobuf\Internal\Message /** * Required. The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to disable in - * the format `projects/*/secrets/*/versions/*`. + * the format `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ @@ -37,7 +38,8 @@ class DisableSecretVersionRequest extends \Google\Protobuf\Internal\Message /** * @param string $name Required. The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to disable in - * the format `projects/*/secrets/*/versions/*`. Please see + * the format `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. Please see * {@see SecretManagerServiceClient::secretVersionName()} for help formatting this field. * * @return \Google\Cloud\SecretManager\V1\DisableSecretVersionRequest @@ -59,7 +61,8 @@ public static function build(string $name): self * @type string $name * Required. The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to disable in - * the format `projects/*/secrets/*/versions/*`. + * the format `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. * @type string $etag * Optional. Etag of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request @@ -75,7 +78,8 @@ public function __construct($data = NULL) { /** * Required. The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to disable in - * the format `projects/*/secrets/*/versions/*`. + * the format `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string @@ -88,7 +92,8 @@ public function getName() /** * Required. The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to disable in - * the format `projects/*/secrets/*/versions/*`. + * the format `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var diff --git a/SecretManager/src/V1/EnableSecretVersionRequest.php b/SecretManager/src/V1/EnableSecretVersionRequest.php index 79bc681fadc6..306965874f85 100644 --- a/SecretManager/src/V1/EnableSecretVersionRequest.php +++ b/SecretManager/src/V1/EnableSecretVersionRequest.php @@ -19,7 +19,8 @@ class EnableSecretVersionRequest extends \Google\Protobuf\Internal\Message /** * Required. The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to enable in - * the format `projects/*/secrets/*/versions/*`. + * the format `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ @@ -37,7 +38,8 @@ class EnableSecretVersionRequest extends \Google\Protobuf\Internal\Message /** * @param string $name Required. The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to enable in - * the format `projects/*/secrets/*/versions/*`. Please see + * the format `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. Please see * {@see SecretManagerServiceClient::secretVersionName()} for help formatting this field. * * @return \Google\Cloud\SecretManager\V1\EnableSecretVersionRequest @@ -59,7 +61,8 @@ public static function build(string $name): self * @type string $name * Required. The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to enable in - * the format `projects/*/secrets/*/versions/*`. + * the format `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. * @type string $etag * Optional. Etag of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request @@ -75,7 +78,8 @@ public function __construct($data = NULL) { /** * Required. The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to enable in - * the format `projects/*/secrets/*/versions/*`. + * the format `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string @@ -88,7 +92,8 @@ public function getName() /** * Required. The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to enable in - * the format `projects/*/secrets/*/versions/*`. + * the format `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var diff --git a/SecretManager/src/V1/Gapic/SecretManagerServiceGapicClient.php b/SecretManager/src/V1/Gapic/SecretManagerServiceGapicClient.php index 72cebb265d8c..36f65f18c86a 100644 --- a/SecretManager/src/V1/Gapic/SecretManagerServiceGapicClient.php +++ b/SecretManager/src/V1/Gapic/SecretManagerServiceGapicClient.php @@ -117,8 +117,18 @@ class SecretManagerServiceGapicClient 'https://www.googleapis.com/auth/cloud-platform', ]; + private static $locationNameTemplate; + private static $projectNameTemplate; + private static $projectLocationSecretNameTemplate; + + private static $projectLocationSecretSecretVersionNameTemplate; + + private static $projectSecretNameTemplate; + + private static $projectSecretSecretVersionNameTemplate; + private static $secretNameTemplate; private static $secretVersionNameTemplate; @@ -146,6 +156,15 @@ private static function getClientDefaults() ]; } + private static function getLocationNameTemplate() + { + if (self::$locationNameTemplate == null) { + self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); + } + + return self::$locationNameTemplate; + } + private static function getProjectNameTemplate() { if (self::$projectNameTemplate == null) { @@ -155,6 +174,42 @@ private static function getProjectNameTemplate() return self::$projectNameTemplate; } + private static function getProjectLocationSecretNameTemplate() + { + if (self::$projectLocationSecretNameTemplate == null) { + self::$projectLocationSecretNameTemplate = new PathTemplate('projects/{project}/locations/{location}/secrets/{secret}'); + } + + return self::$projectLocationSecretNameTemplate; + } + + private static function getProjectLocationSecretSecretVersionNameTemplate() + { + if (self::$projectLocationSecretSecretVersionNameTemplate == null) { + self::$projectLocationSecretSecretVersionNameTemplate = new PathTemplate('projects/{project}/locations/{location}/secrets/{secret}/versions/{secret_version}'); + } + + return self::$projectLocationSecretSecretVersionNameTemplate; + } + + private static function getProjectSecretNameTemplate() + { + if (self::$projectSecretNameTemplate == null) { + self::$projectSecretNameTemplate = new PathTemplate('projects/{project}/secrets/{secret}'); + } + + return self::$projectSecretNameTemplate; + } + + private static function getProjectSecretSecretVersionNameTemplate() + { + if (self::$projectSecretSecretVersionNameTemplate == null) { + self::$projectSecretSecretVersionNameTemplate = new PathTemplate('projects/{project}/secrets/{secret}/versions/{secret_version}'); + } + + return self::$projectSecretSecretVersionNameTemplate; + } + private static function getSecretNameTemplate() { if (self::$secretNameTemplate == null) { @@ -186,7 +241,12 @@ private static function getPathTemplateMap() { if (self::$pathTemplateMap == null) { self::$pathTemplateMap = [ + 'location' => self::getLocationNameTemplate(), 'project' => self::getProjectNameTemplate(), + 'projectLocationSecret' => self::getProjectLocationSecretNameTemplate(), + 'projectLocationSecretSecretVersion' => self::getProjectLocationSecretSecretVersionNameTemplate(), + 'projectSecret' => self::getProjectSecretNameTemplate(), + 'projectSecretSecretVersion' => self::getProjectSecretSecretVersionNameTemplate(), 'secret' => self::getSecretNameTemplate(), 'secretVersion' => self::getSecretVersionNameTemplate(), 'topic' => self::getTopicNameTemplate(), @@ -196,6 +256,23 @@ private static function getPathTemplateMap() return self::$pathTemplateMap; } + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName($project, $location) + { + return self::getLocationNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a project * resource. @@ -211,6 +288,82 @@ public static function projectName($project) ]); } + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_secret resource. + * + * @param string $project + * @param string $location + * @param string $secret + * + * @return string The formatted project_location_secret resource. + */ + public static function projectLocationSecretName($project, $location, $secret) + { + return self::getProjectLocationSecretNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'secret' => $secret, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_secret_secret_version resource. + * + * @param string $project + * @param string $location + * @param string $secret + * @param string $secretVersion + * + * @return string The formatted project_location_secret_secret_version resource. + */ + public static function projectLocationSecretSecretVersionName($project, $location, $secret, $secretVersion) + { + return self::getProjectLocationSecretSecretVersionNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'secret' => $secret, + 'secret_version' => $secretVersion, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_secret resource. + * + * @param string $project + * @param string $secret + * + * @return string The formatted project_secret resource. + */ + public static function projectSecretName($project, $secret) + { + return self::getProjectSecretNameTemplate()->render([ + 'project' => $project, + 'secret' => $secret, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_secret_secret_version resource. + * + * @param string $project + * @param string $secret + * @param string $secretVersion + * + * @return string The formatted project_secret_secret_version resource. + */ + public static function projectSecretSecretVersionName($project, $secret, $secretVersion) + { + return self::getProjectSecretSecretVersionNameTemplate()->render([ + 'project' => $project, + 'secret' => $secret, + 'secret_version' => $secretVersion, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a secret * resource. @@ -268,7 +421,12 @@ public static function topicName($project, $topic) * Parses a formatted name string and returns an associative array of the components in the name. * The following name formats are supported: * Template: Pattern + * - location: projects/{project}/locations/{location} * - project: projects/{project} + * - projectLocationSecret: projects/{project}/locations/{location}/secrets/{secret} + * - projectLocationSecretSecretVersion: projects/{project}/locations/{location}/secrets/{secret}/versions/{secret_version} + * - projectSecret: projects/{project}/secrets/{secret} + * - projectSecretSecretVersion: projects/{project}/secrets/{secret}/versions/{secret_version} * - secret: projects/{project}/secrets/{secret} * - secretVersion: projects/{project}/secrets/{secret}/versions/{secret_version} * - topic: projects/{project}/topics/{topic} @@ -388,10 +546,13 @@ public function __construct(array $options = []) * * @param string $name Required. The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format - * `projects/*/secrets/*/versions/*`. + * `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. * - * `projects/*/secrets/*/versions/latest` is an alias to the most recently - * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. + * `projects/*/secrets/*/versions/latest` or + * `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most + * recently created + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. * @param array $optionalArgs { * Optional. * @@ -436,7 +597,7 @@ public function accessSecretVersion($name, array $optionalArgs = []) * @param string $parent Required. The resource name of the * [Secret][google.cloud.secretmanager.v1.Secret] to associate with the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format - * `projects/*/secrets/*`. + * `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. * @param SecretPayload $payload Required. The secret payload of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. * @param array $optionalArgs { @@ -482,7 +643,8 @@ public function addSecretVersion($parent, $payload, array $optionalArgs = []) * ``` * * @param string $parent Required. The resource name of the project to associate with the - * [Secret][google.cloud.secretmanager.v1.Secret], in the format `projects/*`. + * [Secret][google.cloud.secretmanager.v1.Secret], in the format `projects/*` + * or `projects/*/locations/*`. * @param string $secretId Required. This must be unique within the project. * * A secret ID is a string with a maximum length of 255 characters and can @@ -584,7 +746,8 @@ public function deleteSecret($name, array $optionalArgs = []) * * @param string $name Required. The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to destroy in - * the format `projects/*/secrets/*/versions/*`. + * the format `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. * @param array $optionalArgs { * Optional. * @@ -638,7 +801,8 @@ public function destroySecretVersion($name, array $optionalArgs = []) * * @param string $name Required. The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to disable in - * the format `projects/*/secrets/*/versions/*`. + * the format `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. * @param array $optionalArgs { * Optional. * @@ -692,7 +856,8 @@ public function disableSecretVersion($name, array $optionalArgs = []) * * @param string $name Required. The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to enable in - * the format `projects/*/secrets/*/versions/*`. + * the format `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. * @param array $optionalArgs { * Optional. * @@ -790,7 +955,7 @@ public function getIamPolicy($resource, array $optionalArgs = []) * * @param string $name Required. The resource name of the * [Secret][google.cloud.secretmanager.v1.Secret], in the format - * `projects/*/secrets/*`. + * `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. * @param array $optionalArgs { * Optional. * @@ -835,10 +1000,13 @@ public function getSecret($name, array $optionalArgs = []) * * @param string $name Required. The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format - * `projects/*/secrets/*/versions/*`. + * `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. * - * `projects/*/secrets/*/versions/latest` is an alias to the most recently - * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. + * `projects/*/secrets/*/versions/latest` or + * `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most + * recently created + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. * @param array $optionalArgs { * Optional. * @@ -893,7 +1061,7 @@ public function getSecretVersion($name, array $optionalArgs = []) * @param string $parent Required. The resource name of the * [Secret][google.cloud.secretmanager.v1.Secret] associated with the * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] to list, in - * the format `projects/*/secrets/*`. + * the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. * @param array $optionalArgs { * Optional. * @@ -972,8 +1140,8 @@ public function listSecretVersions($parent, array $optionalArgs = []) * ``` * * @param string $parent Required. The resource name of the project associated with the - * [Secrets][google.cloud.secretmanager.v1.Secret], in the format - * `projects/*`. + * [Secrets][google.cloud.secretmanager.v1.Secret], in the format `projects/*` + * or `projects/*/locations/*` * @param array $optionalArgs { * Optional. * diff --git a/SecretManager/src/V1/GetSecretRequest.php b/SecretManager/src/V1/GetSecretRequest.php index 90f8705c6adb..ef2cd694b906 100644 --- a/SecretManager/src/V1/GetSecretRequest.php +++ b/SecretManager/src/V1/GetSecretRequest.php @@ -19,7 +19,7 @@ class GetSecretRequest extends \Google\Protobuf\Internal\Message /** * Required. The resource name of the * [Secret][google.cloud.secretmanager.v1.Secret], in the format - * `projects/*/secrets/*`. + * `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ @@ -28,7 +28,7 @@ class GetSecretRequest extends \Google\Protobuf\Internal\Message /** * @param string $name Required. The resource name of the * [Secret][google.cloud.secretmanager.v1.Secret], in the format - * `projects/*/secrets/*`. Please see + * `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. Please see * {@see SecretManagerServiceClient::secretName()} for help formatting this field. * * @return \Google\Cloud\SecretManager\V1\GetSecretRequest @@ -50,7 +50,7 @@ public static function build(string $name): self * @type string $name * Required. The resource name of the * [Secret][google.cloud.secretmanager.v1.Secret], in the format - * `projects/*/secrets/*`. + * `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. * } */ public function __construct($data = NULL) { @@ -61,7 +61,7 @@ public function __construct($data = NULL) { /** * Required. The resource name of the * [Secret][google.cloud.secretmanager.v1.Secret], in the format - * `projects/*/secrets/*`. + * `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string @@ -74,7 +74,7 @@ public function getName() /** * Required. The resource name of the * [Secret][google.cloud.secretmanager.v1.Secret], in the format - * `projects/*/secrets/*`. + * `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var diff --git a/SecretManager/src/V1/GetSecretVersionRequest.php b/SecretManager/src/V1/GetSecretVersionRequest.php index 6ac5e42e7fd2..d0788e670269 100644 --- a/SecretManager/src/V1/GetSecretVersionRequest.php +++ b/SecretManager/src/V1/GetSecretVersionRequest.php @@ -19,9 +19,12 @@ class GetSecretVersionRequest extends \Google\Protobuf\Internal\Message /** * Required. The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format - * `projects/*/secrets/*/versions/*`. - * `projects/*/secrets/*/versions/latest` is an alias to the most recently - * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. + * `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. + * `projects/*/secrets/*/versions/latest` or + * `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most + * recently created + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ @@ -30,10 +33,13 @@ class GetSecretVersionRequest extends \Google\Protobuf\Internal\Message /** * @param string $name Required. The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format - * `projects/*/secrets/*/versions/*`. + * `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. * - * `projects/*/secrets/*/versions/latest` is an alias to the most recently - * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. Please see + * `projects/*/secrets/*/versions/latest` or + * `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most + * recently created + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. Please see * {@see SecretManagerServiceClient::secretVersionName()} for help formatting this field. * * @return \Google\Cloud\SecretManager\V1\GetSecretVersionRequest @@ -55,9 +61,12 @@ public static function build(string $name): self * @type string $name * Required. The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format - * `projects/*/secrets/*/versions/*`. - * `projects/*/secrets/*/versions/latest` is an alias to the most recently - * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. + * `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. + * `projects/*/secrets/*/versions/latest` or + * `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most + * recently created + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. * } */ public function __construct($data = NULL) { @@ -68,9 +77,12 @@ public function __construct($data = NULL) { /** * Required. The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format - * `projects/*/secrets/*/versions/*`. - * `projects/*/secrets/*/versions/latest` is an alias to the most recently - * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. + * `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. + * `projects/*/secrets/*/versions/latest` or + * `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most + * recently created + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string @@ -83,9 +95,12 @@ public function getName() /** * Required. The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format - * `projects/*/secrets/*/versions/*`. - * `projects/*/secrets/*/versions/latest` is an alias to the most recently - * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. + * `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. + * `projects/*/secrets/*/versions/latest` or + * `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most + * recently created + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var diff --git a/SecretManager/src/V1/ListSecretVersionsRequest.php b/SecretManager/src/V1/ListSecretVersionsRequest.php index 4053e960474e..13cee276dd74 100644 --- a/SecretManager/src/V1/ListSecretVersionsRequest.php +++ b/SecretManager/src/V1/ListSecretVersionsRequest.php @@ -20,7 +20,7 @@ class ListSecretVersionsRequest extends \Google\Protobuf\Internal\Message * Required. The resource name of the * [Secret][google.cloud.secretmanager.v1.Secret] associated with the * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] to list, in - * the format `projects/*/secrets/*`. + * the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ @@ -55,7 +55,7 @@ class ListSecretVersionsRequest extends \Google\Protobuf\Internal\Message * @param string $parent Required. The resource name of the * [Secret][google.cloud.secretmanager.v1.Secret] associated with the * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] to list, in - * the format `projects/*/secrets/*`. Please see + * the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. Please see * {@see SecretManagerServiceClient::secretName()} for help formatting this field. * * @return \Google\Cloud\SecretManager\V1\ListSecretVersionsRequest @@ -78,7 +78,7 @@ public static function build(string $parent): self * Required. The resource name of the * [Secret][google.cloud.secretmanager.v1.Secret] associated with the * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] to list, in - * the format `projects/*/secrets/*`. + * the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. * @type int $page_size * Optional. The maximum number of results to be returned in a single page. If * set to 0, the server decides the number of results to return. If the @@ -103,7 +103,7 @@ public function __construct($data = NULL) { * Required. The resource name of the * [Secret][google.cloud.secretmanager.v1.Secret] associated with the * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] to list, in - * the format `projects/*/secrets/*`. + * the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string @@ -117,7 +117,7 @@ public function getParent() * Required. The resource name of the * [Secret][google.cloud.secretmanager.v1.Secret] associated with the * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] to list, in - * the format `projects/*/secrets/*`. + * the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var diff --git a/SecretManager/src/V1/ListSecretVersionsResponse.php b/SecretManager/src/V1/ListSecretVersionsResponse.php index 22df5857848e..ed985751b8eb 100644 --- a/SecretManager/src/V1/ListSecretVersionsResponse.php +++ b/SecretManager/src/V1/ListSecretVersionsResponse.php @@ -33,7 +33,10 @@ class ListSecretVersionsResponse extends \Google\Protobuf\Internal\Message private $next_page_token = ''; /** * The total number of - * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion]. + * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] but 0 when + * the + * [ListSecretsRequest.filter][google.cloud.secretmanager.v1.ListSecretsRequest.filter] + * field is set. * * Generated from protobuf field int32 total_size = 3; */ @@ -54,7 +57,10 @@ class ListSecretVersionsResponse extends \Google\Protobuf\Internal\Message * to retrieve the next page. * @type int $total_size * The total number of - * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion]. + * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] but 0 when + * the + * [ListSecretsRequest.filter][google.cloud.secretmanager.v1.ListSecretsRequest.filter] + * field is set. * } */ public function __construct($data = NULL) { @@ -122,7 +128,10 @@ public function setNextPageToken($var) /** * The total number of - * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion]. + * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] but 0 when + * the + * [ListSecretsRequest.filter][google.cloud.secretmanager.v1.ListSecretsRequest.filter] + * field is set. * * Generated from protobuf field int32 total_size = 3; * @return int @@ -134,7 +143,10 @@ public function getTotalSize() /** * The total number of - * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion]. + * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] but 0 when + * the + * [ListSecretsRequest.filter][google.cloud.secretmanager.v1.ListSecretsRequest.filter] + * field is set. * * Generated from protobuf field int32 total_size = 3; * @param int $var diff --git a/SecretManager/src/V1/ListSecretsRequest.php b/SecretManager/src/V1/ListSecretsRequest.php index b86481071939..0745e9613c9d 100644 --- a/SecretManager/src/V1/ListSecretsRequest.php +++ b/SecretManager/src/V1/ListSecretsRequest.php @@ -18,8 +18,8 @@ class ListSecretsRequest extends \Google\Protobuf\Internal\Message { /** * Required. The resource name of the project associated with the - * [Secrets][google.cloud.secretmanager.v1.Secret], in the format - * `projects/*`. + * [Secrets][google.cloud.secretmanager.v1.Secret], in the format `projects/*` + * or `projects/*/locations/*` * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ @@ -52,9 +52,9 @@ class ListSecretsRequest extends \Google\Protobuf\Internal\Message /** * @param string $parent Required. The resource name of the project associated with the - * [Secrets][google.cloud.secretmanager.v1.Secret], in the format - * `projects/*`. Please see - * {@see SecretManagerServiceClient::projectName()} for help formatting this field. + * [Secrets][google.cloud.secretmanager.v1.Secret], in the format `projects/*` + * or `projects/*/locations/*` + * Please see {@see SecretManagerServiceClient::projectName()} for help formatting this field. * * @return \Google\Cloud\SecretManager\V1\ListSecretsRequest * @@ -74,8 +74,8 @@ public static function build(string $parent): self * * @type string $parent * Required. The resource name of the project associated with the - * [Secrets][google.cloud.secretmanager.v1.Secret], in the format - * `projects/*`. + * [Secrets][google.cloud.secretmanager.v1.Secret], in the format `projects/*` + * or `projects/*/locations/*` * @type int $page_size * Optional. The maximum number of results to be returned in a single page. If * set to 0, the server decides the number of results to return. If the @@ -98,8 +98,8 @@ public function __construct($data = NULL) { /** * Required. The resource name of the project associated with the - * [Secrets][google.cloud.secretmanager.v1.Secret], in the format - * `projects/*`. + * [Secrets][google.cloud.secretmanager.v1.Secret], in the format `projects/*` + * or `projects/*/locations/*` * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string @@ -111,8 +111,8 @@ public function getParent() /** * Required. The resource name of the project associated with the - * [Secrets][google.cloud.secretmanager.v1.Secret], in the format - * `projects/*`. + * [Secrets][google.cloud.secretmanager.v1.Secret], in the format `projects/*` + * or `projects/*/locations/*` * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var diff --git a/SecretManager/src/V1/ListSecretsResponse.php b/SecretManager/src/V1/ListSecretsResponse.php index 0dfe831310d1..a147839fd2ef 100644 --- a/SecretManager/src/V1/ListSecretsResponse.php +++ b/SecretManager/src/V1/ListSecretsResponse.php @@ -32,7 +32,10 @@ class ListSecretsResponse extends \Google\Protobuf\Internal\Message */ private $next_page_token = ''; /** - * The total number of [Secrets][google.cloud.secretmanager.v1.Secret]. + * The total number of [Secrets][google.cloud.secretmanager.v1.Secret] but 0 + * when the + * [ListSecretsRequest.filter][google.cloud.secretmanager.v1.ListSecretsRequest.filter] + * field is set. * * Generated from protobuf field int32 total_size = 3; */ @@ -52,7 +55,10 @@ class ListSecretsResponse extends \Google\Protobuf\Internal\Message * [ListSecretsRequest.page_token][google.cloud.secretmanager.v1.ListSecretsRequest.page_token] * to retrieve the next page. * @type int $total_size - * The total number of [Secrets][google.cloud.secretmanager.v1.Secret]. + * The total number of [Secrets][google.cloud.secretmanager.v1.Secret] but 0 + * when the + * [ListSecretsRequest.filter][google.cloud.secretmanager.v1.ListSecretsRequest.filter] + * field is set. * } */ public function __construct($data = NULL) { @@ -119,7 +125,10 @@ public function setNextPageToken($var) } /** - * The total number of [Secrets][google.cloud.secretmanager.v1.Secret]. + * The total number of [Secrets][google.cloud.secretmanager.v1.Secret] but 0 + * when the + * [ListSecretsRequest.filter][google.cloud.secretmanager.v1.ListSecretsRequest.filter] + * field is set. * * Generated from protobuf field int32 total_size = 3; * @return int @@ -130,7 +139,10 @@ public function getTotalSize() } /** - * The total number of [Secrets][google.cloud.secretmanager.v1.Secret]. + * The total number of [Secrets][google.cloud.secretmanager.v1.Secret] but 0 + * when the + * [ListSecretsRequest.filter][google.cloud.secretmanager.v1.ListSecretsRequest.filter] + * field is set. * * Generated from protobuf field int32 total_size = 3; * @param int $var diff --git a/SecretManager/src/V1/Secret.php b/SecretManager/src/V1/Secret.php index b8c8dd8514cf..ea3c57532afa 100644 --- a/SecretManager/src/V1/Secret.php +++ b/SecretManager/src/V1/Secret.php @@ -28,11 +28,11 @@ class Secret extends \Google\Protobuf\Internal\Message */ private $name = ''; /** - * Required. Immutable. The replication policy of the secret data attached to + * Optional. Immutable. The replication policy of the secret data attached to * the [Secret][google.cloud.secretmanager.v1.Secret]. * The replication policy cannot be changed after the Secret has been created. * - * Generated from protobuf field .google.cloud.secretmanager.v1.Replication replication = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field .google.cloud.secretmanager.v1.Replication replication = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; */ private $replication = null; /** @@ -85,7 +85,7 @@ class Secret extends \Google\Protobuf\Internal\Message * letter and cannot be the string 'latest' or 'NEW'. * No more than 50 aliases can be assigned to a given secret. * Version-Alias pairs will be viewable via GetSecret and modifiable via - * UpdateSecret. At launch access by alias will only be supported on + * UpdateSecret. Access by alias is only be supported on * GetSecretVersion and AccessSecretVersion. * * Generated from protobuf field map version_aliases = 11 [(.google.api.field_behavior) = OPTIONAL]; @@ -105,6 +105,29 @@ class Secret extends \Google\Protobuf\Internal\Message * Generated from protobuf field map annotations = 13 [(.google.api.field_behavior) = OPTIONAL]; */ private $annotations; + /** + * Optional. Secret Version TTL after destruction request + * This is a part of the Delayed secret version destroy feature. + * For secret with TTL>0, version destruction doesn't happen immediately + * on calling destroy instead the version goes to a disabled state and + * destruction happens after the TTL expires. + * + * Generated from protobuf field .google.protobuf.Duration version_destroy_ttl = 14 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $version_destroy_ttl = null; + /** + * Optional. The customer-managed encryption configuration of the Regionalised + * Secrets. If no configuration is provided, Google-managed default encryption + * is used. + * Updates to the [Secret][google.cloud.secretmanager.v1.Secret] encryption + * configuration only apply to + * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] added + * afterwards. They do not apply retroactively to existing + * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion]. + * + * Generated from protobuf field .google.cloud.secretmanager.v1.CustomerManagedEncryption customer_managed_encryption = 15 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $customer_managed_encryption = null; protected $expiration; /** @@ -118,7 +141,7 @@ class Secret extends \Google\Protobuf\Internal\Message * [Secret][google.cloud.secretmanager.v1.Secret] in the format * `projects/*/secrets/*`. * @type \Google\Cloud\SecretManager\V1\Replication $replication - * Required. Immutable. The replication policy of the secret data attached to + * Optional. Immutable. The replication policy of the secret data attached to * the [Secret][google.cloud.secretmanager.v1.Secret]. * The replication policy cannot be changed after the Secret has been created. * @type \Google\Protobuf\Timestamp $create_time @@ -158,7 +181,7 @@ class Secret extends \Google\Protobuf\Internal\Message * letter and cannot be the string 'latest' or 'NEW'. * No more than 50 aliases can be assigned to a given secret. * Version-Alias pairs will be viewable via GetSecret and modifiable via - * UpdateSecret. At launch access by alias will only be supported on + * UpdateSecret. Access by alias is only be supported on * GetSecretVersion and AccessSecretVersion. * @type array|\Google\Protobuf\Internal\MapField $annotations * Optional. Custom metadata about the secret. @@ -170,6 +193,21 @@ class Secret extends \Google\Protobuf\Internal\Message * ([a-z0-9A-Z]), and may have dashes (-), underscores (_), dots (.), and * alphanumerics in between these symbols. * The total size of annotation keys and values must be less than 16KiB. + * @type \Google\Protobuf\Duration $version_destroy_ttl + * Optional. Secret Version TTL after destruction request + * This is a part of the Delayed secret version destroy feature. + * For secret with TTL>0, version destruction doesn't happen immediately + * on calling destroy instead the version goes to a disabled state and + * destruction happens after the TTL expires. + * @type \Google\Cloud\SecretManager\V1\CustomerManagedEncryption $customer_managed_encryption + * Optional. The customer-managed encryption configuration of the Regionalised + * Secrets. If no configuration is provided, Google-managed default encryption + * is used. + * Updates to the [Secret][google.cloud.secretmanager.v1.Secret] encryption + * configuration only apply to + * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] added + * afterwards. They do not apply retroactively to existing + * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion]. * } */ public function __construct($data = NULL) { @@ -208,11 +246,11 @@ public function setName($var) } /** - * Required. Immutable. The replication policy of the secret data attached to + * Optional. Immutable. The replication policy of the secret data attached to * the [Secret][google.cloud.secretmanager.v1.Secret]. * The replication policy cannot be changed after the Secret has been created. * - * Generated from protobuf field .google.cloud.secretmanager.v1.Replication replication = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field .google.cloud.secretmanager.v1.Replication replication = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; * @return \Google\Cloud\SecretManager\V1\Replication|null */ public function getReplication() @@ -231,11 +269,11 @@ public function clearReplication() } /** - * Required. Immutable. The replication policy of the secret data attached to + * Optional. Immutable. The replication policy of the secret data attached to * the [Secret][google.cloud.secretmanager.v1.Secret]. * The replication policy cannot be changed after the Secret has been created. * - * Generated from protobuf field .google.cloud.secretmanager.v1.Replication replication = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field .google.cloud.secretmanager.v1.Replication replication = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; * @param \Google\Cloud\SecretManager\V1\Replication $var * @return $this */ @@ -497,7 +535,7 @@ public function setRotation($var) * letter and cannot be the string 'latest' or 'NEW'. * No more than 50 aliases can be assigned to a given secret. * Version-Alias pairs will be viewable via GetSecret and modifiable via - * UpdateSecret. At launch access by alias will only be supported on + * UpdateSecret. Access by alias is only be supported on * GetSecretVersion and AccessSecretVersion. * * Generated from protobuf field map version_aliases = 11 [(.google.api.field_behavior) = OPTIONAL]; @@ -516,7 +554,7 @@ public function getVersionAliases() * letter and cannot be the string 'latest' or 'NEW'. * No more than 50 aliases can be assigned to a given secret. * Version-Alias pairs will be viewable via GetSecret and modifiable via - * UpdateSecret. At launch access by alias will only be supported on + * UpdateSecret. Access by alias is only be supported on * GetSecretVersion and AccessSecretVersion. * * Generated from protobuf field map version_aliases = 11 [(.google.api.field_behavior) = OPTIONAL]; @@ -573,6 +611,100 @@ public function setAnnotations($var) return $this; } + /** + * Optional. Secret Version TTL after destruction request + * This is a part of the Delayed secret version destroy feature. + * For secret with TTL>0, version destruction doesn't happen immediately + * on calling destroy instead the version goes to a disabled state and + * destruction happens after the TTL expires. + * + * Generated from protobuf field .google.protobuf.Duration version_destroy_ttl = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Duration|null + */ + public function getVersionDestroyTtl() + { + return $this->version_destroy_ttl; + } + + public function hasVersionDestroyTtl() + { + return isset($this->version_destroy_ttl); + } + + public function clearVersionDestroyTtl() + { + unset($this->version_destroy_ttl); + } + + /** + * Optional. Secret Version TTL after destruction request + * This is a part of the Delayed secret version destroy feature. + * For secret with TTL>0, version destruction doesn't happen immediately + * on calling destroy instead the version goes to a disabled state and + * destruction happens after the TTL expires. + * + * Generated from protobuf field .google.protobuf.Duration version_destroy_ttl = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setVersionDestroyTtl($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->version_destroy_ttl = $var; + + return $this; + } + + /** + * Optional. The customer-managed encryption configuration of the Regionalised + * Secrets. If no configuration is provided, Google-managed default encryption + * is used. + * Updates to the [Secret][google.cloud.secretmanager.v1.Secret] encryption + * configuration only apply to + * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] added + * afterwards. They do not apply retroactively to existing + * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion]. + * + * Generated from protobuf field .google.cloud.secretmanager.v1.CustomerManagedEncryption customer_managed_encryption = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\SecretManager\V1\CustomerManagedEncryption|null + */ + public function getCustomerManagedEncryption() + { + return $this->customer_managed_encryption; + } + + public function hasCustomerManagedEncryption() + { + return isset($this->customer_managed_encryption); + } + + public function clearCustomerManagedEncryption() + { + unset($this->customer_managed_encryption); + } + + /** + * Optional. The customer-managed encryption configuration of the Regionalised + * Secrets. If no configuration is provided, Google-managed default encryption + * is used. + * Updates to the [Secret][google.cloud.secretmanager.v1.Secret] encryption + * configuration only apply to + * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] added + * afterwards. They do not apply retroactively to existing + * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion]. + * + * Generated from protobuf field .google.cloud.secretmanager.v1.CustomerManagedEncryption customer_managed_encryption = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\SecretManager\V1\CustomerManagedEncryption $var + * @return $this + */ + public function setCustomerManagedEncryption($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecretManager\V1\CustomerManagedEncryption::class); + $this->customer_managed_encryption = $var; + + return $this; + } + /** * @return string */ diff --git a/SecretManager/src/V1/SecretVersion.php b/SecretManager/src/V1/SecretVersion.php index 2782b22c7e39..778619b5cb07 100644 --- a/SecretManager/src/V1/SecretVersion.php +++ b/SecretManager/src/V1/SecretVersion.php @@ -75,6 +75,26 @@ class SecretVersion extends \Google\Protobuf\Internal\Message * Generated from protobuf field bool client_specified_payload_checksum = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ private $client_specified_payload_checksum = false; + /** + * Optional. Output only. Scheduled destroy time for secret version. + * This is a part of the Delayed secret version destroy feature. For a + * Secret with a valid version destroy TTL, when a secert version is + * destroyed, the version is moved to disabled state and it is scheduled for + * destruction. The version is destroyed only after the + * `scheduled_destroy_time`. + * + * Generated from protobuf field .google.protobuf.Timestamp scheduled_destroy_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $scheduled_destroy_time = null; + /** + * Output only. The customer-managed encryption status of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. Only + * populated if customer-managed encryption is used and + * [Secret][google.cloud.secretmanager.v1.Secret] is a Regionalised Secret. + * + * Generated from protobuf field .google.cloud.secretmanager.v1.CustomerManagedEncryptionStatus customer_managed_encryption = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $customer_managed_encryption = null; /** * Constructor. @@ -114,6 +134,18 @@ class SecretVersion extends \Google\Protobuf\Internal\Message * [SecretManagerService][google.cloud.secretmanager.v1.SecretManagerService] * on * [SecretManagerService.AddSecretVersion][google.cloud.secretmanager.v1.SecretManagerService.AddSecretVersion]. + * @type \Google\Protobuf\Timestamp $scheduled_destroy_time + * Optional. Output only. Scheduled destroy time for secret version. + * This is a part of the Delayed secret version destroy feature. For a + * Secret with a valid version destroy TTL, when a secert version is + * destroyed, the version is moved to disabled state and it is scheduled for + * destruction. The version is destroyed only after the + * `scheduled_destroy_time`. + * @type \Google\Cloud\SecretManager\V1\CustomerManagedEncryptionStatus $customer_managed_encryption + * Output only. The customer-managed encryption status of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. Only + * populated if customer-managed encryption is used and + * [Secret][google.cloud.secretmanager.v1.Secret] is a Regionalised Secret. * } */ public function __construct($data = NULL) { @@ -369,5 +401,93 @@ public function setClientSpecifiedPayloadChecksum($var) return $this; } + /** + * Optional. Output only. Scheduled destroy time for secret version. + * This is a part of the Delayed secret version destroy feature. For a + * Secret with a valid version destroy TTL, when a secert version is + * destroyed, the version is moved to disabled state and it is scheduled for + * destruction. The version is destroyed only after the + * `scheduled_destroy_time`. + * + * Generated from protobuf field .google.protobuf.Timestamp scheduled_destroy_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getScheduledDestroyTime() + { + return $this->scheduled_destroy_time; + } + + public function hasScheduledDestroyTime() + { + return isset($this->scheduled_destroy_time); + } + + public function clearScheduledDestroyTime() + { + unset($this->scheduled_destroy_time); + } + + /** + * Optional. Output only. Scheduled destroy time for secret version. + * This is a part of the Delayed secret version destroy feature. For a + * Secret with a valid version destroy TTL, when a secert version is + * destroyed, the version is moved to disabled state and it is scheduled for + * destruction. The version is destroyed only after the + * `scheduled_destroy_time`. + * + * Generated from protobuf field .google.protobuf.Timestamp scheduled_destroy_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setScheduledDestroyTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->scheduled_destroy_time = $var; + + return $this; + } + + /** + * Output only. The customer-managed encryption status of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. Only + * populated if customer-managed encryption is used and + * [Secret][google.cloud.secretmanager.v1.Secret] is a Regionalised Secret. + * + * Generated from protobuf field .google.cloud.secretmanager.v1.CustomerManagedEncryptionStatus customer_managed_encryption = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\SecretManager\V1\CustomerManagedEncryptionStatus|null + */ + public function getCustomerManagedEncryption() + { + return $this->customer_managed_encryption; + } + + public function hasCustomerManagedEncryption() + { + return isset($this->customer_managed_encryption); + } + + public function clearCustomerManagedEncryption() + { + unset($this->customer_managed_encryption); + } + + /** + * Output only. The customer-managed encryption status of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. Only + * populated if customer-managed encryption is used and + * [Secret][google.cloud.secretmanager.v1.Secret] is a Regionalised Secret. + * + * Generated from protobuf field .google.cloud.secretmanager.v1.CustomerManagedEncryptionStatus customer_managed_encryption = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\SecretManager\V1\CustomerManagedEncryptionStatus $var + * @return $this + */ + public function setCustomerManagedEncryption($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecretManager\V1\CustomerManagedEncryptionStatus::class); + $this->customer_managed_encryption = $var; + + return $this; + } + } diff --git a/SecretManager/src/V1/Topic.php b/SecretManager/src/V1/Topic.php index 7c8138533aed..37c0b0adb94f 100644 --- a/SecretManager/src/V1/Topic.php +++ b/SecretManager/src/V1/Topic.php @@ -19,8 +19,9 @@ class Topic extends \Google\Protobuf\Internal\Message /** * Required. The resource name of the Pub/Sub topic that will be published to, * in the following format: `projects/*/topics/*`. For publication to succeed, - * the Secret Manager P4SA must have `pubsub.publisher` permissions on the - * topic. + * the Secret Manager service agent must have the `pubsub.topic.publish` + * permission on the topic. The Pub/Sub Publisher role + * (`roles/pubsub.publisher`) includes this permission. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; */ @@ -35,8 +36,9 @@ class Topic extends \Google\Protobuf\Internal\Message * @type string $name * Required. The resource name of the Pub/Sub topic that will be published to, * in the following format: `projects/*/topics/*`. For publication to succeed, - * the Secret Manager P4SA must have `pubsub.publisher` permissions on the - * topic. + * the Secret Manager service agent must have the `pubsub.topic.publish` + * permission on the topic. The Pub/Sub Publisher role + * (`roles/pubsub.publisher`) includes this permission. * } */ public function __construct($data = NULL) { @@ -47,8 +49,9 @@ public function __construct($data = NULL) { /** * Required. The resource name of the Pub/Sub topic that will be published to, * in the following format: `projects/*/topics/*`. For publication to succeed, - * the Secret Manager P4SA must have `pubsub.publisher` permissions on the - * topic. + * the Secret Manager service agent must have the `pubsub.topic.publish` + * permission on the topic. The Pub/Sub Publisher role + * (`roles/pubsub.publisher`) includes this permission. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; * @return string @@ -61,8 +64,9 @@ public function getName() /** * Required. The resource name of the Pub/Sub topic that will be published to, * in the following format: `projects/*/topics/*`. For publication to succeed, - * the Secret Manager P4SA must have `pubsub.publisher` permissions on the - * topic. + * the Secret Manager service agent must have the `pubsub.topic.publish` + * permission on the topic. The Pub/Sub Publisher role + * (`roles/pubsub.publisher`) includes this permission. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; * @param string $var diff --git a/SecretManager/src/V1/resources/secret_manager_service_descriptor_config.php b/SecretManager/src/V1/resources/secret_manager_service_descriptor_config.php index fc12f035380c..17c40a342374 100644 --- a/SecretManager/src/V1/resources/secret_manager_service_descriptor_config.php +++ b/SecretManager/src/V1/resources/secret_manager_service_descriptor_config.php @@ -221,7 +221,12 @@ ], ], 'templateMap' => [ + 'location' => 'projects/{project}/locations/{location}', 'project' => 'projects/{project}', + 'projectLocationSecret' => 'projects/{project}/locations/{location}/secrets/{secret}', + 'projectLocationSecretSecretVersion' => 'projects/{project}/locations/{location}/secrets/{secret}/versions/{secret_version}', + 'projectSecret' => 'projects/{project}/secrets/{secret}', + 'projectSecretSecretVersion' => 'projects/{project}/secrets/{secret}/versions/{secret_version}', 'secret' => 'projects/{project}/secrets/{secret}', 'secretVersion' => 'projects/{project}/secrets/{secret}/versions/{secret_version}', 'topic' => 'projects/{project}/topics/{topic}', diff --git a/SecretManager/src/V1/resources/secret_manager_service_rest_client_config.php b/SecretManager/src/V1/resources/secret_manager_service_rest_client_config.php index 02f86aaecf44..6dc68c1b4731 100644 --- a/SecretManager/src/V1/resources/secret_manager_service_rest_client_config.php +++ b/SecretManager/src/V1/resources/secret_manager_service_rest_client_config.php @@ -50,6 +50,12 @@ 'AccessSecretVersion' => [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/secrets/*/versions/*}:access', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/secrets/*/versions/*}:access', + ], + ], 'placeholders' => [ 'name' => [ 'getters' => [ @@ -62,6 +68,13 @@ 'method' => 'post', 'uriTemplate' => '/v1/{parent=projects/*/secrets/*}:addVersion', 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/secrets/*}:addVersion', + 'body' => '*', + ], + ], 'placeholders' => [ 'parent' => [ 'getters' => [ @@ -74,6 +87,16 @@ 'method' => 'post', 'uriTemplate' => '/v1/{parent=projects/*}/secrets', 'body' => 'secret', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/secrets', + 'body' => 'secret', + 'queryParams' => [ + 'secret_id', + ], + ], + ], 'placeholders' => [ 'parent' => [ 'getters' => [ @@ -88,6 +111,12 @@ 'DeleteSecret' => [ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/secrets/*}', + 'additionalBindings' => [ + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/secrets/*}', + ], + ], 'placeholders' => [ 'name' => [ 'getters' => [ @@ -100,6 +129,13 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/secrets/*/versions/*}:destroy', 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/secrets/*/versions/*}:destroy', + 'body' => '*', + ], + ], 'placeholders' => [ 'name' => [ 'getters' => [ @@ -112,6 +148,13 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/secrets/*/versions/*}:disable', 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/secrets/*/versions/*}:disable', + 'body' => '*', + ], + ], 'placeholders' => [ 'name' => [ 'getters' => [ @@ -124,6 +167,13 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/secrets/*/versions/*}:enable', 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/secrets/*/versions/*}:enable', + 'body' => '*', + ], + ], 'placeholders' => [ 'name' => [ 'getters' => [ @@ -135,6 +185,12 @@ 'GetIamPolicy' => [ 'method' => 'get', 'uriTemplate' => '/v1/{resource=projects/*/secrets/*}:getIamPolicy', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/secrets/*}:getIamPolicy', + ], + ], 'placeholders' => [ 'resource' => [ 'getters' => [ @@ -146,6 +202,12 @@ 'GetSecret' => [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/secrets/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/secrets/*}', + ], + ], 'placeholders' => [ 'name' => [ 'getters' => [ @@ -157,6 +219,12 @@ 'GetSecretVersion' => [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/secrets/*/versions/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/secrets/*/versions/*}', + ], + ], 'placeholders' => [ 'name' => [ 'getters' => [ @@ -168,6 +236,12 @@ 'ListSecretVersions' => [ 'method' => 'get', 'uriTemplate' => '/v1/{parent=projects/*/secrets/*}/versions', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/secrets/*}/versions', + ], + ], 'placeholders' => [ 'parent' => [ 'getters' => [ @@ -179,6 +253,12 @@ 'ListSecrets' => [ 'method' => 'get', 'uriTemplate' => '/v1/{parent=projects/*}/secrets', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/secrets', + ], + ], 'placeholders' => [ 'parent' => [ 'getters' => [ @@ -191,6 +271,13 @@ 'method' => 'post', 'uriTemplate' => '/v1/{resource=projects/*/secrets/*}:setIamPolicy', 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/secrets/*}:setIamPolicy', + 'body' => '*', + ], + ], 'placeholders' => [ 'resource' => [ 'getters' => [ @@ -203,6 +290,13 @@ 'method' => 'post', 'uriTemplate' => '/v1/{resource=projects/*/secrets/*}:testIamPermissions', 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/secrets/*}:testIamPermissions', + 'body' => '*', + ], + ], 'placeholders' => [ 'resource' => [ 'getters' => [ @@ -215,6 +309,16 @@ 'method' => 'patch', 'uriTemplate' => '/v1/{secret.name=projects/*/secrets/*}', 'body' => 'secret', + 'additionalBindings' => [ + [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{secret.name=projects/*/locations/*/secrets/*}', + 'body' => 'secret', + 'queryParams' => [ + 'update_mask', + ], + ], + ], 'placeholders' => [ 'secret.name' => [ 'getters' => [ diff --git a/SecretManager/tests/Unit/V1/Client/SecretManagerServiceClientTest.php b/SecretManager/tests/Unit/V1/Client/SecretManagerServiceClientTest.php index bbbb3fa93d16..7f5b590fa420 100644 --- a/SecretManager/tests/Unit/V1/Client/SecretManagerServiceClientTest.php +++ b/SecretManager/tests/Unit/V1/Client/SecretManagerServiceClientTest.php @@ -46,7 +46,6 @@ use Google\Cloud\SecretManager\V1\ListSecretVersionsResponse; use Google\Cloud\SecretManager\V1\ListSecretsRequest; use Google\Cloud\SecretManager\V1\ListSecretsResponse; -use Google\Cloud\SecretManager\V1\Replication; use Google\Cloud\SecretManager\V1\Secret; use Google\Cloud\SecretManager\V1\SecretPayload; use Google\Cloud\SecretManager\V1\SecretVersion; @@ -241,8 +240,6 @@ public function createSecretTest() $formattedParent = $gapicClient->projectName('[PROJECT]'); $secretId = 'secretId-739547894'; $secret = new Secret(); - $secretReplication = new Replication(); - $secret->setReplication($secretReplication); $request = (new CreateSecretRequest()) ->setParent($formattedParent) ->setSecretId($secretId) @@ -285,8 +282,6 @@ public function createSecretExceptionTest() $formattedParent = $gapicClient->projectName('[PROJECT]'); $secretId = 'secretId-739547894'; $secret = new Secret(); - $secretReplication = new Replication(); - $secret->setReplication($secretReplication); $request = (new CreateSecretRequest()) ->setParent($formattedParent) ->setSecretId($secretId) @@ -1074,8 +1069,6 @@ public function updateSecretTest() $transport->addResponse($expectedResponse); // Mock request $secret = new Secret(); - $secretReplication = new Replication(); - $secret->setReplication($secretReplication); $updateMask = new FieldMask(); $request = (new UpdateSecretRequest()) ->setSecret($secret) @@ -1114,8 +1107,6 @@ public function updateSecretExceptionTest() $transport->addResponse(null, $status); // Mock request $secret = new Secret(); - $secretReplication = new Replication(); - $secret->setReplication($secretReplication); $updateMask = new FieldMask(); $request = (new UpdateSecretRequest()) ->setSecret($secret) diff --git a/SecretManager/tests/Unit/V1/SecretManagerServiceClientTest.php b/SecretManager/tests/Unit/V1/SecretManagerServiceClientTest.php index c18a8df8f800..7155d85fd35d 100644 --- a/SecretManager/tests/Unit/V1/SecretManagerServiceClientTest.php +++ b/SecretManager/tests/Unit/V1/SecretManagerServiceClientTest.php @@ -31,7 +31,6 @@ use Google\Cloud\SecretManager\V1\AccessSecretVersionResponse; use Google\Cloud\SecretManager\V1\ListSecretVersionsResponse; use Google\Cloud\SecretManager\V1\ListSecretsResponse; -use Google\Cloud\SecretManager\V1\Replication; use Google\Cloud\SecretManager\V1\Secret; use Google\Cloud\SecretManager\V1\SecretManagerServiceClient; use Google\Cloud\SecretManager\V1\SecretPayload; @@ -216,8 +215,6 @@ public function createSecretTest() $formattedParent = $gapicClient->projectName('[PROJECT]'); $secretId = 'secretId-739547894'; $secret = new Secret(); - $secretReplication = new Replication(); - $secret->setReplication($secretReplication); $response = $gapicClient->createSecret($formattedParent, $secretId, $secret); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -256,8 +253,6 @@ public function createSecretExceptionTest() $formattedParent = $gapicClient->projectName('[PROJECT]'); $secretId = 'secretId-739547894'; $secret = new Secret(); - $secretReplication = new Replication(); - $secret->setReplication($secretReplication); try { $gapicClient->createSecret($formattedParent, $secretId, $secret); // If the $gapicClient method call did not throw, fail the test @@ -993,8 +988,6 @@ public function updateSecretTest() $transport->addResponse($expectedResponse); // Mock request $secret = new Secret(); - $secretReplication = new Replication(); - $secret->setReplication($secretReplication); $updateMask = new FieldMask(); $response = $gapicClient->updateSecret($secret, $updateMask); $this->assertEquals($expectedResponse, $response); @@ -1030,8 +1023,6 @@ public function updateSecretExceptionTest() $transport->addResponse(null, $status); // Mock request $secret = new Secret(); - $secretReplication = new Replication(); - $secret->setReplication($secretReplication); $updateMask = new FieldMask(); try { $gapicClient->updateSecret($secret, $updateMask); diff --git a/SecureSourceManager/VERSION b/SecureSourceManager/VERSION index ee1372d33a29..7179039691ce 100644 --- a/SecureSourceManager/VERSION +++ b/SecureSourceManager/VERSION @@ -1 +1 @@ -0.2.2 +0.2.3 diff --git a/SecurityCenter/VERSION b/SecurityCenter/VERSION index 5db08bf2dc57..cfc730712d5d 100644 --- a/SecurityCenter/VERSION +++ b/SecurityCenter/VERSION @@ -1 +1 @@ -1.27.0 +1.28.0 diff --git a/SecurityCenter/metadata/V1/CloudArmor.php b/SecurityCenter/metadata/V1/CloudArmor.php new file mode 100644 index 000000000000..1831a22fd0be --- /dev/null +++ b/SecurityCenter/metadata/V1/CloudArmor.php @@ -0,0 +1,54 @@ +internalAddGeneratedFile( + ' +Æ +0google/cloud/securitycenter/v1/cloud_armor.protogoogle.cloud.securitycenter.v1"Þ + +CloudArmorG +security_policy ( 2..google.cloud.securitycenter.v1.SecurityPolicy: +requests ( 2(.google.cloud.securitycenter.v1.RequestsO +adaptive_protection ( 22.google.cloud.securitycenter.v1.AdaptiveProtection6 +attack ( 2&.google.cloud.securitycenter.v1.Attack + threat_vector ( + +duration ( 2.google.protobuf.Duration"= +SecurityPolicy +name (  +type (  +preview ("j +Requests +ratio ( +short_term_allowed ( +long_term_allowed ( +long_term_denied ("( +AdaptiveProtection + +confidence ("H +Attack + +volume_pps ( + +volume_bps ( +classification ( Bé +"com.google.cloud.securitycenter.v1BCloudArmorProtoPZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpbªGoogle.Cloud.SecurityCenter.V1ÊGoogle\\Cloud\\SecurityCenter\\V1ê!Google::Cloud::SecurityCenter::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/SecurityCenter/metadata/V1/Finding.php b/SecurityCenter/metadata/V1/Finding.php index a9d14dc3739c..ee34cc1657bc 100644 Binary files a/SecurityCenter/metadata/V1/Finding.php and b/SecurityCenter/metadata/V1/Finding.php differ diff --git a/SecurityCenter/src/V1/AdaptiveProtection.php b/SecurityCenter/src/V1/AdaptiveProtection.php new file mode 100644 index 000000000000..b713bf04f0c7 --- /dev/null +++ b/SecurityCenter/src/V1/AdaptiveProtection.php @@ -0,0 +1,84 @@ +google.cloud.securitycenter.v1.AdaptiveProtection + */ +class AdaptiveProtection extends \Google\Protobuf\Internal\Message +{ + /** + * A score of 0 means that there is low confidence that the detected event is + * an actual attack. A score of 1 means that there is high confidence that the + * detected event is an attack. See the [Adaptive Protection + * documentation](https://cloud.google.com/armor/docs/adaptive-protection-overview#configure-alert-tuning) + * for further explanation. + * + * Generated from protobuf field double confidence = 1; + */ + private $confidence = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $confidence + * A score of 0 means that there is low confidence that the detected event is + * an actual attack. A score of 1 means that there is high confidence that the + * detected event is an attack. See the [Adaptive Protection + * documentation](https://cloud.google.com/armor/docs/adaptive-protection-overview#configure-alert-tuning) + * for further explanation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\CloudArmor::initOnce(); + parent::__construct($data); + } + + /** + * A score of 0 means that there is low confidence that the detected event is + * an actual attack. A score of 1 means that there is high confidence that the + * detected event is an attack. See the [Adaptive Protection + * documentation](https://cloud.google.com/armor/docs/adaptive-protection-overview#configure-alert-tuning) + * for further explanation. + * + * Generated from protobuf field double confidence = 1; + * @return float + */ + public function getConfidence() + { + return $this->confidence; + } + + /** + * A score of 0 means that there is low confidence that the detected event is + * an actual attack. A score of 1 means that there is high confidence that the + * detected event is an attack. See the [Adaptive Protection + * documentation](https://cloud.google.com/armor/docs/adaptive-protection-overview#configure-alert-tuning) + * for further explanation. + * + * Generated from protobuf field double confidence = 1; + * @param float $var + * @return $this + */ + public function setConfidence($var) + { + GPBUtil::checkDouble($var); + $this->confidence = $var; + + return $this; + } + +} + diff --git a/SecurityCenter/src/V1/Attack.php b/SecurityCenter/src/V1/Attack.php new file mode 100644 index 000000000000..e6edb1e67b03 --- /dev/null +++ b/SecurityCenter/src/V1/Attack.php @@ -0,0 +1,135 @@ +google.cloud.securitycenter.v1.Attack + */ +class Attack extends \Google\Protobuf\Internal\Message +{ + /** + * Total PPS (packets per second) volume of attack. + * + * Generated from protobuf field int32 volume_pps = 1; + */ + private $volume_pps = 0; + /** + * Total BPS (bytes per second) volume of attack. + * + * Generated from protobuf field int32 volume_bps = 2; + */ + private $volume_bps = 0; + /** + * Type of attack, for example, ‘SYN-flood’, ‘NTP-udp’, or ‘CHARGEN-udp’. + * + * Generated from protobuf field string classification = 3; + */ + private $classification = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $volume_pps + * Total PPS (packets per second) volume of attack. + * @type int $volume_bps + * Total BPS (bytes per second) volume of attack. + * @type string $classification + * Type of attack, for example, ‘SYN-flood’, ‘NTP-udp’, or ‘CHARGEN-udp’. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\CloudArmor::initOnce(); + parent::__construct($data); + } + + /** + * Total PPS (packets per second) volume of attack. + * + * Generated from protobuf field int32 volume_pps = 1; + * @return int + */ + public function getVolumePps() + { + return $this->volume_pps; + } + + /** + * Total PPS (packets per second) volume of attack. + * + * Generated from protobuf field int32 volume_pps = 1; + * @param int $var + * @return $this + */ + public function setVolumePps($var) + { + GPBUtil::checkInt32($var); + $this->volume_pps = $var; + + return $this; + } + + /** + * Total BPS (bytes per second) volume of attack. + * + * Generated from protobuf field int32 volume_bps = 2; + * @return int + */ + public function getVolumeBps() + { + return $this->volume_bps; + } + + /** + * Total BPS (bytes per second) volume of attack. + * + * Generated from protobuf field int32 volume_bps = 2; + * @param int $var + * @return $this + */ + public function setVolumeBps($var) + { + GPBUtil::checkInt32($var); + $this->volume_bps = $var; + + return $this; + } + + /** + * Type of attack, for example, ‘SYN-flood’, ‘NTP-udp’, or ‘CHARGEN-udp’. + * + * Generated from protobuf field string classification = 3; + * @return string + */ + public function getClassification() + { + return $this->classification; + } + + /** + * Type of attack, for example, ‘SYN-flood’, ‘NTP-udp’, or ‘CHARGEN-udp’. + * + * Generated from protobuf field string classification = 3; + * @param string $var + * @return $this + */ + public function setClassification($var) + { + GPBUtil::checkString($var, True); + $this->classification = $var; + + return $this; + } + +} + diff --git a/SecurityCenter/src/V1/CloudArmor.php b/SecurityCenter/src/V1/CloudArmor.php new file mode 100644 index 000000000000..2105262a4baf --- /dev/null +++ b/SecurityCenter/src/V1/CloudArmor.php @@ -0,0 +1,323 @@ +google.cloud.securitycenter.v1.CloudArmor + */ +class CloudArmor extends \Google\Protobuf\Internal\Message +{ + /** + * Information about the [Google Cloud Armor security + * policy](https://cloud.google.com/armor/docs/security-policy-overview) + * relevant to the finding. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.SecurityPolicy security_policy = 1; + */ + private $security_policy = null; + /** + * Information about incoming requests evaluated by [Google Cloud Armor + * security + * policies](https://cloud.google.com/armor/docs/security-policy-overview). + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Requests requests = 2; + */ + private $requests = null; + /** + * Information about potential Layer 7 DDoS attacks identified by [Google + * Cloud Armor Adaptive + * Protection](https://cloud.google.com/armor/docs/adaptive-protection-overview). + * + * Generated from protobuf field .google.cloud.securitycenter.v1.AdaptiveProtection adaptive_protection = 3; + */ + private $adaptive_protection = null; + /** + * Information about DDoS attack volume and classification. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Attack attack = 4; + */ + private $attack = null; + /** + * Distinguish between volumetric & protocol DDoS attack and + * application layer attacks. For example, “L3_4†for Layer 3 and Layer 4 DDoS + * attacks, or “L_7†for Layer 7 DDoS attacks. + * + * Generated from protobuf field string threat_vector = 5; + */ + private $threat_vector = ''; + /** + * Duration of attack from the start until the current moment (updated every 5 + * minutes). + * + * Generated from protobuf field .google.protobuf.Duration duration = 6; + */ + private $duration = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\SecurityCenter\V1\SecurityPolicy $security_policy + * Information about the [Google Cloud Armor security + * policy](https://cloud.google.com/armor/docs/security-policy-overview) + * relevant to the finding. + * @type \Google\Cloud\SecurityCenter\V1\Requests $requests + * Information about incoming requests evaluated by [Google Cloud Armor + * security + * policies](https://cloud.google.com/armor/docs/security-policy-overview). + * @type \Google\Cloud\SecurityCenter\V1\AdaptiveProtection $adaptive_protection + * Information about potential Layer 7 DDoS attacks identified by [Google + * Cloud Armor Adaptive + * Protection](https://cloud.google.com/armor/docs/adaptive-protection-overview). + * @type \Google\Cloud\SecurityCenter\V1\Attack $attack + * Information about DDoS attack volume and classification. + * @type string $threat_vector + * Distinguish between volumetric & protocol DDoS attack and + * application layer attacks. For example, “L3_4†for Layer 3 and Layer 4 DDoS + * attacks, or “L_7†for Layer 7 DDoS attacks. + * @type \Google\Protobuf\Duration $duration + * Duration of attack from the start until the current moment (updated every 5 + * minutes). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\CloudArmor::initOnce(); + parent::__construct($data); + } + + /** + * Information about the [Google Cloud Armor security + * policy](https://cloud.google.com/armor/docs/security-policy-overview) + * relevant to the finding. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.SecurityPolicy security_policy = 1; + * @return \Google\Cloud\SecurityCenter\V1\SecurityPolicy|null + */ + public function getSecurityPolicy() + { + return $this->security_policy; + } + + public function hasSecurityPolicy() + { + return isset($this->security_policy); + } + + public function clearSecurityPolicy() + { + unset($this->security_policy); + } + + /** + * Information about the [Google Cloud Armor security + * policy](https://cloud.google.com/armor/docs/security-policy-overview) + * relevant to the finding. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.SecurityPolicy security_policy = 1; + * @param \Google\Cloud\SecurityCenter\V1\SecurityPolicy $var + * @return $this + */ + public function setSecurityPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\SecurityPolicy::class); + $this->security_policy = $var; + + return $this; + } + + /** + * Information about incoming requests evaluated by [Google Cloud Armor + * security + * policies](https://cloud.google.com/armor/docs/security-policy-overview). + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Requests requests = 2; + * @return \Google\Cloud\SecurityCenter\V1\Requests|null + */ + public function getRequests() + { + return $this->requests; + } + + public function hasRequests() + { + return isset($this->requests); + } + + public function clearRequests() + { + unset($this->requests); + } + + /** + * Information about incoming requests evaluated by [Google Cloud Armor + * security + * policies](https://cloud.google.com/armor/docs/security-policy-overview). + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Requests requests = 2; + * @param \Google\Cloud\SecurityCenter\V1\Requests $var + * @return $this + */ + public function setRequests($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\Requests::class); + $this->requests = $var; + + return $this; + } + + /** + * Information about potential Layer 7 DDoS attacks identified by [Google + * Cloud Armor Adaptive + * Protection](https://cloud.google.com/armor/docs/adaptive-protection-overview). + * + * Generated from protobuf field .google.cloud.securitycenter.v1.AdaptiveProtection adaptive_protection = 3; + * @return \Google\Cloud\SecurityCenter\V1\AdaptiveProtection|null + */ + public function getAdaptiveProtection() + { + return $this->adaptive_protection; + } + + public function hasAdaptiveProtection() + { + return isset($this->adaptive_protection); + } + + public function clearAdaptiveProtection() + { + unset($this->adaptive_protection); + } + + /** + * Information about potential Layer 7 DDoS attacks identified by [Google + * Cloud Armor Adaptive + * Protection](https://cloud.google.com/armor/docs/adaptive-protection-overview). + * + * Generated from protobuf field .google.cloud.securitycenter.v1.AdaptiveProtection adaptive_protection = 3; + * @param \Google\Cloud\SecurityCenter\V1\AdaptiveProtection $var + * @return $this + */ + public function setAdaptiveProtection($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\AdaptiveProtection::class); + $this->adaptive_protection = $var; + + return $this; + } + + /** + * Information about DDoS attack volume and classification. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Attack attack = 4; + * @return \Google\Cloud\SecurityCenter\V1\Attack|null + */ + public function getAttack() + { + return $this->attack; + } + + public function hasAttack() + { + return isset($this->attack); + } + + public function clearAttack() + { + unset($this->attack); + } + + /** + * Information about DDoS attack volume and classification. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Attack attack = 4; + * @param \Google\Cloud\SecurityCenter\V1\Attack $var + * @return $this + */ + public function setAttack($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\Attack::class); + $this->attack = $var; + + return $this; + } + + /** + * Distinguish between volumetric & protocol DDoS attack and + * application layer attacks. For example, “L3_4†for Layer 3 and Layer 4 DDoS + * attacks, or “L_7†for Layer 7 DDoS attacks. + * + * Generated from protobuf field string threat_vector = 5; + * @return string + */ + public function getThreatVector() + { + return $this->threat_vector; + } + + /** + * Distinguish between volumetric & protocol DDoS attack and + * application layer attacks. For example, “L3_4†for Layer 3 and Layer 4 DDoS + * attacks, or “L_7†for Layer 7 DDoS attacks. + * + * Generated from protobuf field string threat_vector = 5; + * @param string $var + * @return $this + */ + public function setThreatVector($var) + { + GPBUtil::checkString($var, True); + $this->threat_vector = $var; + + return $this; + } + + /** + * Duration of attack from the start until the current moment (updated every 5 + * minutes). + * + * Generated from protobuf field .google.protobuf.Duration duration = 6; + * @return \Google\Protobuf\Duration|null + */ + public function getDuration() + { + return $this->duration; + } + + public function hasDuration() + { + return isset($this->duration); + } + + public function clearDuration() + { + unset($this->duration); + } + + /** + * Duration of attack from the start until the current moment (updated every 5 + * minutes). + * + * Generated from protobuf field .google.protobuf.Duration duration = 6; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->duration = $var; + + return $this; + } + +} + diff --git a/SecurityCenter/src/V1/Finding.php b/SecurityCenter/src/V1/Finding.php index b01b12f0aa60..8a8361b76953 100644 --- a/SecurityCenter/src/V1/Finding.php +++ b/SecurityCenter/src/V1/Finding.php @@ -353,6 +353,12 @@ class Finding extends \Google\Protobuf\Internal\Message * Generated from protobuf field repeated .google.cloud.securitycenter.v1.LoadBalancer load_balancers = 58; */ private $load_balancers; + /** + * Fields related to Cloud Armor findings. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.CloudArmor cloud_armor = 59; + */ + private $cloud_armor = null; /** * Notebook associated with the finding. * @@ -523,6 +529,8 @@ class Finding extends \Google\Protobuf\Internal\Message * Log entries that are relevant to the finding. * @type array<\Google\Cloud\SecurityCenter\V1\LoadBalancer>|\Google\Protobuf\Internal\RepeatedField $load_balancers * The load balancers associated with the finding. + * @type \Google\Cloud\SecurityCenter\V1\CloudArmor $cloud_armor + * Fields related to Cloud Armor findings. * @type \Google\Cloud\SecurityCenter\V1\Notebook $notebook * Notebook associated with the finding. * } @@ -1984,6 +1992,42 @@ public function setLoadBalancers($var) return $this; } + /** + * Fields related to Cloud Armor findings. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.CloudArmor cloud_armor = 59; + * @return \Google\Cloud\SecurityCenter\V1\CloudArmor|null + */ + public function getCloudArmor() + { + return $this->cloud_armor; + } + + public function hasCloudArmor() + { + return isset($this->cloud_armor); + } + + public function clearCloudArmor() + { + unset($this->cloud_armor); + } + + /** + * Fields related to Cloud Armor findings. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.CloudArmor cloud_armor = 59; + * @param \Google\Cloud\SecurityCenter\V1\CloudArmor $var + * @return $this + */ + public function setCloudArmor($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\CloudArmor::class); + $this->cloud_armor = $var; + + return $this; + } + /** * Notebook associated with the finding. * diff --git a/SecurityCenter/src/V1/Requests.php b/SecurityCenter/src/V1/Requests.php new file mode 100644 index 000000000000..b57cc601d293 --- /dev/null +++ b/SecurityCenter/src/V1/Requests.php @@ -0,0 +1,177 @@ +google.cloud.securitycenter.v1.Requests + */ +class Requests extends \Google\Protobuf\Internal\Message +{ + /** + * For 'Increasing deny ratio', the ratio is the denied traffic divided by the + * allowed traffic. For 'Allowed traffic spike', the ratio is the allowed + * traffic in the short term divided by allowed traffic in the long term. + * + * Generated from protobuf field double ratio = 1; + */ + private $ratio = 0.0; + /** + * Allowed RPS (requests per second) in the short term. + * + * Generated from protobuf field int32 short_term_allowed = 2; + */ + private $short_term_allowed = 0; + /** + * Allowed RPS (requests per second) over the long term. + * + * Generated from protobuf field int32 long_term_allowed = 3; + */ + private $long_term_allowed = 0; + /** + * Denied RPS (requests per second) over the long term. + * + * Generated from protobuf field int32 long_term_denied = 4; + */ + private $long_term_denied = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $ratio + * For 'Increasing deny ratio', the ratio is the denied traffic divided by the + * allowed traffic. For 'Allowed traffic spike', the ratio is the allowed + * traffic in the short term divided by allowed traffic in the long term. + * @type int $short_term_allowed + * Allowed RPS (requests per second) in the short term. + * @type int $long_term_allowed + * Allowed RPS (requests per second) over the long term. + * @type int $long_term_denied + * Denied RPS (requests per second) over the long term. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\CloudArmor::initOnce(); + parent::__construct($data); + } + + /** + * For 'Increasing deny ratio', the ratio is the denied traffic divided by the + * allowed traffic. For 'Allowed traffic spike', the ratio is the allowed + * traffic in the short term divided by allowed traffic in the long term. + * + * Generated from protobuf field double ratio = 1; + * @return float + */ + public function getRatio() + { + return $this->ratio; + } + + /** + * For 'Increasing deny ratio', the ratio is the denied traffic divided by the + * allowed traffic. For 'Allowed traffic spike', the ratio is the allowed + * traffic in the short term divided by allowed traffic in the long term. + * + * Generated from protobuf field double ratio = 1; + * @param float $var + * @return $this + */ + public function setRatio($var) + { + GPBUtil::checkDouble($var); + $this->ratio = $var; + + return $this; + } + + /** + * Allowed RPS (requests per second) in the short term. + * + * Generated from protobuf field int32 short_term_allowed = 2; + * @return int + */ + public function getShortTermAllowed() + { + return $this->short_term_allowed; + } + + /** + * Allowed RPS (requests per second) in the short term. + * + * Generated from protobuf field int32 short_term_allowed = 2; + * @param int $var + * @return $this + */ + public function setShortTermAllowed($var) + { + GPBUtil::checkInt32($var); + $this->short_term_allowed = $var; + + return $this; + } + + /** + * Allowed RPS (requests per second) over the long term. + * + * Generated from protobuf field int32 long_term_allowed = 3; + * @return int + */ + public function getLongTermAllowed() + { + return $this->long_term_allowed; + } + + /** + * Allowed RPS (requests per second) over the long term. + * + * Generated from protobuf field int32 long_term_allowed = 3; + * @param int $var + * @return $this + */ + public function setLongTermAllowed($var) + { + GPBUtil::checkInt32($var); + $this->long_term_allowed = $var; + + return $this; + } + + /** + * Denied RPS (requests per second) over the long term. + * + * Generated from protobuf field int32 long_term_denied = 4; + * @return int + */ + public function getLongTermDenied() + { + return $this->long_term_denied; + } + + /** + * Denied RPS (requests per second) over the long term. + * + * Generated from protobuf field int32 long_term_denied = 4; + * @param int $var + * @return $this + */ + public function setLongTermDenied($var) + { + GPBUtil::checkInt32($var); + $this->long_term_denied = $var; + + return $this; + } + +} + diff --git a/SecurityCenter/src/V1/SecurityPolicy.php b/SecurityCenter/src/V1/SecurityPolicy.php new file mode 100644 index 000000000000..a47a6c721a47 --- /dev/null +++ b/SecurityCenter/src/V1/SecurityPolicy.php @@ -0,0 +1,149 @@ +google.cloud.securitycenter.v1.SecurityPolicy + */ +class SecurityPolicy extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the Google Cloud Armor security policy, for example, + * "my-security-policy". + * + * Generated from protobuf field string name = 1; + */ + private $name = ''; + /** + * The type of Google Cloud Armor security policy for example, ‘backend + * security policy’, ‘edge security policy’, ‘network edge security policy’, + * or ‘always-on DDoS protection’. + * + * Generated from protobuf field string type = 2; + */ + private $type = ''; + /** + * Whether or not the associated rule or policy is in preview mode. + * + * Generated from protobuf field bool preview = 3; + */ + private $preview = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of the Google Cloud Armor security policy, for example, + * "my-security-policy". + * @type string $type + * The type of Google Cloud Armor security policy for example, ‘backend + * security policy’, ‘edge security policy’, ‘network edge security policy’, + * or ‘always-on DDoS protection’. + * @type bool $preview + * Whether or not the associated rule or policy is in preview mode. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\CloudArmor::initOnce(); + parent::__construct($data); + } + + /** + * The name of the Google Cloud Armor security policy, for example, + * "my-security-policy". + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the Google Cloud Armor security policy, for example, + * "my-security-policy". + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The type of Google Cloud Armor security policy for example, ‘backend + * security policy’, ‘edge security policy’, ‘network edge security policy’, + * or ‘always-on DDoS protection’. + * + * Generated from protobuf field string type = 2; + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * The type of Google Cloud Armor security policy for example, ‘backend + * security policy’, ‘edge security policy’, ‘network edge security policy’, + * or ‘always-on DDoS protection’. + * + * Generated from protobuf field string type = 2; + * @param string $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkString($var, True); + $this->type = $var; + + return $this; + } + + /** + * Whether or not the associated rule or policy is in preview mode. + * + * Generated from protobuf field bool preview = 3; + * @return bool + */ + public function getPreview() + { + return $this->preview; + } + + /** + * Whether or not the associated rule or policy is in preview mode. + * + * Generated from protobuf field bool preview = 3; + * @param bool $var + * @return $this + */ + public function setPreview($var) + { + GPBUtil::checkBool($var); + $this->preview = $var; + + return $this; + } + +} + diff --git a/SecurityCenterManagement/VERSION b/SecurityCenterManagement/VERSION index 3a4036fb450f..53a75d673557 100644 --- a/SecurityCenterManagement/VERSION +++ b/SecurityCenterManagement/VERSION @@ -1 +1 @@ -0.2.5 +0.2.6 diff --git a/SecurityPrivateCa/VERSION b/SecurityPrivateCa/VERSION index bd8bf882d061..943f9cbc4ec7 100644 --- a/SecurityPrivateCa/VERSION +++ b/SecurityPrivateCa/VERSION @@ -1 +1 @@ -1.7.0 +1.7.1 diff --git a/SecurityPublicCA/VERSION b/SecurityPublicCA/VERSION index d15723fbe8de..1c09c74e221c 100644 --- a/SecurityPublicCA/VERSION +++ b/SecurityPublicCA/VERSION @@ -1 +1 @@ -0.3.2 +0.3.3 diff --git a/ServiceControl/VERSION b/ServiceControl/VERSION index 347f5833ee6d..9df886c42a1e 100644 --- a/ServiceControl/VERSION +++ b/ServiceControl/VERSION @@ -1 +1 @@ -1.4.1 +1.4.2 diff --git a/ServiceDirectory/VERSION b/ServiceDirectory/VERSION index 1892b9267677..31e5c843497c 100644 --- a/ServiceDirectory/VERSION +++ b/ServiceDirectory/VERSION @@ -1 +1 @@ -1.3.2 +1.3.3 diff --git a/ServiceHealth/VERSION b/ServiceHealth/VERSION index b1e80bb2480a..845639eef26c 100644 --- a/ServiceHealth/VERSION +++ b/ServiceHealth/VERSION @@ -1 +1 @@ -0.1.3 +0.1.4 diff --git a/ServiceManagement/VERSION b/ServiceManagement/VERSION index 1892b9267677..31e5c843497c 100644 --- a/ServiceManagement/VERSION +++ b/ServiceManagement/VERSION @@ -1 +1 @@ -1.3.2 +1.3.3 diff --git a/ServiceUsage/VERSION b/ServiceUsage/VERSION index 3a3cd8cc8b07..1892b9267677 100644 --- a/ServiceUsage/VERSION +++ b/ServiceUsage/VERSION @@ -1 +1 @@ -1.3.1 +1.3.2 diff --git a/Shell/VERSION b/Shell/VERSION index 1892b9267677..31e5c843497c 100644 --- a/Shell/VERSION +++ b/Shell/VERSION @@ -1 +1 @@ -1.3.2 +1.3.3 diff --git a/ShoppingCss/VERSION b/ShoppingCss/VERSION index 7179039691ce..abd410582dea 100644 --- a/ShoppingCss/VERSION +++ b/ShoppingCss/VERSION @@ -1 +1 @@ -0.2.3 +0.2.4 diff --git a/ShoppingMerchantInventories/VERSION b/ShoppingMerchantInventories/VERSION index 1d0ba9ea182b..267577d47e49 100644 --- a/ShoppingMerchantInventories/VERSION +++ b/ShoppingMerchantInventories/VERSION @@ -1 +1 @@ -0.4.0 +0.4.1 diff --git a/ShoppingMerchantQuota/VERSION b/ShoppingMerchantQuota/VERSION index 6e8bf73aa550..17e51c385ea3 100644 --- a/ShoppingMerchantQuota/VERSION +++ b/ShoppingMerchantQuota/VERSION @@ -1 +1 @@ -0.1.0 +0.1.1 diff --git a/ShoppingMerchantReports/VERSION b/ShoppingMerchantReports/VERSION index faef31a4357c..39e898a4f952 100644 --- a/ShoppingMerchantReports/VERSION +++ b/ShoppingMerchantReports/VERSION @@ -1 +1 @@ -0.7.0 +0.7.1 diff --git a/Spanner/VERSION b/Spanner/VERSION index e1e86acb2353..32a6ce3c719b 100644 --- a/Spanner/VERSION +++ b/Spanner/VERSION @@ -1 +1 @@ -1.75.1 +1.76.0 diff --git a/Spanner/composer.json b/Spanner/composer.json index 42ab1da8a32f..379d4e2d1492 100644 --- a/Spanner/composer.json +++ b/Spanner/composer.json @@ -7,7 +7,7 @@ "php": "^8.0", "ext-grpc": "*", "google/cloud-core": "^1.52.7", - "google/gax": "^1.30" + "google/gax": "^1.32" }, "require-dev": { "phpunit/phpunit": "^9.0", diff --git a/Spanner/src/Connection/Grpc.php b/Spanner/src/Connection/Grpc.php index e9ed95f569eb..93929740dc49 100644 --- a/Spanner/src/Connection/Grpc.php +++ b/Spanner/src/Connection/Grpc.php @@ -57,6 +57,7 @@ use Google\Cloud\Spanner\V1\Mutation; use Google\Cloud\Spanner\V1\Mutation\Delete; use Google\Cloud\Spanner\V1\Mutation\Write; +use Google\Cloud\Spanner\V1\PartialResultSet; use Google\Cloud\Spanner\V1\PartitionOptions; use Google\Cloud\Spanner\V1\RequestOptions; use Google\Cloud\Spanner\V1\Session; @@ -70,6 +71,7 @@ use Google\Protobuf; use Google\Protobuf\FieldMask; use Google\Protobuf\GPBEmpty; +use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\ListValue; use Google\Protobuf\Struct; use Google\Protobuf\Value; @@ -237,6 +239,24 @@ public function __construct(array $config = []) 'google.protobuf.Timestamp' => function ($v) { return $this->formatTimestampFromApi($v); } + ], [], [], [ + // A custom encoder that short-circuits the encodeMessage in Serializer class, + // but only if the argument is of the type PartialResultSet. + PartialResultSet::class => function ($msg) { + $data = json_decode($msg->serializeToJsonString(), true); + + // The transaction id is serialized as a base64 encoded string in $data. So, we + // add a step to get the transaction id using a getter instead of the serialized value. + // The null-safe operator is used to handle edge cases where the relevant fields are not present. + $data['metadata']['transaction']['id'] = (string) $msg?->getMetadata()?->getTransaction()?->getId(); + + // Helps convert metadata enum values from string types to their respective code/annotation + // pairs. Ex: INT64 is converted to {code: 2, typeAnnotation: 0}. + $fields = $msg->getMetadata()?->getRowType()?->getFields(); + $data['metadata']['rowType']['fields'] = $this->getFieldDataFromRepeatedFields($fields); + + return $data; + } ]); //@codeCoverageIgnoreEnd @@ -1617,6 +1637,73 @@ private function setDirectedReadOptions(array &$args) } } + /** + * Utiltiy method to take in a Google\Cloud\Spanner\V1\Type value and return + * the data as an array. The method takes care of array and struct elements. + * + * @param Type $type The "type" object + * + * @return array The formatted data. + */ + private function getTypeData(Type $type): array + { + $data = [ + 'code' => $type->getCode(), + 'typeAnnotation' => $type->getTypeAnnotation(), + 'protoTypeFqn' => $type->getProtoTypeFqn() + ]; + + // If this is a struct field, then recursisevly call getTypeData + if ($type->hasStructType()) { + $nestedType = $type->getStructType(); + $fields = $nestedType->getFields(); + $data['structType'] = [ + 'fields' => $this->getFieldDataFromRepeatedFields($fields) + ]; + } + // If this is an array field, then recursisevly call getTypeData + if ($type->hasArrayElementType()) { + $nestedType = $type->getArrayElementType(); + $data['arrayElementType'] = $this->getTypeData($nestedType); + } + + return $data; + } + + /** + * Utility method to return "fields data" in the format: + * [ + * "name" => "" + * "type" => [] + * ]. + * + * The type is converted from a string like INT64 to ["code" => 2, "typeAnnotation" => 0] + * conforming with the Google\Cloud\Spanner\V1\TypeCode class. + * + * @param ?RepeatedField $fields The array contain list of fields. + * + * @return array The formatted fields data. + */ + private function getFieldDataFromRepeatedFields(?RepeatedField $fields): array + { + if (is_null($fields)) { + return []; + } + + $fieldsData = []; + foreach ($fields as $key => $field) { + $type = $field->getType(); + $typeData = $this->getTypeData($type); + + $fieldsData[$key] = [ + 'name' => $field->getName(), + 'type' => $typeData + ]; + } + + return $fieldsData; + } + private function parseMutations($rawMutations) { if (!is_array($rawMutations)) { diff --git a/Spanner/src/SpannerClient.php b/Spanner/src/SpannerClient.php index 3a00bdabf911..eafe3220ec71 100644 --- a/Spanner/src/SpannerClient.php +++ b/Spanner/src/SpannerClient.php @@ -120,7 +120,7 @@ class SpannerClient use LROTrait; use ValidateTrait; - const VERSION = '1.75.1'; + const VERSION = '1.76.0'; const FULL_CONTROL_SCOPE = 'https://www.googleapis.com/auth/spanner.data'; const ADMIN_SCOPE = 'https://www.googleapis.com/auth/spanner.admin'; diff --git a/Spanner/src/V1/resources/spanner_client_config.json b/Spanner/src/V1/resources/spanner_client_config.json index 69bbfabd0c2d..e185586d033d 100644 --- a/Spanner/src/V1/resources/spanner_client_config.json +++ b/Spanner/src/V1/resources/spanner_client_config.json @@ -5,13 +5,16 @@ "no_retry_codes": [], "no_retry_1_codes": [], "retry_policy_1_codes": [ - "UNAVAILABLE" + "UNAVAILABLE", + "RESOURCE_EXHAUSTED" ], "retry_policy_2_codes": [ - "UNAVAILABLE" + "UNAVAILABLE", + "RESOURCE_EXHAUSTED" ], "retry_policy_3_codes": [ - "UNAVAILABLE" + "UNAVAILABLE", + "RESOURCE_EXHAUSTED" ] }, "retry_params": { diff --git a/Spanner/tests/Unit/Connection/GrpcTest.php b/Spanner/tests/Unit/Connection/GrpcTest.php index b776ef4d42cc..07822d51cea5 100644 --- a/Spanner/tests/Unit/Connection/GrpcTest.php +++ b/Spanner/tests/Unit/Connection/GrpcTest.php @@ -21,6 +21,7 @@ use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\OperationResponse; use Google\ApiCore\Serializer; +use Google\ApiCore\Testing\MockResponse; use Google\ApiCore\Transport\TransportInterface; use Google\Cloud\Core\GrpcRequestWrapper; use Google\Cloud\Core\GrpcTrait; @@ -40,6 +41,7 @@ use Google\Cloud\Spanner\V1\Mutation; use Google\Cloud\Spanner\V1\Mutation\Delete; use Google\Cloud\Spanner\V1\Mutation\Write; +use Google\Cloud\Spanner\V1\PartialResultSet; use Google\Cloud\Spanner\V1\PartitionOptions; use Google\Cloud\Spanner\V1\RequestOptions; use Google\Cloud\Spanner\V1\Session; @@ -1418,6 +1420,37 @@ public function larOptions() ]; } + public function testPartialResultSetCustomEncoder() + { + $partialResultSet = new PartialResultSet(); + $partialResultSet->mergeFromJsonString(json_encode([ + 'metadata' => [ + 'transaction' => [ + 'id' => base64_encode(0b00010100) // bytedata is represented as a base64-encoded string in JSON + ], + 'rowType' => [ + 'fields' => [ + ['type' => ['code' => 'INT64']] // enums are represented as their string equivalents in JSON + ] + ], + ], + ])); + + $this->assertEquals(0b00010100, $partialResultSet->getMetadata()->getTransaction()->getId()); + $this->assertEquals(2, $partialResultSet->getMetadata()->getRowType()->getFields()[0]->getType()->getCode()); + + // decode the message and ensure it's decoded as expected + $grpc = new Grpc(); + $serializerProp = new \ReflectionProperty($grpc, 'serializer'); + $serializerProp->setAccessible(true); + $serializer = $serializerProp->getValue($grpc); + $arr = $serializer->encodeMessage($partialResultSet); + + // We expect this to be the binary string + $this->assertEquals(0b00010100, $arr['metadata']['transaction']['id']); + // We expect this to be the integer + $this->assertEquals(2, $arr['metadata']['rowType']['fields'][0]['type']['code']); + } private function assertCallCorrect( $method, array $args, diff --git a/Speech/VERSION b/Speech/VERSION index 84cc529467b0..ec6d649be650 100644 --- a/Speech/VERSION +++ b/Speech/VERSION @@ -1 +1 @@ -1.18.0 +1.18.1 diff --git a/Speech/src/SpeechClient.php b/Speech/src/SpeechClient.php index 25d7a88a9230..45bbf27da601 100644 --- a/Speech/src/SpeechClient.php +++ b/Speech/src/SpeechClient.php @@ -50,7 +50,7 @@ class SpeechClient { use ClientTrait; - const VERSION = '1.18.0'; + const VERSION = '1.18.1'; const SCOPE = 'https://www.googleapis.com/auth/cloud-platform'; diff --git a/SqlAdmin/VERSION b/SqlAdmin/VERSION index 04a373efe6ba..2a0970ca757c 100644 --- a/SqlAdmin/VERSION +++ b/SqlAdmin/VERSION @@ -1 +1 @@ -0.16.0 +0.16.1 diff --git a/Storage/VERSION b/Storage/VERSION index 5f24410720f5..021b2b85fea5 100644 --- a/Storage/VERSION +++ b/Storage/VERSION @@ -1 +1 @@ -1.41.2 +1.41.3 diff --git a/Storage/src/StorageClient.php b/Storage/src/StorageClient.php index d82b9c6a2c2c..b4945a63b26d 100644 --- a/Storage/src/StorageClient.php +++ b/Storage/src/StorageClient.php @@ -47,7 +47,7 @@ class StorageClient use ArrayTrait; use ClientTrait; - const VERSION = '1.41.2'; + const VERSION = '1.41.3'; const FULL_CONTROL_SCOPE = 'https://www.googleapis.com/auth/devstorage.full_control'; const READ_ONLY_SCOPE = 'https://www.googleapis.com/auth/devstorage.read_only'; diff --git a/Storage/tests/System/ManageObjectsTest.php b/Storage/tests/System/ManageObjectsTest.php index 406c9013c572..07ec7450e34e 100644 --- a/Storage/tests/System/ManageObjectsTest.php +++ b/Storage/tests/System/ManageObjectsTest.php @@ -287,33 +287,33 @@ public function testComposeObjects($object) return $composedObject; } - /** - * @depends testComposeObjects - */ - public function testSoftDeleteObject($object) + public function testSoftDeleteObject() { - // Set soft delete policy - self::$bucket->update([ - 'softDeletePolicy' => [ - 'retentionDurationSeconds' => 8*24*60*60 - ] - ]); - - $this->assertStorageObjectExists($object); + $softDeleteBucketName = "soft-delete-bucket-" . uniqid(); + $softDeleteBucket = self::createBucket( + self::$client, + $softDeleteBucketName, + [ + 'location' => 'us-west1', + 'softDeletePolicy' => ['retentionDurationSeconds' => 8*24*60*60] + ] + ); + $object = $softDeleteBucket->upload(self::DATA, ['name' => uniqid(self::TESTING_PREFIX)]); + $this->assertStorageObjectExists($softDeleteBucket, $object); $generation = $object->info()['generation']; $object->delete(); - $this->assertStorageObjectNotExists($object); - $this->assertStorageObjectExists($object, [ + $this->assertStorageObjectNotExists($softDeleteBucket, $object); + $this->assertStorageObjectExists($softDeleteBucket, $object, [ 'softDeleted' => true, 'generation' => $generation ]); - $restoredObject = self::$bucket->restore($object->name(), $generation); + $restoredObject = $softDeleteBucket->restore($object->name(), $generation); $this->assertNotEquals($generation, $restoredObject->info()['generation']); - $this->assertStorageObjectExists($restoredObject); + $this->assertStorageObjectExists($softDeleteBucket, $restoredObject); } public function testRotatesCustomerSuppliedEncrpytion() @@ -445,20 +445,31 @@ public function testStringNormalization() } } - private function assertStorageObjectExists($object, $options = [], $isPresent = true) + /** + * Asserts that a provided StorageObject exists. + * + * A StorageObject can be created via several methods, including but not limited to: + * Directly via constructor such as during object creation, + * Or lazily by providing name to bucket object, + * Or by listing objects in a bucket. + */ + private function assertStorageObjectExists($bucket, $object, $options = [], $isPresent = true) { + // validate provided object exists $this->assertEquals($isPresent, $object->exists($options)); - $object = self::$bucket->object($object->name(), $options); + // validate object returned from $bucket->object() exists + $object = $bucket->object($object->name(), $options); $this->assertEquals($isPresent, $object->exists($options)); - $objects = self::$bucket->objects($options); + // validate object exists in $bucket->objects() exists + $objects = $bucket->objects($options); $objects = array_map(function ($o) { return $o->name(); }, iterator_to_array($objects)); $this->assertEquals($isPresent, in_array($object->name(), $objects)); } - private function assertStorageObjectNotExists($object, $options = []) + private function assertStorageObjectNotExists($bucket, $object, $options = []) { - $this->assertStorageObjectExists($object, $options, false); + $this->assertStorageObjectExists($bucket, $object, $options, false); } } diff --git a/StorageControl/.OwlBot.yaml b/StorageControl/.OwlBot.yaml new file mode 100644 index 000000000000..db48c19e8d01 --- /dev/null +++ b/StorageControl/.OwlBot.yaml @@ -0,0 +1,4 @@ +deep-copy-regex: + - source: /google/storage/control/(v2)/.*-php/(.*) + dest: /owl-bot-staging/StorageControl/$1/$2 +api-name: StorageControl diff --git a/StorageControl/.gitattributes b/StorageControl/.gitattributes new file mode 100644 index 000000000000..8119e7fcc1b2 --- /dev/null +++ b/StorageControl/.gitattributes @@ -0,0 +1,8 @@ +/*.xml.dist export-ignore +/.OwlBot.yaml export-ignore +/.github export-ignore +/.repo-metadata.json export-ignore +/owlbot.py export-ignore +/src/**/gapic_metadata.json export-ignore +/samples export-ignore +/tests export-ignore diff --git a/StorageControl/.github/pull_request_template.md b/StorageControl/.github/pull_request_template.md new file mode 100644 index 000000000000..c747bcf4652b --- /dev/null +++ b/StorageControl/.github/pull_request_template.md @@ -0,0 +1,24 @@ +**PLEASE READ THIS ENTIRE MESSAGE** + +Hello, and thank you for your contribution! Please note that this repository is +a read-only split of `googleapis/google-cloud-php`. As such, we are +unable to accept pull requests to this repository. + +We welcome your pull request and would be happy to consider it for inclusion in +our library if you follow these steps: + +* Clone the parent client library repository: + +```sh +$ git clone git@github.com:googleapis/google-cloud-php.git +``` + +* Move your changes into the correct location in that library. Library code +belongs in `StorageControl/src`, and tests in `StorageControl/tests`. + +* Push the changes in a new branch to a fork, and open a new pull request +[here](https://github.com/googleapis/google-cloud-php). + +Thanks again, and we look forward to seeing your proposed change! + +The Google Cloud PHP team diff --git a/StorageControl/.repo-metadata.json b/StorageControl/.repo-metadata.json new file mode 100644 index 000000000000..74e764e608ed --- /dev/null +++ b/StorageControl/.repo-metadata.json @@ -0,0 +1,8 @@ +{ + "language": "php", + "distribution_name": "google/cloud-storage-control", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-storage-control/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "storage" +} diff --git a/StorageControl/CONTRIBUTING.md b/StorageControl/CONTRIBUTING.md new file mode 100644 index 000000000000..76ea811cacdb --- /dev/null +++ b/StorageControl/CONTRIBUTING.md @@ -0,0 +1,10 @@ +# How to Contribute + +We'd love to accept your patches and contributions to this project. We accept +and review pull requests against the main +[Google Cloud PHP](https://github.com/googleapis/google-cloud-php) +repository, which contains all of our client libraries. You will also need to +sign a Contributor License Agreement. For more details about how to contribute, +see the +[CONTRIBUTING.md](https://github.com/googleapis/google-cloud-php/blob/main/CONTRIBUTING.md) +file in the main Google Cloud PHP repository. diff --git a/StorageControl/LICENSE b/StorageControl/LICENSE new file mode 100644 index 000000000000..8f71f43fee3f --- /dev/null +++ b/StorageControl/LICENSE @@ -0,0 +1,202 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/StorageControl/README.md b/StorageControl/README.md new file mode 100644 index 000000000000..026d2255300f --- /dev/null +++ b/StorageControl/README.md @@ -0,0 +1,44 @@ +# Google Cloud Storage Control for PHP + +> Idiomatic PHP client for [Google Cloud Storage Control](https://cloud.google.com/storage). + +[![Latest Stable Version](https://poser.pugx.org/google/cloud-storage-control/v/stable)](https://packagist.org/packages/google/cloud-storage-control) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-storage-control.svg)](https://packagist.org/packages/google/cloud-storage-control) + +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-storage-control/latest) + +**NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any +support requests, bug reports, or development contributions should be directed to +that project. + +### Installation + +To begin, install the preferred dependency manager for PHP, [Composer](https://getcomposer.org/). + +Now, install this component: + +```sh +$ composer require google/cloud-storage-control +``` + +> Browse the complete list of [Google Cloud APIs](https://cloud.google.com/php/docs/reference) +> for PHP + +This component requires the gRPC extension. Please see our [gRPC installation guide](https://cloud.google.com/php/grpc) +for more information on how to configure the extension. + +### Authentication + +Please see our [Authentication guide](https://github.com/googleapis/google-cloud-php/blob/main/AUTHENTICATION.md) for more information +on authenticating your client. Once authenticated, you'll be ready to start making requests. + +### Sample + +See the [samples directory](https://github.com/googleapis/google-cloud-php-storage-control/tree/main/samples) for a canonical list of samples. + +### Version + +This component is considered alpha. As such, it is still a work-in-progress and is more likely to get backwards-incompatible updates. + +### Next Steps + +1. Understand the [official documentation](https://cloud.google.com/storage/docs/overview). diff --git a/StorageControl/VERSION b/StorageControl/VERSION new file mode 100644 index 000000000000..6e8bf73aa550 --- /dev/null +++ b/StorageControl/VERSION @@ -0,0 +1 @@ +0.1.0 diff --git a/StorageControl/composer.json b/StorageControl/composer.json new file mode 100644 index 000000000000..ca487cadc5b2 --- /dev/null +++ b/StorageControl/composer.json @@ -0,0 +1,31 @@ +{ + "name": "google/cloud-storage-control", + "description": "Google Cloud Storage Control Client for PHP", + "license": "Apache-2.0", + "minimum-stability": "stable", + "autoload": { + "psr-4": { + "Google\\Cloud\\Storage\\Control\\": "src", + "GPBMetadata\\Google\\Storage\\Control\\": "metadata" + } + }, + "extra": { + "component": { + "id": "cloud-storage-control", + "path": "StorageControl", + "target": "googleapis/google-cloud-php-storage-control" + } + }, + "require": { + "php": "^8.0", + "ext-grpc": "*", + "google/gax": "^1.30.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.0" + }, + "suggest": { + "ext-grpc": "Enables use of gRPC, a universal high-performance RPC framework created by Google.", + "ext-protobuf": "Provides a significant increase in throughput over the pure PHP protobuf implementation. See https://cloud.google.com/php/grpc for installation instructions." + } +} diff --git a/StorageControl/metadata/V2/StorageControl.php b/StorageControl/metadata/V2/StorageControl.php new file mode 100644 index 000000000000..6292a961c287 Binary files /dev/null and b/StorageControl/metadata/V2/StorageControl.php differ diff --git a/StorageControl/owlbot.py b/StorageControl/owlbot.py new file mode 100644 index 000000000000..02e461e3c7f4 --- /dev/null +++ b/StorageControl/owlbot.py @@ -0,0 +1,62 @@ +# Copyright 2023 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""This script is used to synthesize generated parts of this library.""" + +import logging +from pathlib import Path +import subprocess + +import synthtool as s +from synthtool.languages import php +from synthtool import _tracked_paths + +logging.basicConfig(level=logging.DEBUG) + +src = Path(f"../{php.STAGING_DIR}/StorageControl").resolve() +dest = Path().resolve() + +# Added so that we can pass copy_excludes in the owlbot_main() call +_tracked_paths.add(src) + +php.owlbot_main( + src=src, + dest=dest, + copy_excludes=[ + src / "**/[A-Z]*_*.php", + ] +) + +# remove class_alias code +s.replace( + "src/V*/**/*.php", + r"^// Adding a class alias for backwards compatibility with the previous class name.$" + + "\n" + + r"^class_alias\(.*\);$" + + "\n", + '') + +# format generated clients +subprocess.run([ + 'npm', + 'exec', + '--yes', + '--package=@prettier/plugin-php@^0.16', + '--', + 'prettier', + '**/Client/*', + '--write', + '--parser=php', + '--single-quote', + '--print-width=120']) diff --git a/StorageControl/phpunit.xml.dist b/StorageControl/phpunit.xml.dist new file mode 100644 index 000000000000..01a79b8b000d --- /dev/null +++ b/StorageControl/phpunit.xml.dist @@ -0,0 +1,16 @@ + + + + + src + + + src/V[!a-zA-Z]* + + + + + tests/Unit + + + diff --git a/StorageControl/samples/V2/StorageControlClient/create_folder.php b/StorageControl/samples/V2/StorageControlClient/create_folder.php new file mode 100644 index 000000000000..14d0a5f64d18 --- /dev/null +++ b/StorageControl/samples/V2/StorageControlClient/create_folder.php @@ -0,0 +1,83 @@ +setParent($formattedParent) + ->setFolder($folder) + ->setFolderId($folderId); + + // Call the API and handle any network failures. + try { + /** @var Folder $response */ + $response = $storageControlClient->createFolder($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = StorageControlClient::bucketName('[PROJECT]', '[BUCKET]'); + $folderId = '[FOLDER_ID]'; + + create_folder_sample($formattedParent, $folderId); +} +// [END storage_v2_generated_StorageControl_CreateFolder_sync] diff --git a/StorageControl/samples/V2/StorageControlClient/create_managed_folder.php b/StorageControl/samples/V2/StorageControlClient/create_managed_folder.php new file mode 100644 index 000000000000..367c733b53f7 --- /dev/null +++ b/StorageControl/samples/V2/StorageControlClient/create_managed_folder.php @@ -0,0 +1,77 @@ +setParent($formattedParent) + ->setManagedFolder($managedFolder) + ->setManagedFolderId($managedFolderId); + + // Call the API and handle any network failures. + try { + /** @var ManagedFolder $response */ + $response = $storageControlClient->createManagedFolder($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = StorageControlClient::bucketName('[PROJECT]', '[BUCKET]'); + $managedFolderId = '[MANAGED_FOLDER_ID]'; + + create_managed_folder_sample($formattedParent, $managedFolderId); +} +// [END storage_v2_generated_StorageControl_CreateManagedFolder_sync] diff --git a/StorageControl/samples/V2/StorageControlClient/delete_folder.php b/StorageControl/samples/V2/StorageControlClient/delete_folder.php new file mode 100644 index 000000000000..ca3512485a12 --- /dev/null +++ b/StorageControl/samples/V2/StorageControlClient/delete_folder.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $storageControlClient->deleteFolder($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = StorageControlClient::folderName('[PROJECT]', '[BUCKET]', '[FOLDER]'); + + delete_folder_sample($formattedName); +} +// [END storage_v2_generated_StorageControl_DeleteFolder_sync] diff --git a/StorageControl/samples/V2/StorageControlClient/delete_managed_folder.php b/StorageControl/samples/V2/StorageControlClient/delete_managed_folder.php new file mode 100644 index 000000000000..5fec0fb26789 --- /dev/null +++ b/StorageControl/samples/V2/StorageControlClient/delete_managed_folder.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $storageControlClient->deleteManagedFolder($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = StorageControlClient::managedFolderName( + '[PROJECT]', + '[BUCKET]', + '[MANAGEDFOLDER]' + ); + + delete_managed_folder_sample($formattedName); +} +// [END storage_v2_generated_StorageControl_DeleteManagedFolder_sync] diff --git a/StorageControl/samples/V2/StorageControlClient/get_folder.php b/StorageControl/samples/V2/StorageControlClient/get_folder.php new file mode 100644 index 000000000000..bf29421ecfd1 --- /dev/null +++ b/StorageControl/samples/V2/StorageControlClient/get_folder.php @@ -0,0 +1,74 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Folder $response */ + $response = $storageControlClient->getFolder($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = StorageControlClient::folderName('[PROJECT]', '[BUCKET]', '[FOLDER]'); + + get_folder_sample($formattedName); +} +// [END storage_v2_generated_StorageControl_GetFolder_sync] diff --git a/StorageControl/samples/V2/StorageControlClient/get_managed_folder.php b/StorageControl/samples/V2/StorageControlClient/get_managed_folder.php new file mode 100644 index 000000000000..1d48475f4ef5 --- /dev/null +++ b/StorageControl/samples/V2/StorageControlClient/get_managed_folder.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var ManagedFolder $response */ + $response = $storageControlClient->getManagedFolder($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = StorageControlClient::managedFolderName( + '[PROJECT]', + '[BUCKET]', + '[MANAGEDFOLDER]' + ); + + get_managed_folder_sample($formattedName); +} +// [END storage_v2_generated_StorageControl_GetManagedFolder_sync] diff --git a/StorageControl/samples/V2/StorageControlClient/get_storage_layout.php b/StorageControl/samples/V2/StorageControlClient/get_storage_layout.php new file mode 100644 index 000000000000..3a8b9e36aeb6 --- /dev/null +++ b/StorageControl/samples/V2/StorageControlClient/get_storage_layout.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var StorageLayout $response */ + $response = $storageControlClient->getStorageLayout($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = StorageControlClient::storageLayoutName('[PROJECT]', '[BUCKET]'); + + get_storage_layout_sample($formattedName); +} +// [END storage_v2_generated_StorageControl_GetStorageLayout_sync] diff --git a/StorageControl/samples/V2/StorageControlClient/list_folders.php b/StorageControl/samples/V2/StorageControlClient/list_folders.php new file mode 100644 index 000000000000..f85807165986 --- /dev/null +++ b/StorageControl/samples/V2/StorageControlClient/list_folders.php @@ -0,0 +1,79 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $storageControlClient->listFolders($request); + + /** @var Folder $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = StorageControlClient::bucketName('[PROJECT]', '[BUCKET]'); + + list_folders_sample($formattedParent); +} +// [END storage_v2_generated_StorageControl_ListFolders_sync] diff --git a/StorageControl/samples/V2/StorageControlClient/list_managed_folders.php b/StorageControl/samples/V2/StorageControlClient/list_managed_folders.php new file mode 100644 index 000000000000..7b9623d4f14a --- /dev/null +++ b/StorageControl/samples/V2/StorageControlClient/list_managed_folders.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $storageControlClient->listManagedFolders($request); + + /** @var ManagedFolder $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = StorageControlClient::bucketName('[PROJECT]', '[BUCKET]'); + + list_managed_folders_sample($formattedParent); +} +// [END storage_v2_generated_StorageControl_ListManagedFolders_sync] diff --git a/StorageControl/samples/V2/StorageControlClient/rename_folder.php b/StorageControl/samples/V2/StorageControlClient/rename_folder.php new file mode 100644 index 000000000000..cf5a4e3e05fc --- /dev/null +++ b/StorageControl/samples/V2/StorageControlClient/rename_folder.php @@ -0,0 +1,91 @@ +setName($formattedName) + ->setDestinationFolderId($destinationFolderId); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $storageControlClient->renameFolder($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Folder $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = StorageControlClient::folderName('[PROJECT]', '[BUCKET]', '[FOLDER]'); + $destinationFolderId = '[DESTINATION_FOLDER_ID]'; + + rename_folder_sample($formattedName, $destinationFolderId); +} +// [END storage_v2_generated_StorageControl_RenameFolder_sync] diff --git a/StorageControl/src/V2/Client/StorageControlClient.php b/StorageControl/src/V2/Client/StorageControlClient.php new file mode 100644 index 000000000000..9a766ef1fb6d --- /dev/null +++ b/StorageControl/src/V2/Client/StorageControlClient.php @@ -0,0 +1,597 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/storage_control_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/storage_control_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/storage_control_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + ]; + } + + /** Implements ClientOptionsTrait::supportedTransports. */ + private static function supportedTransports() + { + return ['grpc', 'grpc-fallback']; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) + ? $this->descriptors[$methodName]['longRunning'] + : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Formats a string containing the fully-qualified path to represent a bucket + * resource. + * + * @param string $project + * @param string $bucket + * + * @return string The formatted bucket resource. + */ + public static function bucketName(string $project, string $bucket): string + { + return self::getPathTemplate('bucket')->render([ + 'project' => $project, + 'bucket' => $bucket, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a folder + * resource. + * + * @param string $project + * @param string $bucket + * @param string $folder + * + * @return string The formatted folder resource. + */ + public static function folderName(string $project, string $bucket, string $folder): string + { + return self::getPathTemplate('folder')->render([ + 'project' => $project, + 'bucket' => $bucket, + 'folder' => $folder, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * managed_folder resource. + * + * @param string $project + * @param string $bucket + * @param string $managedFolder + * + * @return string The formatted managed_folder resource. + */ + public static function managedFolderName(string $project, string $bucket, string $managedFolder): string + { + return self::getPathTemplate('managedFolder')->render([ + 'project' => $project, + 'bucket' => $bucket, + 'managedFolder' => $managedFolder, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * storage_layout resource. + * + * @param string $project + * @param string $bucket + * + * @return string The formatted storage_layout resource. + */ + public static function storageLayoutName(string $project, string $bucket): string + { + return self::getPathTemplate('storageLayout')->render([ + 'project' => $project, + 'bucket' => $bucket, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - bucket: projects/{project}/buckets/{bucket} + * - folder: projects/{project}/buckets/{bucket}/folders/{folder=**} + * - managedFolder: projects/{project}/buckets/{bucket}/managedFolders/{managedFolder=**} + * - storageLayout: projects/{project}/buckets/{bucket}/storageLayout + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'storage.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. At the moment, supports only + * `grpc`. *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} method for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a new folder. This operation is only applicable to a hierarchical + * namespace enabled bucket. + * Hierarchical namespace buckets are in allowlist preview. + * + * The async variant is {@see StorageControlClient::createFolderAsync()} . + * + * @example samples/V2/StorageControlClient/create_folder.php + * + * @param CreateFolderRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Folder + * + * @throws ApiException Thrown if the API call fails. + */ + public function createFolder(CreateFolderRequest $request, array $callOptions = []): Folder + { + return $this->startApiCall('CreateFolder', $request, $callOptions)->wait(); + } + + /** + * Creates a new managed folder. + * + * The async variant is {@see StorageControlClient::createManagedFolderAsync()} . + * + * @example samples/V2/StorageControlClient/create_managed_folder.php + * + * @param CreateManagedFolderRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ManagedFolder + * + * @throws ApiException Thrown if the API call fails. + */ + public function createManagedFolder(CreateManagedFolderRequest $request, array $callOptions = []): ManagedFolder + { + return $this->startApiCall('CreateManagedFolder', $request, $callOptions)->wait(); + } + + /** + * Permanently deletes an empty folder. This operation is only applicable to a + * hierarchical namespace enabled bucket. + * Hierarchical namespace buckets are in allowlist preview. + * + * The async variant is {@see StorageControlClient::deleteFolderAsync()} . + * + * @example samples/V2/StorageControlClient/delete_folder.php + * + * @param DeleteFolderRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteFolder(DeleteFolderRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteFolder', $request, $callOptions)->wait(); + } + + /** + * Permanently deletes an empty managed folder. + * + * The async variant is {@see StorageControlClient::deleteManagedFolderAsync()} . + * + * @example samples/V2/StorageControlClient/delete_managed_folder.php + * + * @param DeleteManagedFolderRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteManagedFolder(DeleteManagedFolderRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteManagedFolder', $request, $callOptions)->wait(); + } + + /** + * Returns metadata for the specified folder. This operation is only + * applicable to a hierarchical namespace enabled bucket. + * Hierarchical namespace buckets are in allowlist preview. + * + * The async variant is {@see StorageControlClient::getFolderAsync()} . + * + * @example samples/V2/StorageControlClient/get_folder.php + * + * @param GetFolderRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Folder + * + * @throws ApiException Thrown if the API call fails. + */ + public function getFolder(GetFolderRequest $request, array $callOptions = []): Folder + { + return $this->startApiCall('GetFolder', $request, $callOptions)->wait(); + } + + /** + * Returns metadata for the specified managed folder. + * + * The async variant is {@see StorageControlClient::getManagedFolderAsync()} . + * + * @example samples/V2/StorageControlClient/get_managed_folder.php + * + * @param GetManagedFolderRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ManagedFolder + * + * @throws ApiException Thrown if the API call fails. + */ + public function getManagedFolder(GetManagedFolderRequest $request, array $callOptions = []): ManagedFolder + { + return $this->startApiCall('GetManagedFolder', $request, $callOptions)->wait(); + } + + /** + * Returns the storage layout configuration for a given bucket. + * + * The async variant is {@see StorageControlClient::getStorageLayoutAsync()} . + * + * @example samples/V2/StorageControlClient/get_storage_layout.php + * + * @param GetStorageLayoutRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return StorageLayout + * + * @throws ApiException Thrown if the API call fails. + */ + public function getStorageLayout(GetStorageLayoutRequest $request, array $callOptions = []): StorageLayout + { + return $this->startApiCall('GetStorageLayout', $request, $callOptions)->wait(); + } + + /** + * Retrieves a list of folders. This operation is only applicable to a + * hierarchical namespace enabled bucket. + * Hierarchical namespace buckets are in allowlist preview. + * + * The async variant is {@see StorageControlClient::listFoldersAsync()} . + * + * @example samples/V2/StorageControlClient/list_folders.php + * + * @param ListFoldersRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listFolders(ListFoldersRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListFolders', $request, $callOptions); + } + + /** + * Retrieves a list of managed folders for a given bucket. + * + * The async variant is {@see StorageControlClient::listManagedFoldersAsync()} . + * + * @example samples/V2/StorageControlClient/list_managed_folders.php + * + * @param ListManagedFoldersRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listManagedFolders(ListManagedFoldersRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListManagedFolders', $request, $callOptions); + } + + /** + * Renames a source folder to a destination folder. This operation is only + * applicable to a hierarchical namespace enabled bucket. During a rename, the + * source and destination folders are locked until the long running operation + * completes. + * Hierarchical namespace buckets are in allowlist preview. + * + * The async variant is {@see StorageControlClient::renameFolderAsync()} . + * + * @example samples/V2/StorageControlClient/rename_folder.php + * + * @param RenameFolderRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function renameFolder(RenameFolderRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('RenameFolder', $request, $callOptions)->wait(); + } +} diff --git a/StorageControl/src/V2/CommonLongRunningOperationMetadata.php b/StorageControl/src/V2/CommonLongRunningOperationMetadata.php new file mode 100644 index 000000000000..67e1c36d73d3 --- /dev/null +++ b/StorageControl/src/V2/CommonLongRunningOperationMetadata.php @@ -0,0 +1,273 @@ +google.storage.control.v2.CommonLongRunningOperationMetadata + */ +class CommonLongRunningOperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_time = null; + /** + * Output only. The time the operation was last modified. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. The type of operation invoked. + * + * Generated from protobuf field string type = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $type = ''; + /** + * Output only. Identifies whether the user has requested cancellation. + * + * Generated from protobuf field bool requested_cancellation = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $requested_cancellation = false; + /** + * Output only. The estimated progress of the operation in percentage [0, + * 100]. The value -1 means the progress is unknown. + * + * Generated from protobuf field int32 progress_percent = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $progress_percent = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time the operation was created. + * @type \Google\Protobuf\Timestamp $end_time + * Output only. The time the operation finished running. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time the operation was last modified. + * @type string $type + * Output only. The type of operation invoked. + * @type bool $requested_cancellation + * Output only. Identifies whether the user has requested cancellation. + * @type int $progress_percent + * Output only. The estimated progress of the operation in percentage [0, + * 100]. The value -1 means the progress is unknown. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * Output only. The time the operation was last modified. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The time the operation was last modified. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. The type of operation invoked. + * + * Generated from protobuf field string type = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * Output only. The type of operation invoked. + * + * Generated from protobuf field string type = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkString($var, True); + $this->type = $var; + + return $this; + } + + /** + * Output only. Identifies whether the user has requested cancellation. + * + * Generated from protobuf field bool requested_cancellation = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getRequestedCancellation() + { + return $this->requested_cancellation; + } + + /** + * Output only. Identifies whether the user has requested cancellation. + * + * Generated from protobuf field bool requested_cancellation = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setRequestedCancellation($var) + { + GPBUtil::checkBool($var); + $this->requested_cancellation = $var; + + return $this; + } + + /** + * Output only. The estimated progress of the operation in percentage [0, + * 100]. The value -1 means the progress is unknown. + * + * Generated from protobuf field int32 progress_percent = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getProgressPercent() + { + return $this->progress_percent; + } + + /** + * Output only. The estimated progress of the operation in percentage [0, + * 100]. The value -1 means the progress is unknown. + * + * Generated from protobuf field int32 progress_percent = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setProgressPercent($var) + { + GPBUtil::checkInt32($var); + $this->progress_percent = $var; + + return $this; + } + +} + diff --git a/StorageControl/src/V2/CreateFolderRequest.php b/StorageControl/src/V2/CreateFolderRequest.php new file mode 100644 index 000000000000..805011c9fe0c --- /dev/null +++ b/StorageControl/src/V2/CreateFolderRequest.php @@ -0,0 +1,281 @@ +google.storage.control.v2.CreateFolderRequest + */ +class CreateFolderRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the bucket in which the folder will reside. The bucket + * must be a hierarchical namespace enabled bucket. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Properties of the new folder being created. + * The bucket and name of the folder are specified in the parent and folder_id + * fields, respectively. Populating those fields in `folder` will result in an + * error. + * + * Generated from protobuf field .google.storage.control.v2.Folder folder = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $folder = null; + /** + * Required. The full name of a folder, including all its parent folders. + * Folders use single '/' characters as a delimiter. + * The folder_id must end with a slash. + * For example, the folder_id of "books/biographies/" would create a new + * "biographies/" folder under the "books/" folder. + * + * Generated from protobuf field string folder_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $folder_id = ''; + /** + * Optional. If true, parent folder doesn't have to be present and all missing + * ancestor folders will be created atomically. + * + * Generated from protobuf field bool recursive = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $recursive = false; + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $parent Required. Name of the bucket in which the folder will reside. The bucket + * must be a hierarchical namespace enabled bucket. Please see + * {@see StorageControlClient::bucketName()} for help formatting this field. + * @param \Google\Cloud\Storage\Control\V2\Folder $folder Required. Properties of the new folder being created. + * The bucket and name of the folder are specified in the parent and folder_id + * fields, respectively. Populating those fields in `folder` will result in an + * error. + * @param string $folderId Required. The full name of a folder, including all its parent folders. + * Folders use single '/' characters as a delimiter. + * The folder_id must end with a slash. + * For example, the folder_id of "books/biographies/" would create a new + * "biographies/" folder under the "books/" folder. + * + * @return \Google\Cloud\Storage\Control\V2\CreateFolderRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Storage\Control\V2\Folder $folder, string $folderId): self + { + return (new self()) + ->setParent($parent) + ->setFolder($folder) + ->setFolderId($folderId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Name of the bucket in which the folder will reside. The bucket + * must be a hierarchical namespace enabled bucket. + * @type \Google\Cloud\Storage\Control\V2\Folder $folder + * Required. Properties of the new folder being created. + * The bucket and name of the folder are specified in the parent and folder_id + * fields, respectively. Populating those fields in `folder` will result in an + * error. + * @type string $folder_id + * Required. The full name of a folder, including all its parent folders. + * Folders use single '/' characters as a delimiter. + * The folder_id must end with a slash. + * For example, the folder_id of "books/biographies/" would create a new + * "biographies/" folder under the "books/" folder. + * @type bool $recursive + * Optional. If true, parent folder doesn't have to be present and all missing + * ancestor folders will be created atomically. + * @type string $request_id + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the bucket in which the folder will reside. The bucket + * must be a hierarchical namespace enabled bucket. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Name of the bucket in which the folder will reside. The bucket + * must be a hierarchical namespace enabled bucket. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. Properties of the new folder being created. + * The bucket and name of the folder are specified in the parent and folder_id + * fields, respectively. Populating those fields in `folder` will result in an + * error. + * + * Generated from protobuf field .google.storage.control.v2.Folder folder = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Storage\Control\V2\Folder|null + */ + public function getFolder() + { + return $this->folder; + } + + public function hasFolder() + { + return isset($this->folder); + } + + public function clearFolder() + { + unset($this->folder); + } + + /** + * Required. Properties of the new folder being created. + * The bucket and name of the folder are specified in the parent and folder_id + * fields, respectively. Populating those fields in `folder` will result in an + * error. + * + * Generated from protobuf field .google.storage.control.v2.Folder folder = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Storage\Control\V2\Folder $var + * @return $this + */ + public function setFolder($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Storage\Control\V2\Folder::class); + $this->folder = $var; + + return $this; + } + + /** + * Required. The full name of a folder, including all its parent folders. + * Folders use single '/' characters as a delimiter. + * The folder_id must end with a slash. + * For example, the folder_id of "books/biographies/" would create a new + * "biographies/" folder under the "books/" folder. + * + * Generated from protobuf field string folder_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getFolderId() + { + return $this->folder_id; + } + + /** + * Required. The full name of a folder, including all its parent folders. + * Folders use single '/' characters as a delimiter. + * The folder_id must end with a slash. + * For example, the folder_id of "books/biographies/" would create a new + * "biographies/" folder under the "books/" folder. + * + * Generated from protobuf field string folder_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setFolderId($var) + { + GPBUtil::checkString($var, True); + $this->folder_id = $var; + + return $this; + } + + /** + * Optional. If true, parent folder doesn't have to be present and all missing + * ancestor folders will be created atomically. + * + * Generated from protobuf field bool recursive = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getRecursive() + { + return $this->recursive; + } + + /** + * Optional. If true, parent folder doesn't have to be present and all missing + * ancestor folders will be created atomically. + * + * Generated from protobuf field bool recursive = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setRecursive($var) + { + GPBUtil::checkBool($var); + $this->recursive = $var; + + return $this; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/StorageControl/src/V2/CreateManagedFolderRequest.php b/StorageControl/src/V2/CreateManagedFolderRequest.php new file mode 100644 index 000000000000..e5320e9019f0 --- /dev/null +++ b/StorageControl/src/V2/CreateManagedFolderRequest.php @@ -0,0 +1,221 @@ +google.storage.control.v2.CreateManagedFolderRequest + */ +class CreateManagedFolderRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the bucket this managed folder belongs to. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Properties of the managed folder being created. + * The bucket and managed folder names are specified in the `parent` and + * `managed_folder_id` fields. Populating these fields in `managed_folder` + * will result in an error. + * + * Generated from protobuf field .google.storage.control.v2.ManagedFolder managed_folder = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $managed_folder = null; + /** + * Required. The name of the managed folder. It uses a single `/` as delimiter + * and leading and trailing `/` are allowed. + * + * Generated from protobuf field string managed_folder_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $managed_folder_id = ''; + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $parent Required. Name of the bucket this managed folder belongs to. Please see + * {@see StorageControlClient::bucketName()} for help formatting this field. + * @param \Google\Cloud\Storage\Control\V2\ManagedFolder $managedFolder Required. Properties of the managed folder being created. + * The bucket and managed folder names are specified in the `parent` and + * `managed_folder_id` fields. Populating these fields in `managed_folder` + * will result in an error. + * @param string $managedFolderId Required. The name of the managed folder. It uses a single `/` as delimiter + * and leading and trailing `/` are allowed. + * + * @return \Google\Cloud\Storage\Control\V2\CreateManagedFolderRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Storage\Control\V2\ManagedFolder $managedFolder, string $managedFolderId): self + { + return (new self()) + ->setParent($parent) + ->setManagedFolder($managedFolder) + ->setManagedFolderId($managedFolderId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Name of the bucket this managed folder belongs to. + * @type \Google\Cloud\Storage\Control\V2\ManagedFolder $managed_folder + * Required. Properties of the managed folder being created. + * The bucket and managed folder names are specified in the `parent` and + * `managed_folder_id` fields. Populating these fields in `managed_folder` + * will result in an error. + * @type string $managed_folder_id + * Required. The name of the managed folder. It uses a single `/` as delimiter + * and leading and trailing `/` are allowed. + * @type string $request_id + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the bucket this managed folder belongs to. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Name of the bucket this managed folder belongs to. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. Properties of the managed folder being created. + * The bucket and managed folder names are specified in the `parent` and + * `managed_folder_id` fields. Populating these fields in `managed_folder` + * will result in an error. + * + * Generated from protobuf field .google.storage.control.v2.ManagedFolder managed_folder = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Storage\Control\V2\ManagedFolder|null + */ + public function getManagedFolder() + { + return $this->managed_folder; + } + + public function hasManagedFolder() + { + return isset($this->managed_folder); + } + + public function clearManagedFolder() + { + unset($this->managed_folder); + } + + /** + * Required. Properties of the managed folder being created. + * The bucket and managed folder names are specified in the `parent` and + * `managed_folder_id` fields. Populating these fields in `managed_folder` + * will result in an error. + * + * Generated from protobuf field .google.storage.control.v2.ManagedFolder managed_folder = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Storage\Control\V2\ManagedFolder $var + * @return $this + */ + public function setManagedFolder($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Storage\Control\V2\ManagedFolder::class); + $this->managed_folder = $var; + + return $this; + } + + /** + * Required. The name of the managed folder. It uses a single `/` as delimiter + * and leading and trailing `/` are allowed. + * + * Generated from protobuf field string managed_folder_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getManagedFolderId() + { + return $this->managed_folder_id; + } + + /** + * Required. The name of the managed folder. It uses a single `/` as delimiter + * and leading and trailing `/` are allowed. + * + * Generated from protobuf field string managed_folder_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setManagedFolderId($var) + { + GPBUtil::checkString($var, True); + $this->managed_folder_id = $var; + + return $this; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/StorageControl/src/V2/DeleteFolderRequest.php b/StorageControl/src/V2/DeleteFolderRequest.php new file mode 100644 index 000000000000..6958ada830b8 --- /dev/null +++ b/StorageControl/src/V2/DeleteFolderRequest.php @@ -0,0 +1,222 @@ +google.storage.control.v2.DeleteFolderRequest + */ +class DeleteFolderRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the folder. + * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` + * + * Generated from protobuf field string name = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Makes the operation only succeed conditional on whether the folder's + * current metageneration matches the given value. + * + * Generated from protobuf field optional int64 if_metageneration_match = 3; + */ + protected $if_metageneration_match = null; + /** + * Makes the operation only succeed conditional on whether the folder's + * current metageneration does not match the given value. + * + * Generated from protobuf field optional int64 if_metageneration_not_match = 4; + */ + protected $if_metageneration_not_match = null; + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $name Required. Name of the folder. + * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` + * Please see {@see StorageControlClient::folderName()} for help formatting this field. + * + * @return \Google\Cloud\Storage\Control\V2\DeleteFolderRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the folder. + * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` + * @type int|string $if_metageneration_match + * Makes the operation only succeed conditional on whether the folder's + * current metageneration matches the given value. + * @type int|string $if_metageneration_not_match + * Makes the operation only succeed conditional on whether the folder's + * current metageneration does not match the given value. + * @type string $request_id + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the folder. + * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` + * + * Generated from protobuf field string name = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the folder. + * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` + * + * Generated from protobuf field string name = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Makes the operation only succeed conditional on whether the folder's + * current metageneration matches the given value. + * + * Generated from protobuf field optional int64 if_metageneration_match = 3; + * @return int|string + */ + public function getIfMetagenerationMatch() + { + return isset($this->if_metageneration_match) ? $this->if_metageneration_match : 0; + } + + public function hasIfMetagenerationMatch() + { + return isset($this->if_metageneration_match); + } + + public function clearIfMetagenerationMatch() + { + unset($this->if_metageneration_match); + } + + /** + * Makes the operation only succeed conditional on whether the folder's + * current metageneration matches the given value. + * + * Generated from protobuf field optional int64 if_metageneration_match = 3; + * @param int|string $var + * @return $this + */ + public function setIfMetagenerationMatch($var) + { + GPBUtil::checkInt64($var); + $this->if_metageneration_match = $var; + + return $this; + } + + /** + * Makes the operation only succeed conditional on whether the folder's + * current metageneration does not match the given value. + * + * Generated from protobuf field optional int64 if_metageneration_not_match = 4; + * @return int|string + */ + public function getIfMetagenerationNotMatch() + { + return isset($this->if_metageneration_not_match) ? $this->if_metageneration_not_match : 0; + } + + public function hasIfMetagenerationNotMatch() + { + return isset($this->if_metageneration_not_match); + } + + public function clearIfMetagenerationNotMatch() + { + unset($this->if_metageneration_not_match); + } + + /** + * Makes the operation only succeed conditional on whether the folder's + * current metageneration does not match the given value. + * + * Generated from protobuf field optional int64 if_metageneration_not_match = 4; + * @param int|string $var + * @return $this + */ + public function setIfMetagenerationNotMatch($var) + { + GPBUtil::checkInt64($var); + $this->if_metageneration_not_match = $var; + + return $this; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/StorageControl/src/V2/DeleteManagedFolderRequest.php b/StorageControl/src/V2/DeleteManagedFolderRequest.php new file mode 100644 index 000000000000..957f9300a277 --- /dev/null +++ b/StorageControl/src/V2/DeleteManagedFolderRequest.php @@ -0,0 +1,271 @@ +google.storage.control.v2.DeleteManagedFolderRequest + */ +class DeleteManagedFolderRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the managed folder. + * Format: + * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` + * + * Generated from protobuf field string name = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The operation succeeds conditional on the managed folder's current + * metageneration matching the value here specified. + * + * Generated from protobuf field optional int64 if_metageneration_match = 3; + */ + protected $if_metageneration_match = null; + /** + * The operation succeeds conditional on the managed folder's current + * metageneration NOT matching the value here specified. + * + * Generated from protobuf field optional int64 if_metageneration_not_match = 4; + */ + protected $if_metageneration_not_match = null; + /** + * Allows deletion of a managed folder even if it is not empty. + * A managed folder is empty if it manages no child managed folders or + * objects. Caller must have permission for + * storage.managedFolders.setIamPolicy. + * + * Generated from protobuf field bool allow_non_empty = 5; + */ + protected $allow_non_empty = false; + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $name Required. Name of the managed folder. + * Format: + * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` + * Please see {@see StorageControlClient::managedFolderName()} for help formatting this field. + * + * @return \Google\Cloud\Storage\Control\V2\DeleteManagedFolderRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the managed folder. + * Format: + * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` + * @type int|string $if_metageneration_match + * The operation succeeds conditional on the managed folder's current + * metageneration matching the value here specified. + * @type int|string $if_metageneration_not_match + * The operation succeeds conditional on the managed folder's current + * metageneration NOT matching the value here specified. + * @type bool $allow_non_empty + * Allows deletion of a managed folder even if it is not empty. + * A managed folder is empty if it manages no child managed folders or + * objects. Caller must have permission for + * storage.managedFolders.setIamPolicy. + * @type string $request_id + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the managed folder. + * Format: + * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` + * + * Generated from protobuf field string name = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the managed folder. + * Format: + * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` + * + * Generated from protobuf field string name = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The operation succeeds conditional on the managed folder's current + * metageneration matching the value here specified. + * + * Generated from protobuf field optional int64 if_metageneration_match = 3; + * @return int|string + */ + public function getIfMetagenerationMatch() + { + return isset($this->if_metageneration_match) ? $this->if_metageneration_match : 0; + } + + public function hasIfMetagenerationMatch() + { + return isset($this->if_metageneration_match); + } + + public function clearIfMetagenerationMatch() + { + unset($this->if_metageneration_match); + } + + /** + * The operation succeeds conditional on the managed folder's current + * metageneration matching the value here specified. + * + * Generated from protobuf field optional int64 if_metageneration_match = 3; + * @param int|string $var + * @return $this + */ + public function setIfMetagenerationMatch($var) + { + GPBUtil::checkInt64($var); + $this->if_metageneration_match = $var; + + return $this; + } + + /** + * The operation succeeds conditional on the managed folder's current + * metageneration NOT matching the value here specified. + * + * Generated from protobuf field optional int64 if_metageneration_not_match = 4; + * @return int|string + */ + public function getIfMetagenerationNotMatch() + { + return isset($this->if_metageneration_not_match) ? $this->if_metageneration_not_match : 0; + } + + public function hasIfMetagenerationNotMatch() + { + return isset($this->if_metageneration_not_match); + } + + public function clearIfMetagenerationNotMatch() + { + unset($this->if_metageneration_not_match); + } + + /** + * The operation succeeds conditional on the managed folder's current + * metageneration NOT matching the value here specified. + * + * Generated from protobuf field optional int64 if_metageneration_not_match = 4; + * @param int|string $var + * @return $this + */ + public function setIfMetagenerationNotMatch($var) + { + GPBUtil::checkInt64($var); + $this->if_metageneration_not_match = $var; + + return $this; + } + + /** + * Allows deletion of a managed folder even if it is not empty. + * A managed folder is empty if it manages no child managed folders or + * objects. Caller must have permission for + * storage.managedFolders.setIamPolicy. + * + * Generated from protobuf field bool allow_non_empty = 5; + * @return bool + */ + public function getAllowNonEmpty() + { + return $this->allow_non_empty; + } + + /** + * Allows deletion of a managed folder even if it is not empty. + * A managed folder is empty if it manages no child managed folders or + * objects. Caller must have permission for + * storage.managedFolders.setIamPolicy. + * + * Generated from protobuf field bool allow_non_empty = 5; + * @param bool $var + * @return $this + */ + public function setAllowNonEmpty($var) + { + GPBUtil::checkBool($var); + $this->allow_non_empty = $var; + + return $this; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/StorageControl/src/V2/Folder.php b/StorageControl/src/V2/Folder.php new file mode 100644 index 000000000000..8c1eba3f85dd --- /dev/null +++ b/StorageControl/src/V2/Folder.php @@ -0,0 +1,259 @@ +google.storage.control.v2.Folder + */ +class Folder extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The name of this folder. + * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. The version of the metadata for this folder. Used for + * preconditions and for detecting changes in metadata. + * + * Generated from protobuf field int64 metageneration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $metageneration = 0; + /** + * Output only. The creation time of the folder. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The modification time of the folder. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. Only present if the folder is part of an ongoing RenameFolder + * operation. Contains information which can be used to query the operation + * status. The presence of this field also indicates all write operations are + * blocked for this folder, including folder, managed folder, and object + * operations. + * + * Generated from protobuf field .google.storage.control.v2.PendingRenameInfo pending_rename_info = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $pending_rename_info = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The name of this folder. + * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` + * @type int|string $metageneration + * Output only. The version of the metadata for this folder. Used for + * preconditions and for detecting changes in metadata. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The creation time of the folder. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The modification time of the folder. + * @type \Google\Cloud\Storage\Control\V2\PendingRenameInfo $pending_rename_info + * Output only. Only present if the folder is part of an ongoing RenameFolder + * operation. Contains information which can be used to query the operation + * status. The presence of this field also indicates all write operations are + * blocked for this folder, including folder, managed folder, and object + * operations. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The name of this folder. + * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The name of this folder. + * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The version of the metadata for this folder. Used for + * preconditions and for detecting changes in metadata. + * + * Generated from protobuf field int64 metageneration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getMetageneration() + { + return $this->metageneration; + } + + /** + * Output only. The version of the metadata for this folder. Used for + * preconditions and for detecting changes in metadata. + * + * Generated from protobuf field int64 metageneration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setMetageneration($var) + { + GPBUtil::checkInt64($var); + $this->metageneration = $var; + + return $this; + } + + /** + * Output only. The creation time of the folder. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The creation time of the folder. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The modification time of the folder. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The modification time of the folder. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. Only present if the folder is part of an ongoing RenameFolder + * operation. Contains information which can be used to query the operation + * status. The presence of this field also indicates all write operations are + * blocked for this folder, including folder, managed folder, and object + * operations. + * + * Generated from protobuf field .google.storage.control.v2.PendingRenameInfo pending_rename_info = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Storage\Control\V2\PendingRenameInfo|null + */ + public function getPendingRenameInfo() + { + return $this->pending_rename_info; + } + + public function hasPendingRenameInfo() + { + return isset($this->pending_rename_info); + } + + public function clearPendingRenameInfo() + { + unset($this->pending_rename_info); + } + + /** + * Output only. Only present if the folder is part of an ongoing RenameFolder + * operation. Contains information which can be used to query the operation + * status. The presence of this field also indicates all write operations are + * blocked for this folder, including folder, managed folder, and object + * operations. + * + * Generated from protobuf field .google.storage.control.v2.PendingRenameInfo pending_rename_info = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Storage\Control\V2\PendingRenameInfo $var + * @return $this + */ + public function setPendingRenameInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Storage\Control\V2\PendingRenameInfo::class); + $this->pending_rename_info = $var; + + return $this; + } + +} + diff --git a/StorageControl/src/V2/GetFolderRequest.php b/StorageControl/src/V2/GetFolderRequest.php new file mode 100644 index 000000000000..2319f89f3424 --- /dev/null +++ b/StorageControl/src/V2/GetFolderRequest.php @@ -0,0 +1,222 @@ +google.storage.control.v2.GetFolderRequest + */ +class GetFolderRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the folder. + * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` + * + * Generated from protobuf field string name = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Makes the operation only succeed conditional on whether the folder's + * current metageneration matches the given value. + * + * Generated from protobuf field optional int64 if_metageneration_match = 3; + */ + protected $if_metageneration_match = null; + /** + * Makes the operation only succeed conditional on whether the folder's + * current metageneration does not match the given value. + * + * Generated from protobuf field optional int64 if_metageneration_not_match = 4; + */ + protected $if_metageneration_not_match = null; + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $name Required. Name of the folder. + * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` + * Please see {@see StorageControlClient::folderName()} for help formatting this field. + * + * @return \Google\Cloud\Storage\Control\V2\GetFolderRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the folder. + * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` + * @type int|string $if_metageneration_match + * Makes the operation only succeed conditional on whether the folder's + * current metageneration matches the given value. + * @type int|string $if_metageneration_not_match + * Makes the operation only succeed conditional on whether the folder's + * current metageneration does not match the given value. + * @type string $request_id + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the folder. + * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` + * + * Generated from protobuf field string name = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the folder. + * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` + * + * Generated from protobuf field string name = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Makes the operation only succeed conditional on whether the folder's + * current metageneration matches the given value. + * + * Generated from protobuf field optional int64 if_metageneration_match = 3; + * @return int|string + */ + public function getIfMetagenerationMatch() + { + return isset($this->if_metageneration_match) ? $this->if_metageneration_match : 0; + } + + public function hasIfMetagenerationMatch() + { + return isset($this->if_metageneration_match); + } + + public function clearIfMetagenerationMatch() + { + unset($this->if_metageneration_match); + } + + /** + * Makes the operation only succeed conditional on whether the folder's + * current metageneration matches the given value. + * + * Generated from protobuf field optional int64 if_metageneration_match = 3; + * @param int|string $var + * @return $this + */ + public function setIfMetagenerationMatch($var) + { + GPBUtil::checkInt64($var); + $this->if_metageneration_match = $var; + + return $this; + } + + /** + * Makes the operation only succeed conditional on whether the folder's + * current metageneration does not match the given value. + * + * Generated from protobuf field optional int64 if_metageneration_not_match = 4; + * @return int|string + */ + public function getIfMetagenerationNotMatch() + { + return isset($this->if_metageneration_not_match) ? $this->if_metageneration_not_match : 0; + } + + public function hasIfMetagenerationNotMatch() + { + return isset($this->if_metageneration_not_match); + } + + public function clearIfMetagenerationNotMatch() + { + unset($this->if_metageneration_not_match); + } + + /** + * Makes the operation only succeed conditional on whether the folder's + * current metageneration does not match the given value. + * + * Generated from protobuf field optional int64 if_metageneration_not_match = 4; + * @param int|string $var + * @return $this + */ + public function setIfMetagenerationNotMatch($var) + { + GPBUtil::checkInt64($var); + $this->if_metageneration_not_match = $var; + + return $this; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/StorageControl/src/V2/GetManagedFolderRequest.php b/StorageControl/src/V2/GetManagedFolderRequest.php new file mode 100644 index 000000000000..b4deee313827 --- /dev/null +++ b/StorageControl/src/V2/GetManagedFolderRequest.php @@ -0,0 +1,225 @@ +google.storage.control.v2.GetManagedFolderRequest + */ +class GetManagedFolderRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the managed folder. + * Format: + * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` + * + * Generated from protobuf field string name = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The operation succeeds conditional on the managed folder's current + * metageneration matching the value here specified. + * + * Generated from protobuf field optional int64 if_metageneration_match = 3; + */ + protected $if_metageneration_match = null; + /** + * The operation succeeds conditional on the managed folder's current + * metageneration NOT matching the value here specified. + * + * Generated from protobuf field optional int64 if_metageneration_not_match = 4; + */ + protected $if_metageneration_not_match = null; + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $name Required. Name of the managed folder. + * Format: + * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` + * Please see {@see StorageControlClient::managedFolderName()} for help formatting this field. + * + * @return \Google\Cloud\Storage\Control\V2\GetManagedFolderRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the managed folder. + * Format: + * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` + * @type int|string $if_metageneration_match + * The operation succeeds conditional on the managed folder's current + * metageneration matching the value here specified. + * @type int|string $if_metageneration_not_match + * The operation succeeds conditional on the managed folder's current + * metageneration NOT matching the value here specified. + * @type string $request_id + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the managed folder. + * Format: + * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` + * + * Generated from protobuf field string name = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the managed folder. + * Format: + * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` + * + * Generated from protobuf field string name = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The operation succeeds conditional on the managed folder's current + * metageneration matching the value here specified. + * + * Generated from protobuf field optional int64 if_metageneration_match = 3; + * @return int|string + */ + public function getIfMetagenerationMatch() + { + return isset($this->if_metageneration_match) ? $this->if_metageneration_match : 0; + } + + public function hasIfMetagenerationMatch() + { + return isset($this->if_metageneration_match); + } + + public function clearIfMetagenerationMatch() + { + unset($this->if_metageneration_match); + } + + /** + * The operation succeeds conditional on the managed folder's current + * metageneration matching the value here specified. + * + * Generated from protobuf field optional int64 if_metageneration_match = 3; + * @param int|string $var + * @return $this + */ + public function setIfMetagenerationMatch($var) + { + GPBUtil::checkInt64($var); + $this->if_metageneration_match = $var; + + return $this; + } + + /** + * The operation succeeds conditional on the managed folder's current + * metageneration NOT matching the value here specified. + * + * Generated from protobuf field optional int64 if_metageneration_not_match = 4; + * @return int|string + */ + public function getIfMetagenerationNotMatch() + { + return isset($this->if_metageneration_not_match) ? $this->if_metageneration_not_match : 0; + } + + public function hasIfMetagenerationNotMatch() + { + return isset($this->if_metageneration_not_match); + } + + public function clearIfMetagenerationNotMatch() + { + unset($this->if_metageneration_not_match); + } + + /** + * The operation succeeds conditional on the managed folder's current + * metageneration NOT matching the value here specified. + * + * Generated from protobuf field optional int64 if_metageneration_not_match = 4; + * @param int|string $var + * @return $this + */ + public function setIfMetagenerationNotMatch($var) + { + GPBUtil::checkInt64($var); + $this->if_metageneration_not_match = $var; + + return $this; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/StorageControl/src/V2/GetStorageLayoutRequest.php b/StorageControl/src/V2/GetStorageLayoutRequest.php new file mode 100644 index 000000000000..ca2429d9ac1f --- /dev/null +++ b/StorageControl/src/V2/GetStorageLayoutRequest.php @@ -0,0 +1,162 @@ +google.storage.control.v2.GetStorageLayoutRequest + */ +class GetStorageLayoutRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the StorageLayout resource. + * Format: `projects/{project}/buckets/{bucket}/storageLayout` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * An optional prefix used for permission check. It is useful when the caller + * only has limited permissions under a specific prefix. + * + * Generated from protobuf field string prefix = 2; + */ + protected $prefix = ''; + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $name Required. The name of the StorageLayout resource. + * Format: `projects/{project}/buckets/{bucket}/storageLayout` + * Please see {@see StorageControlClient::storageLayoutName()} for help formatting this field. + * + * @return \Google\Cloud\Storage\Control\V2\GetStorageLayoutRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the StorageLayout resource. + * Format: `projects/{project}/buckets/{bucket}/storageLayout` + * @type string $prefix + * An optional prefix used for permission check. It is useful when the caller + * only has limited permissions under a specific prefix. + * @type string $request_id + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the StorageLayout resource. + * Format: `projects/{project}/buckets/{bucket}/storageLayout` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the StorageLayout resource. + * Format: `projects/{project}/buckets/{bucket}/storageLayout` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * An optional prefix used for permission check. It is useful when the caller + * only has limited permissions under a specific prefix. + * + * Generated from protobuf field string prefix = 2; + * @return string + */ + public function getPrefix() + { + return $this->prefix; + } + + /** + * An optional prefix used for permission check. It is useful when the caller + * only has limited permissions under a specific prefix. + * + * Generated from protobuf field string prefix = 2; + * @param string $var + * @return $this + */ + public function setPrefix($var) + { + GPBUtil::checkString($var, True); + $this->prefix = $var; + + return $this; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/StorageControl/src/V2/ListFoldersRequest.php b/StorageControl/src/V2/ListFoldersRequest.php new file mode 100644 index 000000000000..58c36f44ffeb --- /dev/null +++ b/StorageControl/src/V2/ListFoldersRequest.php @@ -0,0 +1,374 @@ +google.storage.control.v2.ListFoldersRequest + */ +class ListFoldersRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the bucket in which to look for folders. The bucket must + * be a hierarchical namespace enabled bucket. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Maximum number of folders to return in a single response. The + * service will use this parameter or 1,000 items, whichever is smaller. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A previously-returned page token representing part of the larger + * set of results to view. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. Filter results to folders whose names begin with this prefix. + * If set, the value must either be an empty string or end with a '/'. + * + * Generated from protobuf field string prefix = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $prefix = ''; + /** + * Optional. If set, returns results in a directory-like mode. The results + * will only include folders that either exactly match the above prefix, or + * are one level below the prefix. The only supported value is '/'. + * + * Generated from protobuf field string delimiter = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $delimiter = ''; + /** + * Optional. Filter results to folders whose names are lexicographically equal + * to or after lexicographic_start. If lexicographic_end is also set, the + * folders listed have names between lexicographic_start (inclusive) and + * lexicographic_end (exclusive). + * + * Generated from protobuf field string lexicographic_start = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $lexicographic_start = ''; + /** + * Optional. Filter results to folders whose names are lexicographically + * before lexicographic_end. If lexicographic_start is also set, the folders + * listed have names between lexicographic_start (inclusive) and + * lexicographic_end (exclusive). + * + * Generated from protobuf field string lexicographic_end = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $lexicographic_end = ''; + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $parent Required. Name of the bucket in which to look for folders. The bucket must + * be a hierarchical namespace enabled bucket. Please see + * {@see StorageControlClient::bucketName()} for help formatting this field. + * + * @return \Google\Cloud\Storage\Control\V2\ListFoldersRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Name of the bucket in which to look for folders. The bucket must + * be a hierarchical namespace enabled bucket. + * @type int $page_size + * Optional. Maximum number of folders to return in a single response. The + * service will use this parameter or 1,000 items, whichever is smaller. + * @type string $page_token + * Optional. A previously-returned page token representing part of the larger + * set of results to view. + * @type string $prefix + * Optional. Filter results to folders whose names begin with this prefix. + * If set, the value must either be an empty string or end with a '/'. + * @type string $delimiter + * Optional. If set, returns results in a directory-like mode. The results + * will only include folders that either exactly match the above prefix, or + * are one level below the prefix. The only supported value is '/'. + * @type string $lexicographic_start + * Optional. Filter results to folders whose names are lexicographically equal + * to or after lexicographic_start. If lexicographic_end is also set, the + * folders listed have names between lexicographic_start (inclusive) and + * lexicographic_end (exclusive). + * @type string $lexicographic_end + * Optional. Filter results to folders whose names are lexicographically + * before lexicographic_end. If lexicographic_start is also set, the folders + * listed have names between lexicographic_start (inclusive) and + * lexicographic_end (exclusive). + * @type string $request_id + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the bucket in which to look for folders. The bucket must + * be a hierarchical namespace enabled bucket. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Name of the bucket in which to look for folders. The bucket must + * be a hierarchical namespace enabled bucket. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. Maximum number of folders to return in a single response. The + * service will use this parameter or 1,000 items, whichever is smaller. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. Maximum number of folders to return in a single response. The + * service will use this parameter or 1,000 items, whichever is smaller. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A previously-returned page token representing part of the larger + * set of results to view. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A previously-returned page token representing part of the larger + * set of results to view. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. Filter results to folders whose names begin with this prefix. + * If set, the value must either be an empty string or end with a '/'. + * + * Generated from protobuf field string prefix = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPrefix() + { + return $this->prefix; + } + + /** + * Optional. Filter results to folders whose names begin with this prefix. + * If set, the value must either be an empty string or end with a '/'. + * + * Generated from protobuf field string prefix = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPrefix($var) + { + GPBUtil::checkString($var, True); + $this->prefix = $var; + + return $this; + } + + /** + * Optional. If set, returns results in a directory-like mode. The results + * will only include folders that either exactly match the above prefix, or + * are one level below the prefix. The only supported value is '/'. + * + * Generated from protobuf field string delimiter = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDelimiter() + { + return $this->delimiter; + } + + /** + * Optional. If set, returns results in a directory-like mode. The results + * will only include folders that either exactly match the above prefix, or + * are one level below the prefix. The only supported value is '/'. + * + * Generated from protobuf field string delimiter = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDelimiter($var) + { + GPBUtil::checkString($var, True); + $this->delimiter = $var; + + return $this; + } + + /** + * Optional. Filter results to folders whose names are lexicographically equal + * to or after lexicographic_start. If lexicographic_end is also set, the + * folders listed have names between lexicographic_start (inclusive) and + * lexicographic_end (exclusive). + * + * Generated from protobuf field string lexicographic_start = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getLexicographicStart() + { + return $this->lexicographic_start; + } + + /** + * Optional. Filter results to folders whose names are lexicographically equal + * to or after lexicographic_start. If lexicographic_end is also set, the + * folders listed have names between lexicographic_start (inclusive) and + * lexicographic_end (exclusive). + * + * Generated from protobuf field string lexicographic_start = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setLexicographicStart($var) + { + GPBUtil::checkString($var, True); + $this->lexicographic_start = $var; + + return $this; + } + + /** + * Optional. Filter results to folders whose names are lexicographically + * before lexicographic_end. If lexicographic_start is also set, the folders + * listed have names between lexicographic_start (inclusive) and + * lexicographic_end (exclusive). + * + * Generated from protobuf field string lexicographic_end = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getLexicographicEnd() + { + return $this->lexicographic_end; + } + + /** + * Optional. Filter results to folders whose names are lexicographically + * before lexicographic_end. If lexicographic_start is also set, the folders + * listed have names between lexicographic_start (inclusive) and + * lexicographic_end (exclusive). + * + * Generated from protobuf field string lexicographic_end = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setLexicographicEnd($var) + { + GPBUtil::checkString($var, True); + $this->lexicographic_end = $var; + + return $this; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/StorageControl/src/V2/ListFoldersResponse.php b/StorageControl/src/V2/ListFoldersResponse.php new file mode 100644 index 000000000000..eb67af3ca9e8 --- /dev/null +++ b/StorageControl/src/V2/ListFoldersResponse.php @@ -0,0 +1,105 @@ +google.storage.control.v2.ListFoldersResponse + */ +class ListFoldersResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of child folders + * + * Generated from protobuf field repeated .google.storage.control.v2.Folder folders = 1; + */ + private $folders; + /** + * The continuation token, used to page through large result sets. Provide + * this value in a subsequent request to return the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Storage\Control\V2\Folder>|\Google\Protobuf\Internal\RepeatedField $folders + * The list of child folders + * @type string $next_page_token + * The continuation token, used to page through large result sets. Provide + * this value in a subsequent request to return the next page of results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * The list of child folders + * + * Generated from protobuf field repeated .google.storage.control.v2.Folder folders = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFolders() + { + return $this->folders; + } + + /** + * The list of child folders + * + * Generated from protobuf field repeated .google.storage.control.v2.Folder folders = 1; + * @param array<\Google\Cloud\Storage\Control\V2\Folder>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFolders($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Storage\Control\V2\Folder::class); + $this->folders = $arr; + + return $this; + } + + /** + * The continuation token, used to page through large result sets. Provide + * this value in a subsequent request to return the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The continuation token, used to page through large result sets. Provide + * this value in a subsequent request to return the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/StorageControl/src/V2/ListManagedFoldersRequest.php b/StorageControl/src/V2/ListManagedFoldersRequest.php new file mode 100644 index 000000000000..4af92f638e5a --- /dev/null +++ b/StorageControl/src/V2/ListManagedFoldersRequest.php @@ -0,0 +1,233 @@ +google.storage.control.v2.ListManagedFoldersRequest + */ +class ListManagedFoldersRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the bucket this managed folder belongs to. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Maximum number of managed folders to return in a single response. + * The service will use this parameter or 1,000 items, whichever is smaller. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A previously-returned page token representing part of the larger + * set of results to view. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. Filter results to match managed folders with name starting with + * this prefix. + * + * Generated from protobuf field string prefix = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $prefix = ''; + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $parent Required. Name of the bucket this managed folder belongs to. Please see + * {@see StorageControlClient::bucketName()} for help formatting this field. + * + * @return \Google\Cloud\Storage\Control\V2\ListManagedFoldersRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Name of the bucket this managed folder belongs to. + * @type int $page_size + * Optional. Maximum number of managed folders to return in a single response. + * The service will use this parameter or 1,000 items, whichever is smaller. + * @type string $page_token + * Optional. A previously-returned page token representing part of the larger + * set of results to view. + * @type string $prefix + * Optional. Filter results to match managed folders with name starting with + * this prefix. + * @type string $request_id + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the bucket this managed folder belongs to. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Name of the bucket this managed folder belongs to. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. Maximum number of managed folders to return in a single response. + * The service will use this parameter or 1,000 items, whichever is smaller. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. Maximum number of managed folders to return in a single response. + * The service will use this parameter or 1,000 items, whichever is smaller. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A previously-returned page token representing part of the larger + * set of results to view. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A previously-returned page token representing part of the larger + * set of results to view. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. Filter results to match managed folders with name starting with + * this prefix. + * + * Generated from protobuf field string prefix = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPrefix() + { + return $this->prefix; + } + + /** + * Optional. Filter results to match managed folders with name starting with + * this prefix. + * + * Generated from protobuf field string prefix = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPrefix($var) + { + GPBUtil::checkString($var, True); + $this->prefix = $var; + + return $this; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/StorageControl/src/V2/ListManagedFoldersResponse.php b/StorageControl/src/V2/ListManagedFoldersResponse.php new file mode 100644 index 000000000000..7ca7daea2e9c --- /dev/null +++ b/StorageControl/src/V2/ListManagedFoldersResponse.php @@ -0,0 +1,105 @@ +google.storage.control.v2.ListManagedFoldersResponse + */ +class ListManagedFoldersResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of matching managed folders + * + * Generated from protobuf field repeated .google.storage.control.v2.ManagedFolder managed_folders = 1; + */ + private $managed_folders; + /** + * The continuation token, used to page through large result sets. Provide + * this value in a subsequent request to return the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Storage\Control\V2\ManagedFolder>|\Google\Protobuf\Internal\RepeatedField $managed_folders + * The list of matching managed folders + * @type string $next_page_token + * The continuation token, used to page through large result sets. Provide + * this value in a subsequent request to return the next page of results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * The list of matching managed folders + * + * Generated from protobuf field repeated .google.storage.control.v2.ManagedFolder managed_folders = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getManagedFolders() + { + return $this->managed_folders; + } + + /** + * The list of matching managed folders + * + * Generated from protobuf field repeated .google.storage.control.v2.ManagedFolder managed_folders = 1; + * @param array<\Google\Cloud\Storage\Control\V2\ManagedFolder>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setManagedFolders($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Storage\Control\V2\ManagedFolder::class); + $this->managed_folders = $arr; + + return $this; + } + + /** + * The continuation token, used to page through large result sets. Provide + * this value in a subsequent request to return the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The continuation token, used to page through large result sets. Provide + * this value in a subsequent request to return the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/StorageControl/src/V2/ManagedFolder.php b/StorageControl/src/V2/ManagedFolder.php new file mode 100644 index 000000000000..46a6d1984b82 --- /dev/null +++ b/StorageControl/src/V2/ManagedFolder.php @@ -0,0 +1,205 @@ +google.storage.control.v2.ManagedFolder + */ +class ManagedFolder extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The name of this managed folder. + * Format: + * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. The metadata version of this managed folder. It increases + * whenever the metadata is updated. Used for preconditions and for detecting + * changes in metadata. Managed folders don't have a generation number. + * + * Generated from protobuf field int64 metageneration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $metageneration = 0; + /** + * Output only. The creation time of the managed folder. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The modification time of the managed folder. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The name of this managed folder. + * Format: + * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` + * @type int|string $metageneration + * Output only. The metadata version of this managed folder. It increases + * whenever the metadata is updated. Used for preconditions and for detecting + * changes in metadata. Managed folders don't have a generation number. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The creation time of the managed folder. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The modification time of the managed folder. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The name of this managed folder. + * Format: + * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The name of this managed folder. + * Format: + * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The metadata version of this managed folder. It increases + * whenever the metadata is updated. Used for preconditions and for detecting + * changes in metadata. Managed folders don't have a generation number. + * + * Generated from protobuf field int64 metageneration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getMetageneration() + { + return $this->metageneration; + } + + /** + * Output only. The metadata version of this managed folder. It increases + * whenever the metadata is updated. Used for preconditions and for detecting + * changes in metadata. Managed folders don't have a generation number. + * + * Generated from protobuf field int64 metageneration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setMetageneration($var) + { + GPBUtil::checkInt64($var); + $this->metageneration = $var; + + return $this; + } + + /** + * Output only. The creation time of the managed folder. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The creation time of the managed folder. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The modification time of the managed folder. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The modification time of the managed folder. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + +} + diff --git a/StorageControl/src/V2/PendingRenameInfo.php b/StorageControl/src/V2/PendingRenameInfo.php new file mode 100644 index 000000000000..52172ad37498 --- /dev/null +++ b/StorageControl/src/V2/PendingRenameInfo.php @@ -0,0 +1,67 @@ +google.storage.control.v2.PendingRenameInfo + */ +class PendingRenameInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The name of the rename operation. + * + * Generated from protobuf field string operation = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $operation = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $operation + * Output only. The name of the rename operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The name of the rename operation. + * + * Generated from protobuf field string operation = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getOperation() + { + return $this->operation; + } + + /** + * Output only. The name of the rename operation. + * + * Generated from protobuf field string operation = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setOperation($var) + { + GPBUtil::checkString($var, True); + $this->operation = $var; + + return $this; + } + +} + diff --git a/StorageControl/src/V2/RenameFolderMetadata.php b/StorageControl/src/V2/RenameFolderMetadata.php new file mode 100644 index 000000000000..d9d0313fd1a7 --- /dev/null +++ b/StorageControl/src/V2/RenameFolderMetadata.php @@ -0,0 +1,146 @@ +google.storage.control.v2.RenameFolderMetadata + */ +class RenameFolderMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Generic metadata for the long running operation. + * + * Generated from protobuf field .google.storage.control.v2.CommonLongRunningOperationMetadata common_metadata = 1; + */ + protected $common_metadata = null; + /** + * The path of the source folder. + * + * Generated from protobuf field string source_folder_id = 2; + */ + protected $source_folder_id = ''; + /** + * The path of the destination folder. + * + * Generated from protobuf field string destination_folder_id = 3; + */ + protected $destination_folder_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Storage\Control\V2\CommonLongRunningOperationMetadata $common_metadata + * Generic metadata for the long running operation. + * @type string $source_folder_id + * The path of the source folder. + * @type string $destination_folder_id + * The path of the destination folder. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Generic metadata for the long running operation. + * + * Generated from protobuf field .google.storage.control.v2.CommonLongRunningOperationMetadata common_metadata = 1; + * @return \Google\Cloud\Storage\Control\V2\CommonLongRunningOperationMetadata|null + */ + public function getCommonMetadata() + { + return $this->common_metadata; + } + + public function hasCommonMetadata() + { + return isset($this->common_metadata); + } + + public function clearCommonMetadata() + { + unset($this->common_metadata); + } + + /** + * Generic metadata for the long running operation. + * + * Generated from protobuf field .google.storage.control.v2.CommonLongRunningOperationMetadata common_metadata = 1; + * @param \Google\Cloud\Storage\Control\V2\CommonLongRunningOperationMetadata $var + * @return $this + */ + public function setCommonMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Storage\Control\V2\CommonLongRunningOperationMetadata::class); + $this->common_metadata = $var; + + return $this; + } + + /** + * The path of the source folder. + * + * Generated from protobuf field string source_folder_id = 2; + * @return string + */ + public function getSourceFolderId() + { + return $this->source_folder_id; + } + + /** + * The path of the source folder. + * + * Generated from protobuf field string source_folder_id = 2; + * @param string $var + * @return $this + */ + public function setSourceFolderId($var) + { + GPBUtil::checkString($var, True); + $this->source_folder_id = $var; + + return $this; + } + + /** + * The path of the destination folder. + * + * Generated from protobuf field string destination_folder_id = 3; + * @return string + */ + public function getDestinationFolderId() + { + return $this->destination_folder_id; + } + + /** + * The path of the destination folder. + * + * Generated from protobuf field string destination_folder_id = 3; + * @param string $var + * @return $this + */ + public function setDestinationFolderId($var) + { + GPBUtil::checkString($var, True); + $this->destination_folder_id = $var; + + return $this; + } + +} + diff --git a/StorageControl/src/V2/RenameFolderRequest.php b/StorageControl/src/V2/RenameFolderRequest.php new file mode 100644 index 000000000000..fd0605ae9953 --- /dev/null +++ b/StorageControl/src/V2/RenameFolderRequest.php @@ -0,0 +1,262 @@ +google.storage.control.v2.RenameFolderRequest + */ +class RenameFolderRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the source folder being renamed. + * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` + * + * Generated from protobuf field string name = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The destination folder ID, e.g. `foo/bar/`. + * + * Generated from protobuf field string destination_folder_id = 8 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $destination_folder_id = ''; + /** + * Makes the operation only succeed conditional on whether the source + * folder's current metageneration matches the given value. + * + * Generated from protobuf field optional int64 if_metageneration_match = 4; + */ + protected $if_metageneration_match = null; + /** + * Makes the operation only succeed conditional on whether the source + * folder's current metageneration does not match the given value. + * + * Generated from protobuf field optional int64 if_metageneration_not_match = 5; + */ + protected $if_metageneration_not_match = null; + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. This request is only + * idempotent if a `request_id` is provided. + * + * Generated from protobuf field string request_id = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $name Required. Name of the source folder being renamed. + * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` + * Please see {@see StorageControlClient::folderName()} for help formatting this field. + * @param string $destinationFolderId Required. The destination folder ID, e.g. `foo/bar/`. + * + * @return \Google\Cloud\Storage\Control\V2\RenameFolderRequest + * + * @experimental + */ + public static function build(string $name, string $destinationFolderId): self + { + return (new self()) + ->setName($name) + ->setDestinationFolderId($destinationFolderId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the source folder being renamed. + * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` + * @type string $destination_folder_id + * Required. The destination folder ID, e.g. `foo/bar/`. + * @type int|string $if_metageneration_match + * Makes the operation only succeed conditional on whether the source + * folder's current metageneration matches the given value. + * @type int|string $if_metageneration_not_match + * Makes the operation only succeed conditional on whether the source + * folder's current metageneration does not match the given value. + * @type string $request_id + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. This request is only + * idempotent if a `request_id` is provided. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the source folder being renamed. + * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` + * + * Generated from protobuf field string name = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the source folder being renamed. + * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` + * + * Generated from protobuf field string name = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The destination folder ID, e.g. `foo/bar/`. + * + * Generated from protobuf field string destination_folder_id = 8 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDestinationFolderId() + { + return $this->destination_folder_id; + } + + /** + * Required. The destination folder ID, e.g. `foo/bar/`. + * + * Generated from protobuf field string destination_folder_id = 8 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDestinationFolderId($var) + { + GPBUtil::checkString($var, True); + $this->destination_folder_id = $var; + + return $this; + } + + /** + * Makes the operation only succeed conditional on whether the source + * folder's current metageneration matches the given value. + * + * Generated from protobuf field optional int64 if_metageneration_match = 4; + * @return int|string + */ + public function getIfMetagenerationMatch() + { + return isset($this->if_metageneration_match) ? $this->if_metageneration_match : 0; + } + + public function hasIfMetagenerationMatch() + { + return isset($this->if_metageneration_match); + } + + public function clearIfMetagenerationMatch() + { + unset($this->if_metageneration_match); + } + + /** + * Makes the operation only succeed conditional on whether the source + * folder's current metageneration matches the given value. + * + * Generated from protobuf field optional int64 if_metageneration_match = 4; + * @param int|string $var + * @return $this + */ + public function setIfMetagenerationMatch($var) + { + GPBUtil::checkInt64($var); + $this->if_metageneration_match = $var; + + return $this; + } + + /** + * Makes the operation only succeed conditional on whether the source + * folder's current metageneration does not match the given value. + * + * Generated from protobuf field optional int64 if_metageneration_not_match = 5; + * @return int|string + */ + public function getIfMetagenerationNotMatch() + { + return isset($this->if_metageneration_not_match) ? $this->if_metageneration_not_match : 0; + } + + public function hasIfMetagenerationNotMatch() + { + return isset($this->if_metageneration_not_match); + } + + public function clearIfMetagenerationNotMatch() + { + unset($this->if_metageneration_not_match); + } + + /** + * Makes the operation only succeed conditional on whether the source + * folder's current metageneration does not match the given value. + * + * Generated from protobuf field optional int64 if_metageneration_not_match = 5; + * @param int|string $var + * @return $this + */ + public function setIfMetagenerationNotMatch($var) + { + GPBUtil::checkInt64($var); + $this->if_metageneration_not_match = $var; + + return $this; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. This request is only + * idempotent if a `request_id` is provided. + * + * Generated from protobuf field string request_id = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. This request is only + * idempotent if a `request_id` is provided. + * + * Generated from protobuf field string request_id = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/StorageControl/src/V2/StorageLayout.php b/StorageControl/src/V2/StorageLayout.php new file mode 100644 index 000000000000..a48fbe8ef2ee --- /dev/null +++ b/StorageControl/src/V2/StorageLayout.php @@ -0,0 +1,239 @@ +google.storage.control.v2.StorageLayout + */ +class StorageLayout extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The name of the StorageLayout resource. + * Format: `projects/{project}/buckets/{bucket}/storageLayout` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. The location of the bucket. + * + * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $location = ''; + /** + * Output only. The location type of the bucket (region, dual-region, + * multi-region, etc). + * + * Generated from protobuf field string location_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $location_type = ''; + /** + * Output only. The data placement configuration for custom dual region. If + * there is no configuration, this is not a custom dual region bucket. + * + * Generated from protobuf field .google.storage.control.v2.StorageLayout.CustomPlacementConfig custom_placement_config = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $custom_placement_config = null; + /** + * Output only. The bucket's hierarchical namespace configuration. If there is + * no configuration, the hierarchical namespace is disabled. + * + * Generated from protobuf field .google.storage.control.v2.StorageLayout.HierarchicalNamespace hierarchical_namespace = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $hierarchical_namespace = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The name of the StorageLayout resource. + * Format: `projects/{project}/buckets/{bucket}/storageLayout` + * @type string $location + * Output only. The location of the bucket. + * @type string $location_type + * Output only. The location type of the bucket (region, dual-region, + * multi-region, etc). + * @type \Google\Cloud\Storage\Control\V2\StorageLayout\CustomPlacementConfig $custom_placement_config + * Output only. The data placement configuration for custom dual region. If + * there is no configuration, this is not a custom dual region bucket. + * @type \Google\Cloud\Storage\Control\V2\StorageLayout\HierarchicalNamespace $hierarchical_namespace + * Output only. The bucket's hierarchical namespace configuration. If there is + * no configuration, the hierarchical namespace is disabled. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The name of the StorageLayout resource. + * Format: `projects/{project}/buckets/{bucket}/storageLayout` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The name of the StorageLayout resource. + * Format: `projects/{project}/buckets/{bucket}/storageLayout` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The location of the bucket. + * + * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getLocation() + { + return $this->location; + } + + /** + * Output only. The location of the bucket. + * + * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + + /** + * Output only. The location type of the bucket (region, dual-region, + * multi-region, etc). + * + * Generated from protobuf field string location_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getLocationType() + { + return $this->location_type; + } + + /** + * Output only. The location type of the bucket (region, dual-region, + * multi-region, etc). + * + * Generated from protobuf field string location_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setLocationType($var) + { + GPBUtil::checkString($var, True); + $this->location_type = $var; + + return $this; + } + + /** + * Output only. The data placement configuration for custom dual region. If + * there is no configuration, this is not a custom dual region bucket. + * + * Generated from protobuf field .google.storage.control.v2.StorageLayout.CustomPlacementConfig custom_placement_config = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Storage\Control\V2\StorageLayout\CustomPlacementConfig|null + */ + public function getCustomPlacementConfig() + { + return $this->custom_placement_config; + } + + public function hasCustomPlacementConfig() + { + return isset($this->custom_placement_config); + } + + public function clearCustomPlacementConfig() + { + unset($this->custom_placement_config); + } + + /** + * Output only. The data placement configuration for custom dual region. If + * there is no configuration, this is not a custom dual region bucket. + * + * Generated from protobuf field .google.storage.control.v2.StorageLayout.CustomPlacementConfig custom_placement_config = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Storage\Control\V2\StorageLayout\CustomPlacementConfig $var + * @return $this + */ + public function setCustomPlacementConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Storage\Control\V2\StorageLayout\CustomPlacementConfig::class); + $this->custom_placement_config = $var; + + return $this; + } + + /** + * Output only. The bucket's hierarchical namespace configuration. If there is + * no configuration, the hierarchical namespace is disabled. + * + * Generated from protobuf field .google.storage.control.v2.StorageLayout.HierarchicalNamespace hierarchical_namespace = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Storage\Control\V2\StorageLayout\HierarchicalNamespace|null + */ + public function getHierarchicalNamespace() + { + return $this->hierarchical_namespace; + } + + public function hasHierarchicalNamespace() + { + return isset($this->hierarchical_namespace); + } + + public function clearHierarchicalNamespace() + { + unset($this->hierarchical_namespace); + } + + /** + * Output only. The bucket's hierarchical namespace configuration. If there is + * no configuration, the hierarchical namespace is disabled. + * + * Generated from protobuf field .google.storage.control.v2.StorageLayout.HierarchicalNamespace hierarchical_namespace = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Storage\Control\V2\StorageLayout\HierarchicalNamespace $var + * @return $this + */ + public function setHierarchicalNamespace($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Storage\Control\V2\StorageLayout\HierarchicalNamespace::class); + $this->hierarchical_namespace = $var; + + return $this; + } + +} + diff --git a/StorageControl/src/V2/StorageLayout/CustomPlacementConfig.php b/StorageControl/src/V2/StorageLayout/CustomPlacementConfig.php new file mode 100644 index 000000000000..97704ea47229 --- /dev/null +++ b/StorageControl/src/V2/StorageLayout/CustomPlacementConfig.php @@ -0,0 +1,70 @@ +google.storage.control.v2.StorageLayout.CustomPlacementConfig + */ +class CustomPlacementConfig extends \Google\Protobuf\Internal\Message +{ + /** + * List of locations to use for data placement. + * + * Generated from protobuf field repeated string data_locations = 1; + */ + private $data_locations; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $data_locations + * List of locations to use for data placement. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * List of locations to use for data placement. + * + * Generated from protobuf field repeated string data_locations = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDataLocations() + { + return $this->data_locations; + } + + /** + * List of locations to use for data placement. + * + * Generated from protobuf field repeated string data_locations = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDataLocations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->data_locations = $arr; + + return $this; + } + +} + + diff --git a/StorageControl/src/V2/StorageLayout/HierarchicalNamespace.php b/StorageControl/src/V2/StorageLayout/HierarchicalNamespace.php new file mode 100644 index 000000000000..6ee8111687cf --- /dev/null +++ b/StorageControl/src/V2/StorageLayout/HierarchicalNamespace.php @@ -0,0 +1,68 @@ +google.storage.control.v2.StorageLayout.HierarchicalNamespace + */ +class HierarchicalNamespace extends \Google\Protobuf\Internal\Message +{ + /** + * Enables the hierarchical namespace feature. + * + * Generated from protobuf field bool enabled = 1; + */ + protected $enabled = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $enabled + * Enables the hierarchical namespace feature. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Enables the hierarchical namespace feature. + * + * Generated from protobuf field bool enabled = 1; + * @return bool + */ + public function getEnabled() + { + return $this->enabled; + } + + /** + * Enables the hierarchical namespace feature. + * + * Generated from protobuf field bool enabled = 1; + * @param bool $var + * @return $this + */ + public function setEnabled($var) + { + GPBUtil::checkBool($var); + $this->enabled = $var; + + return $this; + } + +} + + diff --git a/StorageControl/src/V2/gapic_metadata.json b/StorageControl/src/V2/gapic_metadata.json new file mode 100644 index 000000000000..61ee835d8977 --- /dev/null +++ b/StorageControl/src/V2/gapic_metadata.json @@ -0,0 +1,68 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.storage.control.v2", + "libraryPackage": "Google\\Cloud\\Storage\\Control\\V2", + "services": { + "StorageControl": { + "clients": { + "grpc": { + "libraryClient": "StorageControlGapicClient", + "rpcs": { + "CreateFolder": { + "methods": [ + "createFolder" + ] + }, + "CreateManagedFolder": { + "methods": [ + "createManagedFolder" + ] + }, + "DeleteFolder": { + "methods": [ + "deleteFolder" + ] + }, + "DeleteManagedFolder": { + "methods": [ + "deleteManagedFolder" + ] + }, + "GetFolder": { + "methods": [ + "getFolder" + ] + }, + "GetManagedFolder": { + "methods": [ + "getManagedFolder" + ] + }, + "GetStorageLayout": { + "methods": [ + "getStorageLayout" + ] + }, + "ListFolders": { + "methods": [ + "listFolders" + ] + }, + "ListManagedFolders": { + "methods": [ + "listManagedFolders" + ] + }, + "RenameFolder": { + "methods": [ + "renameFolder" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/StorageControl/src/V2/resources/storage_control_client_config.json b/StorageControl/src/V2/resources/storage_control_client_config.json new file mode 100644 index 000000000000..b6522d27f8ab --- /dev/null +++ b/StorageControl/src/V2/resources/storage_control_client_config.json @@ -0,0 +1,98 @@ +{ + "interfaces": { + "google.storage.control.v2.StorageControl": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "RESOURCE_EXHAUSTED", + "UNAVAILABLE", + "DEADLINE_EXCEEDED", + "INTERNAL", + "UNKNOWN" + ], + "no_retry_1_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 2.0, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "CreateFolder": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateManagedFolder": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteFolder": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteManagedFolder": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetFolder": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetManagedFolder": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetStorageLayout": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListFolders": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListManagedFolders": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "RenameFolder": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/StorageControl/src/V2/resources/storage_control_descriptor_config.php b/StorageControl/src/V2/resources/storage_control_descriptor_config.php new file mode 100644 index 000000000000..351dee8ec73e --- /dev/null +++ b/StorageControl/src/V2/resources/storage_control_descriptor_config.php @@ -0,0 +1,222 @@ + [ + 'google.storage.control.v2.StorageControl' => [ + 'RenameFolder' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Storage\Control\V2\Folder', + 'metadataReturnType' => '\Google\Cloud\Storage\Control\V2\RenameFolderMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'bucket', + 'fieldAccessors' => [ + 'getName', + ], + 'matchers' => [ + '/^(?projects\/[^\/]+\/buckets\/[^\/]+)(?:\/.*)?$/', + ], + ], + ], + 'autoPopulatedFields' => [ + 'requestId' => \Google\Api\FieldInfo\Format::UUID4, + ], + ], + 'CreateFolder' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Storage\Control\V2\Folder', + 'headerParams' => [ + [ + 'keyName' => 'bucket', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + 'autoPopulatedFields' => [ + 'requestId' => \Google\Api\FieldInfo\Format::UUID4, + ], + ], + 'CreateManagedFolder' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Storage\Control\V2\ManagedFolder', + 'headerParams' => [ + [ + 'keyName' => 'bucket', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + 'autoPopulatedFields' => [ + 'requestId' => \Google\Api\FieldInfo\Format::UUID4, + ], + ], + 'DeleteFolder' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'bucket', + 'fieldAccessors' => [ + 'getName', + ], + 'matchers' => [ + '/^(?projects\/[^\/]+\/buckets\/[^\/]+)(?:\/.*)?$/', + ], + ], + ], + 'autoPopulatedFields' => [ + 'requestId' => \Google\Api\FieldInfo\Format::UUID4, + ], + ], + 'DeleteManagedFolder' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'bucket', + 'fieldAccessors' => [ + 'getName', + ], + 'matchers' => [ + '/^(?projects\/[^\/]+\/buckets\/[^\/]+)(?:\/.*)?$/', + ], + ], + ], + 'autoPopulatedFields' => [ + 'requestId' => \Google\Api\FieldInfo\Format::UUID4, + ], + ], + 'GetFolder' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Storage\Control\V2\Folder', + 'headerParams' => [ + [ + 'keyName' => 'bucket', + 'fieldAccessors' => [ + 'getName', + ], + 'matchers' => [ + '/^(?projects\/[^\/]+\/buckets\/[^\/]+)(?:\/.*)?$/', + ], + ], + ], + 'autoPopulatedFields' => [ + 'requestId' => \Google\Api\FieldInfo\Format::UUID4, + ], + ], + 'GetManagedFolder' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Storage\Control\V2\ManagedFolder', + 'headerParams' => [ + [ + 'keyName' => 'bucket', + 'fieldAccessors' => [ + 'getName', + ], + 'matchers' => [ + '/^(?projects\/[^\/]+\/buckets\/[^\/]+)(?:\/.*)?$/', + ], + ], + ], + 'autoPopulatedFields' => [ + 'requestId' => \Google\Api\FieldInfo\Format::UUID4, + ], + ], + 'GetStorageLayout' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Storage\Control\V2\StorageLayout', + 'headerParams' => [ + [ + 'keyName' => 'bucket', + 'fieldAccessors' => [ + 'getName', + ], + 'matchers' => [ + '/^(?projects\/[^\/]+\/buckets\/[^\/]+)(?:\/.*)?$/', + ], + ], + ], + 'autoPopulatedFields' => [ + 'requestId' => \Google\Api\FieldInfo\Format::UUID4, + ], + ], + 'ListFolders' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getFolders', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Storage\Control\V2\ListFoldersResponse', + 'headerParams' => [ + [ + 'keyName' => 'bucket', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListManagedFolders' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getManagedFolders', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Storage\Control\V2\ListManagedFoldersResponse', + 'headerParams' => [ + [ + 'keyName' => 'bucket', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + 'autoPopulatedFields' => [ + 'requestId' => \Google\Api\FieldInfo\Format::UUID4, + ], + ], + 'templateMap' => [ + 'bucket' => 'projects/{project}/buckets/{bucket}', + 'folder' => 'projects/{project}/buckets/{bucket}/folders/{folder=**}', + 'managedFolder' => 'projects/{project}/buckets/{bucket}/managedFolders/{managedFolder=**}', + 'storageLayout' => 'projects/{project}/buckets/{bucket}/storageLayout', + ], + ], + ], +]; diff --git a/StorageControl/tests/Unit/V2/Client/StorageControlClientTest.php b/StorageControl/tests/Unit/V2/Client/StorageControlClientTest.php new file mode 100644 index 000000000000..9d0b66f96030 --- /dev/null +++ b/StorageControl/tests/Unit/V2/Client/StorageControlClientTest.php @@ -0,0 +1,882 @@ +getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); + } + + /** @return StorageControlClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new StorageControlClient($options); + } + + /** @test */ + public function createFolderTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $metageneration = 1048558813; + $expectedResponse = new Folder(); + $expectedResponse->setName($name); + $expectedResponse->setMetageneration($metageneration); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->bucketName('[PROJECT]', '[BUCKET]'); + $folder = new Folder(); + $folderId = 'folderId527488652'; + $request = (new CreateFolderRequest()) + ->setParent($formattedParent) + ->setFolder($folder) + ->setFolderId($folderId); + $response = $gapicClient->createFolder($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.storage.control.v2.StorageControl/CreateFolder', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getFolder(); + $this->assertProtobufEquals($folder, $actualValue); + $actualValue = $actualRequestObject->getFolderId(); + $this->assertProtobufEquals($folderId, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createFolderExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->bucketName('[PROJECT]', '[BUCKET]'); + $folder = new Folder(); + $folderId = 'folderId527488652'; + $request = (new CreateFolderRequest()) + ->setParent($formattedParent) + ->setFolder($folder) + ->setFolderId($folderId); + try { + $gapicClient->createFolder($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createManagedFolderTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $metageneration = 1048558813; + $expectedResponse = new ManagedFolder(); + $expectedResponse->setName($name); + $expectedResponse->setMetageneration($metageneration); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->bucketName('[PROJECT]', '[BUCKET]'); + $managedFolder = new ManagedFolder(); + $managedFolderId = 'managedFolderId-239131156'; + $request = (new CreateManagedFolderRequest()) + ->setParent($formattedParent) + ->setManagedFolder($managedFolder) + ->setManagedFolderId($managedFolderId); + $response = $gapicClient->createManagedFolder($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.storage.control.v2.StorageControl/CreateManagedFolder', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getManagedFolder(); + $this->assertProtobufEquals($managedFolder, $actualValue); + $actualValue = $actualRequestObject->getManagedFolderId(); + $this->assertProtobufEquals($managedFolderId, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createManagedFolderExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->bucketName('[PROJECT]', '[BUCKET]'); + $managedFolder = new ManagedFolder(); + $managedFolderId = 'managedFolderId-239131156'; + $request = (new CreateManagedFolderRequest()) + ->setParent($formattedParent) + ->setManagedFolder($managedFolder) + ->setManagedFolderId($managedFolderId); + try { + $gapicClient->createManagedFolder($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteFolderTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->folderName('[PROJECT]', '[BUCKET]', '[FOLDER]'); + $request = (new DeleteFolderRequest())->setName($formattedName); + $gapicClient->deleteFolder($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.storage.control.v2.StorageControl/DeleteFolder', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteFolderExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->folderName('[PROJECT]', '[BUCKET]', '[FOLDER]'); + $request = (new DeleteFolderRequest())->setName($formattedName); + try { + $gapicClient->deleteFolder($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteManagedFolderTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->managedFolderName('[PROJECT]', '[BUCKET]', '[MANAGEDFOLDER]'); + $request = (new DeleteManagedFolderRequest())->setName($formattedName); + $gapicClient->deleteManagedFolder($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.storage.control.v2.StorageControl/DeleteManagedFolder', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteManagedFolderExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->managedFolderName('[PROJECT]', '[BUCKET]', '[MANAGEDFOLDER]'); + $request = (new DeleteManagedFolderRequest())->setName($formattedName); + try { + $gapicClient->deleteManagedFolder($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getFolderTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $metageneration = 1048558813; + $expectedResponse = new Folder(); + $expectedResponse->setName($name2); + $expectedResponse->setMetageneration($metageneration); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->folderName('[PROJECT]', '[BUCKET]', '[FOLDER]'); + $request = (new GetFolderRequest())->setName($formattedName); + $response = $gapicClient->getFolder($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.storage.control.v2.StorageControl/GetFolder', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getFolderExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->folderName('[PROJECT]', '[BUCKET]', '[FOLDER]'); + $request = (new GetFolderRequest())->setName($formattedName); + try { + $gapicClient->getFolder($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getManagedFolderTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $metageneration = 1048558813; + $expectedResponse = new ManagedFolder(); + $expectedResponse->setName($name2); + $expectedResponse->setMetageneration($metageneration); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->managedFolderName('[PROJECT]', '[BUCKET]', '[MANAGEDFOLDER]'); + $request = (new GetManagedFolderRequest())->setName($formattedName); + $response = $gapicClient->getManagedFolder($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.storage.control.v2.StorageControl/GetManagedFolder', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getManagedFolderExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->managedFolderName('[PROJECT]', '[BUCKET]', '[MANAGEDFOLDER]'); + $request = (new GetManagedFolderRequest())->setName($formattedName); + try { + $gapicClient->getManagedFolder($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getStorageLayoutTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $location = 'location1901043637'; + $locationType = 'locationType-1796591228'; + $expectedResponse = new StorageLayout(); + $expectedResponse->setName($name2); + $expectedResponse->setLocation($location); + $expectedResponse->setLocationType($locationType); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->storageLayoutName('[PROJECT]', '[BUCKET]'); + $request = (new GetStorageLayoutRequest())->setName($formattedName); + $response = $gapicClient->getStorageLayout($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.storage.control.v2.StorageControl/GetStorageLayout', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getStorageLayoutExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->storageLayoutName('[PROJECT]', '[BUCKET]'); + $request = (new GetStorageLayoutRequest())->setName($formattedName); + try { + $gapicClient->getStorageLayout($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listFoldersTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $foldersElement = new Folder(); + $folders = [$foldersElement]; + $expectedResponse = new ListFoldersResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setFolders($folders); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->bucketName('[PROJECT]', '[BUCKET]'); + $request = (new ListFoldersRequest())->setParent($formattedParent); + $response = $gapicClient->listFolders($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getFolders()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.storage.control.v2.StorageControl/ListFolders', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listFoldersExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->bucketName('[PROJECT]', '[BUCKET]'); + $request = (new ListFoldersRequest())->setParent($formattedParent); + try { + $gapicClient->listFolders($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listManagedFoldersTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $managedFoldersElement = new ManagedFolder(); + $managedFolders = [$managedFoldersElement]; + $expectedResponse = new ListManagedFoldersResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setManagedFolders($managedFolders); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->bucketName('[PROJECT]', '[BUCKET]'); + $request = (new ListManagedFoldersRequest())->setParent($formattedParent); + $response = $gapicClient->listManagedFolders($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getManagedFolders()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.storage.control.v2.StorageControl/ListManagedFolders', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listManagedFoldersExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->bucketName('[PROJECT]', '[BUCKET]'); + $request = (new ListManagedFoldersRequest())->setParent($formattedParent); + try { + $gapicClient->listManagedFolders($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function renameFolderTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/renameFolderTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $metageneration = 1048558813; + $expectedResponse = new Folder(); + $expectedResponse->setName($name2); + $expectedResponse->setMetageneration($metageneration); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/renameFolderTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->folderName('[PROJECT]', '[BUCKET]', '[FOLDER]'); + $destinationFolderId = 'destinationFolderId368368539'; + $request = (new RenameFolderRequest())->setName($formattedName)->setDestinationFolderId($destinationFolderId); + $response = $gapicClient->renameFolder($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.storage.control.v2.StorageControl/RenameFolder', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualApiRequestObject->getDestinationFolderId(); + $this->assertProtobufEquals($destinationFolderId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/renameFolderTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function renameFolderExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/renameFolderTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->folderName('[PROJECT]', '[BUCKET]', '[FOLDER]'); + $destinationFolderId = 'destinationFolderId368368539'; + $request = (new RenameFolderRequest())->setName($formattedName)->setDestinationFolderId($destinationFolderId); + $response = $gapicClient->renameFolder($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/renameFolderTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createFolderAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $metageneration = 1048558813; + $expectedResponse = new Folder(); + $expectedResponse->setName($name); + $expectedResponse->setMetageneration($metageneration); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->bucketName('[PROJECT]', '[BUCKET]'); + $folder = new Folder(); + $folderId = 'folderId527488652'; + $request = (new CreateFolderRequest()) + ->setParent($formattedParent) + ->setFolder($folder) + ->setFolderId($folderId); + $response = $gapicClient->createFolderAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.storage.control.v2.StorageControl/CreateFolder', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getFolder(); + $this->assertProtobufEquals($folder, $actualValue); + $actualValue = $actualRequestObject->getFolderId(); + $this->assertProtobufEquals($folderId, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/StorageInsights/VERSION b/StorageInsights/VERSION index d15723fbe8de..1c09c74e221c 100644 --- a/StorageInsights/VERSION +++ b/StorageInsights/VERSION @@ -1 +1 @@ -0.3.2 +0.3.3 diff --git a/StorageTransfer/VERSION b/StorageTransfer/VERSION index 9df886c42a1e..428b770e3e23 100644 --- a/StorageTransfer/VERSION +++ b/StorageTransfer/VERSION @@ -1 +1 @@ -1.4.2 +1.4.3 diff --git a/Support/VERSION b/Support/VERSION index ee1372d33a29..7179039691ce 100644 --- a/Support/VERSION +++ b/Support/VERSION @@ -1 +1 @@ -0.2.2 +0.2.3 diff --git a/Talent/VERSION b/Talent/VERSION index 1892b9267677..31e5c843497c 100644 --- a/Talent/VERSION +++ b/Talent/VERSION @@ -1 +1 @@ -1.3.2 +1.3.3 diff --git a/Tasks/VERSION b/Tasks/VERSION index 4ea8ad87e6e4..4e00d0ac0791 100644 --- a/Tasks/VERSION +++ b/Tasks/VERSION @@ -1 +1 @@ -1.14.3 +1.14.4 diff --git a/TelcoAutomation/VERSION b/TelcoAutomation/VERSION index ee1372d33a29..7179039691ce 100644 --- a/TelcoAutomation/VERSION +++ b/TelcoAutomation/VERSION @@ -1 +1 @@ -0.2.2 +0.2.3 diff --git a/TextToSpeech/VERSION b/TextToSpeech/VERSION index 53adb84c8220..a7ee35a3ea70 100644 --- a/TextToSpeech/VERSION +++ b/TextToSpeech/VERSION @@ -1 +1 @@ -1.8.2 +1.8.3 diff --git a/Tpu/VERSION b/Tpu/VERSION index 9df886c42a1e..428b770e3e23 100644 --- a/Tpu/VERSION +++ b/Tpu/VERSION @@ -1 +1 @@ -1.4.2 +1.4.3 diff --git a/Trace/VERSION b/Trace/VERSION index a7ee35a3ea70..bfa363e76ed7 100644 --- a/Trace/VERSION +++ b/Trace/VERSION @@ -1 +1 @@ -1.8.3 +1.8.4 diff --git a/Trace/src/TraceClient.php b/Trace/src/TraceClient.php index 8f50841557b9..fb4fac5f3ec2 100644 --- a/Trace/src/TraceClient.php +++ b/Trace/src/TraceClient.php @@ -40,7 +40,7 @@ class TraceClient { use ClientTrait; - const VERSION = '1.8.3'; + const VERSION = '1.8.4'; const FULL_CONTROL_SCOPE = 'https://www.googleapis.com/auth/cloud-platform'; diff --git a/Translate/VERSION b/Translate/VERSION index b5aaf81f9cf3..ff278344b339 100644 --- a/Translate/VERSION +++ b/Translate/VERSION @@ -1 +1 @@ -1.17.4 +1.17.5 diff --git a/VideoIntelligence/VERSION b/VideoIntelligence/VERSION index 42cf0675c566..f2380cc7aefe 100644 --- a/VideoIntelligence/VERSION +++ b/VideoIntelligence/VERSION @@ -1 +1 @@ -1.15.2 +1.15.3 diff --git a/VideoIntelligence/src/V1/resources/video_intelligence_service_client_config.json b/VideoIntelligence/src/V1/resources/video_intelligence_service_client_config.json index 5ed73df197b6..7bf68af5fc25 100644 --- a/VideoIntelligence/src/V1/resources/video_intelligence_service_client_config.json +++ b/VideoIntelligence/src/V1/resources/video_intelligence_service_client_config.json @@ -2,28 +2,37 @@ "interfaces": { "google.cloud.videointelligence.v1.VideoIntelligenceService": { "retry_codes": { - "idempotent": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ], - "non_idempotent": [] + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] }, "retry_params": { - "default": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 20000, + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 20000, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 2.5, + "max_retry_delay_millis": 120000, + "initial_rpc_timeout_millis": 600000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 600000, "total_timeout_millis": 600000 } }, "methods": { "AnnotateVideo": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" } } } diff --git a/VideoLiveStream/VERSION b/VideoLiveStream/VERSION index 7486fdbc50b3..f38fc5393ff6 100644 --- a/VideoLiveStream/VERSION +++ b/VideoLiveStream/VERSION @@ -1 +1 @@ -0.7.2 +0.7.3 diff --git a/VideoStitcher/VERSION b/VideoStitcher/VERSION index 100435be135a..ee94dd834b53 100644 --- a/VideoStitcher/VERSION +++ b/VideoStitcher/VERSION @@ -1 +1 @@ -0.8.2 +0.8.3 diff --git a/VideoTranscoder/VERSION b/VideoTranscoder/VERSION index 5eef0f10e8cd..a3f5a8ed4d60 100644 --- a/VideoTranscoder/VERSION +++ b/VideoTranscoder/VERSION @@ -1 +1 @@ -0.10.2 +0.10.3 diff --git a/Vision/VERSION b/Vision/VERSION index 9ab8337f3962..8fdcf3869464 100644 --- a/Vision/VERSION +++ b/Vision/VERSION @@ -1 +1 @@ -1.9.1 +1.9.2 diff --git a/Vision/src/VisionClient.php b/Vision/src/VisionClient.php index f5e0e55b1b97..7976f3547a04 100644 --- a/Vision/src/VisionClient.php +++ b/Vision/src/VisionClient.php @@ -50,7 +50,7 @@ class VisionClient use ClientTrait; use ValidateTrait; - const VERSION = '1.9.1'; + const VERSION = '1.9.2'; const FULL_CONTROL_SCOPE = 'https://www.googleapis.com/auth/cloud-platform'; diff --git a/VmMigration/VERSION b/VmMigration/VERSION index b6160487433b..844f6a91acb9 100644 --- a/VmMigration/VERSION +++ b/VmMigration/VERSION @@ -1 +1 @@ -0.6.2 +0.6.3 diff --git a/VmwareEngine/VERSION b/VmwareEngine/VERSION index be14282b7fff..7d8568351b4f 100644 --- a/VmwareEngine/VERSION +++ b/VmwareEngine/VERSION @@ -1 +1 @@ -0.5.3 +0.5.4 diff --git a/VpcAccess/VERSION b/VpcAccess/VERSION index 1892b9267677..31e5c843497c 100644 --- a/VpcAccess/VERSION +++ b/VpcAccess/VERSION @@ -1 +1 @@ -1.3.2 +1.3.3 diff --git a/WebRisk/VERSION b/WebRisk/VERSION index 4cda8f19edc7..8af85beb5159 100644 --- a/WebRisk/VERSION +++ b/WebRisk/VERSION @@ -1 +1 @@ -1.5.2 +1.5.3 diff --git a/WebSecurityScanner/VERSION b/WebSecurityScanner/VERSION index 100435be135a..ee94dd834b53 100644 --- a/WebSecurityScanner/VERSION +++ b/WebSecurityScanner/VERSION @@ -1 +1 @@ -0.8.2 +0.8.3 diff --git a/Workflows/VERSION b/Workflows/VERSION index cb0c939a936f..be14282b7fff 100644 --- a/Workflows/VERSION +++ b/Workflows/VERSION @@ -1 +1 @@ -0.5.2 +0.5.3 diff --git a/composer.json b/composer.json index ea6d094edf64..37c2a0716d85 100644 --- a/composer.json +++ b/composer.json @@ -50,7 +50,7 @@ "monolog/monolog": "^2.9||^3.0", "psr/http-message": "^1.0|^2.0", "ramsey/uuid": "^4.0", - "google/gax": "^1.30", + "google/gax": "^1.32", "google/common-protos": "^4.4", "google/auth": "^1.34" }, @@ -70,182 +70,183 @@ "psr/log": ">=3" }, "replace": { - "google/access-context-manager": "0.5.2", - "google/analytics-admin": "0.22.2", - "google/analytics-data": "0.16.2", - "google/apps-events-subscriptions": "0.1.0", - "google/apps-chat": "0.0.0", - "google/apps-meet": "0.2.0", - "google/cloud-access-approval": "1.2.2", - "google/cloud-advisorynotifications": "0.8.0", - "google/cloud-ai-platform": "0.37.0", - "google/cloud-alloydb": "0.10.0", - "google/cloud-api-gateway": "1.3.2", - "google/cloud-api-keys": "0.4.2", - "google/cloud-apigee-connect": "1.2.2", - "google/cloud-apigee-registry": "0.5.2", - "google/cloud-appengine-admin": "1.3.2", - "google/cloud-apphub": "0.1.0", - "google/cloud-artifact-registry": "0.6.2", - "google/cloud-asset": "1.16.0", - "google/cloud-assured-workloads": "0.11.2", - "google/cloud-automl": "1.6.2", - "google/cloud-bare-metal-solution": "0.6.2", - "google/cloud-batch": "0.16.5", - "google/cloud-beyondcorp-appconnections": "0.4.2", - "google/cloud-beyondcorp-appconnectors": "0.4.2", - "google/cloud-beyondcorp-appgateways": "0.4.2", - "google/cloud-beyondcorp-clientconnectorservices": "0.4.2", - "google/cloud-beyondcorp-clientgateways": "0.4.2", + "google/access-context-manager": "0.5.3", + "google/analytics-admin": "0.22.3", + "google/analytics-data": "0.16.3", + "google/apps-events-subscriptions": "0.1.1", + "google/apps-chat": "0.1.0", + "google/apps-meet": "0.2.1", + "google/cloud-access-approval": "1.2.3", + "google/cloud-advisorynotifications": "0.8.1", + "google/cloud-ai-platform": "0.37.1", + "google/cloud-alloydb": "0.10.1", + "google/cloud-api-gateway": "1.3.3", + "google/cloud-api-keys": "0.4.3", + "google/cloud-apigee-connect": "1.2.3", + "google/cloud-apigee-registry": "0.5.3", + "google/cloud-appengine-admin": "1.3.3", + "google/cloud-apphub": "0.1.1", + "google/cloud-artifact-registry": "0.6.3", + "google/cloud-asset": "1.16.1", + "google/cloud-assured-workloads": "0.11.3", + "google/cloud-automl": "1.6.3", + "google/cloud-bare-metal-solution": "0.6.3", + "google/cloud-batch": "0.16.6", + "google/cloud-beyondcorp-appconnections": "0.4.3", + "google/cloud-beyondcorp-appconnectors": "0.4.3", + "google/cloud-beyondcorp-appgateways": "0.4.3", + "google/cloud-beyondcorp-clientconnectorservices": "0.4.3", + "google/cloud-beyondcorp-clientgateways": "0.4.3", "google/cloud-bigquery": "1.30.1", - "google/cloud-bigquery-analyticshub": "0.5.0", - "google/cloud-bigquery-connection": "1.5.2", - "google/cloud-bigquery-data-exchange": "0.4.2", - "google/cloud-bigquery-datapolicies": "0.5.2", - "google/cloud-bigquery-migration": "0.4.2", - "google/cloud-bigquery-reservation": "1.3.2", - "google/cloud-bigquery-storage": "1.10.1", - "google/cloud-bigquerydatatransfer": "1.8.2", + "google/cloud-bigquery-analyticshub": "0.5.1", + "google/cloud-bigquery-connection": "1.5.3", + "google/cloud-bigquery-data-exchange": "0.4.3", + "google/cloud-bigquery-datapolicies": "0.5.3", + "google/cloud-bigquery-migration": "0.4.3", + "google/cloud-bigquery-reservation": "1.3.3", + "google/cloud-bigquery-storage": "1.10.2", + "google/cloud-bigquerydatatransfer": "1.8.3", "google/cloud-bigtable": "1.31.0", - "google/cloud-billing": "1.9.4", - "google/cloud-billing-budgets": "1.4.2", - "google/cloud-binary-authorization": "0.8.4", - "google/cloud-build": "0.16.0", - "google/cloud-certificate-manager": "0.7.0", - "google/cloud-channel": "1.9.2", - "google/cloud-cloudcontrolspartner": "0.1.0", - "google/cloud-commerce-consumer-procurement": "0.2.2", + "google/cloud-billing": "1.9.5", + "google/cloud-billing-budgets": "1.4.3", + "google/cloud-binary-authorization": "0.8.5", + "google/cloud-build": "0.16.1", + "google/cloud-certificate-manager": "0.7.1", + "google/cloud-channel": "1.9.3", + "google/cloud-cloudcontrolspartner": "0.1.1", + "google/cloud-commerce-consumer-procurement": "0.2.3", "google/cloud-common-protos": "0.5.1", - "google/cloud-compute": "1.16.0", - "google/cloud-confidentialcomputing": "0.8.0", - "google/cloud-config": "0.4.0", - "google/cloud-contact-center-insights": "1.9.2", - "google/cloud-container": "1.30.0", - "google/cloud-container-analysis": "0.5.4", - "google/cloud-core": "1.57.0", - "google/cloud-data-catalog": "1.10.0", - "google/cloud-data-fusion": "0.6.2", - "google/cloud-datacatalog-lineage": "0.5.2", - "google/cloud-dataflow": "0.6.1", - "google/cloud-dataform": "0.4.2", - "google/cloud-datalabeling": "0.5.2", - "google/cloud-dataplex": "0.15.0", - "google/cloud-dataproc": "3.13.1", - "google/cloud-dataproc-metastore": "0.11.2", - "google/cloud-datastore": "1.28.0", - "google/cloud-datastore-admin": "0.8.2", - "google/cloud-datastream": "1.5.2", - "google/cloud-debugger": "1.8.4", - "google/cloud-deploy": "0.17.2", - "google/cloud-dialogflow": "1.12.0", - "google/cloud-dialogflow-cx": "0.3.1", - "google/cloud-discoveryengine": "0.11.0", - "google/cloud-dlp": "1.13.0", - "google/cloud-dms": "1.5.2", - "google/cloud-document-ai": "1.11.1", - "google/cloud-domains": "0.5.2", - "google/cloud-edgenetwork": "0.3.3", - "google/cloud-error-reporting": "0.22.3", - "google/cloud-essential-contacts": "0.4.2", - "google/cloud-eventarc": "1.3.2", - "google/cloud-eventarc-publishing": "0.6.1", - "google/cloud-filestore": "1.5.4", - "google/cloud-firestore": "1.43.0", - "google/cloud-functions": "1.6.2", + "google/cloud-compute": "1.16.2", + "google/cloud-confidentialcomputing": "0.8.1", + "google/cloud-config": "0.5.0", + "google/cloud-contact-center-insights": "1.9.3", + "google/cloud-container": "1.30.1", + "google/cloud-container-analysis": "0.5.5", + "google/cloud-core": "1.58.0", + "google/cloud-data-catalog": "1.10.1", + "google/cloud-data-fusion": "0.6.3", + "google/cloud-datacatalog-lineage": "0.5.3", + "google/cloud-dataflow": "0.6.2", + "google/cloud-dataform": "0.4.3", + "google/cloud-datalabeling": "0.5.3", + "google/cloud-dataplex": "0.15.1", + "google/cloud-dataproc": "3.13.2", + "google/cloud-dataproc-metastore": "0.11.3", + "google/cloud-datastore": "1.28.1", + "google/cloud-datastore-admin": "0.8.3", + "google/cloud-datastream": "1.5.3", + "google/cloud-debugger": "1.8.5", + "google/cloud-deploy": "0.18.0", + "google/cloud-dialogflow": "1.12.1", + "google/cloud-dialogflow-cx": "0.3.2", + "google/cloud-discoveryengine": "0.11.1", + "google/cloud-dlp": "1.13.1", + "google/cloud-dms": "1.5.3", + "google/cloud-document-ai": "1.12.0", + "google/cloud-domains": "0.5.3", + "google/cloud-edgenetwork": "0.3.4", + "google/cloud-error-reporting": "0.22.4", + "google/cloud-essential-contacts": "0.4.3", + "google/cloud-eventarc": "1.3.3", + "google/cloud-eventarc-publishing": "0.6.2", + "google/cloud-filestore": "1.5.5", + "google/cloud-firestore": "1.43.1", + "google/cloud-functions": "1.6.3", "google/cloud-game-servers": "1.2.4", - "google/cloud-gke-backup": "0.7.0", - "google/cloud-gke-connect-gateway": "0.4.1", - "google/cloud-gke-hub": "0.9.2", - "google/cloud-gke-multi-cloud": "0.5.2", - "google/cloud-gsuite-addons": "0.3.2", - "google/cloud-iam": "0.5.2", - "google/cloud-iam-credentials": "1.2.2", - "google/cloud-iap": "1.4.2", - "google/cloud-ids": "0.5.2", - "google/cloud-iot": "1.7.2", - "google/cloud-kms": "1.21.2", - "google/cloud-kms-inventory": "0.4.2", - "google/cloud-language": "0.32.3", - "google/cloud-life-sciences": "0.6.2", - "google/cloud-logging": "1.29.4", - "google/cloud-managed-identities": "1.3.2", - "google/cloud-media-translation": "0.4.1", - "google/cloud-memcache": "1.3.2", - "google/cloud-migrationcenter": "0.4.2", - "google/cloud-monitoring": "1.9.2", - "google/cloud-netapp": "0.2.4", - "google/cloud-network-connectivity": "1.5.2", - "google/cloud-network-management": "1.7.0", - "google/cloud-network-security": "0.6.2", - "google/cloud-notebooks": "0.7.2", - "google/cloud-optimization": "0.6.2", - "google/cloud-orchestration-airflow": "1.6.1", - "google/cloud-org-policy": "0.6.2", - "google/cloud-osconfig": "1.3.2", - "google/cloud-oslogin": "1.9.2", - "google/cloud-parallelstore": "0.1.0", - "google/cloud-policy-troubleshooter": "1.3.1", - "google/cloud-policysimulator": "0.2.2", - "google/cloud-policytroubleshooter-iam": "0.2.2", - "google/cloud-private-catalog": "0.4.1", - "google/cloud-profiler": "1.4.0", - "google/cloud-pubsub": "2.1.0", - "google/cloud-quotas": "0.2.0", - "google/cloud-rapidmigrationassessment": "0.3.2", - "google/cloud-recaptcha-enterprise": "1.11.0", - "google/cloud-recommendations-ai": "0.7.2", - "google/cloud-recommender": "1.11.2", - "google/cloud-redis": "1.9.2", - "google/cloud-redis-cluster": "0.2.2", - "google/cloud-resource-manager": "0.8.2", - "google/cloud-resource-settings": "1.2.2", - "google/cloud-retail": "1.6.1", - "google/cloud-run": "0.9.0", - "google/cloud-scheduler": "1.10.2", - "google/cloud-secret-manager": "1.14.1", - "google/cloud-securesourcemanager": "0.2.2", - "google/cloud-security-center": "1.27.0", - "google/cloud-security-private-ca": "1.7.0", - "google/cloud-security-public-ca": "0.3.2", - "google/cloud-securitycentermanagement": "0.2.5", - "google/cloud-service-control": "1.4.1", - "google/cloud-service-directory": "1.3.2", - "google/cloud-service-management": "1.3.2", - "google/cloud-service-usage": "1.3.1", - "google/cloud-servicehealth": "0.1.3", - "google/cloud-shell": "1.3.2", - "google/cloud-spanner": "1.75.1", - "google/cloud-speech": "1.18.0", - "google/cloud-sql-admin": "0.16.0", - "google/cloud-storage": "1.41.2", - "google/cloud-storage-transfer": "1.4.2", - "google/cloud-storageinsights": "0.3.2", - "google/cloud-support": "0.2.2", - "google/cloud-talent": "1.3.2", - "google/cloud-tasks": "1.14.3", - "google/cloud-telcoautomation": "0.2.2", - "google/cloud-text-to-speech": "1.8.2", - "google/cloud-tpu": "1.4.2", - "google/cloud-trace": "1.8.3", - "google/cloud-translate": "1.17.4", - "google/cloud-video-live-stream": "0.7.2", - "google/cloud-video-stitcher": "0.8.2", - "google/cloud-video-transcoder": "0.10.2", - "google/cloud-videointelligence": "1.15.2", - "google/cloud-vision": "1.9.1", - "google/cloud-vm-migration": "0.6.2", - "google/cloud-vmware-engine": "0.5.3", - "google/cloud-vpc-access": "1.3.2", - "google/cloud-web-risk": "1.5.2", - "google/cloud-web-security-scanner": "0.8.2", - "google/cloud-workflows": "0.5.2", - "google/grafeas": "0.10.0", - "google/longrunning": "0.4.0", + "google/cloud-gke-backup": "0.7.1", + "google/cloud-gke-connect-gateway": "0.4.2", + "google/cloud-gke-hub": "0.9.3", + "google/cloud-gke-multi-cloud": "0.5.3", + "google/cloud-gsuite-addons": "0.3.3", + "google/cloud-iam": "0.5.3", + "google/cloud-iam-credentials": "1.2.3", + "google/cloud-iap": "1.4.3", + "google/cloud-ids": "0.5.3", + "google/cloud-iot": "1.7.3", + "google/cloud-kms": "1.21.3", + "google/cloud-kms-inventory": "0.4.3", + "google/cloud-language": "0.32.4", + "google/cloud-life-sciences": "0.6.3", + "google/cloud-logging": "1.30.0", + "google/cloud-managed-identities": "1.3.3", + "google/cloud-media-translation": "0.4.2", + "google/cloud-memcache": "1.3.3", + "google/cloud-migrationcenter": "0.4.3", + "google/cloud-monitoring": "1.10.1", + "google/cloud-netapp": "0.2.5", + "google/cloud-network-connectivity": "1.5.3", + "google/cloud-network-management": "1.7.1", + "google/cloud-network-security": "0.6.3", + "google/cloud-notebooks": "0.7.3", + "google/cloud-optimization": "0.6.3", + "google/cloud-orchestration-airflow": "1.6.2", + "google/cloud-org-policy": "0.6.3", + "google/cloud-osconfig": "1.3.3", + "google/cloud-oslogin": "1.9.3", + "google/cloud-parallelstore": "0.1.1", + "google/cloud-policy-troubleshooter": "1.3.2", + "google/cloud-policysimulator": "0.2.3", + "google/cloud-policytroubleshooter-iam": "0.2.3", + "google/cloud-private-catalog": "0.4.2", + "google/cloud-profiler": "1.4.1", + "google/cloud-pubsub": "2.1.1", + "google/cloud-quotas": "0.2.1", + "google/cloud-rapidmigrationassessment": "0.3.3", + "google/cloud-recaptcha-enterprise": "1.12.0", + "google/cloud-recommendations-ai": "0.7.3", + "google/cloud-recommender": "1.11.3", + "google/cloud-redis": "1.9.3", + "google/cloud-redis-cluster": "0.2.3", + "google/cloud-resource-manager": "0.8.3", + "google/cloud-resource-settings": "1.2.3", + "google/cloud-retail": "1.6.2", + "google/cloud-run": "0.9.1", + "google/cloud-scheduler": "1.10.3", + "google/cloud-secret-manager": "1.15.0", + "google/cloud-securesourcemanager": "0.2.3", + "google/cloud-security-center": "1.28.0", + "google/cloud-security-private-ca": "1.7.1", + "google/cloud-security-public-ca": "0.3.3", + "google/cloud-securitycentermanagement": "0.2.6", + "google/cloud-service-control": "1.4.2", + "google/cloud-service-directory": "1.3.3", + "google/cloud-service-management": "1.3.3", + "google/cloud-service-usage": "1.3.2", + "google/cloud-servicehealth": "0.1.4", + "google/cloud-shell": "1.3.3", + "google/cloud-spanner": "1.76.0", + "google/cloud-speech": "1.18.1", + "google/cloud-sql-admin": "0.16.1", + "google/cloud-storage": "1.41.3", + "google/cloud-storage-control": "0.1.0", + "google/cloud-storage-transfer": "1.4.3", + "google/cloud-storageinsights": "0.3.3", + "google/cloud-support": "0.2.3", + "google/cloud-talent": "1.3.3", + "google/cloud-tasks": "1.14.4", + "google/cloud-telcoautomation": "0.2.3", + "google/cloud-text-to-speech": "1.8.3", + "google/cloud-tpu": "1.4.3", + "google/cloud-trace": "1.8.4", + "google/cloud-translate": "1.17.5", + "google/cloud-video-live-stream": "0.7.3", + "google/cloud-video-stitcher": "0.8.3", + "google/cloud-video-transcoder": "0.10.3", + "google/cloud-videointelligence": "1.15.3", + "google/cloud-vision": "1.9.2", + "google/cloud-vm-migration": "0.6.3", + "google/cloud-vmware-engine": "0.5.4", + "google/cloud-vpc-access": "1.3.3", + "google/cloud-web-risk": "1.5.3", + "google/cloud-web-security-scanner": "0.8.3", + "google/cloud-workflows": "0.5.3", + "google/grafeas": "0.10.1", + "google/longrunning": "0.4.1", "google/shopping-common-protos": "0.3.0", - "google/shopping-css": "0.2.3", - "google/shopping-merchant-inventories": "0.4.0", - "google/shopping-merchant-quota": "0.1.0", - "google/shopping-merchant-reports": "0.7.0" + "google/shopping-css": "0.2.4", + "google/shopping-merchant-inventories": "0.4.1", + "google/shopping-merchant-quota": "0.1.1", + "google/shopping-merchant-reports": "0.7.1" }, "suggest": { "opis/closure": "May be used to serialize closures to process jobs in the batch daemon. Please require version ^3.", @@ -261,12 +262,12 @@ "GPBMetadata\\Google\\Api\\Servicemanagement\\": "ServiceManagement/metadata", "GPBMetadata\\Google\\Api\\Serviceusage\\": "ServiceUsage/metadata", "GPBMetadata\\Google\\Appengine\\": "AppEngineAdmin/metadata", + "GPBMetadata\\Google\\Apps\\Card\\": "AppsChat/metadata/Card", "GPBMetadata\\Google\\Apps\\Events\\Subscriptions\\": "AppsEventsSubscriptions/metadata", "GPBMetadata\\Google\\Apps\\Meet\\": "AppsMeet/metadata", "GPBMetadata\\Google\\Apps\\Script\\Type\\": "GSuiteAddOns/external/metadata", "GPBMetadata\\Google\\Bigtable\\": "Bigtable/metadata", "GPBMetadata\\Google\\Chat\\": "AppsChat/metadata/Chat", - "GPBMetadata\\Google\\Apps\\Card\\": "AppsChat/metadata/Card", "GPBMetadata\\Google\\Cloud\\Accessapproval\\": "AccessApproval/metadata", "GPBMetadata\\Google\\Cloud\\Advisorynotifications\\": "AdvisoryNotifications/metadata", "GPBMetadata\\Google\\Cloud\\Aiplatform\\": "AiPlatform/metadata", @@ -434,13 +435,14 @@ "GPBMetadata\\Google\\Shopping\\Merchant\\Reports\\": "ShoppingMerchantReports/metadata", "GPBMetadata\\Google\\Shopping\\Type\\": "ShoppingCommonProtos/metadata/Type", "GPBMetadata\\Google\\Spanner\\": "Spanner/metadata", + "GPBMetadata\\Google\\Storage\\Control\\": "StorageControl/metadata", "GPBMetadata\\Google\\Storagetransfer\\": "StorageTransfer/metadata", "GPBMetadata\\Grafeas\\": "Grafeas/metadata", "Google\\Analytics\\Admin\\": "AnalyticsAdmin/src", "Google\\Analytics\\Data\\": "AnalyticsData/src", "Google\\ApiCore\\LongRunning\\": "LongRunning/src/ApiCore/LongRunning", - "Google\\Apps\\Chat\\": "AppsChat/src/Chat", "Google\\Apps\\Card\\": "AppsChat/src/Card", + "Google\\Apps\\Chat\\": "AppsChat/src/Chat", "Google\\Apps\\Events\\Subscriptions\\": "AppsEventsSubscriptions/src", "Google\\Apps\\Meet\\": "AppsMeet/src", "Google\\Apps\\Script\\Type\\": "GSuiteAddOns/external/protos", @@ -593,6 +595,7 @@ "Google\\Cloud\\StorageInsights\\": "StorageInsights/src", "Google\\Cloud\\StorageTransfer\\": "StorageTransfer/src", "Google\\Cloud\\Storage\\": "Storage/src", + "Google\\Cloud\\Storage\\Control\\": "StorageControl/src", "Google\\Cloud\\Support\\": "Support/src", "Google\\Cloud\\Talent\\": "Talent/src", "Google\\Cloud\\Tasks\\": "Tasks/src", diff --git a/dev/tests/Unit/Command/AddComponentCommandTest.php b/dev/tests/Unit/Command/AddComponentCommandTest.php index 87f6ce116aa0..3a6e0818ec6e 100644 --- a/dev/tests/Unit/Command/AddComponentCommandTest.php +++ b/dev/tests/Unit/Command/AddComponentCommandTest.php @@ -63,9 +63,7 @@ public static function setUpBeforeClass(): void public function testAddComponent() { self::$commandTester->setInputs([ - 'Y', // Does this information look correct? [Y/n] - 'https://cloud.google.com/secret-manager/docs/reference/rest/', // What is the product documentation URL? - 'https://cloud.google.com/secret-manager', // What is the product homepage? + 'Y' // Does this information look correct? [Y/n] ]); self::$commandTester->execute([ @@ -189,9 +187,7 @@ public function testGoogleapisGenPath() $commandTester = new CommandTester($application->get('add-component')); $commandTester->setInputs([ - 'Y', // Does this information look correct? [Y/n] - 'https://cloud.google.com/secret-manager/docs/reference/rest/', // What is the product documentation URL? - 'https://cloud.google.com/secret-manager', // What is the product homepage? + 'Y' // Does this information look correct? [Y/n] ]); $commandTester->execute([ diff --git a/dev/tests/fixtures/component/SecretManager/README.md b/dev/tests/fixtures/component/SecretManager/README.md index 0608a7d425b9..2c92f6419dd6 100644 --- a/dev/tests/fixtures/component/SecretManager/README.md +++ b/dev/tests/fixtures/component/SecretManager/README.md @@ -42,4 +42,4 @@ This component is considered alpha. As such, it is still a work-in-progress and ### Next Steps -1. Understand the [official documentation](https://cloud.google.com/secret-manager/docs/reference/rest/). +1. Understand the [official documentation](https://cloud.google.com/secret-manager/docs/overview).