Skip to content

Commit

Permalink
feat: increase timeout of RPC methods to 20s for v2
Browse files Browse the repository at this point in the history
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
gcf-owl-bot[bot] authored and amanda-tarafa committed Jul 17, 2023
1 parent 0090f90 commit 36504a4
Show file tree
Hide file tree
Showing 19 changed files with 4,652 additions and 825 deletions.
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]
}
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]
}
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]
}
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]
}
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]
}
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]
}
Loading

0 comments on commit 36504a4

Please sign in to comment.