Skip to content

Commit

Permalink
docs: fix broken references in comments
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 710060918

Source-Link: googleapis/googleapis@f7314d1

Source-Link: googleapis/googleapis-gen@2dee5f1
Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuQmF0Y2guVjEvLk93bEJvdC55YW1sIiwiaCI6IjJkZWU1ZjFhMTUzYTFhNDQ3YWJjY2VmZThhYTgxZjY5MjQwNzcyNGEifQ==
  • Loading branch information
gcf-owl-bot[bot] committed Dec 27, 2024
1 parent cd7c4a2 commit 615e51b
Show file tree
Hide file tree
Showing 49 changed files with 23,070 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
// 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 batch_v1_generated_BatchService_CreateJob_async_flattened]
using System.Threading.Tasks;
using gcbv = Google.Cloud.Batch.V1;

public sealed partial class GeneratedBatchServiceClientSnippets
{
/// <summary>Snippet for CreateJobAsync</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 CreateJobAsync()
{
// Create client
gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
gcbv::Job job = new gcbv::Job();
string jobId = "";
// Make the request
gcbv::Job response = await batchServiceClient.CreateJobAsync(parent, job, jobId);
}
}
// [END batch_v1_generated_BatchService_CreateJob_async_flattened]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
// 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 batch_v1_generated_BatchService_CreateJob_async]
using Google.Api.Gax.ResourceNames;
using System.Threading.Tasks;
using gcbv = Google.Cloud.Batch.V1;

public sealed partial class GeneratedBatchServiceClientSnippets
{
/// <summary>Snippet for CreateJobAsync</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 CreateJobRequestObjectAsync()
{
// Create client
gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync();
// Initialize request argument(s)
gcbv::CreateJobRequest request = new gcbv::CreateJobRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
JobId = "",
Job = new gcbv::Job(),
RequestId = "",
};
// Make the request
gcbv::Job response = await batchServiceClient.CreateJobAsync(request);
}
}
// [END batch_v1_generated_BatchService_CreateJob_async]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
// 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 batch_v1_generated_BatchService_CreateJob_sync]
using Google.Api.Gax.ResourceNames;
using Google.Cloud.Batch.V1;

public sealed partial class GeneratedBatchServiceClientSnippets
{
/// <summary>Snippet for CreateJob</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 CreateJobRequestObject()
{
// Create client
BatchServiceClient batchServiceClient = BatchServiceClient.Create();
// Initialize request argument(s)
CreateJobRequest request = new CreateJobRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
JobId = "",
Job = new Job(),
RequestId = "",
};
// Make the request
Job response = batchServiceClient.CreateJob(request);
}
}
// [END batch_v1_generated_BatchService_CreateJob_sync]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
// 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 batch_v1_generated_BatchService_CreateJob_async_flattened_resourceNames]
using Google.Api.Gax.ResourceNames;
using System.Threading.Tasks;
using gcbv = Google.Cloud.Batch.V1;

public sealed partial class GeneratedBatchServiceClientSnippets
{
/// <summary>Snippet for CreateJobAsync</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 CreateJobResourceNamesAsync()
{
// Create client
gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
gcbv::Job job = new gcbv::Job();
string jobId = "";
// Make the request
gcbv::Job response = await batchServiceClient.CreateJobAsync(parent, job, jobId);
}
}
// [END batch_v1_generated_BatchService_CreateJob_async_flattened_resourceNames]
}
Original file line number Diff line number Diff line change
@@ -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 batch_v1_generated_BatchService_CreateJob_sync_flattened_resourceNames]
using Google.Api.Gax.ResourceNames;
using Google.Cloud.Batch.V1;

public sealed partial class GeneratedBatchServiceClientSnippets
{
/// <summary>Snippet for CreateJob</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 CreateJobResourceNames()
{
// Create client
BatchServiceClient batchServiceClient = BatchServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Job job = new Job();
string jobId = "";
// Make the request
Job response = batchServiceClient.CreateJob(parent, job, jobId);
}
}
// [END batch_v1_generated_BatchService_CreateJob_sync_flattened_resourceNames]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
// 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 batch_v1_generated_BatchService_CreateJob_sync_flattened]
using Google.Cloud.Batch.V1;

public sealed partial class GeneratedBatchServiceClientSnippets
{
/// <summary>Snippet for CreateJob</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 CreateJob()
{
// Create client
BatchServiceClient batchServiceClient = BatchServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Job job = new Job();
string jobId = "";
// Make the request
Job response = batchServiceClient.CreateJob(parent, job, jobId);
}
}
// [END batch_v1_generated_BatchService_CreateJob_sync_flattened]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
// 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 batch_v1_generated_BatchService_DeleteJob_async_flattened]
using Google.LongRunning;
using Google.Protobuf.WellKnownTypes;
using System.Threading.Tasks;
using gcbv = Google.Cloud.Batch.V1;

public sealed partial class GeneratedBatchServiceClientSnippets
{
/// <summary>Snippet for DeleteJobAsync</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 DeleteJobAsync()
{
// Create client
gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "";
// Make the request
Operation<Empty, gcbv::OperationMetadata> response = await batchServiceClient.DeleteJobAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, gcbv::OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty 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<Empty, gcbv::OperationMetadata> retrievedResponse = await batchServiceClient.PollOnceDeleteJobAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
}
}
// [END batch_v1_generated_BatchService_DeleteJob_async_flattened]
}
Loading

0 comments on commit 615e51b

Please sign in to comment.