Skip to content

Commit

Permalink
feat: Add Chat read state APIs
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 626377569

Source-Link: googleapis/googleapis@e9672e7

Source-Link: googleapis/googleapis-gen@50c8b6a
Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQXBwcy5DaGF0LlYxLy5Pd2xCb3QueWFtbCIsImgiOiI1MGM4YjZhZjE2YmViN2MwMzA2ZGZmMTI3MTdhYjJiOTc2NjA1N2UwIn0=
  • Loading branch information
gcf-owl-bot[bot] authored and jskeet committed Apr 19, 2024
1 parent 153861e commit 94ab34d
Show file tree
Hide file tree
Showing 27 changed files with 4,856 additions and 98 deletions.
@@ -0,0 +1,44 @@
// 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. DO NOT EDIT!

namespace GoogleCSharpSnippets
{
// [START chat_v1_generated_ChatService_GetSpaceReadState_async_flattened]
using Google.Apps.Chat.V1;
using System.Threading.Tasks;

public sealed partial class GeneratedChatServiceClientSnippets
{
/// <summary>Snippet for GetSpaceReadStateAsync</summary>
/// <remarks>
/// This snippet 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 as shown in
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
/// </remarks>
public async Task GetSpaceReadStateAsync()
{
// Create client
ChatServiceClient chatServiceClient = await ChatServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "users/[USER]/spaces/[SPACE]/spaceReadState";
// Make the request
SpaceReadState response = await chatServiceClient.GetSpaceReadStateAsync(name);
}
}
// [END chat_v1_generated_ChatService_GetSpaceReadState_async_flattened]
}
@@ -0,0 +1,47 @@
// 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. DO NOT EDIT!

namespace GoogleCSharpSnippets
{
// [START chat_v1_generated_ChatService_GetSpaceReadState_async]
using Google.Apps.Chat.V1;
using System.Threading.Tasks;

public sealed partial class GeneratedChatServiceClientSnippets
{
/// <summary>Snippet for GetSpaceReadStateAsync</summary>
/// <remarks>
/// This snippet 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 as shown in
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
/// </remarks>
public async Task GetSpaceReadStateRequestObjectAsync()
{
// Create client
ChatServiceClient chatServiceClient = await ChatServiceClient.CreateAsync();
// Initialize request argument(s)
GetSpaceReadStateRequest request = new GetSpaceReadStateRequest
{
SpaceReadStateName = SpaceReadStateName.FromUserSpace("[USER]", "[SPACE]"),
};
// Make the request
SpaceReadState response = await chatServiceClient.GetSpaceReadStateAsync(request);
}
}
// [END chat_v1_generated_ChatService_GetSpaceReadState_async]
}
@@ -0,0 +1,46 @@
// 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. DO NOT EDIT!

namespace GoogleCSharpSnippets
{
// [START chat_v1_generated_ChatService_GetSpaceReadState_sync]
using Google.Apps.Chat.V1;

public sealed partial class GeneratedChatServiceClientSnippets
{
/// <summary>Snippet for GetSpaceReadState</summary>
/// <remarks>
/// This snippet 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 as shown in
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
/// </remarks>
public void GetSpaceReadStateRequestObject()
{
// Create client
ChatServiceClient chatServiceClient = ChatServiceClient.Create();
// Initialize request argument(s)
GetSpaceReadStateRequest request = new GetSpaceReadStateRequest
{
SpaceReadStateName = SpaceReadStateName.FromUserSpace("[USER]", "[SPACE]"),
};
// Make the request
SpaceReadState response = chatServiceClient.GetSpaceReadState(request);
}
}
// [END chat_v1_generated_ChatService_GetSpaceReadState_sync]
}
@@ -0,0 +1,44 @@
// 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. DO NOT EDIT!

namespace GoogleCSharpSnippets
{
// [START chat_v1_generated_ChatService_GetSpaceReadState_async_flattened_resourceNames]
using Google.Apps.Chat.V1;
using System.Threading.Tasks;

public sealed partial class GeneratedChatServiceClientSnippets
{
/// <summary>Snippet for GetSpaceReadStateAsync</summary>
/// <remarks>
/// This snippet 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 as shown in
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
/// </remarks>
public async Task GetSpaceReadStateResourceNamesAsync()
{
// Create client
ChatServiceClient chatServiceClient = await ChatServiceClient.CreateAsync();
// Initialize request argument(s)
SpaceReadStateName name = SpaceReadStateName.FromUserSpace("[USER]", "[SPACE]");
// Make the request
SpaceReadState response = await chatServiceClient.GetSpaceReadStateAsync(name);
}
}
// [END chat_v1_generated_ChatService_GetSpaceReadState_async_flattened_resourceNames]
}
@@ -0,0 +1,43 @@
// 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. DO NOT EDIT!

namespace GoogleCSharpSnippets
{
// [START chat_v1_generated_ChatService_GetSpaceReadState_sync_flattened_resourceNames]
using Google.Apps.Chat.V1;

public sealed partial class GeneratedChatServiceClientSnippets
{
/// <summary>Snippet for GetSpaceReadState</summary>
/// <remarks>
/// This snippet 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 as shown in
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
/// </remarks>
public void GetSpaceReadStateResourceNames()
{
// Create client
ChatServiceClient chatServiceClient = ChatServiceClient.Create();
// Initialize request argument(s)
SpaceReadStateName name = SpaceReadStateName.FromUserSpace("[USER]", "[SPACE]");
// Make the request
SpaceReadState response = chatServiceClient.GetSpaceReadState(name);
}
}
// [END chat_v1_generated_ChatService_GetSpaceReadState_sync_flattened_resourceNames]
}
@@ -0,0 +1,43 @@
// 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. DO NOT EDIT!

namespace GoogleCSharpSnippets
{
// [START chat_v1_generated_ChatService_GetSpaceReadState_sync_flattened]
using Google.Apps.Chat.V1;

public sealed partial class GeneratedChatServiceClientSnippets
{
/// <summary>Snippet for GetSpaceReadState</summary>
/// <remarks>
/// This snippet 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 as shown in
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
/// </remarks>
public void GetSpaceReadState()
{
// Create client
ChatServiceClient chatServiceClient = ChatServiceClient.Create();
// Initialize request argument(s)
string name = "users/[USER]/spaces/[SPACE]/spaceReadState";
// Make the request
SpaceReadState response = chatServiceClient.GetSpaceReadState(name);
}
}
// [END chat_v1_generated_ChatService_GetSpaceReadState_sync_flattened]
}
@@ -0,0 +1,44 @@
// 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. DO NOT EDIT!

namespace GoogleCSharpSnippets
{
// [START chat_v1_generated_ChatService_GetThreadReadState_async_flattened]
using Google.Apps.Chat.V1;
using System.Threading.Tasks;

public sealed partial class GeneratedChatServiceClientSnippets
{
/// <summary>Snippet for GetThreadReadStateAsync</summary>
/// <remarks>
/// This snippet 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 as shown in
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
/// </remarks>
public async Task GetThreadReadStateAsync()
{
// Create client
ChatServiceClient chatServiceClient = await ChatServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "users/[USER]/spaces/[SPACE]/threads/[THREAD]/threadReadState";
// Make the request
ThreadReadState response = await chatServiceClient.GetThreadReadStateAsync(name);
}
}
// [END chat_v1_generated_ChatService_GetThreadReadState_async_flattened]
}
@@ -0,0 +1,47 @@
// 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. DO NOT EDIT!

namespace GoogleCSharpSnippets
{
// [START chat_v1_generated_ChatService_GetThreadReadState_async]
using Google.Apps.Chat.V1;
using System.Threading.Tasks;

public sealed partial class GeneratedChatServiceClientSnippets
{
/// <summary>Snippet for GetThreadReadStateAsync</summary>
/// <remarks>
/// This snippet 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 as shown in
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
/// </remarks>
public async Task GetThreadReadStateRequestObjectAsync()
{
// Create client
ChatServiceClient chatServiceClient = await ChatServiceClient.CreateAsync();
// Initialize request argument(s)
GetThreadReadStateRequest request = new GetThreadReadStateRequest
{
ThreadReadStateName = ThreadReadStateName.FromUserSpaceThread("[USER]", "[SPACE]", "[THREAD]"),
};
// Make the request
ThreadReadState response = await chatServiceClient.GetThreadReadStateAsync(request);
}
}
// [END chat_v1_generated_ChatService_GetThreadReadState_async]
}

0 comments on commit 94ab34d

Please sign in to comment.