-
Notifications
You must be signed in to change notification settings - Fork 438
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into spanner-batchwrite-impl
- Loading branch information
Showing
524 changed files
with
15,481 additions
and
1,740 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.2.2 | ||
1.2.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.5.2 | ||
0.5.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.8.0 | ||
0.8.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.37.0 | ||
0.37.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.10.0 | ||
0.10.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.22.2 | ||
0.22.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.16.2 | ||
0.16.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.3.2 | ||
1.3.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.4.2 | ||
0.4.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.2.2 | ||
1.2.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.5.2 | ||
0.5.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.3.2 | ||
1.3.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.1.0 | ||
0.1.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.0.0 | ||
0.1.0 |
Binary file not shown.
Binary file not shown.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
89 changes: 89 additions & 0 deletions
89
AppsChat/samples/V1/ChatServiceClient/get_space_read_state.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
<?php | ||
/* | ||
* Copyright 2024 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 | ||
* | ||
* https://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. | ||
*/ | ||
|
||
/* | ||
* GENERATED CODE WARNING | ||
* This file was automatically generated - do not edit! | ||
*/ | ||
|
||
require_once __DIR__ . '/../../../vendor/autoload.php'; | ||
|
||
// [START chat_v1_generated_ChatService_GetSpaceReadState_sync] | ||
use Google\ApiCore\ApiException; | ||
use Google\Apps\Chat\V1\Client\ChatServiceClient; | ||
use Google\Apps\Chat\V1\GetSpaceReadStateRequest; | ||
use Google\Apps\Chat\V1\SpaceReadState; | ||
|
||
/** | ||
* 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). | ||
* | ||
* @param string $formattedName 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. | ||
*/ | ||
function get_space_read_state_sample(string $formattedName): void | ||
{ | ||
// Create a client. | ||
$chatServiceClient = new ChatServiceClient(); | ||
|
||
// Prepare the request message. | ||
$request = (new GetSpaceReadStateRequest()) | ||
->setName($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] |
90 changes: 90 additions & 0 deletions
90
AppsChat/samples/V1/ChatServiceClient/get_thread_read_state.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
<?php | ||
/* | ||
* Copyright 2024 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 | ||
* | ||
* https://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. | ||
*/ | ||
|
||
/* | ||
* GENERATED CODE WARNING | ||
* This file was automatically generated - do not edit! | ||
*/ | ||
|
||
require_once __DIR__ . '/../../../vendor/autoload.php'; | ||
|
||
// [START chat_v1_generated_ChatService_GetThreadReadState_sync] | ||
use Google\ApiCore\ApiException; | ||
use Google\Apps\Chat\V1\Client\ChatServiceClient; | ||
use Google\Apps\Chat\V1\GetThreadReadStateRequest; | ||
use Google\Apps\Chat\V1\ThreadReadState; | ||
|
||
/** | ||
* 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). | ||
* | ||
* @param string $formattedName 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. | ||
*/ | ||
function get_thread_read_state_sample(string $formattedName): void | ||
{ | ||
// Create a client. | ||
$chatServiceClient = new ChatServiceClient(); | ||
|
||
// Prepare the request message. | ||
$request = (new GetThreadReadStateRequest()) | ||
->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] |
63 changes: 63 additions & 0 deletions
63
AppsChat/samples/V1/ChatServiceClient/update_membership.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<?php | ||
/* | ||
* Copyright 2024 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 | ||
* | ||
* https://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. | ||
*/ | ||
|
||
/* | ||
* GENERATED CODE WARNING | ||
* This file was automatically generated - do not edit! | ||
*/ | ||
|
||
require_once __DIR__ . '/../../../vendor/autoload.php'; | ||
|
||
// [START chat_v1_generated_ChatService_UpdateMembership_sync] | ||
use Google\ApiCore\ApiException; | ||
use Google\Apps\Chat\V1\Client\ChatServiceClient; | ||
use Google\Apps\Chat\V1\Membership; | ||
use Google\Apps\Chat\V1\UpdateMembershipRequest; | ||
use Google\Protobuf\FieldMask; | ||
|
||
/** | ||
* Updates a membership. Requires [user | ||
* authentication](https://developers.google.com/chat/api/guides/auth/users). | ||
* | ||
* 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 update_membership_sample(): void | ||
{ | ||
// Create a client. | ||
$chatServiceClient = new ChatServiceClient(); | ||
|
||
// Prepare the request message. | ||
$membership = new Membership(); | ||
$updateMask = new FieldMask(); | ||
$request = (new UpdateMembershipRequest()) | ||
->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] |
Oops, something went wrong.