Skip to content

Commit

Permalink
Merge branch 'main' into spanner-batchwrite-impl
Browse files Browse the repository at this point in the history
  • Loading branch information
yash30201 committed May 3, 2024
2 parents 2a4af12 + dfcc0f1 commit 127c7dd
Show file tree
Hide file tree
Showing 524 changed files with 15,481 additions and 1,740 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion AccessApproval/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.2.2
1.2.3
2 changes: 1 addition & 1 deletion AccessContextManager/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.5.2
0.5.3
2 changes: 1 addition & 1 deletion AdvisoryNotifications/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.8.0
0.8.1
2 changes: 1 addition & 1 deletion AiPlatform/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.37.0
0.37.1
2 changes: 1 addition & 1 deletion AlloyDb/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.10.0
0.10.1
2 changes: 1 addition & 1 deletion AnalyticsAdmin/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.22.2
0.22.3
2 changes: 1 addition & 1 deletion AnalyticsData/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.16.2
0.16.3
2 changes: 1 addition & 1 deletion ApiGateway/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.3.2
1.3.3
2 changes: 1 addition & 1 deletion ApiKeys/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.4.2
0.4.3
2 changes: 1 addition & 1 deletion ApigeeConnect/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.2.2
1.2.3
2 changes: 1 addition & 1 deletion ApigeeRegistry/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.5.2
0.5.3
2 changes: 1 addition & 1 deletion AppEngineAdmin/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.3.2
1.3.3
2 changes: 1 addition & 1 deletion AppHub/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.0
0.1.1
4 changes: 2 additions & 2 deletions AppsChat/.repo-metadata.json
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"
}
2 changes: 1 addition & 1 deletion AppsChat/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.0
0.1.0
Binary file modified AppsChat/metadata/Chat/V1/ChatService.php
Binary file not shown.
Binary file modified AppsChat/metadata/Chat/V1/Membership.php
Binary file not shown.
41 changes: 41 additions & 0 deletions AppsChat/metadata/Chat/V1/SpaceReadState.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 37 additions & 0 deletions AppsChat/metadata/Chat/V1/ThreadReadState.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

89 changes: 89 additions & 0 deletions AppsChat/samples/V1/ChatServiceClient/get_space_read_state.php
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&#64;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 AppsChat/samples/V1/ChatServiceClient/get_thread_read_state.php
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&#64;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 AppsChat/samples/V1/ChatServiceClient/update_membership.php
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]
Loading

0 comments on commit 127c7dd

Please sign in to comment.