-
Notifications
You must be signed in to change notification settings - Fork 369
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: fix broken references in comments
PiperOrigin-RevId: 710060918 Source-Link: googleapis/googleapis@f7314d1 Source-Link: googleapis/googleapis-gen@2dee5f1 Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuQmF0Y2guVjEvLk93bEJvdC55YW1sIiwiaCI6IjJkZWU1ZjFhMTUzYTFhNDQ3YWJjY2VmZThhYTgxZjY5MjQwNzcyNGEifQ==
- Loading branch information
1 parent
cd7c4a2
commit 615e51b
Showing
49 changed files
with
23,070 additions
and
0 deletions.
There are no files selected for viewing
48 changes: 48 additions & 0 deletions
48
....V1/Google.Cloud.Batch.V1.GeneratedSnippets/BatchServiceClient.CreateJobAsyncSnippet.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,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] | ||
} |
53 changes: 53 additions & 0 deletions
53
...oud.Batch.V1.GeneratedSnippets/BatchServiceClient.CreateJobRequestObjectAsyncSnippet.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,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] | ||
} |
50 changes: 50 additions & 0 deletions
50
...le.Cloud.Batch.V1.GeneratedSnippets/BatchServiceClient.CreateJobRequestObjectSnippet.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,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] | ||
} |
49 changes: 49 additions & 0 deletions
49
...oud.Batch.V1.GeneratedSnippets/BatchServiceClient.CreateJobResourceNamesAsyncSnippet.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 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] | ||
} |
46 changes: 46 additions & 0 deletions
46
...le.Cloud.Batch.V1.GeneratedSnippets/BatchServiceClient.CreateJobResourceNamesSnippet.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 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] | ||
} |
45 changes: 45 additions & 0 deletions
45
...Batch.V1/Google.Cloud.Batch.V1.GeneratedSnippets/BatchServiceClient.CreateJobSnippet.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,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] | ||
} |
64 changes: 64 additions & 0 deletions
64
....V1/Google.Cloud.Batch.V1.GeneratedSnippets/BatchServiceClient.DeleteJobAsyncSnippet.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,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] | ||
} |
Oops, something went wrong.