-
Notifications
You must be signed in to change notification settings - Fork 362
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: increase timeout of RPC methods to 20s for v2
feat: add YAML config for GetLocation and ListLocation for v2 feat: add UploadQueueYaml, BufferTask RPC method for CloudTasks service for v2beta2 feat: set deadline for GetLocation, ListLocations and UploadQueueYaml RPCs for v2beta2 feat: add BufferTask RPC method for CloudTasks service for v2beta3 feat: add YAML config for GetLocation and ListLocations for v2beta3 PiperOrigin-RevId: 548738528 Source-Link: googleapis/googleapis@4d98ffc Source-Link: googleapis/googleapis-gen@183d6bc Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuVGFza3MuVjJCZXRhMy8uT3dsQm90LnlhbWwiLCJoIjoiMTgzZDZiYzRlZTNjMTg5MGIxZDI0ZjlkYzg1NTA0MWY0OTdkNWQ1YiJ9
- Loading branch information
1 parent
0090f90
commit 36504a4
Showing
19 changed files
with
4,652 additions
and
825 deletions.
There are no files selected for viewing
49 changes: 49 additions & 0 deletions
49
...Google.Cloud.Tasks.V2Beta3.GeneratedSnippets/CloudTasksClient.BufferTaskAsyncSnippet.g.cs
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,49 @@ | ||
// 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 | ||
// | ||
// 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! | ||
|
||
#pragma warning disable CS8981 | ||
|
||
namespace GoogleCSharpSnippets | ||
{ | ||
// [START cloudtasks_v2beta3_generated_CloudTasks_BufferTask_async_flattened] | ||
using Google.Api; | ||
using System.Threading.Tasks; | ||
using gctv = Google.Cloud.Tasks.V2Beta3; | ||
|
||
public sealed partial class GeneratedCloudTasksClientSnippets | ||
{ | ||
/// <summary>Snippet for BufferTaskAsync</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 BufferTaskAsync() | ||
{ | ||
// Create client | ||
gctv::CloudTasksClient cloudTasksClient = await gctv::CloudTasksClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
string queue = "projects/[PROJECT]/locations/[LOCATION]/queues/[QUEUE]"; | ||
string taskId = ""; | ||
HttpBody body = new HttpBody(); | ||
// Make the request | ||
gctv::BufferTaskResponse response = await cloudTasksClient.BufferTaskAsync(queue, taskId, body); | ||
} | ||
} | ||
// [END cloudtasks_v2beta3_generated_CloudTasks_BufferTask_async_flattened] | ||
} |
52 changes: 52 additions & 0 deletions
52
...Tasks.V2Beta3.GeneratedSnippets/CloudTasksClient.BufferTaskRequestObjectAsyncSnippet.g.cs
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,52 @@ | ||
// 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 | ||
// | ||
// 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! | ||
|
||
#pragma warning disable CS8981 | ||
|
||
namespace GoogleCSharpSnippets | ||
{ | ||
// [START cloudtasks_v2beta3_generated_CloudTasks_BufferTask_async] | ||
using Google.Api; | ||
using System.Threading.Tasks; | ||
using gctv = Google.Cloud.Tasks.V2Beta3; | ||
|
||
public sealed partial class GeneratedCloudTasksClientSnippets | ||
{ | ||
/// <summary>Snippet for BufferTaskAsync</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 BufferTaskRequestObjectAsync() | ||
{ | ||
// Create client | ||
gctv::CloudTasksClient cloudTasksClient = await gctv::CloudTasksClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
gctv::BufferTaskRequest request = new gctv::BufferTaskRequest | ||
{ | ||
QueueAsQueueName = gctv::QueueName.FromProjectLocationQueue("[PROJECT]", "[LOCATION]", "[QUEUE]"), | ||
TaskId = "", | ||
Body = new HttpBody(), | ||
}; | ||
// Make the request | ||
gctv::BufferTaskResponse response = await cloudTasksClient.BufferTaskAsync(request); | ||
} | ||
} | ||
// [END cloudtasks_v2beta3_generated_CloudTasks_BufferTask_async] | ||
} |
49 changes: 49 additions & 0 deletions
49
...loud.Tasks.V2Beta3.GeneratedSnippets/CloudTasksClient.BufferTaskRequestObjectSnippet.g.cs
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,49 @@ | ||
// 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 | ||
// | ||
// 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 cloudtasks_v2beta3_generated_CloudTasks_BufferTask_sync] | ||
using Google.Api; | ||
using Google.Cloud.Tasks.V2Beta3; | ||
|
||
public sealed partial class GeneratedCloudTasksClientSnippets | ||
{ | ||
/// <summary>Snippet for BufferTask</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 BufferTaskRequestObject() | ||
{ | ||
// Create client | ||
CloudTasksClient cloudTasksClient = CloudTasksClient.Create(); | ||
// Initialize request argument(s) | ||
BufferTaskRequest request = new BufferTaskRequest | ||
{ | ||
QueueAsQueueName = QueueName.FromProjectLocationQueue("[PROJECT]", "[LOCATION]", "[QUEUE]"), | ||
TaskId = "", | ||
Body = new HttpBody(), | ||
}; | ||
// Make the request | ||
BufferTaskResponse response = cloudTasksClient.BufferTask(request); | ||
} | ||
} | ||
// [END cloudtasks_v2beta3_generated_CloudTasks_BufferTask_sync] | ||
} |
49 changes: 49 additions & 0 deletions
49
...Tasks.V2Beta3.GeneratedSnippets/CloudTasksClient.BufferTaskResourceNamesAsyncSnippet.g.cs
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,49 @@ | ||
// 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 | ||
// | ||
// 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! | ||
|
||
#pragma warning disable CS8981 | ||
|
||
namespace GoogleCSharpSnippets | ||
{ | ||
// [START cloudtasks_v2beta3_generated_CloudTasks_BufferTask_async_flattened_resourceNames] | ||
using Google.Api; | ||
using System.Threading.Tasks; | ||
using gctv = Google.Cloud.Tasks.V2Beta3; | ||
|
||
public sealed partial class GeneratedCloudTasksClientSnippets | ||
{ | ||
/// <summary>Snippet for BufferTaskAsync</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 BufferTaskResourceNamesAsync() | ||
{ | ||
// Create client | ||
gctv::CloudTasksClient cloudTasksClient = await gctv::CloudTasksClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
gctv::QueueName queue = gctv::QueueName.FromProjectLocationQueue("[PROJECT]", "[LOCATION]", "[QUEUE]"); | ||
string taskId = ""; | ||
HttpBody body = new HttpBody(); | ||
// Make the request | ||
gctv::BufferTaskResponse response = await cloudTasksClient.BufferTaskAsync(queue, taskId, body); | ||
} | ||
} | ||
// [END cloudtasks_v2beta3_generated_CloudTasks_BufferTask_async_flattened_resourceNames] | ||
} |
46 changes: 46 additions & 0 deletions
46
...loud.Tasks.V2Beta3.GeneratedSnippets/CloudTasksClient.BufferTaskResourceNamesSnippet.g.cs
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,46 @@ | ||
// 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 | ||
// | ||
// 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 cloudtasks_v2beta3_generated_CloudTasks_BufferTask_sync_flattened_resourceNames] | ||
using Google.Api; | ||
using Google.Cloud.Tasks.V2Beta3; | ||
|
||
public sealed partial class GeneratedCloudTasksClientSnippets | ||
{ | ||
/// <summary>Snippet for BufferTask</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 BufferTaskResourceNames() | ||
{ | ||
// Create client | ||
CloudTasksClient cloudTasksClient = CloudTasksClient.Create(); | ||
// Initialize request argument(s) | ||
QueueName queue = QueueName.FromProjectLocationQueue("[PROJECT]", "[LOCATION]", "[QUEUE]"); | ||
string taskId = ""; | ||
HttpBody body = new HttpBody(); | ||
// Make the request | ||
BufferTaskResponse response = cloudTasksClient.BufferTask(queue, taskId, body); | ||
} | ||
} | ||
// [END cloudtasks_v2beta3_generated_CloudTasks_BufferTask_sync_flattened_resourceNames] | ||
} |
46 changes: 46 additions & 0 deletions
46
...eta3/Google.Cloud.Tasks.V2Beta3.GeneratedSnippets/CloudTasksClient.BufferTaskSnippet.g.cs
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,46 @@ | ||
// 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 | ||
// | ||
// 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 cloudtasks_v2beta3_generated_CloudTasks_BufferTask_sync_flattened] | ||
using Google.Api; | ||
using Google.Cloud.Tasks.V2Beta3; | ||
|
||
public sealed partial class GeneratedCloudTasksClientSnippets | ||
{ | ||
/// <summary>Snippet for BufferTask</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 BufferTask() | ||
{ | ||
// Create client | ||
CloudTasksClient cloudTasksClient = CloudTasksClient.Create(); | ||
// Initialize request argument(s) | ||
string queue = "projects/[PROJECT]/locations/[LOCATION]/queues/[QUEUE]"; | ||
string taskId = ""; | ||
HttpBody body = new HttpBody(); | ||
// Make the request | ||
BufferTaskResponse response = cloudTasksClient.BufferTask(queue, taskId, body); | ||
} | ||
} | ||
// [END cloudtasks_v2beta3_generated_CloudTasks_BufferTask_sync_flattened] | ||
} |
Oops, something went wrong.