Skip to content

Commit

Permalink
docs:fixed formatting of some documentation
Browse files Browse the repository at this point in the history
feat:add Builds API
feat:add Service Mesh configuration to Services
feat:add GPU configuration to Services
feat:add INGRESS_TRAFFIC_NONE to Services
feat:add ServiceScaling to Services

PiperOrigin-RevId: 681696446

Source-Link: googleapis/googleapis@4fe2139

Source-Link: googleapis/googleapis-gen@cb5e78c
Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuUnVuLlYyLy5Pd2xCb3QueWFtbCIsImgiOiJjYjVlNzhjM2M0NzhmODFhOGM4MTNhZjU4ODc3NTdkYzY5MjA1MmYzIn0=
  • Loading branch information
gcf-owl-bot[bot] committed Oct 3, 2024
1 parent 591d255 commit 7cb7b55
Show file tree
Hide file tree
Showing 182 changed files with 61,646 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
// 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!

#pragma warning disable CS8981

namespace GoogleCSharpSnippets
{
// [START run_v2_generated_Builds_SubmitBuild_async]
using System.Threading.Tasks;
using gcrv = Google.Cloud.Run.V2;

public sealed partial class GeneratedBuildsClientSnippets
{
/// <summary>Snippet for SubmitBuildAsync</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 SubmitBuildRequestObjectAsync()
{
// Create client
gcrv::BuildsClient buildsClient = await gcrv::BuildsClient.CreateAsync();
// Initialize request argument(s)
gcrv::SubmitBuildRequest request = new gcrv::SubmitBuildRequest
{
Parent = "",
StorageSource = new gcrv::StorageSource(),
ImageUri = "",
BuildpackBuild = new gcrv::SubmitBuildRequest.Types.BuildpacksBuild(),
ServiceAccount = "",
WorkerPoolAsWorkerPoolName = gcrv::WorkerPoolName.FromProjectLocationWorkerPool("[PROJECT]", "[LOCATION]", "[WORKER_POOL]"),
Tags = { "", },
};
// Make the request
gcrv::SubmitBuildResponse response = await buildsClient.SubmitBuildAsync(request);
}
}
// [END run_v2_generated_Builds_SubmitBuild_async]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
// 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 run_v2_generated_Builds_SubmitBuild_sync]
using Google.Cloud.Run.V2;

public sealed partial class GeneratedBuildsClientSnippets
{
/// <summary>Snippet for SubmitBuild</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 SubmitBuildRequestObject()
{
// Create client
BuildsClient buildsClient = BuildsClient.Create();
// Initialize request argument(s)
SubmitBuildRequest request = new SubmitBuildRequest
{
Parent = "",
StorageSource = new StorageSource(),
ImageUri = "",
BuildpackBuild = new SubmitBuildRequest.Types.BuildpacksBuild(),
ServiceAccount = "",
WorkerPoolAsWorkerPoolName = WorkerPoolName.FromProjectLocationWorkerPool("[PROJECT]", "[LOCATION]", "[WORKER_POOL]"),
Tags = { "", },
};
// Make the request
SubmitBuildResponse response = buildsClient.SubmitBuild(request);
}
}
// [END run_v2_generated_Builds_SubmitBuild_sync]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
// 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!

#pragma warning disable CS8981

namespace GoogleCSharpSnippets
{
// [START run_v2_generated_Executions_CancelExecution_async_flattened]
using Google.LongRunning;
using System.Threading.Tasks;
using gcrv = Google.Cloud.Run.V2;

public sealed partial class GeneratedExecutionsClientSnippets
{
/// <summary>Snippet for CancelExecutionAsync</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 CancelExecutionAsync()
{
// Create client
gcrv::ExecutionsClient executionsClient = await gcrv::ExecutionsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/jobs/[JOB]/executions/[EXECUTION]";
// Make the request
Operation<gcrv::Execution, gcrv::Execution> response = await executionsClient.CancelExecutionAsync(name);

// Poll until the returned long-running operation is complete
Operation<gcrv::Execution, gcrv::Execution> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcrv::Execution result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<gcrv::Execution, gcrv::Execution> retrievedResponse = await executionsClient.PollOnceCancelExecutionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcrv::Execution retrievedResult = retrievedResponse.Result;
}
}
}
// [END run_v2_generated_Executions_CancelExecution_async_flattened]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
// 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!

#pragma warning disable CS8981

namespace GoogleCSharpSnippets
{
// [START run_v2_generated_Executions_CancelExecution_async]
using Google.LongRunning;
using System.Threading.Tasks;
using gcrv = Google.Cloud.Run.V2;

public sealed partial class GeneratedExecutionsClientSnippets
{
/// <summary>Snippet for CancelExecutionAsync</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 CancelExecutionRequestObjectAsync()
{
// Create client
gcrv::ExecutionsClient executionsClient = await gcrv::ExecutionsClient.CreateAsync();
// Initialize request argument(s)
gcrv::CancelExecutionRequest request = new gcrv::CancelExecutionRequest
{
ExecutionName = gcrv::ExecutionName.FromProjectLocationJobExecution("[PROJECT]", "[LOCATION]", "[JOB]", "[EXECUTION]"),
ValidateOnly = false,
Etag = "",
};
// Make the request
Operation<gcrv::Execution, gcrv::Execution> response = await executionsClient.CancelExecutionAsync(request);

// Poll until the returned long-running operation is complete
Operation<gcrv::Execution, gcrv::Execution> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcrv::Execution result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<gcrv::Execution, gcrv::Execution> retrievedResponse = await executionsClient.PollOnceCancelExecutionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcrv::Execution retrievedResult = retrievedResponse.Result;
}
}
}
// [END run_v2_generated_Executions_CancelExecution_async]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
// 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 run_v2_generated_Executions_CancelExecution_sync]
using Google.Cloud.Run.V2;
using Google.LongRunning;

public sealed partial class GeneratedExecutionsClientSnippets
{
/// <summary>Snippet for CancelExecution</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 CancelExecutionRequestObject()
{
// Create client
ExecutionsClient executionsClient = ExecutionsClient.Create();
// Initialize request argument(s)
CancelExecutionRequest request = new CancelExecutionRequest
{
ExecutionName = ExecutionName.FromProjectLocationJobExecution("[PROJECT]", "[LOCATION]", "[JOB]", "[EXECUTION]"),
ValidateOnly = false,
Etag = "",
};
// Make the request
Operation<Execution, Execution> response = executionsClient.CancelExecution(request);

// Poll until the returned long-running operation is complete
Operation<Execution, Execution> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Execution result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Execution, Execution> retrievedResponse = executionsClient.PollOnceCancelExecution(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Execution retrievedResult = retrievedResponse.Result;
}
}
}
// [END run_v2_generated_Executions_CancelExecution_sync]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
// 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!

#pragma warning disable CS8981

namespace GoogleCSharpSnippets
{
// [START run_v2_generated_Executions_CancelExecution_async_flattened_resourceNames]
using Google.LongRunning;
using System.Threading.Tasks;
using gcrv = Google.Cloud.Run.V2;

public sealed partial class GeneratedExecutionsClientSnippets
{
/// <summary>Snippet for CancelExecutionAsync</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 CancelExecutionResourceNamesAsync()
{
// Create client
gcrv::ExecutionsClient executionsClient = await gcrv::ExecutionsClient.CreateAsync();
// Initialize request argument(s)
gcrv::ExecutionName name = gcrv::ExecutionName.FromProjectLocationJobExecution("[PROJECT]", "[LOCATION]", "[JOB]", "[EXECUTION]");
// Make the request
Operation<gcrv::Execution, gcrv::Execution> response = await executionsClient.CancelExecutionAsync(name);

// Poll until the returned long-running operation is complete
Operation<gcrv::Execution, gcrv::Execution> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcrv::Execution result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<gcrv::Execution, gcrv::Execution> retrievedResponse = await executionsClient.PollOnceCancelExecutionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcrv::Execution retrievedResult = retrievedResponse.Result;
}
}
}
// [END run_v2_generated_Executions_CancelExecution_async_flattened_resourceNames]
}
Loading

0 comments on commit 7cb7b55

Please sign in to comment.