diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.CancelJobAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.CancelJobAsyncSnippet.g.cs new file mode 100755 index 000000000000..8a3a8d02d1c0 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.CancelJobAsyncSnippet.g.cs @@ -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 batch_v1alpha_generated_BatchService_CancelJob_async_flattened] + using Google.LongRunning; + using System.Threading.Tasks; + using gcbv = Google.Cloud.Batch.V1Alpha; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for CancelJobAsync + /// + /// 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. + /// + public async Task CancelJobAsync() + { + // Create client + gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/jobs/[JOB]"; + // Make the request + Operation response = await batchServiceClient.CancelJobAsync(name); + + // Poll until the returned long-running operation is complete + Operation completedResponse = await response.PollUntilCompletedAsync(); + // Retrieve the operation result + gcbv::CancelJobResponse 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 retrievedResponse = await batchServiceClient.PollOnceCancelJobAsync(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + gcbv::CancelJobResponse retrievedResult = retrievedResponse.Result; + } + } + } + // [END batch_v1alpha_generated_BatchService_CancelJob_async_flattened] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.CancelJobRequestObjectAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.CancelJobRequestObjectAsyncSnippet.g.cs new file mode 100755 index 000000000000..2a49e4bb7185 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.CancelJobRequestObjectAsyncSnippet.g.cs @@ -0,0 +1,67 @@ +// 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_v1alpha_generated_BatchService_CancelJob_async] + using Google.LongRunning; + using System.Threading.Tasks; + using gcbv = Google.Cloud.Batch.V1Alpha; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for CancelJobAsync + /// + /// 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. + /// + public async Task CancelJobRequestObjectAsync() + { + // Create client + gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync(); + // Initialize request argument(s) + gcbv::CancelJobRequest request = new gcbv::CancelJobRequest + { + JobName = gcbv::JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]"), + RequestId = "", + }; + // Make the request + Operation response = await batchServiceClient.CancelJobAsync(request); + + // Poll until the returned long-running operation is complete + Operation completedResponse = await response.PollUntilCompletedAsync(); + // Retrieve the operation result + gcbv::CancelJobResponse 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 retrievedResponse = await batchServiceClient.PollOnceCancelJobAsync(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + gcbv::CancelJobResponse retrievedResult = retrievedResponse.Result; + } + } + } + // [END batch_v1alpha_generated_BatchService_CancelJob_async] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.CancelJobRequestObjectSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.CancelJobRequestObjectSnippet.g.cs new file mode 100755 index 000000000000..7e7db288b740 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.CancelJobRequestObjectSnippet.g.cs @@ -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! + +namespace GoogleCSharpSnippets +{ + // [START batch_v1alpha_generated_BatchService_CancelJob_sync] + using Google.Cloud.Batch.V1Alpha; + using Google.LongRunning; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for CancelJob + /// + /// 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. + /// + public void CancelJobRequestObject() + { + // Create client + BatchServiceClient batchServiceClient = BatchServiceClient.Create(); + // Initialize request argument(s) + CancelJobRequest request = new CancelJobRequest + { + JobName = JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]"), + RequestId = "", + }; + // Make the request + Operation response = batchServiceClient.CancelJob(request); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // Retrieve the operation result + CancelJobResponse 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 retrievedResponse = batchServiceClient.PollOnceCancelJob(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + CancelJobResponse retrievedResult = retrievedResponse.Result; + } + } + } + // [END batch_v1alpha_generated_BatchService_CancelJob_sync] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.CancelJobResourceNamesAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.CancelJobResourceNamesAsyncSnippet.g.cs new file mode 100755 index 000000000000..20d01a1b40cb --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.CancelJobResourceNamesAsyncSnippet.g.cs @@ -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 batch_v1alpha_generated_BatchService_CancelJob_async_flattened_resourceNames] + using Google.LongRunning; + using System.Threading.Tasks; + using gcbv = Google.Cloud.Batch.V1Alpha; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for CancelJobAsync + /// + /// 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. + /// + public async Task CancelJobResourceNamesAsync() + { + // Create client + gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync(); + // Initialize request argument(s) + gcbv::JobName name = gcbv::JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]"); + // Make the request + Operation response = await batchServiceClient.CancelJobAsync(name); + + // Poll until the returned long-running operation is complete + Operation completedResponse = await response.PollUntilCompletedAsync(); + // Retrieve the operation result + gcbv::CancelJobResponse 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 retrievedResponse = await batchServiceClient.PollOnceCancelJobAsync(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + gcbv::CancelJobResponse retrievedResult = retrievedResponse.Result; + } + } + } + // [END batch_v1alpha_generated_BatchService_CancelJob_async_flattened_resourceNames] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.CancelJobResourceNamesSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.CancelJobResourceNamesSnippet.g.cs new file mode 100755 index 000000000000..f27c06601471 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.CancelJobResourceNamesSnippet.g.cs @@ -0,0 +1,60 @@ +// 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_v1alpha_generated_BatchService_CancelJob_sync_flattened_resourceNames] + using Google.Cloud.Batch.V1Alpha; + using Google.LongRunning; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for CancelJob + /// + /// 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. + /// + public void CancelJobResourceNames() + { + // Create client + BatchServiceClient batchServiceClient = BatchServiceClient.Create(); + // Initialize request argument(s) + JobName name = JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]"); + // Make the request + Operation response = batchServiceClient.CancelJob(name); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // Retrieve the operation result + CancelJobResponse 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 retrievedResponse = batchServiceClient.PollOnceCancelJob(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + CancelJobResponse retrievedResult = retrievedResponse.Result; + } + } + } + // [END batch_v1alpha_generated_BatchService_CancelJob_sync_flattened_resourceNames] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.CancelJobSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.CancelJobSnippet.g.cs new file mode 100755 index 000000000000..8c5310324299 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.CancelJobSnippet.g.cs @@ -0,0 +1,60 @@ +// 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_v1alpha_generated_BatchService_CancelJob_sync_flattened] + using Google.Cloud.Batch.V1Alpha; + using Google.LongRunning; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for CancelJob + /// + /// 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. + /// + public void CancelJob() + { + // Create client + BatchServiceClient batchServiceClient = BatchServiceClient.Create(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/jobs/[JOB]"; + // Make the request + Operation response = batchServiceClient.CancelJob(name); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // Retrieve the operation result + CancelJobResponse 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 retrievedResponse = batchServiceClient.PollOnceCancelJob(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + CancelJobResponse retrievedResult = retrievedResponse.Result; + } + } + } + // [END batch_v1alpha_generated_BatchService_CancelJob_sync_flattened] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.CreateJobAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.CreateJobAsyncSnippet.g.cs new file mode 100755 index 000000000000..8b5fd5a53928 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.CreateJobAsyncSnippet.g.cs @@ -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_v1alpha_generated_BatchService_CreateJob_async_flattened] + using System.Threading.Tasks; + using gcbv = Google.Cloud.Batch.V1Alpha; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for CreateJobAsync + /// + /// 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. + /// + 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_v1alpha_generated_BatchService_CreateJob_async_flattened] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.CreateJobRequestObjectAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.CreateJobRequestObjectAsyncSnippet.g.cs new file mode 100755 index 000000000000..f12ca4b15032 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.CreateJobRequestObjectAsyncSnippet.g.cs @@ -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_v1alpha_generated_BatchService_CreateJob_async] + using Google.Api.Gax.ResourceNames; + using System.Threading.Tasks; + using gcbv = Google.Cloud.Batch.V1Alpha; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for CreateJobAsync + /// + /// 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. + /// + 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_v1alpha_generated_BatchService_CreateJob_async] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.CreateJobRequestObjectSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.CreateJobRequestObjectSnippet.g.cs new file mode 100755 index 000000000000..a7690238236b --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.CreateJobRequestObjectSnippet.g.cs @@ -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_v1alpha_generated_BatchService_CreateJob_sync] + using Google.Api.Gax.ResourceNames; + using Google.Cloud.Batch.V1Alpha; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for CreateJob + /// + /// 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. + /// + 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_v1alpha_generated_BatchService_CreateJob_sync] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.CreateJobResourceNamesAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.CreateJobResourceNamesAsyncSnippet.g.cs new file mode 100755 index 000000000000..a67c96743fb3 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.CreateJobResourceNamesAsyncSnippet.g.cs @@ -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_v1alpha_generated_BatchService_CreateJob_async_flattened_resourceNames] + using Google.Api.Gax.ResourceNames; + using System.Threading.Tasks; + using gcbv = Google.Cloud.Batch.V1Alpha; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for CreateJobAsync + /// + /// 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. + /// + 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_v1alpha_generated_BatchService_CreateJob_async_flattened_resourceNames] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.CreateJobResourceNamesSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.CreateJobResourceNamesSnippet.g.cs new file mode 100755 index 000000000000..7762c4a89ef9 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.CreateJobResourceNamesSnippet.g.cs @@ -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_v1alpha_generated_BatchService_CreateJob_sync_flattened_resourceNames] + using Google.Api.Gax.ResourceNames; + using Google.Cloud.Batch.V1Alpha; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for CreateJob + /// + /// 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. + /// + 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_v1alpha_generated_BatchService_CreateJob_sync_flattened_resourceNames] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.CreateJobSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.CreateJobSnippet.g.cs new file mode 100755 index 000000000000..e47e373994c9 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.CreateJobSnippet.g.cs @@ -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_v1alpha_generated_BatchService_CreateJob_sync_flattened] + using Google.Cloud.Batch.V1Alpha; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for CreateJob + /// + /// 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. + /// + 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_v1alpha_generated_BatchService_CreateJob_sync_flattened] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.CreateResourceAllowanceAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.CreateResourceAllowanceAsyncSnippet.g.cs new file mode 100755 index 000000000000..98ad0ba0291d --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.CreateResourceAllowanceAsyncSnippet.g.cs @@ -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_v1alpha_generated_BatchService_CreateResourceAllowance_async_flattened] + using System.Threading.Tasks; + using gcbv = Google.Cloud.Batch.V1Alpha; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for CreateResourceAllowanceAsync + /// + /// 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. + /// + public async Task CreateResourceAllowanceAsync() + { + // Create client + gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync(); + // Initialize request argument(s) + string parent = "projects/[PROJECT]/locations/[LOCATION]"; + gcbv::ResourceAllowance resourceAllowance = new gcbv::ResourceAllowance(); + string resourceAllowanceId = ""; + // Make the request + gcbv::ResourceAllowance response = await batchServiceClient.CreateResourceAllowanceAsync(parent, resourceAllowance, resourceAllowanceId); + } + } + // [END batch_v1alpha_generated_BatchService_CreateResourceAllowance_async_flattened] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.CreateResourceAllowanceRequestObjectAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.CreateResourceAllowanceRequestObjectAsyncSnippet.g.cs new file mode 100755 index 000000000000..a0acc8eccf57 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.CreateResourceAllowanceRequestObjectAsyncSnippet.g.cs @@ -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_v1alpha_generated_BatchService_CreateResourceAllowance_async] + using Google.Api.Gax.ResourceNames; + using System.Threading.Tasks; + using gcbv = Google.Cloud.Batch.V1Alpha; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for CreateResourceAllowanceAsync + /// + /// 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. + /// + public async Task CreateResourceAllowanceRequestObjectAsync() + { + // Create client + gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync(); + // Initialize request argument(s) + gcbv::CreateResourceAllowanceRequest request = new gcbv::CreateResourceAllowanceRequest + { + ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"), + ResourceAllowanceId = "", + ResourceAllowance = new gcbv::ResourceAllowance(), + RequestId = "", + }; + // Make the request + gcbv::ResourceAllowance response = await batchServiceClient.CreateResourceAllowanceAsync(request); + } + } + // [END batch_v1alpha_generated_BatchService_CreateResourceAllowance_async] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.CreateResourceAllowanceRequestObjectSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.CreateResourceAllowanceRequestObjectSnippet.g.cs new file mode 100755 index 000000000000..227f7fe2b76b --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.CreateResourceAllowanceRequestObjectSnippet.g.cs @@ -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_v1alpha_generated_BatchService_CreateResourceAllowance_sync] + using Google.Api.Gax.ResourceNames; + using Google.Cloud.Batch.V1Alpha; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for CreateResourceAllowance + /// + /// 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. + /// + public void CreateResourceAllowanceRequestObject() + { + // Create client + BatchServiceClient batchServiceClient = BatchServiceClient.Create(); + // Initialize request argument(s) + CreateResourceAllowanceRequest request = new CreateResourceAllowanceRequest + { + ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"), + ResourceAllowanceId = "", + ResourceAllowance = new ResourceAllowance(), + RequestId = "", + }; + // Make the request + ResourceAllowance response = batchServiceClient.CreateResourceAllowance(request); + } + } + // [END batch_v1alpha_generated_BatchService_CreateResourceAllowance_sync] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.CreateResourceAllowanceResourceNamesAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.CreateResourceAllowanceResourceNamesAsyncSnippet.g.cs new file mode 100755 index 000000000000..a2c24edd9857 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.CreateResourceAllowanceResourceNamesAsyncSnippet.g.cs @@ -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_v1alpha_generated_BatchService_CreateResourceAllowance_async_flattened_resourceNames] + using Google.Api.Gax.ResourceNames; + using System.Threading.Tasks; + using gcbv = Google.Cloud.Batch.V1Alpha; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for CreateResourceAllowanceAsync + /// + /// 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. + /// + public async Task CreateResourceAllowanceResourceNamesAsync() + { + // Create client + gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync(); + // Initialize request argument(s) + LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"); + gcbv::ResourceAllowance resourceAllowance = new gcbv::ResourceAllowance(); + string resourceAllowanceId = ""; + // Make the request + gcbv::ResourceAllowance response = await batchServiceClient.CreateResourceAllowanceAsync(parent, resourceAllowance, resourceAllowanceId); + } + } + // [END batch_v1alpha_generated_BatchService_CreateResourceAllowance_async_flattened_resourceNames] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.CreateResourceAllowanceResourceNamesSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.CreateResourceAllowanceResourceNamesSnippet.g.cs new file mode 100755 index 000000000000..e991b55b5224 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.CreateResourceAllowanceResourceNamesSnippet.g.cs @@ -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_v1alpha_generated_BatchService_CreateResourceAllowance_sync_flattened_resourceNames] + using Google.Api.Gax.ResourceNames; + using Google.Cloud.Batch.V1Alpha; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for CreateResourceAllowance + /// + /// 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. + /// + public void CreateResourceAllowanceResourceNames() + { + // Create client + BatchServiceClient batchServiceClient = BatchServiceClient.Create(); + // Initialize request argument(s) + LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"); + ResourceAllowance resourceAllowance = new ResourceAllowance(); + string resourceAllowanceId = ""; + // Make the request + ResourceAllowance response = batchServiceClient.CreateResourceAllowance(parent, resourceAllowance, resourceAllowanceId); + } + } + // [END batch_v1alpha_generated_BatchService_CreateResourceAllowance_sync_flattened_resourceNames] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.CreateResourceAllowanceSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.CreateResourceAllowanceSnippet.g.cs new file mode 100755 index 000000000000..26610af1339d --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.CreateResourceAllowanceSnippet.g.cs @@ -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_v1alpha_generated_BatchService_CreateResourceAllowance_sync_flattened] + using Google.Cloud.Batch.V1Alpha; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for CreateResourceAllowance + /// + /// 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. + /// + public void CreateResourceAllowance() + { + // Create client + BatchServiceClient batchServiceClient = BatchServiceClient.Create(); + // Initialize request argument(s) + string parent = "projects/[PROJECT]/locations/[LOCATION]"; + ResourceAllowance resourceAllowance = new ResourceAllowance(); + string resourceAllowanceId = ""; + // Make the request + ResourceAllowance response = batchServiceClient.CreateResourceAllowance(parent, resourceAllowance, resourceAllowanceId); + } + } + // [END batch_v1alpha_generated_BatchService_CreateResourceAllowance_sync_flattened] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.DeleteJobAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.DeleteJobAsyncSnippet.g.cs new file mode 100755 index 000000000000..cff2c0c431d2 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.DeleteJobAsyncSnippet.g.cs @@ -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_v1alpha_generated_BatchService_DeleteJob_async_flattened] + using Google.LongRunning; + using Google.Protobuf.WellKnownTypes; + using System.Threading.Tasks; + using gcbv = Google.Cloud.Batch.V1Alpha; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for DeleteJobAsync + /// + /// 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. + /// + public async Task DeleteJobAsync() + { + // Create client + gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync(); + // Initialize request argument(s) + string name = ""; + // Make the request + Operation response = await batchServiceClient.DeleteJobAsync(name); + + // Poll until the returned long-running operation is complete + Operation 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 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_v1alpha_generated_BatchService_DeleteJob_async_flattened] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.DeleteJobRequestObjectAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.DeleteJobRequestObjectAsyncSnippet.g.cs new file mode 100755 index 000000000000..c6c718f9160f --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.DeleteJobRequestObjectAsyncSnippet.g.cs @@ -0,0 +1,69 @@ +// 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_v1alpha_generated_BatchService_DeleteJob_async] + using Google.LongRunning; + using Google.Protobuf.WellKnownTypes; + using System.Threading.Tasks; + using gcbv = Google.Cloud.Batch.V1Alpha; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for DeleteJobAsync + /// + /// 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. + /// + public async Task DeleteJobRequestObjectAsync() + { + // Create client + gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync(); + // Initialize request argument(s) + gcbv::DeleteJobRequest request = new gcbv::DeleteJobRequest + { + Name = "", + Reason = "", + RequestId = "", + }; + // Make the request + Operation response = await batchServiceClient.DeleteJobAsync(request); + + // Poll until the returned long-running operation is complete + Operation 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 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_v1alpha_generated_BatchService_DeleteJob_async] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.DeleteJobRequestObjectSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.DeleteJobRequestObjectSnippet.g.cs new file mode 100755 index 000000000000..dd8d4821d9e6 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.DeleteJobRequestObjectSnippet.g.cs @@ -0,0 +1,66 @@ +// 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_v1alpha_generated_BatchService_DeleteJob_sync] + using Google.Cloud.Batch.V1Alpha; + using Google.LongRunning; + using Google.Protobuf.WellKnownTypes; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for DeleteJob + /// + /// 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. + /// + public void DeleteJobRequestObject() + { + // Create client + BatchServiceClient batchServiceClient = BatchServiceClient.Create(); + // Initialize request argument(s) + DeleteJobRequest request = new DeleteJobRequest + { + Name = "", + Reason = "", + RequestId = "", + }; + // Make the request + Operation response = batchServiceClient.DeleteJob(request); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // 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 retrievedResponse = batchServiceClient.PollOnceDeleteJob(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_v1alpha_generated_BatchService_DeleteJob_sync] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.DeleteJobSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.DeleteJobSnippet.g.cs new file mode 100755 index 000000000000..ea9eabf9ab38 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.DeleteJobSnippet.g.cs @@ -0,0 +1,61 @@ +// 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_v1alpha_generated_BatchService_DeleteJob_sync_flattened] + using Google.Cloud.Batch.V1Alpha; + using Google.LongRunning; + using Google.Protobuf.WellKnownTypes; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for DeleteJob + /// + /// 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. + /// + public void DeleteJob() + { + // Create client + BatchServiceClient batchServiceClient = BatchServiceClient.Create(); + // Initialize request argument(s) + string name = ""; + // Make the request + Operation response = batchServiceClient.DeleteJob(name); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // 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 retrievedResponse = batchServiceClient.PollOnceDeleteJob(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_v1alpha_generated_BatchService_DeleteJob_sync_flattened] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.DeleteResourceAllowanceAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.DeleteResourceAllowanceAsyncSnippet.g.cs new file mode 100755 index 000000000000..37e5ad914ce4 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.DeleteResourceAllowanceAsyncSnippet.g.cs @@ -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_v1alpha_generated_BatchService_DeleteResourceAllowance_async_flattened] + using Google.LongRunning; + using Google.Protobuf.WellKnownTypes; + using System.Threading.Tasks; + using gcbv = Google.Cloud.Batch.V1Alpha; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for DeleteResourceAllowanceAsync + /// + /// 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. + /// + public async Task DeleteResourceAllowanceAsync() + { + // Create client + gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/resourceAllowances/[RESOURCE_ALLOWANCE]"; + // Make the request + Operation response = await batchServiceClient.DeleteResourceAllowanceAsync(name); + + // Poll until the returned long-running operation is complete + Operation 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 retrievedResponse = await batchServiceClient.PollOnceDeleteResourceAllowanceAsync(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_v1alpha_generated_BatchService_DeleteResourceAllowance_async_flattened] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.DeleteResourceAllowanceRequestObjectAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.DeleteResourceAllowanceRequestObjectAsyncSnippet.g.cs new file mode 100755 index 000000000000..a56d6949be22 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.DeleteResourceAllowanceRequestObjectAsyncSnippet.g.cs @@ -0,0 +1,69 @@ +// 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_v1alpha_generated_BatchService_DeleteResourceAllowance_async] + using Google.LongRunning; + using Google.Protobuf.WellKnownTypes; + using System.Threading.Tasks; + using gcbv = Google.Cloud.Batch.V1Alpha; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for DeleteResourceAllowanceAsync + /// + /// 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. + /// + public async Task DeleteResourceAllowanceRequestObjectAsync() + { + // Create client + gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync(); + // Initialize request argument(s) + gcbv::DeleteResourceAllowanceRequest request = new gcbv::DeleteResourceAllowanceRequest + { + ResourceAllowanceName = gcbv::ResourceAllowanceName.FromProjectLocationResourceAllowance("[PROJECT]", "[LOCATION]", "[RESOURCE_ALLOWANCE]"), + Reason = "", + RequestId = "", + }; + // Make the request + Operation response = await batchServiceClient.DeleteResourceAllowanceAsync(request); + + // Poll until the returned long-running operation is complete + Operation 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 retrievedResponse = await batchServiceClient.PollOnceDeleteResourceAllowanceAsync(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_v1alpha_generated_BatchService_DeleteResourceAllowance_async] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.DeleteResourceAllowanceRequestObjectSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.DeleteResourceAllowanceRequestObjectSnippet.g.cs new file mode 100755 index 000000000000..541473ebcaf8 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.DeleteResourceAllowanceRequestObjectSnippet.g.cs @@ -0,0 +1,66 @@ +// 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_v1alpha_generated_BatchService_DeleteResourceAllowance_sync] + using Google.Cloud.Batch.V1Alpha; + using Google.LongRunning; + using Google.Protobuf.WellKnownTypes; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for DeleteResourceAllowance + /// + /// 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. + /// + public void DeleteResourceAllowanceRequestObject() + { + // Create client + BatchServiceClient batchServiceClient = BatchServiceClient.Create(); + // Initialize request argument(s) + DeleteResourceAllowanceRequest request = new DeleteResourceAllowanceRequest + { + ResourceAllowanceName = ResourceAllowanceName.FromProjectLocationResourceAllowance("[PROJECT]", "[LOCATION]", "[RESOURCE_ALLOWANCE]"), + Reason = "", + RequestId = "", + }; + // Make the request + Operation response = batchServiceClient.DeleteResourceAllowance(request); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // 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 retrievedResponse = batchServiceClient.PollOnceDeleteResourceAllowance(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_v1alpha_generated_BatchService_DeleteResourceAllowance_sync] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.DeleteResourceAllowanceResourceNamesAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.DeleteResourceAllowanceResourceNamesAsyncSnippet.g.cs new file mode 100755 index 000000000000..ce88c038293c --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.DeleteResourceAllowanceResourceNamesAsyncSnippet.g.cs @@ -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_v1alpha_generated_BatchService_DeleteResourceAllowance_async_flattened_resourceNames] + using Google.LongRunning; + using Google.Protobuf.WellKnownTypes; + using System.Threading.Tasks; + using gcbv = Google.Cloud.Batch.V1Alpha; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for DeleteResourceAllowanceAsync + /// + /// 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. + /// + public async Task DeleteResourceAllowanceResourceNamesAsync() + { + // Create client + gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync(); + // Initialize request argument(s) + gcbv::ResourceAllowanceName name = gcbv::ResourceAllowanceName.FromProjectLocationResourceAllowance("[PROJECT]", "[LOCATION]", "[RESOURCE_ALLOWANCE]"); + // Make the request + Operation response = await batchServiceClient.DeleteResourceAllowanceAsync(name); + + // Poll until the returned long-running operation is complete + Operation 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 retrievedResponse = await batchServiceClient.PollOnceDeleteResourceAllowanceAsync(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_v1alpha_generated_BatchService_DeleteResourceAllowance_async_flattened_resourceNames] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.DeleteResourceAllowanceResourceNamesSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.DeleteResourceAllowanceResourceNamesSnippet.g.cs new file mode 100755 index 000000000000..045d1dc4c660 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.DeleteResourceAllowanceResourceNamesSnippet.g.cs @@ -0,0 +1,61 @@ +// 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_v1alpha_generated_BatchService_DeleteResourceAllowance_sync_flattened_resourceNames] + using Google.Cloud.Batch.V1Alpha; + using Google.LongRunning; + using Google.Protobuf.WellKnownTypes; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for DeleteResourceAllowance + /// + /// 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. + /// + public void DeleteResourceAllowanceResourceNames() + { + // Create client + BatchServiceClient batchServiceClient = BatchServiceClient.Create(); + // Initialize request argument(s) + ResourceAllowanceName name = ResourceAllowanceName.FromProjectLocationResourceAllowance("[PROJECT]", "[LOCATION]", "[RESOURCE_ALLOWANCE]"); + // Make the request + Operation response = batchServiceClient.DeleteResourceAllowance(name); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // 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 retrievedResponse = batchServiceClient.PollOnceDeleteResourceAllowance(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_v1alpha_generated_BatchService_DeleteResourceAllowance_sync_flattened_resourceNames] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.DeleteResourceAllowanceSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.DeleteResourceAllowanceSnippet.g.cs new file mode 100755 index 000000000000..bcc76b5e88e1 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.DeleteResourceAllowanceSnippet.g.cs @@ -0,0 +1,61 @@ +// 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_v1alpha_generated_BatchService_DeleteResourceAllowance_sync_flattened] + using Google.Cloud.Batch.V1Alpha; + using Google.LongRunning; + using Google.Protobuf.WellKnownTypes; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for DeleteResourceAllowance + /// + /// 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. + /// + public void DeleteResourceAllowance() + { + // Create client + BatchServiceClient batchServiceClient = BatchServiceClient.Create(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/resourceAllowances/[RESOURCE_ALLOWANCE]"; + // Make the request + Operation response = batchServiceClient.DeleteResourceAllowance(name); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // 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 retrievedResponse = batchServiceClient.PollOnceDeleteResourceAllowance(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_v1alpha_generated_BatchService_DeleteResourceAllowance_sync_flattened] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.GetJobAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.GetJobAsyncSnippet.g.cs new file mode 100755 index 000000000000..3ebd4d3a7bbd --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.GetJobAsyncSnippet.g.cs @@ -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! + +#pragma warning disable CS8981 + +namespace GoogleCSharpSnippets +{ + // [START batch_v1alpha_generated_BatchService_GetJob_async_flattened] + using System.Threading.Tasks; + using gcbv = Google.Cloud.Batch.V1Alpha; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for GetJobAsync + /// + /// 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. + /// + public async Task GetJobAsync() + { + // Create client + gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/jobs/[JOB]"; + // Make the request + gcbv::Job response = await batchServiceClient.GetJobAsync(name); + } + } + // [END batch_v1alpha_generated_BatchService_GetJob_async_flattened] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.GetJobRequestObjectAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.GetJobRequestObjectAsyncSnippet.g.cs new file mode 100755 index 000000000000..29e4cac58635 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.GetJobRequestObjectAsyncSnippet.g.cs @@ -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_v1alpha_generated_BatchService_GetJob_async] + using System.Threading.Tasks; + using gcbv = Google.Cloud.Batch.V1Alpha; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for GetJobAsync + /// + /// 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. + /// + public async Task GetJobRequestObjectAsync() + { + // Create client + gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync(); + // Initialize request argument(s) + gcbv::GetJobRequest request = new gcbv::GetJobRequest + { + JobName = gcbv::JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]"), + }; + // Make the request + gcbv::Job response = await batchServiceClient.GetJobAsync(request); + } + } + // [END batch_v1alpha_generated_BatchService_GetJob_async] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.GetJobRequestObjectSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.GetJobRequestObjectSnippet.g.cs new file mode 100755 index 000000000000..af0dc68055e9 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.GetJobRequestObjectSnippet.g.cs @@ -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_v1alpha_generated_BatchService_GetJob_sync] + using Google.Cloud.Batch.V1Alpha; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for GetJob + /// + /// 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. + /// + public void GetJobRequestObject() + { + // Create client + BatchServiceClient batchServiceClient = BatchServiceClient.Create(); + // Initialize request argument(s) + GetJobRequest request = new GetJobRequest + { + JobName = JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]"), + }; + // Make the request + Job response = batchServiceClient.GetJob(request); + } + } + // [END batch_v1alpha_generated_BatchService_GetJob_sync] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.GetJobResourceNamesAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.GetJobResourceNamesAsyncSnippet.g.cs new file mode 100755 index 000000000000..a8a7325b27b7 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.GetJobResourceNamesAsyncSnippet.g.cs @@ -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! + +#pragma warning disable CS8981 + +namespace GoogleCSharpSnippets +{ + // [START batch_v1alpha_generated_BatchService_GetJob_async_flattened_resourceNames] + using System.Threading.Tasks; + using gcbv = Google.Cloud.Batch.V1Alpha; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for GetJobAsync + /// + /// 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. + /// + public async Task GetJobResourceNamesAsync() + { + // Create client + gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync(); + // Initialize request argument(s) + gcbv::JobName name = gcbv::JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]"); + // Make the request + gcbv::Job response = await batchServiceClient.GetJobAsync(name); + } + } + // [END batch_v1alpha_generated_BatchService_GetJob_async_flattened_resourceNames] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.GetJobResourceNamesSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.GetJobResourceNamesSnippet.g.cs new file mode 100755 index 000000000000..580609b391ca --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.GetJobResourceNamesSnippet.g.cs @@ -0,0 +1,43 @@ +// 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_v1alpha_generated_BatchService_GetJob_sync_flattened_resourceNames] + using Google.Cloud.Batch.V1Alpha; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for GetJob + /// + /// 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. + /// + public void GetJobResourceNames() + { + // Create client + BatchServiceClient batchServiceClient = BatchServiceClient.Create(); + // Initialize request argument(s) + JobName name = JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]"); + // Make the request + Job response = batchServiceClient.GetJob(name); + } + } + // [END batch_v1alpha_generated_BatchService_GetJob_sync_flattened_resourceNames] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.GetJobSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.GetJobSnippet.g.cs new file mode 100755 index 000000000000..cfb8d1008314 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.GetJobSnippet.g.cs @@ -0,0 +1,43 @@ +// 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_v1alpha_generated_BatchService_GetJob_sync_flattened] + using Google.Cloud.Batch.V1Alpha; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for GetJob + /// + /// 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. + /// + public void GetJob() + { + // Create client + BatchServiceClient batchServiceClient = BatchServiceClient.Create(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/jobs/[JOB]"; + // Make the request + Job response = batchServiceClient.GetJob(name); + } + } + // [END batch_v1alpha_generated_BatchService_GetJob_sync_flattened] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.GetResourceAllowanceAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.GetResourceAllowanceAsyncSnippet.g.cs new file mode 100755 index 000000000000..f7e55183e5b7 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.GetResourceAllowanceAsyncSnippet.g.cs @@ -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! + +#pragma warning disable CS8981 + +namespace GoogleCSharpSnippets +{ + // [START batch_v1alpha_generated_BatchService_GetResourceAllowance_async_flattened] + using System.Threading.Tasks; + using gcbv = Google.Cloud.Batch.V1Alpha; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for GetResourceAllowanceAsync + /// + /// 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. + /// + public async Task GetResourceAllowanceAsync() + { + // Create client + gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/resourceAllowances/[RESOURCE_ALLOWANCE]"; + // Make the request + gcbv::ResourceAllowance response = await batchServiceClient.GetResourceAllowanceAsync(name); + } + } + // [END batch_v1alpha_generated_BatchService_GetResourceAllowance_async_flattened] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.GetResourceAllowanceRequestObjectAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.GetResourceAllowanceRequestObjectAsyncSnippet.g.cs new file mode 100755 index 000000000000..92b1288c33c2 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.GetResourceAllowanceRequestObjectAsyncSnippet.g.cs @@ -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_v1alpha_generated_BatchService_GetResourceAllowance_async] + using System.Threading.Tasks; + using gcbv = Google.Cloud.Batch.V1Alpha; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for GetResourceAllowanceAsync + /// + /// 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. + /// + public async Task GetResourceAllowanceRequestObjectAsync() + { + // Create client + gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync(); + // Initialize request argument(s) + gcbv::GetResourceAllowanceRequest request = new gcbv::GetResourceAllowanceRequest + { + ResourceAllowanceName = gcbv::ResourceAllowanceName.FromProjectLocationResourceAllowance("[PROJECT]", "[LOCATION]", "[RESOURCE_ALLOWANCE]"), + }; + // Make the request + gcbv::ResourceAllowance response = await batchServiceClient.GetResourceAllowanceAsync(request); + } + } + // [END batch_v1alpha_generated_BatchService_GetResourceAllowance_async] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.GetResourceAllowanceRequestObjectSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.GetResourceAllowanceRequestObjectSnippet.g.cs new file mode 100755 index 000000000000..39a636f50cf3 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.GetResourceAllowanceRequestObjectSnippet.g.cs @@ -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_v1alpha_generated_BatchService_GetResourceAllowance_sync] + using Google.Cloud.Batch.V1Alpha; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for GetResourceAllowance + /// + /// 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. + /// + public void GetResourceAllowanceRequestObject() + { + // Create client + BatchServiceClient batchServiceClient = BatchServiceClient.Create(); + // Initialize request argument(s) + GetResourceAllowanceRequest request = new GetResourceAllowanceRequest + { + ResourceAllowanceName = ResourceAllowanceName.FromProjectLocationResourceAllowance("[PROJECT]", "[LOCATION]", "[RESOURCE_ALLOWANCE]"), + }; + // Make the request + ResourceAllowance response = batchServiceClient.GetResourceAllowance(request); + } + } + // [END batch_v1alpha_generated_BatchService_GetResourceAllowance_sync] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.GetResourceAllowanceResourceNamesAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.GetResourceAllowanceResourceNamesAsyncSnippet.g.cs new file mode 100755 index 000000000000..1db220b06e3e --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.GetResourceAllowanceResourceNamesAsyncSnippet.g.cs @@ -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! + +#pragma warning disable CS8981 + +namespace GoogleCSharpSnippets +{ + // [START batch_v1alpha_generated_BatchService_GetResourceAllowance_async_flattened_resourceNames] + using System.Threading.Tasks; + using gcbv = Google.Cloud.Batch.V1Alpha; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for GetResourceAllowanceAsync + /// + /// 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. + /// + public async Task GetResourceAllowanceResourceNamesAsync() + { + // Create client + gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync(); + // Initialize request argument(s) + gcbv::ResourceAllowanceName name = gcbv::ResourceAllowanceName.FromProjectLocationResourceAllowance("[PROJECT]", "[LOCATION]", "[RESOURCE_ALLOWANCE]"); + // Make the request + gcbv::ResourceAllowance response = await batchServiceClient.GetResourceAllowanceAsync(name); + } + } + // [END batch_v1alpha_generated_BatchService_GetResourceAllowance_async_flattened_resourceNames] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.GetResourceAllowanceResourceNamesSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.GetResourceAllowanceResourceNamesSnippet.g.cs new file mode 100755 index 000000000000..b68a47d62c70 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.GetResourceAllowanceResourceNamesSnippet.g.cs @@ -0,0 +1,43 @@ +// 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_v1alpha_generated_BatchService_GetResourceAllowance_sync_flattened_resourceNames] + using Google.Cloud.Batch.V1Alpha; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for GetResourceAllowance + /// + /// 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. + /// + public void GetResourceAllowanceResourceNames() + { + // Create client + BatchServiceClient batchServiceClient = BatchServiceClient.Create(); + // Initialize request argument(s) + ResourceAllowanceName name = ResourceAllowanceName.FromProjectLocationResourceAllowance("[PROJECT]", "[LOCATION]", "[RESOURCE_ALLOWANCE]"); + // Make the request + ResourceAllowance response = batchServiceClient.GetResourceAllowance(name); + } + } + // [END batch_v1alpha_generated_BatchService_GetResourceAllowance_sync_flattened_resourceNames] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.GetResourceAllowanceSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.GetResourceAllowanceSnippet.g.cs new file mode 100755 index 000000000000..c40e928eed6b --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.GetResourceAllowanceSnippet.g.cs @@ -0,0 +1,43 @@ +// 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_v1alpha_generated_BatchService_GetResourceAllowance_sync_flattened] + using Google.Cloud.Batch.V1Alpha; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for GetResourceAllowance + /// + /// 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. + /// + public void GetResourceAllowance() + { + // Create client + BatchServiceClient batchServiceClient = BatchServiceClient.Create(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/resourceAllowances/[RESOURCE_ALLOWANCE]"; + // Make the request + ResourceAllowance response = batchServiceClient.GetResourceAllowance(name); + } + } + // [END batch_v1alpha_generated_BatchService_GetResourceAllowance_sync_flattened] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.GetTaskAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.GetTaskAsyncSnippet.g.cs new file mode 100755 index 000000000000..aaac879781f3 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.GetTaskAsyncSnippet.g.cs @@ -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! + +#pragma warning disable CS8981 + +namespace GoogleCSharpSnippets +{ + // [START batch_v1alpha_generated_BatchService_GetTask_async_flattened] + using System.Threading.Tasks; + using gcbv = Google.Cloud.Batch.V1Alpha; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for GetTaskAsync + /// + /// 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. + /// + public async Task GetTaskAsync() + { + // Create client + gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/jobs/[JOB]/taskGroups/[TASK_GROUP]/tasks/[TASK]"; + // Make the request + gcbv::Task response = await batchServiceClient.GetTaskAsync(name); + } + } + // [END batch_v1alpha_generated_BatchService_GetTask_async_flattened] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.GetTaskRequestObjectAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.GetTaskRequestObjectAsyncSnippet.g.cs new file mode 100755 index 000000000000..52f0e80c2d15 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.GetTaskRequestObjectAsyncSnippet.g.cs @@ -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_v1alpha_generated_BatchService_GetTask_async] + using System.Threading.Tasks; + using gcbv = Google.Cloud.Batch.V1Alpha; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for GetTaskAsync + /// + /// 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. + /// + public async Task GetTaskRequestObjectAsync() + { + // Create client + gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync(); + // Initialize request argument(s) + gcbv::GetTaskRequest request = new gcbv::GetTaskRequest + { + TaskName = gcbv::TaskName.FromProjectLocationJobTaskGroupTask("[PROJECT]", "[LOCATION]", "[JOB]", "[TASK_GROUP]", "[TASK]"), + }; + // Make the request + gcbv::Task response = await batchServiceClient.GetTaskAsync(request); + } + } + // [END batch_v1alpha_generated_BatchService_GetTask_async] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.GetTaskRequestObjectSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.GetTaskRequestObjectSnippet.g.cs new file mode 100755 index 000000000000..1f9656e5ffb7 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.GetTaskRequestObjectSnippet.g.cs @@ -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_v1alpha_generated_BatchService_GetTask_sync] + using Google.Cloud.Batch.V1Alpha; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for GetTask + /// + /// 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. + /// + public void GetTaskRequestObject() + { + // Create client + BatchServiceClient batchServiceClient = BatchServiceClient.Create(); + // Initialize request argument(s) + GetTaskRequest request = new GetTaskRequest + { + TaskName = TaskName.FromProjectLocationJobTaskGroupTask("[PROJECT]", "[LOCATION]", "[JOB]", "[TASK_GROUP]", "[TASK]"), + }; + // Make the request + Task response = batchServiceClient.GetTask(request); + } + } + // [END batch_v1alpha_generated_BatchService_GetTask_sync] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.GetTaskResourceNamesAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.GetTaskResourceNamesAsyncSnippet.g.cs new file mode 100755 index 000000000000..ff922b2c84ae --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.GetTaskResourceNamesAsyncSnippet.g.cs @@ -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! + +#pragma warning disable CS8981 + +namespace GoogleCSharpSnippets +{ + // [START batch_v1alpha_generated_BatchService_GetTask_async_flattened_resourceNames] + using System.Threading.Tasks; + using gcbv = Google.Cloud.Batch.V1Alpha; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for GetTaskAsync + /// + /// 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. + /// + public async Task GetTaskResourceNamesAsync() + { + // Create client + gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync(); + // Initialize request argument(s) + gcbv::TaskName name = gcbv::TaskName.FromProjectLocationJobTaskGroupTask("[PROJECT]", "[LOCATION]", "[JOB]", "[TASK_GROUP]", "[TASK]"); + // Make the request + gcbv::Task response = await batchServiceClient.GetTaskAsync(name); + } + } + // [END batch_v1alpha_generated_BatchService_GetTask_async_flattened_resourceNames] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.GetTaskResourceNamesSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.GetTaskResourceNamesSnippet.g.cs new file mode 100755 index 000000000000..8e8b69ce2ae0 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.GetTaskResourceNamesSnippet.g.cs @@ -0,0 +1,43 @@ +// 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_v1alpha_generated_BatchService_GetTask_sync_flattened_resourceNames] + using Google.Cloud.Batch.V1Alpha; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for GetTask + /// + /// 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. + /// + public void GetTaskResourceNames() + { + // Create client + BatchServiceClient batchServiceClient = BatchServiceClient.Create(); + // Initialize request argument(s) + TaskName name = TaskName.FromProjectLocationJobTaskGroupTask("[PROJECT]", "[LOCATION]", "[JOB]", "[TASK_GROUP]", "[TASK]"); + // Make the request + Task response = batchServiceClient.GetTask(name); + } + } + // [END batch_v1alpha_generated_BatchService_GetTask_sync_flattened_resourceNames] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.GetTaskSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.GetTaskSnippet.g.cs new file mode 100755 index 000000000000..897147732763 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.GetTaskSnippet.g.cs @@ -0,0 +1,43 @@ +// 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_v1alpha_generated_BatchService_GetTask_sync_flattened] + using Google.Cloud.Batch.V1Alpha; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for GetTask + /// + /// 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. + /// + public void GetTask() + { + // Create client + BatchServiceClient batchServiceClient = BatchServiceClient.Create(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/jobs/[JOB]/taskGroups/[TASK_GROUP]/tasks/[TASK]"; + // Make the request + Task response = batchServiceClient.GetTask(name); + } + } + // [END batch_v1alpha_generated_BatchService_GetTask_sync_flattened] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.ListJobsAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.ListJobsAsyncSnippet.g.cs new file mode 100755 index 000000000000..e3ff07ecdc8f --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.ListJobsAsyncSnippet.g.cs @@ -0,0 +1,81 @@ +// 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_v1alpha_generated_BatchService_ListJobs_async_flattened] + using Google.Api.Gax; + using System; + using System.Linq; + using System.Threading.Tasks; + using gcbv = Google.Cloud.Batch.V1Alpha; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for ListJobsAsync + /// + /// 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. + /// + public async Task ListJobsAsync() + { + // Create client + gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync(); + // Initialize request argument(s) + string parent = ""; + // Make the request + PagedAsyncEnumerable response = batchServiceClient.ListJobsAsync(parent); + + // Iterate over all response items, lazily performing RPCs as required + await response.ForEachAsync((gcbv::Job item) => + { + // Do something with each item + Console.WriteLine(item); + }); + + // Or iterate over pages (of server-defined size), performing one RPC per page + await response.AsRawResponses().ForEachAsync((gcbv::ListJobsResponse page) => + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (gcbv::Job item in page) + { + // Do something with each item + Console.WriteLine(item); + } + }); + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = await response.ReadPageAsync(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (gcbv::Job item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + } + } + // [END batch_v1alpha_generated_BatchService_ListJobs_async_flattened] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.ListJobsRequestObjectAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.ListJobsRequestObjectAsyncSnippet.g.cs new file mode 100755 index 000000000000..2af9fe59f613 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.ListJobsRequestObjectAsyncSnippet.g.cs @@ -0,0 +1,86 @@ +// 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_v1alpha_generated_BatchService_ListJobs_async] + using Google.Api.Gax; + using System; + using System.Linq; + using System.Threading.Tasks; + using gcbv = Google.Cloud.Batch.V1Alpha; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for ListJobsAsync + /// + /// 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. + /// + public async Task ListJobsRequestObjectAsync() + { + // Create client + gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync(); + // Initialize request argument(s) + gcbv::ListJobsRequest request = new gcbv::ListJobsRequest + { + Parent = "", + Filter = "", + OrderBy = "", + }; + // Make the request + PagedAsyncEnumerable response = batchServiceClient.ListJobsAsync(request); + + // Iterate over all response items, lazily performing RPCs as required + await response.ForEachAsync((gcbv::Job item) => + { + // Do something with each item + Console.WriteLine(item); + }); + + // Or iterate over pages (of server-defined size), performing one RPC per page + await response.AsRawResponses().ForEachAsync((gcbv::ListJobsResponse page) => + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (gcbv::Job item in page) + { + // Do something with each item + Console.WriteLine(item); + } + }); + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = await response.ReadPageAsync(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (gcbv::Job item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + } + } + // [END batch_v1alpha_generated_BatchService_ListJobs_async] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.ListJobsRequestObjectSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.ListJobsRequestObjectSnippet.g.cs new file mode 100755 index 000000000000..5aa357de152a --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.ListJobsRequestObjectSnippet.g.cs @@ -0,0 +1,82 @@ +// 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_v1alpha_generated_BatchService_ListJobs_sync] + using Google.Api.Gax; + using Google.Cloud.Batch.V1Alpha; + using System; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for ListJobs + /// + /// 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. + /// + public void ListJobsRequestObject() + { + // Create client + BatchServiceClient batchServiceClient = BatchServiceClient.Create(); + // Initialize request argument(s) + ListJobsRequest request = new ListJobsRequest + { + Parent = "", + Filter = "", + OrderBy = "", + }; + // Make the request + PagedEnumerable response = batchServiceClient.ListJobs(request); + + // Iterate over all response items, lazily performing RPCs as required + foreach (Job item in response) + { + // Do something with each item + Console.WriteLine(item); + } + + // Or iterate over pages (of server-defined size), performing one RPC per page + foreach (ListJobsResponse page in response.AsRawResponses()) + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (Job item in page) + { + // Do something with each item + Console.WriteLine(item); + } + } + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = response.ReadPage(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (Job item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + } + } + // [END batch_v1alpha_generated_BatchService_ListJobs_sync] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.ListJobsSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.ListJobsSnippet.g.cs new file mode 100755 index 000000000000..df0fd3e5e203 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.ListJobsSnippet.g.cs @@ -0,0 +1,77 @@ +// 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_v1alpha_generated_BatchService_ListJobs_sync_flattened] + using Google.Api.Gax; + using Google.Cloud.Batch.V1Alpha; + using System; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for ListJobs + /// + /// 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. + /// + public void ListJobs() + { + // Create client + BatchServiceClient batchServiceClient = BatchServiceClient.Create(); + // Initialize request argument(s) + string parent = ""; + // Make the request + PagedEnumerable response = batchServiceClient.ListJobs(parent); + + // Iterate over all response items, lazily performing RPCs as required + foreach (Job item in response) + { + // Do something with each item + Console.WriteLine(item); + } + + // Or iterate over pages (of server-defined size), performing one RPC per page + foreach (ListJobsResponse page in response.AsRawResponses()) + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (Job item in page) + { + // Do something with each item + Console.WriteLine(item); + } + } + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = response.ReadPage(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (Job item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + } + } + // [END batch_v1alpha_generated_BatchService_ListJobs_sync_flattened] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.ListResourceAllowancesAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.ListResourceAllowancesAsyncSnippet.g.cs new file mode 100755 index 000000000000..a5da403b379c --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.ListResourceAllowancesAsyncSnippet.g.cs @@ -0,0 +1,81 @@ +// 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_v1alpha_generated_BatchService_ListResourceAllowances_async_flattened] + using Google.Api.Gax; + using System; + using System.Linq; + using System.Threading.Tasks; + using gcbv = Google.Cloud.Batch.V1Alpha; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for ListResourceAllowancesAsync + /// + /// 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. + /// + public async Task ListResourceAllowancesAsync() + { + // Create client + gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync(); + // Initialize request argument(s) + string parent = "projects/[PROJECT]/locations/[LOCATION]"; + // Make the request + PagedAsyncEnumerable response = batchServiceClient.ListResourceAllowancesAsync(parent); + + // Iterate over all response items, lazily performing RPCs as required + await response.ForEachAsync((gcbv::ResourceAllowance item) => + { + // Do something with each item + Console.WriteLine(item); + }); + + // Or iterate over pages (of server-defined size), performing one RPC per page + await response.AsRawResponses().ForEachAsync((gcbv::ListResourceAllowancesResponse page) => + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (gcbv::ResourceAllowance item in page) + { + // Do something with each item + Console.WriteLine(item); + } + }); + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = await response.ReadPageAsync(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (gcbv::ResourceAllowance item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + } + } + // [END batch_v1alpha_generated_BatchService_ListResourceAllowances_async_flattened] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.ListResourceAllowancesRequestObjectAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.ListResourceAllowancesRequestObjectAsyncSnippet.g.cs new file mode 100755 index 000000000000..dacc75422f9d --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.ListResourceAllowancesRequestObjectAsyncSnippet.g.cs @@ -0,0 +1,85 @@ +// 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_v1alpha_generated_BatchService_ListResourceAllowances_async] + using Google.Api.Gax; + using Google.Api.Gax.ResourceNames; + using System; + using System.Linq; + using System.Threading.Tasks; + using gcbv = Google.Cloud.Batch.V1Alpha; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for ListResourceAllowancesAsync + /// + /// 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. + /// + public async Task ListResourceAllowancesRequestObjectAsync() + { + // Create client + gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync(); + // Initialize request argument(s) + gcbv::ListResourceAllowancesRequest request = new gcbv::ListResourceAllowancesRequest + { + ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"), + }; + // Make the request + PagedAsyncEnumerable response = batchServiceClient.ListResourceAllowancesAsync(request); + + // Iterate over all response items, lazily performing RPCs as required + await response.ForEachAsync((gcbv::ResourceAllowance item) => + { + // Do something with each item + Console.WriteLine(item); + }); + + // Or iterate over pages (of server-defined size), performing one RPC per page + await response.AsRawResponses().ForEachAsync((gcbv::ListResourceAllowancesResponse page) => + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (gcbv::ResourceAllowance item in page) + { + // Do something with each item + Console.WriteLine(item); + } + }); + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = await response.ReadPageAsync(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (gcbv::ResourceAllowance item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + } + } + // [END batch_v1alpha_generated_BatchService_ListResourceAllowances_async] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.ListResourceAllowancesRequestObjectSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.ListResourceAllowancesRequestObjectSnippet.g.cs new file mode 100755 index 000000000000..b278837ca885 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.ListResourceAllowancesRequestObjectSnippet.g.cs @@ -0,0 +1,81 @@ +// 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_v1alpha_generated_BatchService_ListResourceAllowances_sync] + using Google.Api.Gax; + using Google.Api.Gax.ResourceNames; + using Google.Cloud.Batch.V1Alpha; + using System; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for ListResourceAllowances + /// + /// 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. + /// + public void ListResourceAllowancesRequestObject() + { + // Create client + BatchServiceClient batchServiceClient = BatchServiceClient.Create(); + // Initialize request argument(s) + ListResourceAllowancesRequest request = new ListResourceAllowancesRequest + { + ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"), + }; + // Make the request + PagedEnumerable response = batchServiceClient.ListResourceAllowances(request); + + // Iterate over all response items, lazily performing RPCs as required + foreach (ResourceAllowance item in response) + { + // Do something with each item + Console.WriteLine(item); + } + + // Or iterate over pages (of server-defined size), performing one RPC per page + foreach (ListResourceAllowancesResponse page in response.AsRawResponses()) + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (ResourceAllowance item in page) + { + // Do something with each item + Console.WriteLine(item); + } + } + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = response.ReadPage(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (ResourceAllowance item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + } + } + // [END batch_v1alpha_generated_BatchService_ListResourceAllowances_sync] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.ListResourceAllowancesResourceNamesAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.ListResourceAllowancesResourceNamesAsyncSnippet.g.cs new file mode 100755 index 000000000000..4617a354ef80 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.ListResourceAllowancesResourceNamesAsyncSnippet.g.cs @@ -0,0 +1,82 @@ +// 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_v1alpha_generated_BatchService_ListResourceAllowances_async_flattened_resourceNames] + using Google.Api.Gax; + using Google.Api.Gax.ResourceNames; + using System; + using System.Linq; + using System.Threading.Tasks; + using gcbv = Google.Cloud.Batch.V1Alpha; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for ListResourceAllowancesAsync + /// + /// 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. + /// + public async Task ListResourceAllowancesResourceNamesAsync() + { + // Create client + gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync(); + // Initialize request argument(s) + LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"); + // Make the request + PagedAsyncEnumerable response = batchServiceClient.ListResourceAllowancesAsync(parent); + + // Iterate over all response items, lazily performing RPCs as required + await response.ForEachAsync((gcbv::ResourceAllowance item) => + { + // Do something with each item + Console.WriteLine(item); + }); + + // Or iterate over pages (of server-defined size), performing one RPC per page + await response.AsRawResponses().ForEachAsync((gcbv::ListResourceAllowancesResponse page) => + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (gcbv::ResourceAllowance item in page) + { + // Do something with each item + Console.WriteLine(item); + } + }); + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = await response.ReadPageAsync(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (gcbv::ResourceAllowance item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + } + } + // [END batch_v1alpha_generated_BatchService_ListResourceAllowances_async_flattened_resourceNames] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.ListResourceAllowancesResourceNamesSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.ListResourceAllowancesResourceNamesSnippet.g.cs new file mode 100755 index 000000000000..822ba92f033e --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.ListResourceAllowancesResourceNamesSnippet.g.cs @@ -0,0 +1,78 @@ +// 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_v1alpha_generated_BatchService_ListResourceAllowances_sync_flattened_resourceNames] + using Google.Api.Gax; + using Google.Api.Gax.ResourceNames; + using Google.Cloud.Batch.V1Alpha; + using System; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for ListResourceAllowances + /// + /// 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. + /// + public void ListResourceAllowancesResourceNames() + { + // Create client + BatchServiceClient batchServiceClient = BatchServiceClient.Create(); + // Initialize request argument(s) + LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"); + // Make the request + PagedEnumerable response = batchServiceClient.ListResourceAllowances(parent); + + // Iterate over all response items, lazily performing RPCs as required + foreach (ResourceAllowance item in response) + { + // Do something with each item + Console.WriteLine(item); + } + + // Or iterate over pages (of server-defined size), performing one RPC per page + foreach (ListResourceAllowancesResponse page in response.AsRawResponses()) + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (ResourceAllowance item in page) + { + // Do something with each item + Console.WriteLine(item); + } + } + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = response.ReadPage(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (ResourceAllowance item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + } + } + // [END batch_v1alpha_generated_BatchService_ListResourceAllowances_sync_flattened_resourceNames] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.ListResourceAllowancesSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.ListResourceAllowancesSnippet.g.cs new file mode 100755 index 000000000000..cfeda2110fb1 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.ListResourceAllowancesSnippet.g.cs @@ -0,0 +1,77 @@ +// 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_v1alpha_generated_BatchService_ListResourceAllowances_sync_flattened] + using Google.Api.Gax; + using Google.Cloud.Batch.V1Alpha; + using System; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for ListResourceAllowances + /// + /// 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. + /// + public void ListResourceAllowances() + { + // Create client + BatchServiceClient batchServiceClient = BatchServiceClient.Create(); + // Initialize request argument(s) + string parent = "projects/[PROJECT]/locations/[LOCATION]"; + // Make the request + PagedEnumerable response = batchServiceClient.ListResourceAllowances(parent); + + // Iterate over all response items, lazily performing RPCs as required + foreach (ResourceAllowance item in response) + { + // Do something with each item + Console.WriteLine(item); + } + + // Or iterate over pages (of server-defined size), performing one RPC per page + foreach (ListResourceAllowancesResponse page in response.AsRawResponses()) + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (ResourceAllowance item in page) + { + // Do something with each item + Console.WriteLine(item); + } + } + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = response.ReadPage(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (ResourceAllowance item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + } + } + // [END batch_v1alpha_generated_BatchService_ListResourceAllowances_sync_flattened] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.ListTasksAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.ListTasksAsyncSnippet.g.cs new file mode 100755 index 000000000000..61b82da24075 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.ListTasksAsyncSnippet.g.cs @@ -0,0 +1,81 @@ +// 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_v1alpha_generated_BatchService_ListTasks_async_flattened] + using Google.Api.Gax; + using System; + using System.Linq; + using System.Threading.Tasks; + using gcbv = Google.Cloud.Batch.V1Alpha; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for ListTasksAsync + /// + /// 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. + /// + public async Task ListTasksAsync() + { + // Create client + gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync(); + // Initialize request argument(s) + string parent = "projects/[PROJECT]/locations/[LOCATION]/jobs/[JOB]/taskGroups/[TASK_GROUP]"; + // Make the request + PagedAsyncEnumerable response = batchServiceClient.ListTasksAsync(parent); + + // Iterate over all response items, lazily performing RPCs as required + await response.ForEachAsync((gcbv::Task item) => + { + // Do something with each item + Console.WriteLine(item); + }); + + // Or iterate over pages (of server-defined size), performing one RPC per page + await response.AsRawResponses().ForEachAsync((gcbv::ListTasksResponse page) => + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (gcbv::Task item in page) + { + // Do something with each item + Console.WriteLine(item); + } + }); + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = await response.ReadPageAsync(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (gcbv::Task item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + } + } + // [END batch_v1alpha_generated_BatchService_ListTasks_async_flattened] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.ListTasksRequestObjectAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.ListTasksRequestObjectAsyncSnippet.g.cs new file mode 100755 index 000000000000..0994e5baf878 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.ListTasksRequestObjectAsyncSnippet.g.cs @@ -0,0 +1,86 @@ +// 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_v1alpha_generated_BatchService_ListTasks_async] + using Google.Api.Gax; + using System; + using System.Linq; + using System.Threading.Tasks; + using gcbv = Google.Cloud.Batch.V1Alpha; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for ListTasksAsync + /// + /// 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. + /// + public async Task ListTasksRequestObjectAsync() + { + // Create client + gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync(); + // Initialize request argument(s) + gcbv::ListTasksRequest request = new gcbv::ListTasksRequest + { + ParentAsTaskGroupName = gcbv::TaskGroupName.FromProjectLocationJobTaskGroup("[PROJECT]", "[LOCATION]", "[JOB]", "[TASK_GROUP]"), + Filter = "", + OrderBy = "", + }; + // Make the request + PagedAsyncEnumerable response = batchServiceClient.ListTasksAsync(request); + + // Iterate over all response items, lazily performing RPCs as required + await response.ForEachAsync((gcbv::Task item) => + { + // Do something with each item + Console.WriteLine(item); + }); + + // Or iterate over pages (of server-defined size), performing one RPC per page + await response.AsRawResponses().ForEachAsync((gcbv::ListTasksResponse page) => + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (gcbv::Task item in page) + { + // Do something with each item + Console.WriteLine(item); + } + }); + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = await response.ReadPageAsync(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (gcbv::Task item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + } + } + // [END batch_v1alpha_generated_BatchService_ListTasks_async] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.ListTasksRequestObjectSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.ListTasksRequestObjectSnippet.g.cs new file mode 100755 index 000000000000..5e7d7b9658f4 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.ListTasksRequestObjectSnippet.g.cs @@ -0,0 +1,82 @@ +// 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_v1alpha_generated_BatchService_ListTasks_sync] + using Google.Api.Gax; + using Google.Cloud.Batch.V1Alpha; + using System; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for ListTasks + /// + /// 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. + /// + public void ListTasksRequestObject() + { + // Create client + BatchServiceClient batchServiceClient = BatchServiceClient.Create(); + // Initialize request argument(s) + ListTasksRequest request = new ListTasksRequest + { + ParentAsTaskGroupName = TaskGroupName.FromProjectLocationJobTaskGroup("[PROJECT]", "[LOCATION]", "[JOB]", "[TASK_GROUP]"), + Filter = "", + OrderBy = "", + }; + // Make the request + PagedEnumerable response = batchServiceClient.ListTasks(request); + + // Iterate over all response items, lazily performing RPCs as required + foreach (Task item in response) + { + // Do something with each item + Console.WriteLine(item); + } + + // Or iterate over pages (of server-defined size), performing one RPC per page + foreach (ListTasksResponse page in response.AsRawResponses()) + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (Task item in page) + { + // Do something with each item + Console.WriteLine(item); + } + } + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = response.ReadPage(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (Task item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + } + } + // [END batch_v1alpha_generated_BatchService_ListTasks_sync] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.ListTasksResourceNamesAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.ListTasksResourceNamesAsyncSnippet.g.cs new file mode 100755 index 000000000000..fdf3c10b2d6f --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.ListTasksResourceNamesAsyncSnippet.g.cs @@ -0,0 +1,81 @@ +// 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_v1alpha_generated_BatchService_ListTasks_async_flattened_resourceNames] + using Google.Api.Gax; + using System; + using System.Linq; + using System.Threading.Tasks; + using gcbv = Google.Cloud.Batch.V1Alpha; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for ListTasksAsync + /// + /// 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. + /// + public async Task ListTasksResourceNamesAsync() + { + // Create client + gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync(); + // Initialize request argument(s) + gcbv::TaskGroupName parent = gcbv::TaskGroupName.FromProjectLocationJobTaskGroup("[PROJECT]", "[LOCATION]", "[JOB]", "[TASK_GROUP]"); + // Make the request + PagedAsyncEnumerable response = batchServiceClient.ListTasksAsync(parent); + + // Iterate over all response items, lazily performing RPCs as required + await response.ForEachAsync((gcbv::Task item) => + { + // Do something with each item + Console.WriteLine(item); + }); + + // Or iterate over pages (of server-defined size), performing one RPC per page + await response.AsRawResponses().ForEachAsync((gcbv::ListTasksResponse page) => + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (gcbv::Task item in page) + { + // Do something with each item + Console.WriteLine(item); + } + }); + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = await response.ReadPageAsync(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (gcbv::Task item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + } + } + // [END batch_v1alpha_generated_BatchService_ListTasks_async_flattened_resourceNames] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.ListTasksResourceNamesSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.ListTasksResourceNamesSnippet.g.cs new file mode 100755 index 000000000000..2b90f8bfc71c --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.ListTasksResourceNamesSnippet.g.cs @@ -0,0 +1,77 @@ +// 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_v1alpha_generated_BatchService_ListTasks_sync_flattened_resourceNames] + using Google.Api.Gax; + using Google.Cloud.Batch.V1Alpha; + using System; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for ListTasks + /// + /// 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. + /// + public void ListTasksResourceNames() + { + // Create client + BatchServiceClient batchServiceClient = BatchServiceClient.Create(); + // Initialize request argument(s) + TaskGroupName parent = TaskGroupName.FromProjectLocationJobTaskGroup("[PROJECT]", "[LOCATION]", "[JOB]", "[TASK_GROUP]"); + // Make the request + PagedEnumerable response = batchServiceClient.ListTasks(parent); + + // Iterate over all response items, lazily performing RPCs as required + foreach (Task item in response) + { + // Do something with each item + Console.WriteLine(item); + } + + // Or iterate over pages (of server-defined size), performing one RPC per page + foreach (ListTasksResponse page in response.AsRawResponses()) + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (Task item in page) + { + // Do something with each item + Console.WriteLine(item); + } + } + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = response.ReadPage(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (Task item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + } + } + // [END batch_v1alpha_generated_BatchService_ListTasks_sync_flattened_resourceNames] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.ListTasksSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.ListTasksSnippet.g.cs new file mode 100755 index 000000000000..e3fedd73af64 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.ListTasksSnippet.g.cs @@ -0,0 +1,77 @@ +// 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_v1alpha_generated_BatchService_ListTasks_sync_flattened] + using Google.Api.Gax; + using Google.Cloud.Batch.V1Alpha; + using System; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for ListTasks + /// + /// 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. + /// + public void ListTasks() + { + // Create client + BatchServiceClient batchServiceClient = BatchServiceClient.Create(); + // Initialize request argument(s) + string parent = "projects/[PROJECT]/locations/[LOCATION]/jobs/[JOB]/taskGroups/[TASK_GROUP]"; + // Make the request + PagedEnumerable response = batchServiceClient.ListTasks(parent); + + // Iterate over all response items, lazily performing RPCs as required + foreach (Task item in response) + { + // Do something with each item + Console.WriteLine(item); + } + + // Or iterate over pages (of server-defined size), performing one RPC per page + foreach (ListTasksResponse page in response.AsRawResponses()) + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (Task item in page) + { + // Do something with each item + Console.WriteLine(item); + } + } + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = response.ReadPage(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (Task item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + } + } + // [END batch_v1alpha_generated_BatchService_ListTasks_sync_flattened] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.UpdateJobAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.UpdateJobAsyncSnippet.g.cs new file mode 100755 index 000000000000..46584e50d733 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.UpdateJobAsyncSnippet.g.cs @@ -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_v1alpha_generated_BatchService_UpdateJob_async_flattened] + using Google.Protobuf.WellKnownTypes; + using System.Threading.Tasks; + using gcbv = Google.Cloud.Batch.V1Alpha; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for UpdateJobAsync + /// + /// 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. + /// + public async Task UpdateJobAsync() + { + // Create client + gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync(); + // Initialize request argument(s) + gcbv::Job job = new gcbv::Job(); + FieldMask updateMask = new FieldMask(); + // Make the request + gcbv::Job response = await batchServiceClient.UpdateJobAsync(job, updateMask); + } + } + // [END batch_v1alpha_generated_BatchService_UpdateJob_async_flattened] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.UpdateJobRequestObjectAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.UpdateJobRequestObjectAsyncSnippet.g.cs new file mode 100755 index 000000000000..a2e1b030fe8f --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.UpdateJobRequestObjectAsyncSnippet.g.cs @@ -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! + +#pragma warning disable CS8981 + +namespace GoogleCSharpSnippets +{ + // [START batch_v1alpha_generated_BatchService_UpdateJob_async] + using Google.Protobuf.WellKnownTypes; + using System.Threading.Tasks; + using gcbv = Google.Cloud.Batch.V1Alpha; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for UpdateJobAsync + /// + /// 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. + /// + public async Task UpdateJobRequestObjectAsync() + { + // Create client + gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync(); + // Initialize request argument(s) + gcbv::UpdateJobRequest request = new gcbv::UpdateJobRequest + { + Job = new gcbv::Job(), + UpdateMask = new FieldMask(), + RequestId = "", + }; + // Make the request + gcbv::Job response = await batchServiceClient.UpdateJobAsync(request); + } + } + // [END batch_v1alpha_generated_BatchService_UpdateJob_async] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.UpdateJobRequestObjectSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.UpdateJobRequestObjectSnippet.g.cs new file mode 100755 index 000000000000..e0f00286e6c3 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.UpdateJobRequestObjectSnippet.g.cs @@ -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! + +namespace GoogleCSharpSnippets +{ + // [START batch_v1alpha_generated_BatchService_UpdateJob_sync] + using Google.Cloud.Batch.V1Alpha; + using Google.Protobuf.WellKnownTypes; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for UpdateJob + /// + /// 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. + /// + public void UpdateJobRequestObject() + { + // Create client + BatchServiceClient batchServiceClient = BatchServiceClient.Create(); + // Initialize request argument(s) + UpdateJobRequest request = new UpdateJobRequest + { + Job = new Job(), + UpdateMask = new FieldMask(), + RequestId = "", + }; + // Make the request + Job response = batchServiceClient.UpdateJob(request); + } + } + // [END batch_v1alpha_generated_BatchService_UpdateJob_sync] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.UpdateJobSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.UpdateJobSnippet.g.cs new file mode 100755 index 000000000000..3e2beb82af47 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.UpdateJobSnippet.g.cs @@ -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_v1alpha_generated_BatchService_UpdateJob_sync_flattened] + using Google.Cloud.Batch.V1Alpha; + using Google.Protobuf.WellKnownTypes; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for UpdateJob + /// + /// 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. + /// + public void UpdateJob() + { + // Create client + BatchServiceClient batchServiceClient = BatchServiceClient.Create(); + // Initialize request argument(s) + Job job = new Job(); + FieldMask updateMask = new FieldMask(); + // Make the request + Job response = batchServiceClient.UpdateJob(job, updateMask); + } + } + // [END batch_v1alpha_generated_BatchService_UpdateJob_sync_flattened] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.UpdateResourceAllowanceAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.UpdateResourceAllowanceAsyncSnippet.g.cs new file mode 100755 index 000000000000..fd02f7d02acd --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.UpdateResourceAllowanceAsyncSnippet.g.cs @@ -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_v1alpha_generated_BatchService_UpdateResourceAllowance_async_flattened] + using Google.Protobuf.WellKnownTypes; + using System.Threading.Tasks; + using gcbv = Google.Cloud.Batch.V1Alpha; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for UpdateResourceAllowanceAsync + /// + /// 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. + /// + public async Task UpdateResourceAllowanceAsync() + { + // Create client + gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync(); + // Initialize request argument(s) + gcbv::ResourceAllowance resourceAllowance = new gcbv::ResourceAllowance(); + FieldMask updateMask = new FieldMask(); + // Make the request + gcbv::ResourceAllowance response = await batchServiceClient.UpdateResourceAllowanceAsync(resourceAllowance, updateMask); + } + } + // [END batch_v1alpha_generated_BatchService_UpdateResourceAllowance_async_flattened] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.UpdateResourceAllowanceRequestObjectAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.UpdateResourceAllowanceRequestObjectAsyncSnippet.g.cs new file mode 100755 index 000000000000..214ad9e9d4e8 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.UpdateResourceAllowanceRequestObjectAsyncSnippet.g.cs @@ -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! + +#pragma warning disable CS8981 + +namespace GoogleCSharpSnippets +{ + // [START batch_v1alpha_generated_BatchService_UpdateResourceAllowance_async] + using Google.Protobuf.WellKnownTypes; + using System.Threading.Tasks; + using gcbv = Google.Cloud.Batch.V1Alpha; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for UpdateResourceAllowanceAsync + /// + /// 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. + /// + public async Task UpdateResourceAllowanceRequestObjectAsync() + { + // Create client + gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync(); + // Initialize request argument(s) + gcbv::UpdateResourceAllowanceRequest request = new gcbv::UpdateResourceAllowanceRequest + { + ResourceAllowance = new gcbv::ResourceAllowance(), + UpdateMask = new FieldMask(), + RequestId = "", + }; + // Make the request + gcbv::ResourceAllowance response = await batchServiceClient.UpdateResourceAllowanceAsync(request); + } + } + // [END batch_v1alpha_generated_BatchService_UpdateResourceAllowance_async] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.UpdateResourceAllowanceRequestObjectSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.UpdateResourceAllowanceRequestObjectSnippet.g.cs new file mode 100755 index 000000000000..2cf9474705c7 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.UpdateResourceAllowanceRequestObjectSnippet.g.cs @@ -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! + +namespace GoogleCSharpSnippets +{ + // [START batch_v1alpha_generated_BatchService_UpdateResourceAllowance_sync] + using Google.Cloud.Batch.V1Alpha; + using Google.Protobuf.WellKnownTypes; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for UpdateResourceAllowance + /// + /// 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. + /// + public void UpdateResourceAllowanceRequestObject() + { + // Create client + BatchServiceClient batchServiceClient = BatchServiceClient.Create(); + // Initialize request argument(s) + UpdateResourceAllowanceRequest request = new UpdateResourceAllowanceRequest + { + ResourceAllowance = new ResourceAllowance(), + UpdateMask = new FieldMask(), + RequestId = "", + }; + // Make the request + ResourceAllowance response = batchServiceClient.UpdateResourceAllowance(request); + } + } + // [END batch_v1alpha_generated_BatchService_UpdateResourceAllowance_sync] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.UpdateResourceAllowanceSnippet.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.UpdateResourceAllowanceSnippet.g.cs new file mode 100755 index 000000000000..f968d63d8ff0 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/BatchServiceClient.UpdateResourceAllowanceSnippet.g.cs @@ -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_v1alpha_generated_BatchService_UpdateResourceAllowance_sync_flattened] + using Google.Cloud.Batch.V1Alpha; + using Google.Protobuf.WellKnownTypes; + + public sealed partial class GeneratedBatchServiceClientSnippets + { + /// Snippet for UpdateResourceAllowance + /// + /// 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. + /// + public void UpdateResourceAllowance() + { + // Create client + BatchServiceClient batchServiceClient = BatchServiceClient.Create(); + // Initialize request argument(s) + ResourceAllowance resourceAllowance = new ResourceAllowance(); + FieldMask updateMask = new FieldMask(); + // Make the request + ResourceAllowance response = batchServiceClient.UpdateResourceAllowance(resourceAllowance, updateMask); + } + } + // [END batch_v1alpha_generated_BatchService_UpdateResourceAllowance_sync_flattened] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/Google.Cloud.Batch.V1Alpha.GeneratedSnippets.csproj b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/Google.Cloud.Batch.V1Alpha.GeneratedSnippets.csproj new file mode 100755 index 000000000000..7b2c051e501a --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/Google.Cloud.Batch.V1Alpha.GeneratedSnippets.csproj @@ -0,0 +1,15 @@ + + + + + net6.0;net462 + latest + + + + + + + + + \ No newline at end of file diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/snippet_metadata_google.cloud.batch.v1alpha.json b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/snippet_metadata_google.cloud.batch.v1alpha.json new file mode 100755 index 000000000000..293b46b5257a --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.GeneratedSnippets/snippet_metadata_google.cloud.batch.v1alpha.json @@ -0,0 +1,3525 @@ +{ + "clientLibrary": { + "name": "Google.Cloud.Batch.V1Alpha", + "language": "C_SHARP", + "apis": [ + { + "id": "google.cloud.batch.v1alpha", + "version": "v1alpha" + } + ] + }, + "snippets": [ + { + "regionTag": "batch_v1alpha_generated_BatchService_CreateJob_sync", + "title": "CreateJobRequestObject", + "description": "Snippet for CreateJob", + "file": "BatchServiceClient.CreateJobRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "CreateJob", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.CreateJob", + "parameters": [ + { + "type": "Google.Cloud.Batch.V1Alpha.CreateJobRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Batch.V1Alpha.Job", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "CreateJob", + "fullName": "google.cloud.batch.v1alpha.BatchService.CreateJob", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 48, + "type": "FULL" + }, + { + "start": 35, + "end": 46, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_CreateJob_async", + "title": "CreateJobRequestObjectAsync", + "description": "Snippet for CreateJobAsync", + "file": "BatchServiceClient.CreateJobRequestObjectAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "CreateJobAsync", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.CreateJobAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Batch.V1Alpha.CreateJobRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "CreateJob", + "fullName": "google.cloud.batch.v1alpha.BatchService.CreateJob", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 22, + "end": 51, + "type": "FULL" + }, + { + "start": 38, + "end": 49, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_CreateJob_sync_flattened", + "title": "CreateJob", + "description": "Snippet for CreateJob", + "file": "BatchServiceClient.CreateJobSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "CreateJob", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.CreateJob", + "parameters": [ + { + "type": "System.String", + "name": "parent" + }, + { + "type": "Google.Cloud.Batch.V1Alpha.Job", + "name": "job" + }, + { + "type": "System.String", + "name": "jobId" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Batch.V1Alpha.Job", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "CreateJob", + "fullName": "google.cloud.batch.v1alpha.BatchService.CreateJob", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 43, + "type": "FULL" + }, + { + "start": 34, + "end": 41, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_CreateJob_async_flattened", + "title": "CreateJobAsync", + "description": "Snippet for CreateJobAsync", + "file": "BatchServiceClient.CreateJobAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "CreateJobAsync", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.CreateJobAsync", + "async": true, + "parameters": [ + { + "type": "System.String", + "name": "parent" + }, + { + "type": "Google.Cloud.Batch.V1Alpha.Job", + "name": "job" + }, + { + "type": "System.String", + "name": "jobId" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "CreateJob", + "fullName": "google.cloud.batch.v1alpha.BatchService.CreateJob", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 22, + "end": 46, + "type": "FULL" + }, + { + "start": 37, + "end": 44, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_CreateJob_sync_flattened_resourceNames", + "title": "CreateJobResourceNames", + "description": "Snippet for CreateJob", + "file": "BatchServiceClient.CreateJobResourceNamesSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "CreateJob", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.CreateJob", + "parameters": [ + { + "type": "Google.Api.Gax.ResourceNames.LocationName", + "name": "parent" + }, + { + "type": "Google.Cloud.Batch.V1Alpha.Job", + "name": "job" + }, + { + "type": "System.String", + "name": "jobId" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Batch.V1Alpha.Job", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "CreateJob", + "fullName": "google.cloud.batch.v1alpha.BatchService.CreateJob", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 44, + "type": "FULL" + }, + { + "start": 35, + "end": 42, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_CreateJob_async_flattened_resourceNames", + "title": "CreateJobResourceNamesAsync", + "description": "Snippet for CreateJobAsync", + "file": "BatchServiceClient.CreateJobResourceNamesAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "CreateJobAsync", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.CreateJobAsync", + "async": true, + "parameters": [ + { + "type": "Google.Api.Gax.ResourceNames.LocationName", + "name": "parent" + }, + { + "type": "Google.Cloud.Batch.V1Alpha.Job", + "name": "job" + }, + { + "type": "System.String", + "name": "jobId" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "CreateJob", + "fullName": "google.cloud.batch.v1alpha.BatchService.CreateJob", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 22, + "end": 47, + "type": "FULL" + }, + { + "start": 38, + "end": 45, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_GetJob_sync", + "title": "GetJobRequestObject", + "description": "Snippet for GetJob", + "file": "BatchServiceClient.GetJobRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetJob", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.GetJob", + "parameters": [ + { + "type": "Google.Cloud.Batch.V1Alpha.GetJobRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Batch.V1Alpha.Job", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "GetJob", + "fullName": "google.cloud.batch.v1alpha.BatchService.GetJob", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 44, + "type": "FULL" + }, + { + "start": 34, + "end": 42, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_GetJob_async", + "title": "GetJobRequestObjectAsync", + "description": "Snippet for GetJobAsync", + "file": "BatchServiceClient.GetJobRequestObjectAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetJobAsync", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.GetJobAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Batch.V1Alpha.GetJobRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "GetJob", + "fullName": "google.cloud.batch.v1alpha.BatchService.GetJob", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 22, + "end": 47, + "type": "FULL" + }, + { + "start": 37, + "end": 45, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_GetJob_sync_flattened", + "title": "GetJob", + "description": "Snippet for GetJob", + "file": "BatchServiceClient.GetJobSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetJob", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.GetJob", + "parameters": [ + { + "type": "System.String", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Batch.V1Alpha.Job", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "GetJob", + "fullName": "google.cloud.batch.v1alpha.BatchService.GetJob", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 41, + "type": "FULL" + }, + { + "start": 34, + "end": 39, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_GetJob_async_flattened", + "title": "GetJobAsync", + "description": "Snippet for GetJobAsync", + "file": "BatchServiceClient.GetJobAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetJobAsync", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.GetJobAsync", + "async": true, + "parameters": [ + { + "type": "System.String", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "GetJob", + "fullName": "google.cloud.batch.v1alpha.BatchService.GetJob", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 22, + "end": 44, + "type": "FULL" + }, + { + "start": 37, + "end": 42, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_GetJob_sync_flattened_resourceNames", + "title": "GetJobResourceNames", + "description": "Snippet for GetJob", + "file": "BatchServiceClient.GetJobResourceNamesSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetJob", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.GetJob", + "parameters": [ + { + "type": "Google.Cloud.Batch.V1Alpha.JobName", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Batch.V1Alpha.Job", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "GetJob", + "fullName": "google.cloud.batch.v1alpha.BatchService.GetJob", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 41, + "type": "FULL" + }, + { + "start": 34, + "end": 39, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_GetJob_async_flattened_resourceNames", + "title": "GetJobResourceNamesAsync", + "description": "Snippet for GetJobAsync", + "file": "BatchServiceClient.GetJobResourceNamesAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetJobAsync", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.GetJobAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Batch.V1Alpha.JobName", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "GetJob", + "fullName": "google.cloud.batch.v1alpha.BatchService.GetJob", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 22, + "end": 44, + "type": "FULL" + }, + { + "start": 37, + "end": 42, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_DeleteJob_sync", + "title": "DeleteJobRequestObject", + "description": "Snippet for DeleteJob", + "file": "BatchServiceClient.DeleteJobRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "DeleteJob", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.DeleteJob", + "parameters": [ + { + "type": "Google.Cloud.Batch.V1Alpha.DeleteJobRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.LongRunning.Operation", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "DeleteJob", + "fullName": "google.cloud.batch.v1alpha.BatchService.DeleteJob", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 64, + "type": "FULL" + }, + { + "start": 36, + "end": 62, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_DeleteJob_async", + "title": "DeleteJobRequestObjectAsync", + "description": "Snippet for DeleteJobAsync", + "file": "BatchServiceClient.DeleteJobRequestObjectAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "DeleteJobAsync", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.DeleteJobAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Batch.V1Alpha.DeleteJobRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task>", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "DeleteJob", + "fullName": "google.cloud.batch.v1alpha.BatchService.DeleteJob", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 22, + "end": 67, + "type": "FULL" + }, + { + "start": 39, + "end": 65, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_DeleteJob_sync_flattened", + "title": "DeleteJob", + "description": "Snippet for DeleteJob", + "file": "BatchServiceClient.DeleteJobSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "DeleteJob", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.DeleteJob", + "parameters": [ + { + "type": "System.String", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.LongRunning.Operation", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "DeleteJob", + "fullName": "google.cloud.batch.v1alpha.BatchService.DeleteJob", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 59, + "type": "FULL" + }, + { + "start": 36, + "end": 57, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_DeleteJob_async_flattened", + "title": "DeleteJobAsync", + "description": "Snippet for DeleteJobAsync", + "file": "BatchServiceClient.DeleteJobAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "DeleteJobAsync", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.DeleteJobAsync", + "async": true, + "parameters": [ + { + "type": "System.String", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task>", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "DeleteJob", + "fullName": "google.cloud.batch.v1alpha.BatchService.DeleteJob", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 22, + "end": 62, + "type": "FULL" + }, + { + "start": 39, + "end": 60, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_CancelJob_sync", + "title": "CancelJobRequestObject", + "description": "Snippet for CancelJob", + "file": "BatchServiceClient.CancelJobRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "CancelJob", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.CancelJob", + "parameters": [ + { + "type": "Google.Cloud.Batch.V1Alpha.CancelJobRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.LongRunning.Operation", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "CancelJob", + "fullName": "google.cloud.batch.v1alpha.BatchService.CancelJob", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 62, + "type": "FULL" + }, + { + "start": 35, + "end": 60, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_CancelJob_async", + "title": "CancelJobRequestObjectAsync", + "description": "Snippet for CancelJobAsync", + "file": "BatchServiceClient.CancelJobRequestObjectAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "CancelJobAsync", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.CancelJobAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Batch.V1Alpha.CancelJobRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task>", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "CancelJob", + "fullName": "google.cloud.batch.v1alpha.BatchService.CancelJob", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 22, + "end": 65, + "type": "FULL" + }, + { + "start": 38, + "end": 63, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_CancelJob_sync_flattened", + "title": "CancelJob", + "description": "Snippet for CancelJob", + "file": "BatchServiceClient.CancelJobSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "CancelJob", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.CancelJob", + "parameters": [ + { + "type": "System.String", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.LongRunning.Operation", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "CancelJob", + "fullName": "google.cloud.batch.v1alpha.BatchService.CancelJob", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 58, + "type": "FULL" + }, + { + "start": 35, + "end": 56, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_CancelJob_async_flattened", + "title": "CancelJobAsync", + "description": "Snippet for CancelJobAsync", + "file": "BatchServiceClient.CancelJobAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "CancelJobAsync", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.CancelJobAsync", + "async": true, + "parameters": [ + { + "type": "System.String", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task>", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "CancelJob", + "fullName": "google.cloud.batch.v1alpha.BatchService.CancelJob", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 22, + "end": 61, + "type": "FULL" + }, + { + "start": 38, + "end": 59, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_CancelJob_sync_flattened_resourceNames", + "title": "CancelJobResourceNames", + "description": "Snippet for CancelJob", + "file": "BatchServiceClient.CancelJobResourceNamesSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "CancelJob", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.CancelJob", + "parameters": [ + { + "type": "Google.Cloud.Batch.V1Alpha.JobName", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.LongRunning.Operation", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "CancelJob", + "fullName": "google.cloud.batch.v1alpha.BatchService.CancelJob", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 58, + "type": "FULL" + }, + { + "start": 35, + "end": 56, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_CancelJob_async_flattened_resourceNames", + "title": "CancelJobResourceNamesAsync", + "description": "Snippet for CancelJobAsync", + "file": "BatchServiceClient.CancelJobResourceNamesAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "CancelJobAsync", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.CancelJobAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Batch.V1Alpha.JobName", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task>", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "CancelJob", + "fullName": "google.cloud.batch.v1alpha.BatchService.CancelJob", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 22, + "end": 61, + "type": "FULL" + }, + { + "start": 38, + "end": 59, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_UpdateJob_sync", + "title": "UpdateJobRequestObject", + "description": "Snippet for UpdateJob", + "file": "BatchServiceClient.UpdateJobRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "UpdateJob", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.UpdateJob", + "parameters": [ + { + "type": "Google.Cloud.Batch.V1Alpha.UpdateJobRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Batch.V1Alpha.Job", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "UpdateJob", + "fullName": "google.cloud.batch.v1alpha.BatchService.UpdateJob", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 47, + "type": "FULL" + }, + { + "start": 35, + "end": 45, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_UpdateJob_async", + "title": "UpdateJobRequestObjectAsync", + "description": "Snippet for UpdateJobAsync", + "file": "BatchServiceClient.UpdateJobRequestObjectAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "UpdateJobAsync", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.UpdateJobAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Batch.V1Alpha.UpdateJobRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "UpdateJob", + "fullName": "google.cloud.batch.v1alpha.BatchService.UpdateJob", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 22, + "end": 50, + "type": "FULL" + }, + { + "start": 38, + "end": 48, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_UpdateJob_sync_flattened", + "title": "UpdateJob", + "description": "Snippet for UpdateJob", + "file": "BatchServiceClient.UpdateJobSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "UpdateJob", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.UpdateJob", + "parameters": [ + { + "type": "Google.Cloud.Batch.V1Alpha.Job", + "name": "job" + }, + { + "type": "Google.Protobuf.WellKnownTypes.FieldMask", + "name": "updateMask" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Batch.V1Alpha.Job", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "UpdateJob", + "fullName": "google.cloud.batch.v1alpha.BatchService.UpdateJob", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 43, + "type": "FULL" + }, + { + "start": 35, + "end": 41, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_UpdateJob_async_flattened", + "title": "UpdateJobAsync", + "description": "Snippet for UpdateJobAsync", + "file": "BatchServiceClient.UpdateJobAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "UpdateJobAsync", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.UpdateJobAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Batch.V1Alpha.Job", + "name": "job" + }, + { + "type": "Google.Protobuf.WellKnownTypes.FieldMask", + "name": "updateMask" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "UpdateJob", + "fullName": "google.cloud.batch.v1alpha.BatchService.UpdateJob", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 22, + "end": 46, + "type": "FULL" + }, + { + "start": 38, + "end": 44, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_ListJobs_sync", + "title": "ListJobsRequestObject", + "description": "Snippet for ListJobs", + "file": "BatchServiceClient.ListJobsRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ListJobs", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.ListJobs", + "parameters": [ + { + "type": "Google.Cloud.Batch.V1Alpha.ListJobsRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Api.Gax.PagedEnumerable", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "ListJobs", + "fullName": "google.cloud.batch.v1alpha.BatchService.ListJobs", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 80, + "type": "FULL" + }, + { + "start": 36, + "end": 78, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_ListJobs_async", + "title": "ListJobsRequestObjectAsync", + "description": "Snippet for ListJobsAsync", + "file": "BatchServiceClient.ListJobsRequestObjectAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ListJobsAsync", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.ListJobsAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Batch.V1Alpha.ListJobsRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Api.Gax.PagedAsyncEnumerable", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "ListJobs", + "fullName": "google.cloud.batch.v1alpha.BatchService.ListJobs", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 22, + "end": 84, + "type": "FULL" + }, + { + "start": 40, + "end": 82, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_ListJobs_sync_flattened", + "title": "ListJobs", + "description": "Snippet for ListJobs", + "file": "BatchServiceClient.ListJobsSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ListJobs", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.ListJobs", + "parameters": [ + { + "type": "System.String", + "name": "parent" + }, + { + "type": "System.String", + "name": "pageToken" + }, + { + "type": "System.Nullable[System.Int32]", + "name": "pageSize" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Api.Gax.PagedEnumerable", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "ListJobs", + "fullName": "google.cloud.batch.v1alpha.BatchService.ListJobs", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 75, + "type": "FULL" + }, + { + "start": 36, + "end": 73, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_ListJobs_async_flattened", + "title": "ListJobsAsync", + "description": "Snippet for ListJobsAsync", + "file": "BatchServiceClient.ListJobsAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ListJobsAsync", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.ListJobsAsync", + "async": true, + "parameters": [ + { + "type": "System.String", + "name": "parent" + }, + { + "type": "System.String", + "name": "pageToken" + }, + { + "type": "System.Nullable[System.Int32]", + "name": "pageSize" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Api.Gax.PagedAsyncEnumerable", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "ListJobs", + "fullName": "google.cloud.batch.v1alpha.BatchService.ListJobs", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 22, + "end": 79, + "type": "FULL" + }, + { + "start": 40, + "end": 77, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_GetTask_sync", + "title": "GetTaskRequestObject", + "description": "Snippet for GetTask", + "file": "BatchServiceClient.GetTaskRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetTask", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.GetTask", + "parameters": [ + { + "type": "Google.Cloud.Batch.V1Alpha.GetTaskRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Batch.V1Alpha.Task", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "GetTask", + "fullName": "google.cloud.batch.v1alpha.BatchService.GetTask", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 44, + "type": "FULL" + }, + { + "start": 34, + "end": 42, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_GetTask_async", + "title": "GetTaskRequestObjectAsync", + "description": "Snippet for GetTaskAsync", + "file": "BatchServiceClient.GetTaskRequestObjectAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetTaskAsync", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.GetTaskAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Batch.V1Alpha.GetTaskRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "GetTask", + "fullName": "google.cloud.batch.v1alpha.BatchService.GetTask", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 22, + "end": 47, + "type": "FULL" + }, + { + "start": 37, + "end": 45, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_GetTask_sync_flattened", + "title": "GetTask", + "description": "Snippet for GetTask", + "file": "BatchServiceClient.GetTaskSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetTask", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.GetTask", + "parameters": [ + { + "type": "System.String", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Batch.V1Alpha.Task", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "GetTask", + "fullName": "google.cloud.batch.v1alpha.BatchService.GetTask", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 41, + "type": "FULL" + }, + { + "start": 34, + "end": 39, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_GetTask_async_flattened", + "title": "GetTaskAsync", + "description": "Snippet for GetTaskAsync", + "file": "BatchServiceClient.GetTaskAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetTaskAsync", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.GetTaskAsync", + "async": true, + "parameters": [ + { + "type": "System.String", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "GetTask", + "fullName": "google.cloud.batch.v1alpha.BatchService.GetTask", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 22, + "end": 44, + "type": "FULL" + }, + { + "start": 37, + "end": 42, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_GetTask_sync_flattened_resourceNames", + "title": "GetTaskResourceNames", + "description": "Snippet for GetTask", + "file": "BatchServiceClient.GetTaskResourceNamesSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetTask", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.GetTask", + "parameters": [ + { + "type": "Google.Cloud.Batch.V1Alpha.TaskName", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Batch.V1Alpha.Task", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "GetTask", + "fullName": "google.cloud.batch.v1alpha.BatchService.GetTask", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 41, + "type": "FULL" + }, + { + "start": 34, + "end": 39, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_GetTask_async_flattened_resourceNames", + "title": "GetTaskResourceNamesAsync", + "description": "Snippet for GetTaskAsync", + "file": "BatchServiceClient.GetTaskResourceNamesAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetTaskAsync", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.GetTaskAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Batch.V1Alpha.TaskName", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "GetTask", + "fullName": "google.cloud.batch.v1alpha.BatchService.GetTask", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 22, + "end": 44, + "type": "FULL" + }, + { + "start": 37, + "end": 42, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_ListTasks_sync", + "title": "ListTasksRequestObject", + "description": "Snippet for ListTasks", + "file": "BatchServiceClient.ListTasksRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ListTasks", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.ListTasks", + "parameters": [ + { + "type": "Google.Cloud.Batch.V1Alpha.ListTasksRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Api.Gax.PagedEnumerable", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "ListTasks", + "fullName": "google.cloud.batch.v1alpha.BatchService.ListTasks", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 80, + "type": "FULL" + }, + { + "start": 36, + "end": 78, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_ListTasks_async", + "title": "ListTasksRequestObjectAsync", + "description": "Snippet for ListTasksAsync", + "file": "BatchServiceClient.ListTasksRequestObjectAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ListTasksAsync", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.ListTasksAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Batch.V1Alpha.ListTasksRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Api.Gax.PagedAsyncEnumerable", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "ListTasks", + "fullName": "google.cloud.batch.v1alpha.BatchService.ListTasks", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 22, + "end": 84, + "type": "FULL" + }, + { + "start": 40, + "end": 82, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_ListTasks_sync_flattened", + "title": "ListTasks", + "description": "Snippet for ListTasks", + "file": "BatchServiceClient.ListTasksSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ListTasks", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.ListTasks", + "parameters": [ + { + "type": "System.String", + "name": "parent" + }, + { + "type": "System.String", + "name": "pageToken" + }, + { + "type": "System.Nullable[System.Int32]", + "name": "pageSize" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Api.Gax.PagedEnumerable", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "ListTasks", + "fullName": "google.cloud.batch.v1alpha.BatchService.ListTasks", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 75, + "type": "FULL" + }, + { + "start": 36, + "end": 73, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_ListTasks_async_flattened", + "title": "ListTasksAsync", + "description": "Snippet for ListTasksAsync", + "file": "BatchServiceClient.ListTasksAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ListTasksAsync", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.ListTasksAsync", + "async": true, + "parameters": [ + { + "type": "System.String", + "name": "parent" + }, + { + "type": "System.String", + "name": "pageToken" + }, + { + "type": "System.Nullable[System.Int32]", + "name": "pageSize" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Api.Gax.PagedAsyncEnumerable", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "ListTasks", + "fullName": "google.cloud.batch.v1alpha.BatchService.ListTasks", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 22, + "end": 79, + "type": "FULL" + }, + { + "start": 40, + "end": 77, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_ListTasks_sync_flattened_resourceNames", + "title": "ListTasksResourceNames", + "description": "Snippet for ListTasks", + "file": "BatchServiceClient.ListTasksResourceNamesSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ListTasks", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.ListTasks", + "parameters": [ + { + "type": "Google.Cloud.Batch.V1Alpha.TaskGroupName", + "name": "parent" + }, + { + "type": "System.String", + "name": "pageToken" + }, + { + "type": "System.Nullable[System.Int32]", + "name": "pageSize" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Api.Gax.PagedEnumerable", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "ListTasks", + "fullName": "google.cloud.batch.v1alpha.BatchService.ListTasks", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 75, + "type": "FULL" + }, + { + "start": 36, + "end": 73, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_ListTasks_async_flattened_resourceNames", + "title": "ListTasksResourceNamesAsync", + "description": "Snippet for ListTasksAsync", + "file": "BatchServiceClient.ListTasksResourceNamesAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ListTasksAsync", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.ListTasksAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Batch.V1Alpha.TaskGroupName", + "name": "parent" + }, + { + "type": "System.String", + "name": "pageToken" + }, + { + "type": "System.Nullable[System.Int32]", + "name": "pageSize" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Api.Gax.PagedAsyncEnumerable", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "ListTasks", + "fullName": "google.cloud.batch.v1alpha.BatchService.ListTasks", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 22, + "end": 79, + "type": "FULL" + }, + { + "start": 40, + "end": 77, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_CreateResourceAllowance_sync", + "title": "CreateResourceAllowanceRequestObject", + "description": "Snippet for CreateResourceAllowance", + "file": "BatchServiceClient.CreateResourceAllowanceRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "CreateResourceAllowance", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.CreateResourceAllowance", + "parameters": [ + { + "type": "Google.Cloud.Batch.V1Alpha.CreateResourceAllowanceRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Batch.V1Alpha.ResourceAllowance", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "CreateResourceAllowance", + "fullName": "google.cloud.batch.v1alpha.BatchService.CreateResourceAllowance", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 48, + "type": "FULL" + }, + { + "start": 35, + "end": 46, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_CreateResourceAllowance_async", + "title": "CreateResourceAllowanceRequestObjectAsync", + "description": "Snippet for CreateResourceAllowanceAsync", + "file": "BatchServiceClient.CreateResourceAllowanceRequestObjectAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "CreateResourceAllowanceAsync", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.CreateResourceAllowanceAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Batch.V1Alpha.CreateResourceAllowanceRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "CreateResourceAllowance", + "fullName": "google.cloud.batch.v1alpha.BatchService.CreateResourceAllowance", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 22, + "end": 51, + "type": "FULL" + }, + { + "start": 38, + "end": 49, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_CreateResourceAllowance_sync_flattened", + "title": "CreateResourceAllowance", + "description": "Snippet for CreateResourceAllowance", + "file": "BatchServiceClient.CreateResourceAllowanceSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "CreateResourceAllowance", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.CreateResourceAllowance", + "parameters": [ + { + "type": "System.String", + "name": "parent" + }, + { + "type": "Google.Cloud.Batch.V1Alpha.ResourceAllowance", + "name": "resourceAllowance" + }, + { + "type": "System.String", + "name": "resourceAllowanceId" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Batch.V1Alpha.ResourceAllowance", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "CreateResourceAllowance", + "fullName": "google.cloud.batch.v1alpha.BatchService.CreateResourceAllowance", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 43, + "type": "FULL" + }, + { + "start": 34, + "end": 41, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_CreateResourceAllowance_async_flattened", + "title": "CreateResourceAllowanceAsync", + "description": "Snippet for CreateResourceAllowanceAsync", + "file": "BatchServiceClient.CreateResourceAllowanceAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "CreateResourceAllowanceAsync", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.CreateResourceAllowanceAsync", + "async": true, + "parameters": [ + { + "type": "System.String", + "name": "parent" + }, + { + "type": "Google.Cloud.Batch.V1Alpha.ResourceAllowance", + "name": "resourceAllowance" + }, + { + "type": "System.String", + "name": "resourceAllowanceId" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "CreateResourceAllowance", + "fullName": "google.cloud.batch.v1alpha.BatchService.CreateResourceAllowance", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 22, + "end": 46, + "type": "FULL" + }, + { + "start": 37, + "end": 44, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_CreateResourceAllowance_sync_flattened_resourceNames", + "title": "CreateResourceAllowanceResourceNames", + "description": "Snippet for CreateResourceAllowance", + "file": "BatchServiceClient.CreateResourceAllowanceResourceNamesSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "CreateResourceAllowance", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.CreateResourceAllowance", + "parameters": [ + { + "type": "Google.Api.Gax.ResourceNames.LocationName", + "name": "parent" + }, + { + "type": "Google.Cloud.Batch.V1Alpha.ResourceAllowance", + "name": "resourceAllowance" + }, + { + "type": "System.String", + "name": "resourceAllowanceId" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Batch.V1Alpha.ResourceAllowance", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "CreateResourceAllowance", + "fullName": "google.cloud.batch.v1alpha.BatchService.CreateResourceAllowance", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 44, + "type": "FULL" + }, + { + "start": 35, + "end": 42, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_CreateResourceAllowance_async_flattened_resourceNames", + "title": "CreateResourceAllowanceResourceNamesAsync", + "description": "Snippet for CreateResourceAllowanceAsync", + "file": "BatchServiceClient.CreateResourceAllowanceResourceNamesAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "CreateResourceAllowanceAsync", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.CreateResourceAllowanceAsync", + "async": true, + "parameters": [ + { + "type": "Google.Api.Gax.ResourceNames.LocationName", + "name": "parent" + }, + { + "type": "Google.Cloud.Batch.V1Alpha.ResourceAllowance", + "name": "resourceAllowance" + }, + { + "type": "System.String", + "name": "resourceAllowanceId" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "CreateResourceAllowance", + "fullName": "google.cloud.batch.v1alpha.BatchService.CreateResourceAllowance", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 22, + "end": 47, + "type": "FULL" + }, + { + "start": 38, + "end": 45, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_GetResourceAllowance_sync", + "title": "GetResourceAllowanceRequestObject", + "description": "Snippet for GetResourceAllowance", + "file": "BatchServiceClient.GetResourceAllowanceRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetResourceAllowance", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.GetResourceAllowance", + "parameters": [ + { + "type": "Google.Cloud.Batch.V1Alpha.GetResourceAllowanceRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Batch.V1Alpha.ResourceAllowance", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "GetResourceAllowance", + "fullName": "google.cloud.batch.v1alpha.BatchService.GetResourceAllowance", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 44, + "type": "FULL" + }, + { + "start": 34, + "end": 42, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_GetResourceAllowance_async", + "title": "GetResourceAllowanceRequestObjectAsync", + "description": "Snippet for GetResourceAllowanceAsync", + "file": "BatchServiceClient.GetResourceAllowanceRequestObjectAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetResourceAllowanceAsync", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.GetResourceAllowanceAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Batch.V1Alpha.GetResourceAllowanceRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "GetResourceAllowance", + "fullName": "google.cloud.batch.v1alpha.BatchService.GetResourceAllowance", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 22, + "end": 47, + "type": "FULL" + }, + { + "start": 37, + "end": 45, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_GetResourceAllowance_sync_flattened", + "title": "GetResourceAllowance", + "description": "Snippet for GetResourceAllowance", + "file": "BatchServiceClient.GetResourceAllowanceSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetResourceAllowance", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.GetResourceAllowance", + "parameters": [ + { + "type": "System.String", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Batch.V1Alpha.ResourceAllowance", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "GetResourceAllowance", + "fullName": "google.cloud.batch.v1alpha.BatchService.GetResourceAllowance", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 41, + "type": "FULL" + }, + { + "start": 34, + "end": 39, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_GetResourceAllowance_async_flattened", + "title": "GetResourceAllowanceAsync", + "description": "Snippet for GetResourceAllowanceAsync", + "file": "BatchServiceClient.GetResourceAllowanceAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetResourceAllowanceAsync", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.GetResourceAllowanceAsync", + "async": true, + "parameters": [ + { + "type": "System.String", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "GetResourceAllowance", + "fullName": "google.cloud.batch.v1alpha.BatchService.GetResourceAllowance", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 22, + "end": 44, + "type": "FULL" + }, + { + "start": 37, + "end": 42, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_GetResourceAllowance_sync_flattened_resourceNames", + "title": "GetResourceAllowanceResourceNames", + "description": "Snippet for GetResourceAllowance", + "file": "BatchServiceClient.GetResourceAllowanceResourceNamesSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetResourceAllowance", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.GetResourceAllowance", + "parameters": [ + { + "type": "Google.Cloud.Batch.V1Alpha.ResourceAllowanceName", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Batch.V1Alpha.ResourceAllowance", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "GetResourceAllowance", + "fullName": "google.cloud.batch.v1alpha.BatchService.GetResourceAllowance", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 41, + "type": "FULL" + }, + { + "start": 34, + "end": 39, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_GetResourceAllowance_async_flattened_resourceNames", + "title": "GetResourceAllowanceResourceNamesAsync", + "description": "Snippet for GetResourceAllowanceAsync", + "file": "BatchServiceClient.GetResourceAllowanceResourceNamesAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetResourceAllowanceAsync", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.GetResourceAllowanceAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Batch.V1Alpha.ResourceAllowanceName", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "GetResourceAllowance", + "fullName": "google.cloud.batch.v1alpha.BatchService.GetResourceAllowance", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 22, + "end": 44, + "type": "FULL" + }, + { + "start": 37, + "end": 42, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_DeleteResourceAllowance_sync", + "title": "DeleteResourceAllowanceRequestObject", + "description": "Snippet for DeleteResourceAllowance", + "file": "BatchServiceClient.DeleteResourceAllowanceRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "DeleteResourceAllowance", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.DeleteResourceAllowance", + "parameters": [ + { + "type": "Google.Cloud.Batch.V1Alpha.DeleteResourceAllowanceRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.LongRunning.Operation", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "DeleteResourceAllowance", + "fullName": "google.cloud.batch.v1alpha.BatchService.DeleteResourceAllowance", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 64, + "type": "FULL" + }, + { + "start": 36, + "end": 62, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_DeleteResourceAllowance_async", + "title": "DeleteResourceAllowanceRequestObjectAsync", + "description": "Snippet for DeleteResourceAllowanceAsync", + "file": "BatchServiceClient.DeleteResourceAllowanceRequestObjectAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "DeleteResourceAllowanceAsync", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.DeleteResourceAllowanceAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Batch.V1Alpha.DeleteResourceAllowanceRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task>", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "DeleteResourceAllowance", + "fullName": "google.cloud.batch.v1alpha.BatchService.DeleteResourceAllowance", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 22, + "end": 67, + "type": "FULL" + }, + { + "start": 39, + "end": 65, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_DeleteResourceAllowance_sync_flattened", + "title": "DeleteResourceAllowance", + "description": "Snippet for DeleteResourceAllowance", + "file": "BatchServiceClient.DeleteResourceAllowanceSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "DeleteResourceAllowance", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.DeleteResourceAllowance", + "parameters": [ + { + "type": "System.String", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.LongRunning.Operation", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "DeleteResourceAllowance", + "fullName": "google.cloud.batch.v1alpha.BatchService.DeleteResourceAllowance", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 59, + "type": "FULL" + }, + { + "start": 36, + "end": 57, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_DeleteResourceAllowance_async_flattened", + "title": "DeleteResourceAllowanceAsync", + "description": "Snippet for DeleteResourceAllowanceAsync", + "file": "BatchServiceClient.DeleteResourceAllowanceAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "DeleteResourceAllowanceAsync", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.DeleteResourceAllowanceAsync", + "async": true, + "parameters": [ + { + "type": "System.String", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task>", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "DeleteResourceAllowance", + "fullName": "google.cloud.batch.v1alpha.BatchService.DeleteResourceAllowance", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 22, + "end": 62, + "type": "FULL" + }, + { + "start": 39, + "end": 60, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_DeleteResourceAllowance_sync_flattened_resourceNames", + "title": "DeleteResourceAllowanceResourceNames", + "description": "Snippet for DeleteResourceAllowance", + "file": "BatchServiceClient.DeleteResourceAllowanceResourceNamesSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "DeleteResourceAllowance", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.DeleteResourceAllowance", + "parameters": [ + { + "type": "Google.Cloud.Batch.V1Alpha.ResourceAllowanceName", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.LongRunning.Operation", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "DeleteResourceAllowance", + "fullName": "google.cloud.batch.v1alpha.BatchService.DeleteResourceAllowance", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 59, + "type": "FULL" + }, + { + "start": 36, + "end": 57, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_DeleteResourceAllowance_async_flattened_resourceNames", + "title": "DeleteResourceAllowanceResourceNamesAsync", + "description": "Snippet for DeleteResourceAllowanceAsync", + "file": "BatchServiceClient.DeleteResourceAllowanceResourceNamesAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "DeleteResourceAllowanceAsync", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.DeleteResourceAllowanceAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Batch.V1Alpha.ResourceAllowanceName", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task>", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "DeleteResourceAllowance", + "fullName": "google.cloud.batch.v1alpha.BatchService.DeleteResourceAllowance", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 22, + "end": 62, + "type": "FULL" + }, + { + "start": 39, + "end": 60, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_ListResourceAllowances_sync", + "title": "ListResourceAllowancesRequestObject", + "description": "Snippet for ListResourceAllowances", + "file": "BatchServiceClient.ListResourceAllowancesRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ListResourceAllowances", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.ListResourceAllowances", + "parameters": [ + { + "type": "Google.Cloud.Batch.V1Alpha.ListResourceAllowancesRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Api.Gax.PagedEnumerable", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "ListResourceAllowances", + "fullName": "google.cloud.batch.v1alpha.BatchService.ListResourceAllowances", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 79, + "type": "FULL" + }, + { + "start": 37, + "end": 77, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_ListResourceAllowances_async", + "title": "ListResourceAllowancesRequestObjectAsync", + "description": "Snippet for ListResourceAllowancesAsync", + "file": "BatchServiceClient.ListResourceAllowancesRequestObjectAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ListResourceAllowancesAsync", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.ListResourceAllowancesAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Batch.V1Alpha.ListResourceAllowancesRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Api.Gax.PagedAsyncEnumerable", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "ListResourceAllowances", + "fullName": "google.cloud.batch.v1alpha.BatchService.ListResourceAllowances", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 22, + "end": 83, + "type": "FULL" + }, + { + "start": 41, + "end": 81, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_ListResourceAllowances_sync_flattened", + "title": "ListResourceAllowances", + "description": "Snippet for ListResourceAllowances", + "file": "BatchServiceClient.ListResourceAllowancesSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ListResourceAllowances", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.ListResourceAllowances", + "parameters": [ + { + "type": "System.String", + "name": "parent" + }, + { + "type": "System.String", + "name": "pageToken" + }, + { + "type": "System.Nullable[System.Int32]", + "name": "pageSize" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Api.Gax.PagedEnumerable", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "ListResourceAllowances", + "fullName": "google.cloud.batch.v1alpha.BatchService.ListResourceAllowances", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 75, + "type": "FULL" + }, + { + "start": 36, + "end": 73, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_ListResourceAllowances_async_flattened", + "title": "ListResourceAllowancesAsync", + "description": "Snippet for ListResourceAllowancesAsync", + "file": "BatchServiceClient.ListResourceAllowancesAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ListResourceAllowancesAsync", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.ListResourceAllowancesAsync", + "async": true, + "parameters": [ + { + "type": "System.String", + "name": "parent" + }, + { + "type": "System.String", + "name": "pageToken" + }, + { + "type": "System.Nullable[System.Int32]", + "name": "pageSize" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Api.Gax.PagedAsyncEnumerable", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "ListResourceAllowances", + "fullName": "google.cloud.batch.v1alpha.BatchService.ListResourceAllowances", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 22, + "end": 79, + "type": "FULL" + }, + { + "start": 40, + "end": 77, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_ListResourceAllowances_sync_flattened_resourceNames", + "title": "ListResourceAllowancesResourceNames", + "description": "Snippet for ListResourceAllowances", + "file": "BatchServiceClient.ListResourceAllowancesResourceNamesSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ListResourceAllowances", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.ListResourceAllowances", + "parameters": [ + { + "type": "Google.Api.Gax.ResourceNames.LocationName", + "name": "parent" + }, + { + "type": "System.String", + "name": "pageToken" + }, + { + "type": "System.Nullable[System.Int32]", + "name": "pageSize" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Api.Gax.PagedEnumerable", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "ListResourceAllowances", + "fullName": "google.cloud.batch.v1alpha.BatchService.ListResourceAllowances", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 76, + "type": "FULL" + }, + { + "start": 37, + "end": 74, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_ListResourceAllowances_async_flattened_resourceNames", + "title": "ListResourceAllowancesResourceNamesAsync", + "description": "Snippet for ListResourceAllowancesAsync", + "file": "BatchServiceClient.ListResourceAllowancesResourceNamesAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ListResourceAllowancesAsync", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.ListResourceAllowancesAsync", + "async": true, + "parameters": [ + { + "type": "Google.Api.Gax.ResourceNames.LocationName", + "name": "parent" + }, + { + "type": "System.String", + "name": "pageToken" + }, + { + "type": "System.Nullable[System.Int32]", + "name": "pageSize" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Api.Gax.PagedAsyncEnumerable", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "ListResourceAllowances", + "fullName": "google.cloud.batch.v1alpha.BatchService.ListResourceAllowances", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 22, + "end": 80, + "type": "FULL" + }, + { + "start": 41, + "end": 78, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_UpdateResourceAllowance_sync", + "title": "UpdateResourceAllowanceRequestObject", + "description": "Snippet for UpdateResourceAllowance", + "file": "BatchServiceClient.UpdateResourceAllowanceRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "UpdateResourceAllowance", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.UpdateResourceAllowance", + "parameters": [ + { + "type": "Google.Cloud.Batch.V1Alpha.UpdateResourceAllowanceRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Batch.V1Alpha.ResourceAllowance", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "UpdateResourceAllowance", + "fullName": "google.cloud.batch.v1alpha.BatchService.UpdateResourceAllowance", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 47, + "type": "FULL" + }, + { + "start": 35, + "end": 45, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_UpdateResourceAllowance_async", + "title": "UpdateResourceAllowanceRequestObjectAsync", + "description": "Snippet for UpdateResourceAllowanceAsync", + "file": "BatchServiceClient.UpdateResourceAllowanceRequestObjectAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "UpdateResourceAllowanceAsync", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.UpdateResourceAllowanceAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Batch.V1Alpha.UpdateResourceAllowanceRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "UpdateResourceAllowance", + "fullName": "google.cloud.batch.v1alpha.BatchService.UpdateResourceAllowance", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 22, + "end": 50, + "type": "FULL" + }, + { + "start": 38, + "end": 48, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_UpdateResourceAllowance_sync_flattened", + "title": "UpdateResourceAllowance", + "description": "Snippet for UpdateResourceAllowance", + "file": "BatchServiceClient.UpdateResourceAllowanceSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "UpdateResourceAllowance", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.UpdateResourceAllowance", + "parameters": [ + { + "type": "Google.Cloud.Batch.V1Alpha.ResourceAllowance", + "name": "resourceAllowance" + }, + { + "type": "Google.Protobuf.WellKnownTypes.FieldMask", + "name": "updateMask" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Batch.V1Alpha.ResourceAllowance", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "UpdateResourceAllowance", + "fullName": "google.cloud.batch.v1alpha.BatchService.UpdateResourceAllowance", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 43, + "type": "FULL" + }, + { + "start": 35, + "end": 41, + "type": "SHORT" + } + ] + }, + { + "regionTag": "batch_v1alpha_generated_BatchService_UpdateResourceAllowance_async_flattened", + "title": "UpdateResourceAllowanceAsync", + "description": "Snippet for UpdateResourceAllowanceAsync", + "file": "BatchServiceClient.UpdateResourceAllowanceAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "UpdateResourceAllowanceAsync", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient.UpdateResourceAllowanceAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Batch.V1Alpha.ResourceAllowance", + "name": "resourceAllowance" + }, + { + "type": "Google.Protobuf.WellKnownTypes.FieldMask", + "name": "updateMask" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "BatchServiceClient", + "fullName": "Google.Cloud.Batch.V1Alpha.BatchServiceClient" + }, + "method": { + "shortName": "UpdateResourceAllowance", + "fullName": "google.cloud.batch.v1alpha.BatchService.UpdateResourceAllowance", + "service": { + "shortName": "BatchService", + "fullName": "google.cloud.batch.v1alpha.BatchService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 22, + "end": 46, + "type": "FULL" + }, + { + "start": 38, + "end": 44, + "type": "SHORT" + } + ] + } + ] +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.Snippets/BatchServiceClientSnippets.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.Snippets/BatchServiceClientSnippets.g.cs new file mode 100755 index 000000000000..351ca8a5e037 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.Snippets/BatchServiceClientSnippets.g.cs @@ -0,0 +1,1874 @@ +// 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 +{ + using Google.Api.Gax; + using Google.Api.Gax.ResourceNames; + using Google.LongRunning; + using Google.Protobuf.WellKnownTypes; + using System; + using System.Linq; + using System.Threading.Tasks; + using gcbv = Google.Cloud.Batch.V1Alpha; + + /// Generated snippets. + public sealed class AllGeneratedBatchServiceClientSnippets + { + /// Snippet for CreateJob + public void CreateJobRequestObject() + { + // Snippet: CreateJob(CreateJobRequest, CallSettings) + // Create client + gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create(); + // 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 = batchServiceClient.CreateJob(request); + // End snippet + } + + /// Snippet for CreateJobAsync + public async Task CreateJobRequestObjectAsync() + { + // Snippet: CreateJobAsync(CreateJobRequest, CallSettings) + // Additional: CreateJobAsync(CreateJobRequest, CancellationToken) + // 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 snippet + } + + /// Snippet for CreateJob + public void CreateJob() + { + // Snippet: CreateJob(string, Job, string, CallSettings) + // Create client + gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create(); + // Initialize request argument(s) + string parent = "projects/[PROJECT]/locations/[LOCATION]"; + gcbv::Job job = new gcbv::Job(); + string jobId = ""; + // Make the request + gcbv::Job response = batchServiceClient.CreateJob(parent, job, jobId); + // End snippet + } + + /// Snippet for CreateJobAsync + public async Task CreateJobAsync() + { + // Snippet: CreateJobAsync(string, Job, string, CallSettings) + // Additional: CreateJobAsync(string, Job, string, CancellationToken) + // 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 snippet + } + + /// Snippet for CreateJob + public void CreateJobResourceNames() + { + // Snippet: CreateJob(LocationName, Job, string, CallSettings) + // Create client + gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create(); + // Initialize request argument(s) + LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"); + gcbv::Job job = new gcbv::Job(); + string jobId = ""; + // Make the request + gcbv::Job response = batchServiceClient.CreateJob(parent, job, jobId); + // End snippet + } + + /// Snippet for CreateJobAsync + public async Task CreateJobResourceNamesAsync() + { + // Snippet: CreateJobAsync(LocationName, Job, string, CallSettings) + // Additional: CreateJobAsync(LocationName, Job, string, CancellationToken) + // 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 snippet + } + + /// Snippet for GetJob + public void GetJobRequestObject() + { + // Snippet: GetJob(GetJobRequest, CallSettings) + // Create client + gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create(); + // Initialize request argument(s) + gcbv::GetJobRequest request = new gcbv::GetJobRequest + { + JobName = gcbv::JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]"), + }; + // Make the request + gcbv::Job response = batchServiceClient.GetJob(request); + // End snippet + } + + /// Snippet for GetJobAsync + public async Task GetJobRequestObjectAsync() + { + // Snippet: GetJobAsync(GetJobRequest, CallSettings) + // Additional: GetJobAsync(GetJobRequest, CancellationToken) + // Create client + gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync(); + // Initialize request argument(s) + gcbv::GetJobRequest request = new gcbv::GetJobRequest + { + JobName = gcbv::JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]"), + }; + // Make the request + gcbv::Job response = await batchServiceClient.GetJobAsync(request); + // End snippet + } + + /// Snippet for GetJob + public void GetJob() + { + // Snippet: GetJob(string, CallSettings) + // Create client + gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/jobs/[JOB]"; + // Make the request + gcbv::Job response = batchServiceClient.GetJob(name); + // End snippet + } + + /// Snippet for GetJobAsync + public async Task GetJobAsync() + { + // Snippet: GetJobAsync(string, CallSettings) + // Additional: GetJobAsync(string, CancellationToken) + // Create client + gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/jobs/[JOB]"; + // Make the request + gcbv::Job response = await batchServiceClient.GetJobAsync(name); + // End snippet + } + + /// Snippet for GetJob + public void GetJobResourceNames() + { + // Snippet: GetJob(JobName, CallSettings) + // Create client + gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create(); + // Initialize request argument(s) + gcbv::JobName name = gcbv::JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]"); + // Make the request + gcbv::Job response = batchServiceClient.GetJob(name); + // End snippet + } + + /// Snippet for GetJobAsync + public async Task GetJobResourceNamesAsync() + { + // Snippet: GetJobAsync(JobName, CallSettings) + // Additional: GetJobAsync(JobName, CancellationToken) + // Create client + gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync(); + // Initialize request argument(s) + gcbv::JobName name = gcbv::JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]"); + // Make the request + gcbv::Job response = await batchServiceClient.GetJobAsync(name); + // End snippet + } + + /// Snippet for DeleteJob + public void DeleteJobRequestObject() + { + // Snippet: DeleteJob(DeleteJobRequest, CallSettings) + // Create client + gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create(); + // Initialize request argument(s) + gcbv::DeleteJobRequest request = new gcbv::DeleteJobRequest + { + Name = "", + Reason = "", + RequestId = "", + }; + // Make the request + Operation response = batchServiceClient.DeleteJob(request); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // 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 retrievedResponse = batchServiceClient.PollOnceDeleteJob(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 snippet + } + + /// Snippet for DeleteJobAsync + public async Task DeleteJobRequestObjectAsync() + { + // Snippet: DeleteJobAsync(DeleteJobRequest, CallSettings) + // Additional: DeleteJobAsync(DeleteJobRequest, CancellationToken) + // Create client + gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync(); + // Initialize request argument(s) + gcbv::DeleteJobRequest request = new gcbv::DeleteJobRequest + { + Name = "", + Reason = "", + RequestId = "", + }; + // Make the request + Operation response = await batchServiceClient.DeleteJobAsync(request); + + // Poll until the returned long-running operation is complete + Operation 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 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 snippet + } + + /// Snippet for DeleteJob + public void DeleteJob() + { + // Snippet: DeleteJob(string, CallSettings) + // Create client + gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create(); + // Initialize request argument(s) + string name = ""; + // Make the request + Operation response = batchServiceClient.DeleteJob(name); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // 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 retrievedResponse = batchServiceClient.PollOnceDeleteJob(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 snippet + } + + /// Snippet for DeleteJobAsync + public async Task DeleteJobAsync() + { + // Snippet: DeleteJobAsync(string, CallSettings) + // Additional: DeleteJobAsync(string, CancellationToken) + // Create client + gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync(); + // Initialize request argument(s) + string name = ""; + // Make the request + Operation response = await batchServiceClient.DeleteJobAsync(name); + + // Poll until the returned long-running operation is complete + Operation 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 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 snippet + } + + /// Snippet for CancelJob + public void CancelJobRequestObject() + { + // Snippet: CancelJob(CancelJobRequest, CallSettings) + // Create client + gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create(); + // Initialize request argument(s) + gcbv::CancelJobRequest request = new gcbv::CancelJobRequest + { + JobName = gcbv::JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]"), + RequestId = "", + }; + // Make the request + Operation response = batchServiceClient.CancelJob(request); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // Retrieve the operation result + gcbv::CancelJobResponse 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 retrievedResponse = batchServiceClient.PollOnceCancelJob(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + gcbv::CancelJobResponse retrievedResult = retrievedResponse.Result; + } + // End snippet + } + + /// Snippet for CancelJobAsync + public async Task CancelJobRequestObjectAsync() + { + // Snippet: CancelJobAsync(CancelJobRequest, CallSettings) + // Additional: CancelJobAsync(CancelJobRequest, CancellationToken) + // Create client + gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync(); + // Initialize request argument(s) + gcbv::CancelJobRequest request = new gcbv::CancelJobRequest + { + JobName = gcbv::JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]"), + RequestId = "", + }; + // Make the request + Operation response = await batchServiceClient.CancelJobAsync(request); + + // Poll until the returned long-running operation is complete + Operation completedResponse = await response.PollUntilCompletedAsync(); + // Retrieve the operation result + gcbv::CancelJobResponse 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 retrievedResponse = await batchServiceClient.PollOnceCancelJobAsync(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + gcbv::CancelJobResponse retrievedResult = retrievedResponse.Result; + } + // End snippet + } + + /// Snippet for CancelJob + public void CancelJob() + { + // Snippet: CancelJob(string, CallSettings) + // Create client + gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/jobs/[JOB]"; + // Make the request + Operation response = batchServiceClient.CancelJob(name); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // Retrieve the operation result + gcbv::CancelJobResponse 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 retrievedResponse = batchServiceClient.PollOnceCancelJob(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + gcbv::CancelJobResponse retrievedResult = retrievedResponse.Result; + } + // End snippet + } + + /// Snippet for CancelJobAsync + public async Task CancelJobAsync() + { + // Snippet: CancelJobAsync(string, CallSettings) + // Additional: CancelJobAsync(string, CancellationToken) + // Create client + gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/jobs/[JOB]"; + // Make the request + Operation response = await batchServiceClient.CancelJobAsync(name); + + // Poll until the returned long-running operation is complete + Operation completedResponse = await response.PollUntilCompletedAsync(); + // Retrieve the operation result + gcbv::CancelJobResponse 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 retrievedResponse = await batchServiceClient.PollOnceCancelJobAsync(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + gcbv::CancelJobResponse retrievedResult = retrievedResponse.Result; + } + // End snippet + } + + /// Snippet for CancelJob + public void CancelJobResourceNames() + { + // Snippet: CancelJob(JobName, CallSettings) + // Create client + gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create(); + // Initialize request argument(s) + gcbv::JobName name = gcbv::JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]"); + // Make the request + Operation response = batchServiceClient.CancelJob(name); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // Retrieve the operation result + gcbv::CancelJobResponse 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 retrievedResponse = batchServiceClient.PollOnceCancelJob(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + gcbv::CancelJobResponse retrievedResult = retrievedResponse.Result; + } + // End snippet + } + + /// Snippet for CancelJobAsync + public async Task CancelJobResourceNamesAsync() + { + // Snippet: CancelJobAsync(JobName, CallSettings) + // Additional: CancelJobAsync(JobName, CancellationToken) + // Create client + gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync(); + // Initialize request argument(s) + gcbv::JobName name = gcbv::JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]"); + // Make the request + Operation response = await batchServiceClient.CancelJobAsync(name); + + // Poll until the returned long-running operation is complete + Operation completedResponse = await response.PollUntilCompletedAsync(); + // Retrieve the operation result + gcbv::CancelJobResponse 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 retrievedResponse = await batchServiceClient.PollOnceCancelJobAsync(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + gcbv::CancelJobResponse retrievedResult = retrievedResponse.Result; + } + // End snippet + } + + /// Snippet for UpdateJob + public void UpdateJobRequestObject() + { + // Snippet: UpdateJob(UpdateJobRequest, CallSettings) + // Create client + gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create(); + // Initialize request argument(s) + gcbv::UpdateJobRequest request = new gcbv::UpdateJobRequest + { + Job = new gcbv::Job(), + UpdateMask = new FieldMask(), + RequestId = "", + }; + // Make the request + gcbv::Job response = batchServiceClient.UpdateJob(request); + // End snippet + } + + /// Snippet for UpdateJobAsync + public async Task UpdateJobRequestObjectAsync() + { + // Snippet: UpdateJobAsync(UpdateJobRequest, CallSettings) + // Additional: UpdateJobAsync(UpdateJobRequest, CancellationToken) + // Create client + gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync(); + // Initialize request argument(s) + gcbv::UpdateJobRequest request = new gcbv::UpdateJobRequest + { + Job = new gcbv::Job(), + UpdateMask = new FieldMask(), + RequestId = "", + }; + // Make the request + gcbv::Job response = await batchServiceClient.UpdateJobAsync(request); + // End snippet + } + + /// Snippet for UpdateJob + public void UpdateJob() + { + // Snippet: UpdateJob(Job, FieldMask, CallSettings) + // Create client + gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create(); + // Initialize request argument(s) + gcbv::Job job = new gcbv::Job(); + FieldMask updateMask = new FieldMask(); + // Make the request + gcbv::Job response = batchServiceClient.UpdateJob(job, updateMask); + // End snippet + } + + /// Snippet for UpdateJobAsync + public async Task UpdateJobAsync() + { + // Snippet: UpdateJobAsync(Job, FieldMask, CallSettings) + // Additional: UpdateJobAsync(Job, FieldMask, CancellationToken) + // Create client + gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync(); + // Initialize request argument(s) + gcbv::Job job = new gcbv::Job(); + FieldMask updateMask = new FieldMask(); + // Make the request + gcbv::Job response = await batchServiceClient.UpdateJobAsync(job, updateMask); + // End snippet + } + + /// Snippet for ListJobs + public void ListJobsRequestObject() + { + // Snippet: ListJobs(ListJobsRequest, CallSettings) + // Create client + gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create(); + // Initialize request argument(s) + gcbv::ListJobsRequest request = new gcbv::ListJobsRequest + { + Parent = "", + Filter = "", + OrderBy = "", + }; + // Make the request + PagedEnumerable response = batchServiceClient.ListJobs(request); + + // Iterate over all response items, lazily performing RPCs as required + foreach (gcbv::Job item in response) + { + // Do something with each item + Console.WriteLine(item); + } + + // Or iterate over pages (of server-defined size), performing one RPC per page + foreach (gcbv::ListJobsResponse page in response.AsRawResponses()) + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (gcbv::Job item in page) + { + // Do something with each item + Console.WriteLine(item); + } + } + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = response.ReadPage(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (gcbv::Job item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + // End snippet + } + + /// Snippet for ListJobsAsync + public async Task ListJobsRequestObjectAsync() + { + // Snippet: ListJobsAsync(ListJobsRequest, CallSettings) + // Create client + gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync(); + // Initialize request argument(s) + gcbv::ListJobsRequest request = new gcbv::ListJobsRequest + { + Parent = "", + Filter = "", + OrderBy = "", + }; + // Make the request + PagedAsyncEnumerable response = batchServiceClient.ListJobsAsync(request); + + // Iterate over all response items, lazily performing RPCs as required + await response.ForEachAsync((gcbv::Job item) => + { + // Do something with each item + Console.WriteLine(item); + }); + + // Or iterate over pages (of server-defined size), performing one RPC per page + await response.AsRawResponses().ForEachAsync((gcbv::ListJobsResponse page) => + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (gcbv::Job item in page) + { + // Do something with each item + Console.WriteLine(item); + } + }); + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = await response.ReadPageAsync(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (gcbv::Job item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + // End snippet + } + + /// Snippet for ListJobs + public void ListJobs() + { + // Snippet: ListJobs(string, string, int?, CallSettings) + // Create client + gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create(); + // Initialize request argument(s) + string parent = ""; + // Make the request + PagedEnumerable response = batchServiceClient.ListJobs(parent); + + // Iterate over all response items, lazily performing RPCs as required + foreach (gcbv::Job item in response) + { + // Do something with each item + Console.WriteLine(item); + } + + // Or iterate over pages (of server-defined size), performing one RPC per page + foreach (gcbv::ListJobsResponse page in response.AsRawResponses()) + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (gcbv::Job item in page) + { + // Do something with each item + Console.WriteLine(item); + } + } + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = response.ReadPage(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (gcbv::Job item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + // End snippet + } + + /// Snippet for ListJobsAsync + public async Task ListJobsAsync() + { + // Snippet: ListJobsAsync(string, string, int?, CallSettings) + // Create client + gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync(); + // Initialize request argument(s) + string parent = ""; + // Make the request + PagedAsyncEnumerable response = batchServiceClient.ListJobsAsync(parent); + + // Iterate over all response items, lazily performing RPCs as required + await response.ForEachAsync((gcbv::Job item) => + { + // Do something with each item + Console.WriteLine(item); + }); + + // Or iterate over pages (of server-defined size), performing one RPC per page + await response.AsRawResponses().ForEachAsync((gcbv::ListJobsResponse page) => + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (gcbv::Job item in page) + { + // Do something with each item + Console.WriteLine(item); + } + }); + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = await response.ReadPageAsync(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (gcbv::Job item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + // End snippet + } + + /// Snippet for GetTask + public void GetTaskRequestObject() + { + // Snippet: GetTask(GetTaskRequest, CallSettings) + // Create client + gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create(); + // Initialize request argument(s) + gcbv::GetTaskRequest request = new gcbv::GetTaskRequest + { + TaskName = gcbv::TaskName.FromProjectLocationJobTaskGroupTask("[PROJECT]", "[LOCATION]", "[JOB]", "[TASK_GROUP]", "[TASK]"), + }; + // Make the request + gcbv::Task response = batchServiceClient.GetTask(request); + // End snippet + } + + /// Snippet for GetTaskAsync + public async Task GetTaskRequestObjectAsync() + { + // Snippet: GetTaskAsync(GetTaskRequest, CallSettings) + // Additional: GetTaskAsync(GetTaskRequest, CancellationToken) + // Create client + gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync(); + // Initialize request argument(s) + gcbv::GetTaskRequest request = new gcbv::GetTaskRequest + { + TaskName = gcbv::TaskName.FromProjectLocationJobTaskGroupTask("[PROJECT]", "[LOCATION]", "[JOB]", "[TASK_GROUP]", "[TASK]"), + }; + // Make the request + gcbv::Task response = await batchServiceClient.GetTaskAsync(request); + // End snippet + } + + /// Snippet for GetTask + public void GetTask() + { + // Snippet: GetTask(string, CallSettings) + // Create client + gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/jobs/[JOB]/taskGroups/[TASK_GROUP]/tasks/[TASK]"; + // Make the request + gcbv::Task response = batchServiceClient.GetTask(name); + // End snippet + } + + /// Snippet for GetTaskAsync + public async Task GetTaskAsync() + { + // Snippet: GetTaskAsync(string, CallSettings) + // Additional: GetTaskAsync(string, CancellationToken) + // Create client + gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/jobs/[JOB]/taskGroups/[TASK_GROUP]/tasks/[TASK]"; + // Make the request + gcbv::Task response = await batchServiceClient.GetTaskAsync(name); + // End snippet + } + + /// Snippet for GetTask + public void GetTaskResourceNames() + { + // Snippet: GetTask(TaskName, CallSettings) + // Create client + gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create(); + // Initialize request argument(s) + gcbv::TaskName name = gcbv::TaskName.FromProjectLocationJobTaskGroupTask("[PROJECT]", "[LOCATION]", "[JOB]", "[TASK_GROUP]", "[TASK]"); + // Make the request + gcbv::Task response = batchServiceClient.GetTask(name); + // End snippet + } + + /// Snippet for GetTaskAsync + public async Task GetTaskResourceNamesAsync() + { + // Snippet: GetTaskAsync(TaskName, CallSettings) + // Additional: GetTaskAsync(TaskName, CancellationToken) + // Create client + gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync(); + // Initialize request argument(s) + gcbv::TaskName name = gcbv::TaskName.FromProjectLocationJobTaskGroupTask("[PROJECT]", "[LOCATION]", "[JOB]", "[TASK_GROUP]", "[TASK]"); + // Make the request + gcbv::Task response = await batchServiceClient.GetTaskAsync(name); + // End snippet + } + + /// Snippet for ListTasks + public void ListTasksRequestObject() + { + // Snippet: ListTasks(ListTasksRequest, CallSettings) + // Create client + gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create(); + // Initialize request argument(s) + gcbv::ListTasksRequest request = new gcbv::ListTasksRequest + { + ParentAsTaskGroupName = gcbv::TaskGroupName.FromProjectLocationJobTaskGroup("[PROJECT]", "[LOCATION]", "[JOB]", "[TASK_GROUP]"), + Filter = "", + OrderBy = "", + }; + // Make the request + PagedEnumerable response = batchServiceClient.ListTasks(request); + + // Iterate over all response items, lazily performing RPCs as required + foreach (gcbv::Task item in response) + { + // Do something with each item + Console.WriteLine(item); + } + + // Or iterate over pages (of server-defined size), performing one RPC per page + foreach (gcbv::ListTasksResponse page in response.AsRawResponses()) + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (gcbv::Task item in page) + { + // Do something with each item + Console.WriteLine(item); + } + } + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = response.ReadPage(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (gcbv::Task item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + // End snippet + } + + /// Snippet for ListTasksAsync + public async Task ListTasksRequestObjectAsync() + { + // Snippet: ListTasksAsync(ListTasksRequest, CallSettings) + // Create client + gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync(); + // Initialize request argument(s) + gcbv::ListTasksRequest request = new gcbv::ListTasksRequest + { + ParentAsTaskGroupName = gcbv::TaskGroupName.FromProjectLocationJobTaskGroup("[PROJECT]", "[LOCATION]", "[JOB]", "[TASK_GROUP]"), + Filter = "", + OrderBy = "", + }; + // Make the request + PagedAsyncEnumerable response = batchServiceClient.ListTasksAsync(request); + + // Iterate over all response items, lazily performing RPCs as required + await response.ForEachAsync((gcbv::Task item) => + { + // Do something with each item + Console.WriteLine(item); + }); + + // Or iterate over pages (of server-defined size), performing one RPC per page + await response.AsRawResponses().ForEachAsync((gcbv::ListTasksResponse page) => + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (gcbv::Task item in page) + { + // Do something with each item + Console.WriteLine(item); + } + }); + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = await response.ReadPageAsync(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (gcbv::Task item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + // End snippet + } + + /// Snippet for ListTasks + public void ListTasks() + { + // Snippet: ListTasks(string, string, int?, CallSettings) + // Create client + gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create(); + // Initialize request argument(s) + string parent = "projects/[PROJECT]/locations/[LOCATION]/jobs/[JOB]/taskGroups/[TASK_GROUP]"; + // Make the request + PagedEnumerable response = batchServiceClient.ListTasks(parent); + + // Iterate over all response items, lazily performing RPCs as required + foreach (gcbv::Task item in response) + { + // Do something with each item + Console.WriteLine(item); + } + + // Or iterate over pages (of server-defined size), performing one RPC per page + foreach (gcbv::ListTasksResponse page in response.AsRawResponses()) + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (gcbv::Task item in page) + { + // Do something with each item + Console.WriteLine(item); + } + } + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = response.ReadPage(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (gcbv::Task item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + // End snippet + } + + /// Snippet for ListTasksAsync + public async Task ListTasksAsync() + { + // Snippet: ListTasksAsync(string, string, int?, CallSettings) + // Create client + gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync(); + // Initialize request argument(s) + string parent = "projects/[PROJECT]/locations/[LOCATION]/jobs/[JOB]/taskGroups/[TASK_GROUP]"; + // Make the request + PagedAsyncEnumerable response = batchServiceClient.ListTasksAsync(parent); + + // Iterate over all response items, lazily performing RPCs as required + await response.ForEachAsync((gcbv::Task item) => + { + // Do something with each item + Console.WriteLine(item); + }); + + // Or iterate over pages (of server-defined size), performing one RPC per page + await response.AsRawResponses().ForEachAsync((gcbv::ListTasksResponse page) => + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (gcbv::Task item in page) + { + // Do something with each item + Console.WriteLine(item); + } + }); + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = await response.ReadPageAsync(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (gcbv::Task item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + // End snippet + } + + /// Snippet for ListTasks + public void ListTasksResourceNames() + { + // Snippet: ListTasks(TaskGroupName, string, int?, CallSettings) + // Create client + gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create(); + // Initialize request argument(s) + gcbv::TaskGroupName parent = gcbv::TaskGroupName.FromProjectLocationJobTaskGroup("[PROJECT]", "[LOCATION]", "[JOB]", "[TASK_GROUP]"); + // Make the request + PagedEnumerable response = batchServiceClient.ListTasks(parent); + + // Iterate over all response items, lazily performing RPCs as required + foreach (gcbv::Task item in response) + { + // Do something with each item + Console.WriteLine(item); + } + + // Or iterate over pages (of server-defined size), performing one RPC per page + foreach (gcbv::ListTasksResponse page in response.AsRawResponses()) + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (gcbv::Task item in page) + { + // Do something with each item + Console.WriteLine(item); + } + } + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = response.ReadPage(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (gcbv::Task item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + // End snippet + } + + /// Snippet for ListTasksAsync + public async Task ListTasksResourceNamesAsync() + { + // Snippet: ListTasksAsync(TaskGroupName, string, int?, CallSettings) + // Create client + gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync(); + // Initialize request argument(s) + gcbv::TaskGroupName parent = gcbv::TaskGroupName.FromProjectLocationJobTaskGroup("[PROJECT]", "[LOCATION]", "[JOB]", "[TASK_GROUP]"); + // Make the request + PagedAsyncEnumerable response = batchServiceClient.ListTasksAsync(parent); + + // Iterate over all response items, lazily performing RPCs as required + await response.ForEachAsync((gcbv::Task item) => + { + // Do something with each item + Console.WriteLine(item); + }); + + // Or iterate over pages (of server-defined size), performing one RPC per page + await response.AsRawResponses().ForEachAsync((gcbv::ListTasksResponse page) => + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (gcbv::Task item in page) + { + // Do something with each item + Console.WriteLine(item); + } + }); + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = await response.ReadPageAsync(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (gcbv::Task item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + // End snippet + } + + /// Snippet for CreateResourceAllowance + public void CreateResourceAllowanceRequestObject() + { + // Snippet: CreateResourceAllowance(CreateResourceAllowanceRequest, CallSettings) + // Create client + gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create(); + // Initialize request argument(s) + gcbv::CreateResourceAllowanceRequest request = new gcbv::CreateResourceAllowanceRequest + { + ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"), + ResourceAllowanceId = "", + ResourceAllowance = new gcbv::ResourceAllowance(), + RequestId = "", + }; + // Make the request + gcbv::ResourceAllowance response = batchServiceClient.CreateResourceAllowance(request); + // End snippet + } + + /// Snippet for CreateResourceAllowanceAsync + public async Task CreateResourceAllowanceRequestObjectAsync() + { + // Snippet: CreateResourceAllowanceAsync(CreateResourceAllowanceRequest, CallSettings) + // Additional: CreateResourceAllowanceAsync(CreateResourceAllowanceRequest, CancellationToken) + // Create client + gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync(); + // Initialize request argument(s) + gcbv::CreateResourceAllowanceRequest request = new gcbv::CreateResourceAllowanceRequest + { + ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"), + ResourceAllowanceId = "", + ResourceAllowance = new gcbv::ResourceAllowance(), + RequestId = "", + }; + // Make the request + gcbv::ResourceAllowance response = await batchServiceClient.CreateResourceAllowanceAsync(request); + // End snippet + } + + /// Snippet for CreateResourceAllowance + public void CreateResourceAllowance() + { + // Snippet: CreateResourceAllowance(string, ResourceAllowance, string, CallSettings) + // Create client + gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create(); + // Initialize request argument(s) + string parent = "projects/[PROJECT]/locations/[LOCATION]"; + gcbv::ResourceAllowance resourceAllowance = new gcbv::ResourceAllowance(); + string resourceAllowanceId = ""; + // Make the request + gcbv::ResourceAllowance response = batchServiceClient.CreateResourceAllowance(parent, resourceAllowance, resourceAllowanceId); + // End snippet + } + + /// Snippet for CreateResourceAllowanceAsync + public async Task CreateResourceAllowanceAsync() + { + // Snippet: CreateResourceAllowanceAsync(string, ResourceAllowance, string, CallSettings) + // Additional: CreateResourceAllowanceAsync(string, ResourceAllowance, string, CancellationToken) + // Create client + gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync(); + // Initialize request argument(s) + string parent = "projects/[PROJECT]/locations/[LOCATION]"; + gcbv::ResourceAllowance resourceAllowance = new gcbv::ResourceAllowance(); + string resourceAllowanceId = ""; + // Make the request + gcbv::ResourceAllowance response = await batchServiceClient.CreateResourceAllowanceAsync(parent, resourceAllowance, resourceAllowanceId); + // End snippet + } + + /// Snippet for CreateResourceAllowance + public void CreateResourceAllowanceResourceNames() + { + // Snippet: CreateResourceAllowance(LocationName, ResourceAllowance, string, CallSettings) + // Create client + gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create(); + // Initialize request argument(s) + LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"); + gcbv::ResourceAllowance resourceAllowance = new gcbv::ResourceAllowance(); + string resourceAllowanceId = ""; + // Make the request + gcbv::ResourceAllowance response = batchServiceClient.CreateResourceAllowance(parent, resourceAllowance, resourceAllowanceId); + // End snippet + } + + /// Snippet for CreateResourceAllowanceAsync + public async Task CreateResourceAllowanceResourceNamesAsync() + { + // Snippet: CreateResourceAllowanceAsync(LocationName, ResourceAllowance, string, CallSettings) + // Additional: CreateResourceAllowanceAsync(LocationName, ResourceAllowance, string, CancellationToken) + // Create client + gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync(); + // Initialize request argument(s) + LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"); + gcbv::ResourceAllowance resourceAllowance = new gcbv::ResourceAllowance(); + string resourceAllowanceId = ""; + // Make the request + gcbv::ResourceAllowance response = await batchServiceClient.CreateResourceAllowanceAsync(parent, resourceAllowance, resourceAllowanceId); + // End snippet + } + + /// Snippet for GetResourceAllowance + public void GetResourceAllowanceRequestObject() + { + // Snippet: GetResourceAllowance(GetResourceAllowanceRequest, CallSettings) + // Create client + gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create(); + // Initialize request argument(s) + gcbv::GetResourceAllowanceRequest request = new gcbv::GetResourceAllowanceRequest + { + ResourceAllowanceName = gcbv::ResourceAllowanceName.FromProjectLocationResourceAllowance("[PROJECT]", "[LOCATION]", "[RESOURCE_ALLOWANCE]"), + }; + // Make the request + gcbv::ResourceAllowance response = batchServiceClient.GetResourceAllowance(request); + // End snippet + } + + /// Snippet for GetResourceAllowanceAsync + public async Task GetResourceAllowanceRequestObjectAsync() + { + // Snippet: GetResourceAllowanceAsync(GetResourceAllowanceRequest, CallSettings) + // Additional: GetResourceAllowanceAsync(GetResourceAllowanceRequest, CancellationToken) + // Create client + gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync(); + // Initialize request argument(s) + gcbv::GetResourceAllowanceRequest request = new gcbv::GetResourceAllowanceRequest + { + ResourceAllowanceName = gcbv::ResourceAllowanceName.FromProjectLocationResourceAllowance("[PROJECT]", "[LOCATION]", "[RESOURCE_ALLOWANCE]"), + }; + // Make the request + gcbv::ResourceAllowance response = await batchServiceClient.GetResourceAllowanceAsync(request); + // End snippet + } + + /// Snippet for GetResourceAllowance + public void GetResourceAllowance() + { + // Snippet: GetResourceAllowance(string, CallSettings) + // Create client + gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/resourceAllowances/[RESOURCE_ALLOWANCE]"; + // Make the request + gcbv::ResourceAllowance response = batchServiceClient.GetResourceAllowance(name); + // End snippet + } + + /// Snippet for GetResourceAllowanceAsync + public async Task GetResourceAllowanceAsync() + { + // Snippet: GetResourceAllowanceAsync(string, CallSettings) + // Additional: GetResourceAllowanceAsync(string, CancellationToken) + // Create client + gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/resourceAllowances/[RESOURCE_ALLOWANCE]"; + // Make the request + gcbv::ResourceAllowance response = await batchServiceClient.GetResourceAllowanceAsync(name); + // End snippet + } + + /// Snippet for GetResourceAllowance + public void GetResourceAllowanceResourceNames() + { + // Snippet: GetResourceAllowance(ResourceAllowanceName, CallSettings) + // Create client + gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create(); + // Initialize request argument(s) + gcbv::ResourceAllowanceName name = gcbv::ResourceAllowanceName.FromProjectLocationResourceAllowance("[PROJECT]", "[LOCATION]", "[RESOURCE_ALLOWANCE]"); + // Make the request + gcbv::ResourceAllowance response = batchServiceClient.GetResourceAllowance(name); + // End snippet + } + + /// Snippet for GetResourceAllowanceAsync + public async Task GetResourceAllowanceResourceNamesAsync() + { + // Snippet: GetResourceAllowanceAsync(ResourceAllowanceName, CallSettings) + // Additional: GetResourceAllowanceAsync(ResourceAllowanceName, CancellationToken) + // Create client + gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync(); + // Initialize request argument(s) + gcbv::ResourceAllowanceName name = gcbv::ResourceAllowanceName.FromProjectLocationResourceAllowance("[PROJECT]", "[LOCATION]", "[RESOURCE_ALLOWANCE]"); + // Make the request + gcbv::ResourceAllowance response = await batchServiceClient.GetResourceAllowanceAsync(name); + // End snippet + } + + /// Snippet for DeleteResourceAllowance + public void DeleteResourceAllowanceRequestObject() + { + // Snippet: DeleteResourceAllowance(DeleteResourceAllowanceRequest, CallSettings) + // Create client + gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create(); + // Initialize request argument(s) + gcbv::DeleteResourceAllowanceRequest request = new gcbv::DeleteResourceAllowanceRequest + { + ResourceAllowanceName = gcbv::ResourceAllowanceName.FromProjectLocationResourceAllowance("[PROJECT]", "[LOCATION]", "[RESOURCE_ALLOWANCE]"), + Reason = "", + RequestId = "", + }; + // Make the request + Operation response = batchServiceClient.DeleteResourceAllowance(request); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // 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 retrievedResponse = batchServiceClient.PollOnceDeleteResourceAllowance(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 snippet + } + + /// Snippet for DeleteResourceAllowanceAsync + public async Task DeleteResourceAllowanceRequestObjectAsync() + { + // Snippet: DeleteResourceAllowanceAsync(DeleteResourceAllowanceRequest, CallSettings) + // Additional: DeleteResourceAllowanceAsync(DeleteResourceAllowanceRequest, CancellationToken) + // Create client + gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync(); + // Initialize request argument(s) + gcbv::DeleteResourceAllowanceRequest request = new gcbv::DeleteResourceAllowanceRequest + { + ResourceAllowanceName = gcbv::ResourceAllowanceName.FromProjectLocationResourceAllowance("[PROJECT]", "[LOCATION]", "[RESOURCE_ALLOWANCE]"), + Reason = "", + RequestId = "", + }; + // Make the request + Operation response = await batchServiceClient.DeleteResourceAllowanceAsync(request); + + // Poll until the returned long-running operation is complete + Operation 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 retrievedResponse = await batchServiceClient.PollOnceDeleteResourceAllowanceAsync(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 snippet + } + + /// Snippet for DeleteResourceAllowance + public void DeleteResourceAllowance() + { + // Snippet: DeleteResourceAllowance(string, CallSettings) + // Create client + gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/resourceAllowances/[RESOURCE_ALLOWANCE]"; + // Make the request + Operation response = batchServiceClient.DeleteResourceAllowance(name); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // 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 retrievedResponse = batchServiceClient.PollOnceDeleteResourceAllowance(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 snippet + } + + /// Snippet for DeleteResourceAllowanceAsync + public async Task DeleteResourceAllowanceAsync() + { + // Snippet: DeleteResourceAllowanceAsync(string, CallSettings) + // Additional: DeleteResourceAllowanceAsync(string, CancellationToken) + // Create client + gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/resourceAllowances/[RESOURCE_ALLOWANCE]"; + // Make the request + Operation response = await batchServiceClient.DeleteResourceAllowanceAsync(name); + + // Poll until the returned long-running operation is complete + Operation 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 retrievedResponse = await batchServiceClient.PollOnceDeleteResourceAllowanceAsync(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 snippet + } + + /// Snippet for DeleteResourceAllowance + public void DeleteResourceAllowanceResourceNames() + { + // Snippet: DeleteResourceAllowance(ResourceAllowanceName, CallSettings) + // Create client + gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create(); + // Initialize request argument(s) + gcbv::ResourceAllowanceName name = gcbv::ResourceAllowanceName.FromProjectLocationResourceAllowance("[PROJECT]", "[LOCATION]", "[RESOURCE_ALLOWANCE]"); + // Make the request + Operation response = batchServiceClient.DeleteResourceAllowance(name); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // 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 retrievedResponse = batchServiceClient.PollOnceDeleteResourceAllowance(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 snippet + } + + /// Snippet for DeleteResourceAllowanceAsync + public async Task DeleteResourceAllowanceResourceNamesAsync() + { + // Snippet: DeleteResourceAllowanceAsync(ResourceAllowanceName, CallSettings) + // Additional: DeleteResourceAllowanceAsync(ResourceAllowanceName, CancellationToken) + // Create client + gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync(); + // Initialize request argument(s) + gcbv::ResourceAllowanceName name = gcbv::ResourceAllowanceName.FromProjectLocationResourceAllowance("[PROJECT]", "[LOCATION]", "[RESOURCE_ALLOWANCE]"); + // Make the request + Operation response = await batchServiceClient.DeleteResourceAllowanceAsync(name); + + // Poll until the returned long-running operation is complete + Operation 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 retrievedResponse = await batchServiceClient.PollOnceDeleteResourceAllowanceAsync(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 snippet + } + + /// Snippet for ListResourceAllowances + public void ListResourceAllowancesRequestObject() + { + // Snippet: ListResourceAllowances(ListResourceAllowancesRequest, CallSettings) + // Create client + gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create(); + // Initialize request argument(s) + gcbv::ListResourceAllowancesRequest request = new gcbv::ListResourceAllowancesRequest + { + ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"), + }; + // Make the request + PagedEnumerable response = batchServiceClient.ListResourceAllowances(request); + + // Iterate over all response items, lazily performing RPCs as required + foreach (gcbv::ResourceAllowance item in response) + { + // Do something with each item + Console.WriteLine(item); + } + + // Or iterate over pages (of server-defined size), performing one RPC per page + foreach (gcbv::ListResourceAllowancesResponse page in response.AsRawResponses()) + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (gcbv::ResourceAllowance item in page) + { + // Do something with each item + Console.WriteLine(item); + } + } + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = response.ReadPage(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (gcbv::ResourceAllowance item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + // End snippet + } + + /// Snippet for ListResourceAllowancesAsync + public async Task ListResourceAllowancesRequestObjectAsync() + { + // Snippet: ListResourceAllowancesAsync(ListResourceAllowancesRequest, CallSettings) + // Create client + gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync(); + // Initialize request argument(s) + gcbv::ListResourceAllowancesRequest request = new gcbv::ListResourceAllowancesRequest + { + ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"), + }; + // Make the request + PagedAsyncEnumerable response = batchServiceClient.ListResourceAllowancesAsync(request); + + // Iterate over all response items, lazily performing RPCs as required + await response.ForEachAsync((gcbv::ResourceAllowance item) => + { + // Do something with each item + Console.WriteLine(item); + }); + + // Or iterate over pages (of server-defined size), performing one RPC per page + await response.AsRawResponses().ForEachAsync((gcbv::ListResourceAllowancesResponse page) => + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (gcbv::ResourceAllowance item in page) + { + // Do something with each item + Console.WriteLine(item); + } + }); + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = await response.ReadPageAsync(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (gcbv::ResourceAllowance item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + // End snippet + } + + /// Snippet for ListResourceAllowances + public void ListResourceAllowances() + { + // Snippet: ListResourceAllowances(string, string, int?, CallSettings) + // Create client + gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create(); + // Initialize request argument(s) + string parent = "projects/[PROJECT]/locations/[LOCATION]"; + // Make the request + PagedEnumerable response = batchServiceClient.ListResourceAllowances(parent); + + // Iterate over all response items, lazily performing RPCs as required + foreach (gcbv::ResourceAllowance item in response) + { + // Do something with each item + Console.WriteLine(item); + } + + // Or iterate over pages (of server-defined size), performing one RPC per page + foreach (gcbv::ListResourceAllowancesResponse page in response.AsRawResponses()) + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (gcbv::ResourceAllowance item in page) + { + // Do something with each item + Console.WriteLine(item); + } + } + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = response.ReadPage(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (gcbv::ResourceAllowance item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + // End snippet + } + + /// Snippet for ListResourceAllowancesAsync + public async Task ListResourceAllowancesAsync() + { + // Snippet: ListResourceAllowancesAsync(string, string, int?, CallSettings) + // Create client + gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync(); + // Initialize request argument(s) + string parent = "projects/[PROJECT]/locations/[LOCATION]"; + // Make the request + PagedAsyncEnumerable response = batchServiceClient.ListResourceAllowancesAsync(parent); + + // Iterate over all response items, lazily performing RPCs as required + await response.ForEachAsync((gcbv::ResourceAllowance item) => + { + // Do something with each item + Console.WriteLine(item); + }); + + // Or iterate over pages (of server-defined size), performing one RPC per page + await response.AsRawResponses().ForEachAsync((gcbv::ListResourceAllowancesResponse page) => + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (gcbv::ResourceAllowance item in page) + { + // Do something with each item + Console.WriteLine(item); + } + }); + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = await response.ReadPageAsync(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (gcbv::ResourceAllowance item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + // End snippet + } + + /// Snippet for ListResourceAllowances + public void ListResourceAllowancesResourceNames() + { + // Snippet: ListResourceAllowances(LocationName, string, int?, CallSettings) + // Create client + gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create(); + // Initialize request argument(s) + LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"); + // Make the request + PagedEnumerable response = batchServiceClient.ListResourceAllowances(parent); + + // Iterate over all response items, lazily performing RPCs as required + foreach (gcbv::ResourceAllowance item in response) + { + // Do something with each item + Console.WriteLine(item); + } + + // Or iterate over pages (of server-defined size), performing one RPC per page + foreach (gcbv::ListResourceAllowancesResponse page in response.AsRawResponses()) + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (gcbv::ResourceAllowance item in page) + { + // Do something with each item + Console.WriteLine(item); + } + } + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = response.ReadPage(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (gcbv::ResourceAllowance item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + // End snippet + } + + /// Snippet for ListResourceAllowancesAsync + public async Task ListResourceAllowancesResourceNamesAsync() + { + // Snippet: ListResourceAllowancesAsync(LocationName, string, int?, CallSettings) + // Create client + gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync(); + // Initialize request argument(s) + LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"); + // Make the request + PagedAsyncEnumerable response = batchServiceClient.ListResourceAllowancesAsync(parent); + + // Iterate over all response items, lazily performing RPCs as required + await response.ForEachAsync((gcbv::ResourceAllowance item) => + { + // Do something with each item + Console.WriteLine(item); + }); + + // Or iterate over pages (of server-defined size), performing one RPC per page + await response.AsRawResponses().ForEachAsync((gcbv::ListResourceAllowancesResponse page) => + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (gcbv::ResourceAllowance item in page) + { + // Do something with each item + Console.WriteLine(item); + } + }); + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = await response.ReadPageAsync(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (gcbv::ResourceAllowance item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + // End snippet + } + + /// Snippet for UpdateResourceAllowance + public void UpdateResourceAllowanceRequestObject() + { + // Snippet: UpdateResourceAllowance(UpdateResourceAllowanceRequest, CallSettings) + // Create client + gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create(); + // Initialize request argument(s) + gcbv::UpdateResourceAllowanceRequest request = new gcbv::UpdateResourceAllowanceRequest + { + ResourceAllowance = new gcbv::ResourceAllowance(), + UpdateMask = new FieldMask(), + RequestId = "", + }; + // Make the request + gcbv::ResourceAllowance response = batchServiceClient.UpdateResourceAllowance(request); + // End snippet + } + + /// Snippet for UpdateResourceAllowanceAsync + public async Task UpdateResourceAllowanceRequestObjectAsync() + { + // Snippet: UpdateResourceAllowanceAsync(UpdateResourceAllowanceRequest, CallSettings) + // Additional: UpdateResourceAllowanceAsync(UpdateResourceAllowanceRequest, CancellationToken) + // Create client + gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync(); + // Initialize request argument(s) + gcbv::UpdateResourceAllowanceRequest request = new gcbv::UpdateResourceAllowanceRequest + { + ResourceAllowance = new gcbv::ResourceAllowance(), + UpdateMask = new FieldMask(), + RequestId = "", + }; + // Make the request + gcbv::ResourceAllowance response = await batchServiceClient.UpdateResourceAllowanceAsync(request); + // End snippet + } + + /// Snippet for UpdateResourceAllowance + public void UpdateResourceAllowance() + { + // Snippet: UpdateResourceAllowance(ResourceAllowance, FieldMask, CallSettings) + // Create client + gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create(); + // Initialize request argument(s) + gcbv::ResourceAllowance resourceAllowance = new gcbv::ResourceAllowance(); + FieldMask updateMask = new FieldMask(); + // Make the request + gcbv::ResourceAllowance response = batchServiceClient.UpdateResourceAllowance(resourceAllowance, updateMask); + // End snippet + } + + /// Snippet for UpdateResourceAllowanceAsync + public async Task UpdateResourceAllowanceAsync() + { + // Snippet: UpdateResourceAllowanceAsync(ResourceAllowance, FieldMask, CallSettings) + // Additional: UpdateResourceAllowanceAsync(ResourceAllowance, FieldMask, CancellationToken) + // Create client + gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync(); + // Initialize request argument(s) + gcbv::ResourceAllowance resourceAllowance = new gcbv::ResourceAllowance(); + FieldMask updateMask = new FieldMask(); + // Make the request + gcbv::ResourceAllowance response = await batchServiceClient.UpdateResourceAllowanceAsync(resourceAllowance, updateMask); + // End snippet + } + } +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.Snippets/Google.Cloud.Batch.V1Alpha.Snippets.csproj b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.Snippets/Google.Cloud.Batch.V1Alpha.Snippets.csproj new file mode 100755 index 000000000000..7b2c051e501a --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.Snippets/Google.Cloud.Batch.V1Alpha.Snippets.csproj @@ -0,0 +1,15 @@ + + + + + net6.0;net462 + latest + + + + + + + + + \ No newline at end of file diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha/Batch.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha/Batch.g.cs new file mode 100755 index 000000000000..31178271ca5d --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha/Batch.g.cs @@ -0,0 +1,5303 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/batch/v1alpha/batch.proto +// +#pragma warning disable 1591, 0612, 3021, 8981 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Google.Cloud.Batch.V1Alpha { + + /// Holder for reflection information generated from google/cloud/batch/v1alpha/batch.proto + public static partial class BatchReflection { + + #region Descriptor + /// File descriptor for google/cloud/batch/v1alpha/batch.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static BatchReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CiZnb29nbGUvY2xvdWQvYmF0Y2gvdjFhbHBoYS9iYXRjaC5wcm90bxIaZ29v", + "Z2xlLmNsb3VkLmJhdGNoLnYxYWxwaGEaHGdvb2dsZS9hcGkvYW5ub3RhdGlv", + "bnMucHJvdG8aF2dvb2dsZS9hcGkvY2xpZW50LnByb3RvGh9nb29nbGUvYXBp", + "L2ZpZWxkX2JlaGF2aW9yLnByb3RvGhtnb29nbGUvYXBpL2ZpZWxkX2luZm8u", + "cHJvdG8aGWdvb2dsZS9hcGkvcmVzb3VyY2UucHJvdG8aJGdvb2dsZS9jbG91", + "ZC9iYXRjaC92MWFscGhhL2pvYi5wcm90bxozZ29vZ2xlL2Nsb3VkL2JhdGNo", + "L3YxYWxwaGEvcmVzb3VyY2VfYWxsb3dhbmNlLnByb3RvGiVnb29nbGUvY2xv", + "dWQvYmF0Y2gvdjFhbHBoYS90YXNrLnByb3RvGiNnb29nbGUvbG9uZ3J1bm5p", + "bmcvb3BlcmF0aW9ucy5wcm90bxobZ29vZ2xlL3Byb3RvYnVmL2VtcHR5LnBy", + "b3RvGiBnb29nbGUvcHJvdG9idWYvZmllbGRfbWFzay5wcm90bxofZ29vZ2xl", + "L3Byb3RvYnVmL3RpbWVzdGFtcC5wcm90byKgAQoQQ3JlYXRlSm9iUmVxdWVz", + "dBIwCgZwYXJlbnQYASABKAlCIOBBAvpBGhIYYmF0Y2guZ29vZ2xlYXBpcy5j", + "b20vSm9iEg4KBmpvYl9pZBgCIAEoCRIxCgNqb2IYAyABKAsyHy5nb29nbGUu", + "Y2xvdWQuYmF0Y2gudjFhbHBoYS5Kb2JCA+BBAhIXCgpyZXF1ZXN0X2lkGAQg", + "ASgJQgPgQQEiPwoNR2V0Sm9iUmVxdWVzdBIuCgRuYW1lGAEgASgJQiDgQQL6", + "QRoKGGJhdGNoLmdvb2dsZWFwaXMuY29tL0pvYiJOChBEZWxldGVKb2JSZXF1", + "ZXN0EgwKBG5hbWUYASABKAkSEwoGcmVhc29uGAIgASgJQgPgQQESFwoKcmVx", + "dWVzdF9pZBgEIAEoCUID4EEBImMKEENhbmNlbEpvYlJlcXVlc3QSLgoEbmFt", + "ZRgBIAEoCUIg4EEC+kEaChhiYXRjaC5nb29nbGVhcGlzLmNvbS9Kb2ISHwoK", + "cmVxdWVzdF9pZBgEIAEoCUIL4EEB4ozP1wgCCAEiEwoRQ2FuY2VsSm9iUmVz", + "cG9uc2UinAEKEFVwZGF0ZUpvYlJlcXVlc3QSMQoDam9iGAEgASgLMh8uZ29v", + "Z2xlLmNsb3VkLmJhdGNoLnYxYWxwaGEuSm9iQgPgQQISNAoLdXBkYXRlX21h", + "c2sYAiABKAsyGi5nb29nbGUucHJvdG9idWYuRmllbGRNYXNrQgPgQQISHwoK", + "cmVxdWVzdF9pZBgDIAEoCUIL4EEB4ozP1wgCCAEibwoPTGlzdEpvYnNSZXF1", + "ZXN0Eg4KBnBhcmVudBgBIAEoCRIOCgZmaWx0ZXIYBCABKAkSFQoIb3JkZXJf", + "YnkYBSABKAlCA+BBARIRCglwYWdlX3NpemUYAiABKAUSEgoKcGFnZV90b2tl", + "bhgDIAEoCSJvChBMaXN0Sm9ic1Jlc3BvbnNlEi0KBGpvYnMYASADKAsyHy5n", + "b29nbGUuY2xvdWQuYmF0Y2gudjFhbHBoYS5Kb2ISFwoPbmV4dF9wYWdlX3Rv", + "a2VuGAIgASgJEhMKC3VucmVhY2hhYmxlGAMgAygJIpMBChBMaXN0VGFza3NS", + "ZXF1ZXN0EjYKBnBhcmVudBgBIAEoCUIm4EEC+kEgCh5iYXRjaC5nb29nbGVh", + "cGlzLmNvbS9UYXNrR3JvdXASDgoGZmlsdGVyGAIgASgJEhAKCG9yZGVyX2J5", + "GAUgASgJEhEKCXBhZ2Vfc2l6ZRgDIAEoBRISCgpwYWdlX3Rva2VuGAQgASgJ", + "InIKEUxpc3RUYXNrc1Jlc3BvbnNlEi8KBXRhc2tzGAEgAygLMiAuZ29vZ2xl", + "LmNsb3VkLmJhdGNoLnYxYWxwaGEuVGFzaxIXCg9uZXh0X3BhZ2VfdG9rZW4Y", + "AiABKAkSEwoLdW5yZWFjaGFibGUYAyADKAkiQQoOR2V0VGFza1JlcXVlc3QS", + "LwoEbmFtZRgBIAEoCUIh4EEC+kEbChliYXRjaC5nb29nbGVhcGlzLmNvbS9U", + "YXNrIvABCh5DcmVhdGVSZXNvdXJjZUFsbG93YW5jZVJlcXVlc3QSPgoGcGFy", + "ZW50GAEgASgJQi7gQQL6QSgSJmJhdGNoLmdvb2dsZWFwaXMuY29tL1Jlc291", + "cmNlQWxsb3dhbmNlEh0KFXJlc291cmNlX2FsbG93YW5jZV9pZBgCIAEoCRJO", + "ChJyZXNvdXJjZV9hbGxvd2FuY2UYAyABKAsyLS5nb29nbGUuY2xvdWQuYmF0", + "Y2gudjFhbHBoYS5SZXNvdXJjZUFsbG93YW5jZUID4EECEh8KCnJlcXVlc3Rf", + "aWQYBCABKAlCC+BBAeKMz9cIAggBIlsKG0dldFJlc291cmNlQWxsb3dhbmNl", + "UmVxdWVzdBI8CgRuYW1lGAEgASgJQi7gQQL6QSgKJmJhdGNoLmdvb2dsZWFw", + "aXMuY29tL1Jlc291cmNlQWxsb3dhbmNlIpQBCh5EZWxldGVSZXNvdXJjZUFs", + "bG93YW5jZVJlcXVlc3QSPAoEbmFtZRgBIAEoCUIu4EEC+kEoCiZiYXRjaC5n", + "b29nbGVhcGlzLmNvbS9SZXNvdXJjZUFsbG93YW5jZRITCgZyZWFzb24YAiAB", + "KAlCA+BBARIfCgpyZXF1ZXN0X2lkGAQgASgJQgvgQQHijM/XCAIIASKQAQod", + "TGlzdFJlc291cmNlQWxsb3dhbmNlc1JlcXVlc3QSPgoGcGFyZW50GAEgASgJ", + "Qi7gQQL6QSgSJmJhdGNoLmdvb2dsZWFwaXMuY29tL1Jlc291cmNlQWxsb3dh", + "bmNlEhYKCXBhZ2Vfc2l6ZRgCIAEoBUID4EEBEhcKCnBhZ2VfdG9rZW4YAyAB", + "KAlCA+BBASKaAQoeTGlzdFJlc291cmNlQWxsb3dhbmNlc1Jlc3BvbnNlEkoK", + "E3Jlc291cmNlX2FsbG93YW5jZXMYASADKAsyLS5nb29nbGUuY2xvdWQuYmF0", + "Y2gudjFhbHBoYS5SZXNvdXJjZUFsbG93YW5jZRIXCg9uZXh0X3BhZ2VfdG9r", + "ZW4YAiABKAkSEwoLdW5yZWFjaGFibGUYAyADKAkixwEKHlVwZGF0ZVJlc291", + "cmNlQWxsb3dhbmNlUmVxdWVzdBJOChJyZXNvdXJjZV9hbGxvd2FuY2UYASAB", + "KAsyLS5nb29nbGUuY2xvdWQuYmF0Y2gudjFhbHBoYS5SZXNvdXJjZUFsbG93", + "YW5jZUID4EECEjQKC3VwZGF0ZV9tYXNrGAIgASgLMhouZ29vZ2xlLnByb3Rv", + "YnVmLkZpZWxkTWFza0ID4EECEh8KCnJlcXVlc3RfaWQYAyABKAlCC+BBAeKM", + "z9cIAggBIoACChFPcGVyYXRpb25NZXRhZGF0YRI0CgtjcmVhdGVfdGltZRgB", + "IAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBCA+BBAxIxCghlbmRf", + "dGltZRgCIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBCA+BBAxIT", + "CgZ0YXJnZXQYAyABKAlCA+BBAxIRCgR2ZXJiGAQgASgJQgPgQQMSGwoOc3Rh", + "dHVzX21lc3NhZ2UYBSABKAlCA+BBAxIjChZyZXF1ZXN0ZWRfY2FuY2VsbGF0", + "aW9uGAYgASgIQgPgQQMSGAoLYXBpX3ZlcnNpb24YByABKAlCA+BBAzKkFgoM", + "QmF0Y2hTZXJ2aWNlEqoBCglDcmVhdGVKb2ISLC5nb29nbGUuY2xvdWQuYmF0", + "Y2gudjFhbHBoYS5DcmVhdGVKb2JSZXF1ZXN0Gh8uZ29vZ2xlLmNsb3VkLmJh", + "dGNoLnYxYWxwaGEuSm9iIk7aQRFwYXJlbnQsam9iLGpvYl9pZILT5JMCNCIt", + "L3YxYWxwaGEve3BhcmVudD1wcm9qZWN0cy8qL2xvY2F0aW9ucy8qfS9qb2Jz", + "OgNqb2ISkgEKBkdldEpvYhIpLmdvb2dsZS5jbG91ZC5iYXRjaC52MWFscGhh", + "LkdldEpvYlJlcXVlc3QaHy5nb29nbGUuY2xvdWQuYmF0Y2gudjFhbHBoYS5K", + "b2IiPNpBBG5hbWWC0+STAi8SLS92MWFscGhhL3tuYW1lPXByb2plY3RzLyov", + "bG9jYXRpb25zLyovam9icy8qfRLfAQoJRGVsZXRlSm9iEiwuZ29vZ2xlLmNs", + "b3VkLmJhdGNoLnYxYWxwaGEuRGVsZXRlSm9iUmVxdWVzdBodLmdvb2dsZS5s", + "b25ncnVubmluZy5PcGVyYXRpb24ihAHKQUUKFWdvb2dsZS5wcm90b2J1Zi5F", + "bXB0eRIsZ29vZ2xlLmNsb3VkLmJhdGNoLnYxYWxwaGEuT3BlcmF0aW9uTWV0", + "YWRhdGHaQQRuYW1lgtPkkwIvKi0vdjFhbHBoYS97bmFtZT1wcm9qZWN0cy8q", + "L2xvY2F0aW9ucy8qL2pvYnMvKn0SgAIKCUNhbmNlbEpvYhIsLmdvb2dsZS5j", + "bG91ZC5iYXRjaC52MWFscGhhLkNhbmNlbEpvYlJlcXVlc3QaHS5nb29nbGUu", + "bG9uZ3J1bm5pbmcuT3BlcmF0aW9uIqUBykFcCixnb29nbGUuY2xvdWQuYmF0", + "Y2gudjFhbHBoYS5DYW5jZWxKb2JSZXNwb25zZRIsZ29vZ2xlLmNsb3VkLmJh", + "dGNoLnYxYWxwaGEuT3BlcmF0aW9uTWV0YWRhdGHaQQRuYW1lgtPkkwI5IjQv", + "djFhbHBoYS97bmFtZT1wcm9qZWN0cy8qL2xvY2F0aW9ucy8qL2pvYnMvKn06", + "Y2FuY2VsOgEqEqwBCglVcGRhdGVKb2ISLC5nb29nbGUuY2xvdWQuYmF0Y2gu", + "djFhbHBoYS5VcGRhdGVKb2JSZXF1ZXN0Gh8uZ29vZ2xlLmNsb3VkLmJhdGNo", + "LnYxYWxwaGEuSm9iIlDaQQ9qb2IsdXBkYXRlX21hc2uC0+STAjgyMS92MWFs", + "cGhhL3tqb2IubmFtZT1wcm9qZWN0cy8qL2xvY2F0aW9ucy8qL2pvYnMvKn06", + "A2pvYhKlAQoITGlzdEpvYnMSKy5nb29nbGUuY2xvdWQuYmF0Y2gudjFhbHBo", + "YS5MaXN0Sm9ic1JlcXVlc3QaLC5nb29nbGUuY2xvdWQuYmF0Y2gudjFhbHBo", + "YS5MaXN0Sm9ic1Jlc3BvbnNlIj7aQQZwYXJlbnSC0+STAi8SLS92MWFscGhh", + "L3twYXJlbnQ9cHJvamVjdHMvKi9sb2NhdGlvbnMvKn0vam9icxKqAQoHR2V0", + "VGFzaxIqLmdvb2dsZS5jbG91ZC5iYXRjaC52MWFscGhhLkdldFRhc2tSZXF1", + "ZXN0GiAuZ29vZ2xlLmNsb3VkLmJhdGNoLnYxYWxwaGEuVGFzayJR2kEEbmFt", + "ZYLT5JMCRBJCL3YxYWxwaGEve25hbWU9cHJvamVjdHMvKi9sb2NhdGlvbnMv", + "Ki9qb2JzLyovdGFza0dyb3Vwcy8qL3Rhc2tzLyp9Er0BCglMaXN0VGFza3MS", + "LC5nb29nbGUuY2xvdWQuYmF0Y2gudjFhbHBoYS5MaXN0VGFza3NSZXF1ZXN0", + "Gi0uZ29vZ2xlLmNsb3VkLmJhdGNoLnYxYWxwaGEuTGlzdFRhc2tzUmVzcG9u", + "c2UiU9pBBnBhcmVudILT5JMCRBJCL3YxYWxwaGEve3BhcmVudD1wcm9qZWN0", + "cy8qL2xvY2F0aW9ucy8qL2pvYnMvKi90YXNrR3JvdXBzLyp9L3Rhc2tzEpAC", + "ChdDcmVhdGVSZXNvdXJjZUFsbG93YW5jZRI6Lmdvb2dsZS5jbG91ZC5iYXRj", + "aC52MWFscGhhLkNyZWF0ZVJlc291cmNlQWxsb3dhbmNlUmVxdWVzdBotLmdv", + "b2dsZS5jbG91ZC5iYXRjaC52MWFscGhhLlJlc291cmNlQWxsb3dhbmNlIokB", + "2kEvcGFyZW50LHJlc291cmNlX2FsbG93YW5jZSxyZXNvdXJjZV9hbGxvd2Fu", + "Y2VfaWSC0+STAlEiOy92MWFscGhhL3twYXJlbnQ9cHJvamVjdHMvKi9sb2Nh", + "dGlvbnMvKn0vcmVzb3VyY2VBbGxvd2FuY2VzOhJyZXNvdXJjZV9hbGxvd2Fu", + "Y2USygEKFEdldFJlc291cmNlQWxsb3dhbmNlEjcuZ29vZ2xlLmNsb3VkLmJh", + "dGNoLnYxYWxwaGEuR2V0UmVzb3VyY2VBbGxvd2FuY2VSZXF1ZXN0Gi0uZ29v", + "Z2xlLmNsb3VkLmJhdGNoLnYxYWxwaGEuUmVzb3VyY2VBbGxvd2FuY2UiStpB", + "BG5hbWWC0+STAj0SOy92MWFscGhhL3tuYW1lPXByb2plY3RzLyovbG9jYXRp", + "b25zLyovcmVzb3VyY2VBbGxvd2FuY2VzLyp9EokCChdEZWxldGVSZXNvdXJj", + "ZUFsbG93YW5jZRI6Lmdvb2dsZS5jbG91ZC5iYXRjaC52MWFscGhhLkRlbGV0", + "ZVJlc291cmNlQWxsb3dhbmNlUmVxdWVzdBodLmdvb2dsZS5sb25ncnVubmlu", + "Zy5PcGVyYXRpb24ikgHKQUUKFWdvb2dsZS5wcm90b2J1Zi5FbXB0eRIsZ29v", + "Z2xlLmNsb3VkLmJhdGNoLnYxYWxwaGEuT3BlcmF0aW9uTWV0YWRhdGHaQQRu", + "YW1lgtPkkwI9KjsvdjFhbHBoYS97bmFtZT1wcm9qZWN0cy8qL2xvY2F0aW9u", + "cy8qL3Jlc291cmNlQWxsb3dhbmNlcy8qfRLdAQoWTGlzdFJlc291cmNlQWxs", + "b3dhbmNlcxI5Lmdvb2dsZS5jbG91ZC5iYXRjaC52MWFscGhhLkxpc3RSZXNv", + "dXJjZUFsbG93YW5jZXNSZXF1ZXN0GjouZ29vZ2xlLmNsb3VkLmJhdGNoLnYx", + "YWxwaGEuTGlzdFJlc291cmNlQWxsb3dhbmNlc1Jlc3BvbnNlIkzaQQZwYXJl", + "bnSC0+STAj0SOy92MWFscGhhL3twYXJlbnQ9cHJvamVjdHMvKi9sb2NhdGlv", + "bnMvKn0vcmVzb3VyY2VBbGxvd2FuY2VzEpICChdVcGRhdGVSZXNvdXJjZUFs", + "bG93YW5jZRI6Lmdvb2dsZS5jbG91ZC5iYXRjaC52MWFscGhhLlVwZGF0ZVJl", + "c291cmNlQWxsb3dhbmNlUmVxdWVzdBotLmdvb2dsZS5jbG91ZC5iYXRjaC52", + "MWFscGhhLlJlc291cmNlQWxsb3dhbmNlIosB2kEecmVzb3VyY2VfYWxsb3dh", + "bmNlLHVwZGF0ZV9tYXNrgtPkkwJkMk4vdjFhbHBoYS97cmVzb3VyY2VfYWxs", + "b3dhbmNlLm5hbWU9cHJvamVjdHMvKi9sb2NhdGlvbnMvKi9yZXNvdXJjZUFs", + "bG93YW5jZXMvKn06EnJlc291cmNlX2FsbG93YW5jZRpIykEUYmF0Y2guZ29v", + "Z2xlYXBpcy5jb23SQS5odHRwczovL3d3dy5nb29nbGVhcGlzLmNvbS9hdXRo", + "L2Nsb3VkLXBsYXRmb3JtQsQBCh5jb20uZ29vZ2xlLmNsb3VkLmJhdGNoLnYx", + "YWxwaGFCCkJhdGNoUHJvdG9QAVo0Y2xvdWQuZ29vZ2xlLmNvbS9nby9iYXRj", + "aC9hcGl2MWFscGhhL2JhdGNocGI7YmF0Y2hwYqICA0dDQqoCGkdvb2dsZS5D", + "bG91ZC5CYXRjaC5WMUFscGhhygIaR29vZ2xlXENsb3VkXEJhdGNoXFYxYWxw", + "aGHqAh1Hb29nbGU6OkNsb3VkOjpCYXRjaDo6VjFhbHBoYWIGcHJvdG8z")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { global::Google.Api.AnnotationsReflection.Descriptor, global::Google.Api.ClientReflection.Descriptor, global::Google.Api.FieldBehaviorReflection.Descriptor, global::Google.Api.FieldInfoReflection.Descriptor, global::Google.Api.ResourceReflection.Descriptor, global::Google.Cloud.Batch.V1Alpha.JobReflection.Descriptor, global::Google.Cloud.Batch.V1Alpha.ResourceAllowanceReflection.Descriptor, global::Google.Cloud.Batch.V1Alpha.TaskReflection.Descriptor, global::Google.LongRunning.OperationsReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.EmptyReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.FieldMaskReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.TimestampReflection.Descriptor, }, + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Batch.V1Alpha.CreateJobRequest), global::Google.Cloud.Batch.V1Alpha.CreateJobRequest.Parser, new[]{ "Parent", "JobId", "Job", "RequestId" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Batch.V1Alpha.GetJobRequest), global::Google.Cloud.Batch.V1Alpha.GetJobRequest.Parser, new[]{ "Name" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Batch.V1Alpha.DeleteJobRequest), global::Google.Cloud.Batch.V1Alpha.DeleteJobRequest.Parser, new[]{ "Name", "Reason", "RequestId" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Batch.V1Alpha.CancelJobRequest), global::Google.Cloud.Batch.V1Alpha.CancelJobRequest.Parser, new[]{ "Name", "RequestId" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Batch.V1Alpha.CancelJobResponse), global::Google.Cloud.Batch.V1Alpha.CancelJobResponse.Parser, null, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Batch.V1Alpha.UpdateJobRequest), global::Google.Cloud.Batch.V1Alpha.UpdateJobRequest.Parser, new[]{ "Job", "UpdateMask", "RequestId" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Batch.V1Alpha.ListJobsRequest), global::Google.Cloud.Batch.V1Alpha.ListJobsRequest.Parser, new[]{ "Parent", "Filter", "OrderBy", "PageSize", "PageToken" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Batch.V1Alpha.ListJobsResponse), global::Google.Cloud.Batch.V1Alpha.ListJobsResponse.Parser, new[]{ "Jobs", "NextPageToken", "Unreachable" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Batch.V1Alpha.ListTasksRequest), global::Google.Cloud.Batch.V1Alpha.ListTasksRequest.Parser, new[]{ "Parent", "Filter", "OrderBy", "PageSize", "PageToken" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Batch.V1Alpha.ListTasksResponse), global::Google.Cloud.Batch.V1Alpha.ListTasksResponse.Parser, new[]{ "Tasks", "NextPageToken", "Unreachable" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Batch.V1Alpha.GetTaskRequest), global::Google.Cloud.Batch.V1Alpha.GetTaskRequest.Parser, new[]{ "Name" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Batch.V1Alpha.CreateResourceAllowanceRequest), global::Google.Cloud.Batch.V1Alpha.CreateResourceAllowanceRequest.Parser, new[]{ "Parent", "ResourceAllowanceId", "ResourceAllowance", "RequestId" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Batch.V1Alpha.GetResourceAllowanceRequest), global::Google.Cloud.Batch.V1Alpha.GetResourceAllowanceRequest.Parser, new[]{ "Name" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Batch.V1Alpha.DeleteResourceAllowanceRequest), global::Google.Cloud.Batch.V1Alpha.DeleteResourceAllowanceRequest.Parser, new[]{ "Name", "Reason", "RequestId" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Batch.V1Alpha.ListResourceAllowancesRequest), global::Google.Cloud.Batch.V1Alpha.ListResourceAllowancesRequest.Parser, new[]{ "Parent", "PageSize", "PageToken" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Batch.V1Alpha.ListResourceAllowancesResponse), global::Google.Cloud.Batch.V1Alpha.ListResourceAllowancesResponse.Parser, new[]{ "ResourceAllowances", "NextPageToken", "Unreachable" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Batch.V1Alpha.UpdateResourceAllowanceRequest), global::Google.Cloud.Batch.V1Alpha.UpdateResourceAllowanceRequest.Parser, new[]{ "ResourceAllowance", "UpdateMask", "RequestId" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Batch.V1Alpha.OperationMetadata), global::Google.Cloud.Batch.V1Alpha.OperationMetadata.Parser, new[]{ "CreateTime", "EndTime", "Target", "Verb", "StatusMessage", "RequestedCancellation", "ApiVersion" }, null, null, null, null) + })); + } + #endregion + + } + #region Messages + /// + /// CreateJob Request. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class CreateJobRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new CreateJobRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Batch.V1Alpha.BatchReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CreateJobRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CreateJobRequest(CreateJobRequest other) : this() { + parent_ = other.parent_; + jobId_ = other.jobId_; + job_ = other.job_ != null ? other.job_.Clone() : null; + requestId_ = other.requestId_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CreateJobRequest Clone() { + return new CreateJobRequest(this); + } + + /// Field number for the "parent" field. + public const int ParentFieldNumber = 1; + private string parent_ = ""; + /// + /// Required. The parent resource name where the Job will be created. + /// Pattern: "projects/{project}/locations/{location}" + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Parent { + get { return parent_; } + set { + parent_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "job_id" field. + public const int JobIdFieldNumber = 2; + private string jobId_ = ""; + /// + /// ID used to uniquely identify the Job within its parent scope. + /// This field should contain at most 63 characters and must start with + /// lowercase characters. + /// Only lowercase characters, numbers and '-' are accepted. + /// The '-' character cannot be the first or the last one. + /// A system generated ID will be used if the field is not set. + /// + /// The job.name field in the request will be ignored and the created resource + /// name of the Job will be "{parent}/jobs/{job_id}". + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string JobId { + get { return jobId_; } + set { + jobId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "job" field. + public const int JobFieldNumber = 3; + private global::Google.Cloud.Batch.V1Alpha.Job job_; + /// + /// Required. The Job to create. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Batch.V1Alpha.Job Job { + get { return job_; } + set { + job_ = value; + } + } + + /// Field number for the "request_id" field. + public const int RequestIdFieldNumber = 4; + private string requestId_ = ""; + /// + /// Optional. An optional request ID to identify requests. Specify a unique + /// request ID so that if you must retry your request, the server will know to + /// ignore the request if it has already been completed. The server will + /// guarantee that for at least 60 minutes since the first request. + /// + /// For example, consider a situation where you make an initial request and + /// the request times out. If you make the request again with the same request + /// ID, the server can check if original operation with the same request ID + /// was received, and if so, will ignore the second request. This prevents + /// clients from accidentally creating duplicate commitments. + /// + /// The request ID must be a valid UUID with the exception that zero UUID is + /// not supported (00000000-0000-0000-0000-000000000000). + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string RequestId { + get { return requestId_; } + set { + requestId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as CreateJobRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(CreateJobRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Parent != other.Parent) return false; + if (JobId != other.JobId) return false; + if (!object.Equals(Job, other.Job)) return false; + if (RequestId != other.RequestId) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Parent.Length != 0) hash ^= Parent.GetHashCode(); + if (JobId.Length != 0) hash ^= JobId.GetHashCode(); + if (job_ != null) hash ^= Job.GetHashCode(); + if (RequestId.Length != 0) hash ^= RequestId.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Parent.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Parent); + } + if (JobId.Length != 0) { + output.WriteRawTag(18); + output.WriteString(JobId); + } + if (job_ != null) { + output.WriteRawTag(26); + output.WriteMessage(Job); + } + if (RequestId.Length != 0) { + output.WriteRawTag(34); + output.WriteString(RequestId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Parent.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Parent); + } + if (JobId.Length != 0) { + output.WriteRawTag(18); + output.WriteString(JobId); + } + if (job_ != null) { + output.WriteRawTag(26); + output.WriteMessage(Job); + } + if (RequestId.Length != 0) { + output.WriteRawTag(34); + output.WriteString(RequestId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Parent.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Parent); + } + if (JobId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(JobId); + } + if (job_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Job); + } + if (RequestId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(RequestId); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(CreateJobRequest other) { + if (other == null) { + return; + } + if (other.Parent.Length != 0) { + Parent = other.Parent; + } + if (other.JobId.Length != 0) { + JobId = other.JobId; + } + if (other.job_ != null) { + if (job_ == null) { + Job = new global::Google.Cloud.Batch.V1Alpha.Job(); + } + Job.MergeFrom(other.Job); + } + if (other.RequestId.Length != 0) { + RequestId = other.RequestId; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Parent = input.ReadString(); + break; + } + case 18: { + JobId = input.ReadString(); + break; + } + case 26: { + if (job_ == null) { + Job = new global::Google.Cloud.Batch.V1Alpha.Job(); + } + input.ReadMessage(Job); + break; + } + case 34: { + RequestId = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Parent = input.ReadString(); + break; + } + case 18: { + JobId = input.ReadString(); + break; + } + case 26: { + if (job_ == null) { + Job = new global::Google.Cloud.Batch.V1Alpha.Job(); + } + input.ReadMessage(Job); + break; + } + case 34: { + RequestId = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// GetJob Request. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class GetJobRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GetJobRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Batch.V1Alpha.BatchReflection.Descriptor.MessageTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetJobRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetJobRequest(GetJobRequest other) : this() { + name_ = other.name_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetJobRequest Clone() { + return new GetJobRequest(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; + /// + /// Required. Job name. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as GetJobRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GetJobRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GetJobRequest other) { + if (other == null) { + return; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Name = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Name = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// DeleteJob Request. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class DeleteJobRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DeleteJobRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Batch.V1Alpha.BatchReflection.Descriptor.MessageTypes[2]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeleteJobRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeleteJobRequest(DeleteJobRequest other) : this() { + name_ = other.name_; + reason_ = other.reason_; + requestId_ = other.requestId_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeleteJobRequest Clone() { + return new DeleteJobRequest(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; + /// + /// Job name. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "reason" field. + public const int ReasonFieldNumber = 2; + private string reason_ = ""; + /// + /// Optional. Reason for this deletion. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Reason { + get { return reason_; } + set { + reason_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "request_id" field. + public const int RequestIdFieldNumber = 4; + private string requestId_ = ""; + /// + /// Optional. An optional request ID to identify requests. Specify a unique + /// request ID so that if you must retry your request, the server will know to + /// ignore the request if it has already been completed. The server will + /// guarantee that for at least 60 minutes after the first request. + /// + /// For example, consider a situation where you make an initial request and + /// the request times out. If you make the request again with the same request + /// ID, the server can check if original operation with the same request ID + /// was received, and if so, will ignore the second request. This prevents + /// clients from accidentally creating duplicate commitments. + /// + /// The request ID must be a valid UUID with the exception that zero UUID is + /// not supported (00000000-0000-0000-0000-000000000000). + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string RequestId { + get { return requestId_; } + set { + requestId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as DeleteJobRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(DeleteJobRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + if (Reason != other.Reason) return false; + if (RequestId != other.RequestId) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (Reason.Length != 0) hash ^= Reason.GetHashCode(); + if (RequestId.Length != 0) hash ^= RequestId.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (Reason.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Reason); + } + if (RequestId.Length != 0) { + output.WriteRawTag(34); + output.WriteString(RequestId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (Reason.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Reason); + } + if (RequestId.Length != 0) { + output.WriteRawTag(34); + output.WriteString(RequestId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (Reason.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Reason); + } + if (RequestId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(RequestId); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(DeleteJobRequest other) { + if (other == null) { + return; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + if (other.Reason.Length != 0) { + Reason = other.Reason; + } + if (other.RequestId.Length != 0) { + RequestId = other.RequestId; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + Reason = input.ReadString(); + break; + } + case 34: { + RequestId = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + Reason = input.ReadString(); + break; + } + case 34: { + RequestId = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// CancelJob Request. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class CancelJobRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new CancelJobRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Batch.V1Alpha.BatchReflection.Descriptor.MessageTypes[3]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CancelJobRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CancelJobRequest(CancelJobRequest other) : this() { + name_ = other.name_; + requestId_ = other.requestId_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CancelJobRequest Clone() { + return new CancelJobRequest(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; + /// + /// Required. Job name. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "request_id" field. + public const int RequestIdFieldNumber = 4; + private string requestId_ = ""; + /// + /// Optional. An optional request ID to identify requests. Specify a unique + /// request ID so that if you must retry your request, the server will know to + /// ignore the request if it has already been completed. The server will + /// guarantee that for at least 60 minutes after the first request. + /// + /// For example, consider a situation where you make an initial request and + /// the request times out. If you make the request again with the same request + /// ID, the server can check if original operation with the same request ID + /// was received, and if so, will ignore the second request. This prevents + /// clients from accidentally creating duplicate commitments. + /// + /// The request ID must be a valid UUID with the exception that zero UUID is + /// not supported (00000000-0000-0000-0000-000000000000). + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string RequestId { + get { return requestId_; } + set { + requestId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as CancelJobRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(CancelJobRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + if (RequestId != other.RequestId) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (RequestId.Length != 0) hash ^= RequestId.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (RequestId.Length != 0) { + output.WriteRawTag(34); + output.WriteString(RequestId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (RequestId.Length != 0) { + output.WriteRawTag(34); + output.WriteString(RequestId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (RequestId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(RequestId); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(CancelJobRequest other) { + if (other == null) { + return; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + if (other.RequestId.Length != 0) { + RequestId = other.RequestId; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 34: { + RequestId = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 34: { + RequestId = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// Response to the CancelJob request. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class CancelJobResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new CancelJobResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Batch.V1Alpha.BatchReflection.Descriptor.MessageTypes[4]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CancelJobResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CancelJobResponse(CancelJobResponse other) : this() { + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CancelJobResponse Clone() { + return new CancelJobResponse(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as CancelJobResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(CancelJobResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(CancelJobResponse other) { + if (other == null) { + return; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + } + } + } + #endif + + } + + /// + /// UpdateJob Request. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class UpdateJobRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UpdateJobRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Batch.V1Alpha.BatchReflection.Descriptor.MessageTypes[5]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UpdateJobRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UpdateJobRequest(UpdateJobRequest other) : this() { + job_ = other.job_ != null ? other.job_.Clone() : null; + updateMask_ = other.updateMask_ != null ? other.updateMask_.Clone() : null; + requestId_ = other.requestId_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UpdateJobRequest Clone() { + return new UpdateJobRequest(this); + } + + /// Field number for the "job" field. + public const int JobFieldNumber = 1; + private global::Google.Cloud.Batch.V1Alpha.Job job_; + /// + /// Required. The Job to update. + /// Only fields specified in `updateMask` are updated. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Batch.V1Alpha.Job Job { + get { return job_; } + set { + job_ = value; + } + } + + /// Field number for the "update_mask" field. + public const int UpdateMaskFieldNumber = 2; + private global::Google.Protobuf.WellKnownTypes.FieldMask updateMask_; + /// + /// Required. Mask of fields to update. + /// + /// The `jobs.patch` method can only be used while a job is in the `QUEUED`, + /// `SCHEDULED`, or `RUNNING` state and currently only supports increasing the + /// value of the first `taskCount` field in the job's `taskGroups` field. + /// Therefore, you must set the value of `updateMask` to `taskGroups`. Any + /// other job fields in the update request will be ignored. + /// + /// For example, to update a job's `taskCount` to `2`, set `updateMask` to + /// `taskGroups` and use the following request body: + /// ``` + /// { + /// "taskGroups":[{ + /// "taskCount": 2 + /// }] + /// } + /// ``` + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.WellKnownTypes.FieldMask UpdateMask { + get { return updateMask_; } + set { + updateMask_ = value; + } + } + + /// Field number for the "request_id" field. + public const int RequestIdFieldNumber = 3; + private string requestId_ = ""; + /// + /// Optional. An optional request ID to identify requests. Specify a unique + /// request ID so that if you must retry your request, the server will know to + /// ignore the request if it has already been completed. The server will + /// guarantee that for at least 60 minutes after the first request. + /// + /// For example, consider a situation where you make an initial request and + /// the request times out. If you make the request again with the same request + /// ID, the server can check if original operation with the same request ID + /// was received, and if so, will ignore the second request. This prevents + /// clients from accidentally creating duplicate commitments. + /// + /// The request ID must be a valid UUID with the exception that zero UUID is + /// not supported (00000000-0000-0000-0000-000000000000). + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string RequestId { + get { return requestId_; } + set { + requestId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as UpdateJobRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(UpdateJobRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(Job, other.Job)) return false; + if (!object.Equals(UpdateMask, other.UpdateMask)) return false; + if (RequestId != other.RequestId) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (job_ != null) hash ^= Job.GetHashCode(); + if (updateMask_ != null) hash ^= UpdateMask.GetHashCode(); + if (RequestId.Length != 0) hash ^= RequestId.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (job_ != null) { + output.WriteRawTag(10); + output.WriteMessage(Job); + } + if (updateMask_ != null) { + output.WriteRawTag(18); + output.WriteMessage(UpdateMask); + } + if (RequestId.Length != 0) { + output.WriteRawTag(26); + output.WriteString(RequestId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (job_ != null) { + output.WriteRawTag(10); + output.WriteMessage(Job); + } + if (updateMask_ != null) { + output.WriteRawTag(18); + output.WriteMessage(UpdateMask); + } + if (RequestId.Length != 0) { + output.WriteRawTag(26); + output.WriteString(RequestId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (job_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Job); + } + if (updateMask_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(UpdateMask); + } + if (RequestId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(RequestId); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(UpdateJobRequest other) { + if (other == null) { + return; + } + if (other.job_ != null) { + if (job_ == null) { + Job = new global::Google.Cloud.Batch.V1Alpha.Job(); + } + Job.MergeFrom(other.Job); + } + if (other.updateMask_ != null) { + if (updateMask_ == null) { + UpdateMask = new global::Google.Protobuf.WellKnownTypes.FieldMask(); + } + UpdateMask.MergeFrom(other.UpdateMask); + } + if (other.RequestId.Length != 0) { + RequestId = other.RequestId; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + if (job_ == null) { + Job = new global::Google.Cloud.Batch.V1Alpha.Job(); + } + input.ReadMessage(Job); + break; + } + case 18: { + if (updateMask_ == null) { + UpdateMask = new global::Google.Protobuf.WellKnownTypes.FieldMask(); + } + input.ReadMessage(UpdateMask); + break; + } + case 26: { + RequestId = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + if (job_ == null) { + Job = new global::Google.Cloud.Batch.V1Alpha.Job(); + } + input.ReadMessage(Job); + break; + } + case 18: { + if (updateMask_ == null) { + UpdateMask = new global::Google.Protobuf.WellKnownTypes.FieldMask(); + } + input.ReadMessage(UpdateMask); + break; + } + case 26: { + RequestId = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// ListJob Request. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ListJobsRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ListJobsRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Batch.V1Alpha.BatchReflection.Descriptor.MessageTypes[6]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ListJobsRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ListJobsRequest(ListJobsRequest other) : this() { + parent_ = other.parent_; + filter_ = other.filter_; + orderBy_ = other.orderBy_; + pageSize_ = other.pageSize_; + pageToken_ = other.pageToken_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ListJobsRequest Clone() { + return new ListJobsRequest(this); + } + + /// Field number for the "parent" field. + public const int ParentFieldNumber = 1; + private string parent_ = ""; + /// + /// Parent path. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Parent { + get { return parent_; } + set { + parent_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "filter" field. + public const int FilterFieldNumber = 4; + private string filter_ = ""; + /// + /// List filter. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Filter { + get { return filter_; } + set { + filter_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "order_by" field. + public const int OrderByFieldNumber = 5; + private string orderBy_ = ""; + /// + /// Optional. Sort results. Supported are "name", "name desc", "create_time", + /// and "create_time desc". + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string OrderBy { + get { return orderBy_; } + set { + orderBy_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "page_size" field. + public const int PageSizeFieldNumber = 2; + private int pageSize_; + /// + /// Page size. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int PageSize { + get { return pageSize_; } + set { + pageSize_ = value; + } + } + + /// Field number for the "page_token" field. + public const int PageTokenFieldNumber = 3; + private string pageToken_ = ""; + /// + /// Page token. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string PageToken { + get { return pageToken_; } + set { + pageToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ListJobsRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ListJobsRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Parent != other.Parent) return false; + if (Filter != other.Filter) return false; + if (OrderBy != other.OrderBy) return false; + if (PageSize != other.PageSize) return false; + if (PageToken != other.PageToken) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Parent.Length != 0) hash ^= Parent.GetHashCode(); + if (Filter.Length != 0) hash ^= Filter.GetHashCode(); + if (OrderBy.Length != 0) hash ^= OrderBy.GetHashCode(); + if (PageSize != 0) hash ^= PageSize.GetHashCode(); + if (PageToken.Length != 0) hash ^= PageToken.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Parent.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Parent); + } + if (PageSize != 0) { + output.WriteRawTag(16); + output.WriteInt32(PageSize); + } + if (PageToken.Length != 0) { + output.WriteRawTag(26); + output.WriteString(PageToken); + } + if (Filter.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Filter); + } + if (OrderBy.Length != 0) { + output.WriteRawTag(42); + output.WriteString(OrderBy); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Parent.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Parent); + } + if (PageSize != 0) { + output.WriteRawTag(16); + output.WriteInt32(PageSize); + } + if (PageToken.Length != 0) { + output.WriteRawTag(26); + output.WriteString(PageToken); + } + if (Filter.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Filter); + } + if (OrderBy.Length != 0) { + output.WriteRawTag(42); + output.WriteString(OrderBy); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Parent.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Parent); + } + if (Filter.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Filter); + } + if (OrderBy.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(OrderBy); + } + if (PageSize != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(PageSize); + } + if (PageToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(PageToken); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ListJobsRequest other) { + if (other == null) { + return; + } + if (other.Parent.Length != 0) { + Parent = other.Parent; + } + if (other.Filter.Length != 0) { + Filter = other.Filter; + } + if (other.OrderBy.Length != 0) { + OrderBy = other.OrderBy; + } + if (other.PageSize != 0) { + PageSize = other.PageSize; + } + if (other.PageToken.Length != 0) { + PageToken = other.PageToken; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Parent = input.ReadString(); + break; + } + case 16: { + PageSize = input.ReadInt32(); + break; + } + case 26: { + PageToken = input.ReadString(); + break; + } + case 34: { + Filter = input.ReadString(); + break; + } + case 42: { + OrderBy = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Parent = input.ReadString(); + break; + } + case 16: { + PageSize = input.ReadInt32(); + break; + } + case 26: { + PageToken = input.ReadString(); + break; + } + case 34: { + Filter = input.ReadString(); + break; + } + case 42: { + OrderBy = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// ListJob Response. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ListJobsResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ListJobsResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Batch.V1Alpha.BatchReflection.Descriptor.MessageTypes[7]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ListJobsResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ListJobsResponse(ListJobsResponse other) : this() { + jobs_ = other.jobs_.Clone(); + nextPageToken_ = other.nextPageToken_; + unreachable_ = other.unreachable_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ListJobsResponse Clone() { + return new ListJobsResponse(this); + } + + /// Field number for the "jobs" field. + public const int JobsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_jobs_codec + = pb::FieldCodec.ForMessage(10, global::Google.Cloud.Batch.V1Alpha.Job.Parser); + private readonly pbc::RepeatedField jobs_ = new pbc::RepeatedField(); + /// + /// Jobs. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Jobs { + get { return jobs_; } + } + + /// Field number for the "next_page_token" field. + public const int NextPageTokenFieldNumber = 2; + private string nextPageToken_ = ""; + /// + /// Next page token. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string NextPageToken { + get { return nextPageToken_; } + set { + nextPageToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "unreachable" field. + public const int UnreachableFieldNumber = 3; + private static readonly pb::FieldCodec _repeated_unreachable_codec + = pb::FieldCodec.ForString(26); + private readonly pbc::RepeatedField unreachable_ = new pbc::RepeatedField(); + /// + /// Locations that could not be reached. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Unreachable { + get { return unreachable_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ListJobsResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ListJobsResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!jobs_.Equals(other.jobs_)) return false; + if (NextPageToken != other.NextPageToken) return false; + if(!unreachable_.Equals(other.unreachable_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= jobs_.GetHashCode(); + if (NextPageToken.Length != 0) hash ^= NextPageToken.GetHashCode(); + hash ^= unreachable_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + jobs_.WriteTo(output, _repeated_jobs_codec); + if (NextPageToken.Length != 0) { + output.WriteRawTag(18); + output.WriteString(NextPageToken); + } + unreachable_.WriteTo(output, _repeated_unreachable_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + jobs_.WriteTo(ref output, _repeated_jobs_codec); + if (NextPageToken.Length != 0) { + output.WriteRawTag(18); + output.WriteString(NextPageToken); + } + unreachable_.WriteTo(ref output, _repeated_unreachable_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += jobs_.CalculateSize(_repeated_jobs_codec); + if (NextPageToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(NextPageToken); + } + size += unreachable_.CalculateSize(_repeated_unreachable_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ListJobsResponse other) { + if (other == null) { + return; + } + jobs_.Add(other.jobs_); + if (other.NextPageToken.Length != 0) { + NextPageToken = other.NextPageToken; + } + unreachable_.Add(other.unreachable_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + jobs_.AddEntriesFrom(input, _repeated_jobs_codec); + break; + } + case 18: { + NextPageToken = input.ReadString(); + break; + } + case 26: { + unreachable_.AddEntriesFrom(input, _repeated_unreachable_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + jobs_.AddEntriesFrom(ref input, _repeated_jobs_codec); + break; + } + case 18: { + NextPageToken = input.ReadString(); + break; + } + case 26: { + unreachable_.AddEntriesFrom(ref input, _repeated_unreachable_codec); + break; + } + } + } + } + #endif + + } + + /// + /// ListTasks Request. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ListTasksRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ListTasksRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Batch.V1Alpha.BatchReflection.Descriptor.MessageTypes[8]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ListTasksRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ListTasksRequest(ListTasksRequest other) : this() { + parent_ = other.parent_; + filter_ = other.filter_; + orderBy_ = other.orderBy_; + pageSize_ = other.pageSize_; + pageToken_ = other.pageToken_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ListTasksRequest Clone() { + return new ListTasksRequest(this); + } + + /// Field number for the "parent" field. + public const int ParentFieldNumber = 1; + private string parent_ = ""; + /// + /// Required. Name of a TaskGroup from which Tasks are being requested. + /// Pattern: + /// "projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}" + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Parent { + get { return parent_; } + set { + parent_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "filter" field. + public const int FilterFieldNumber = 2; + private string filter_ = ""; + /// + /// Task filter, null filter matches all Tasks. + /// Filter string should be of the format State=TaskStatus.State e.g. + /// State=RUNNING + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Filter { + get { return filter_; } + set { + filter_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "order_by" field. + public const int OrderByFieldNumber = 5; + private string orderBy_ = ""; + /// + /// Not implemented. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string OrderBy { + get { return orderBy_; } + set { + orderBy_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "page_size" field. + public const int PageSizeFieldNumber = 3; + private int pageSize_; + /// + /// Page size. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int PageSize { + get { return pageSize_; } + set { + pageSize_ = value; + } + } + + /// Field number for the "page_token" field. + public const int PageTokenFieldNumber = 4; + private string pageToken_ = ""; + /// + /// Page token. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string PageToken { + get { return pageToken_; } + set { + pageToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ListTasksRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ListTasksRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Parent != other.Parent) return false; + if (Filter != other.Filter) return false; + if (OrderBy != other.OrderBy) return false; + if (PageSize != other.PageSize) return false; + if (PageToken != other.PageToken) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Parent.Length != 0) hash ^= Parent.GetHashCode(); + if (Filter.Length != 0) hash ^= Filter.GetHashCode(); + if (OrderBy.Length != 0) hash ^= OrderBy.GetHashCode(); + if (PageSize != 0) hash ^= PageSize.GetHashCode(); + if (PageToken.Length != 0) hash ^= PageToken.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Parent.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Parent); + } + if (Filter.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Filter); + } + if (PageSize != 0) { + output.WriteRawTag(24); + output.WriteInt32(PageSize); + } + if (PageToken.Length != 0) { + output.WriteRawTag(34); + output.WriteString(PageToken); + } + if (OrderBy.Length != 0) { + output.WriteRawTag(42); + output.WriteString(OrderBy); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Parent.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Parent); + } + if (Filter.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Filter); + } + if (PageSize != 0) { + output.WriteRawTag(24); + output.WriteInt32(PageSize); + } + if (PageToken.Length != 0) { + output.WriteRawTag(34); + output.WriteString(PageToken); + } + if (OrderBy.Length != 0) { + output.WriteRawTag(42); + output.WriteString(OrderBy); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Parent.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Parent); + } + if (Filter.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Filter); + } + if (OrderBy.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(OrderBy); + } + if (PageSize != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(PageSize); + } + if (PageToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(PageToken); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ListTasksRequest other) { + if (other == null) { + return; + } + if (other.Parent.Length != 0) { + Parent = other.Parent; + } + if (other.Filter.Length != 0) { + Filter = other.Filter; + } + if (other.OrderBy.Length != 0) { + OrderBy = other.OrderBy; + } + if (other.PageSize != 0) { + PageSize = other.PageSize; + } + if (other.PageToken.Length != 0) { + PageToken = other.PageToken; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Parent = input.ReadString(); + break; + } + case 18: { + Filter = input.ReadString(); + break; + } + case 24: { + PageSize = input.ReadInt32(); + break; + } + case 34: { + PageToken = input.ReadString(); + break; + } + case 42: { + OrderBy = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Parent = input.ReadString(); + break; + } + case 18: { + Filter = input.ReadString(); + break; + } + case 24: { + PageSize = input.ReadInt32(); + break; + } + case 34: { + PageToken = input.ReadString(); + break; + } + case 42: { + OrderBy = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// ListTasks Response. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ListTasksResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ListTasksResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Batch.V1Alpha.BatchReflection.Descriptor.MessageTypes[9]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ListTasksResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ListTasksResponse(ListTasksResponse other) : this() { + tasks_ = other.tasks_.Clone(); + nextPageToken_ = other.nextPageToken_; + unreachable_ = other.unreachable_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ListTasksResponse Clone() { + return new ListTasksResponse(this); + } + + /// Field number for the "tasks" field. + public const int TasksFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_tasks_codec + = pb::FieldCodec.ForMessage(10, global::Google.Cloud.Batch.V1Alpha.Task.Parser); + private readonly pbc::RepeatedField tasks_ = new pbc::RepeatedField(); + /// + /// Tasks. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Tasks { + get { return tasks_; } + } + + /// Field number for the "next_page_token" field. + public const int NextPageTokenFieldNumber = 2; + private string nextPageToken_ = ""; + /// + /// Next page token. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string NextPageToken { + get { return nextPageToken_; } + set { + nextPageToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "unreachable" field. + public const int UnreachableFieldNumber = 3; + private static readonly pb::FieldCodec _repeated_unreachable_codec + = pb::FieldCodec.ForString(26); + private readonly pbc::RepeatedField unreachable_ = new pbc::RepeatedField(); + /// + /// Locations that could not be reached. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Unreachable { + get { return unreachable_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ListTasksResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ListTasksResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!tasks_.Equals(other.tasks_)) return false; + if (NextPageToken != other.NextPageToken) return false; + if(!unreachable_.Equals(other.unreachable_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= tasks_.GetHashCode(); + if (NextPageToken.Length != 0) hash ^= NextPageToken.GetHashCode(); + hash ^= unreachable_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + tasks_.WriteTo(output, _repeated_tasks_codec); + if (NextPageToken.Length != 0) { + output.WriteRawTag(18); + output.WriteString(NextPageToken); + } + unreachable_.WriteTo(output, _repeated_unreachable_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + tasks_.WriteTo(ref output, _repeated_tasks_codec); + if (NextPageToken.Length != 0) { + output.WriteRawTag(18); + output.WriteString(NextPageToken); + } + unreachable_.WriteTo(ref output, _repeated_unreachable_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += tasks_.CalculateSize(_repeated_tasks_codec); + if (NextPageToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(NextPageToken); + } + size += unreachable_.CalculateSize(_repeated_unreachable_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ListTasksResponse other) { + if (other == null) { + return; + } + tasks_.Add(other.tasks_); + if (other.NextPageToken.Length != 0) { + NextPageToken = other.NextPageToken; + } + unreachable_.Add(other.unreachable_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + tasks_.AddEntriesFrom(input, _repeated_tasks_codec); + break; + } + case 18: { + NextPageToken = input.ReadString(); + break; + } + case 26: { + unreachable_.AddEntriesFrom(input, _repeated_unreachable_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + tasks_.AddEntriesFrom(ref input, _repeated_tasks_codec); + break; + } + case 18: { + NextPageToken = input.ReadString(); + break; + } + case 26: { + unreachable_.AddEntriesFrom(ref input, _repeated_unreachable_codec); + break; + } + } + } + } + #endif + + } + + /// + /// Request for a single Task by name. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class GetTaskRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GetTaskRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Batch.V1Alpha.BatchReflection.Descriptor.MessageTypes[10]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetTaskRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetTaskRequest(GetTaskRequest other) : this() { + name_ = other.name_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetTaskRequest Clone() { + return new GetTaskRequest(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; + /// + /// Required. Task name. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as GetTaskRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GetTaskRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GetTaskRequest other) { + if (other == null) { + return; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Name = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Name = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// CreateResourceAllowance Request. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class CreateResourceAllowanceRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new CreateResourceAllowanceRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Batch.V1Alpha.BatchReflection.Descriptor.MessageTypes[11]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CreateResourceAllowanceRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CreateResourceAllowanceRequest(CreateResourceAllowanceRequest other) : this() { + parent_ = other.parent_; + resourceAllowanceId_ = other.resourceAllowanceId_; + resourceAllowance_ = other.resourceAllowance_ != null ? other.resourceAllowance_.Clone() : null; + requestId_ = other.requestId_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CreateResourceAllowanceRequest Clone() { + return new CreateResourceAllowanceRequest(this); + } + + /// Field number for the "parent" field. + public const int ParentFieldNumber = 1; + private string parent_ = ""; + /// + /// Required. The parent resource name where the ResourceAllowance will be + /// created. Pattern: "projects/{project}/locations/{location}" + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Parent { + get { return parent_; } + set { + parent_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "resource_allowance_id" field. + public const int ResourceAllowanceIdFieldNumber = 2; + private string resourceAllowanceId_ = ""; + /// + /// ID used to uniquely identify the ResourceAllowance within its parent scope. + /// This field should contain at most 63 characters and must start with + /// lowercase characters. + /// Only lowercase characters, numbers and '-' are accepted. + /// The '-' character cannot be the first or the last one. + /// A system generated ID will be used if the field is not set. + /// + /// The resource_allowance.name field in the request will be ignored and the + /// created resource name of the ResourceAllowance will be + /// "{parent}/resourceAllowances/{resource_allowance_id}". + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string ResourceAllowanceId { + get { return resourceAllowanceId_; } + set { + resourceAllowanceId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "resource_allowance" field. + public const int ResourceAllowanceFieldNumber = 3; + private global::Google.Cloud.Batch.V1Alpha.ResourceAllowance resourceAllowance_; + /// + /// Required. The ResourceAllowance to create. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Batch.V1Alpha.ResourceAllowance ResourceAllowance { + get { return resourceAllowance_; } + set { + resourceAllowance_ = value; + } + } + + /// Field number for the "request_id" field. + public const int RequestIdFieldNumber = 4; + private string requestId_ = ""; + /// + /// Optional. An optional request ID to identify requests. Specify a unique + /// request ID so that if you must retry your request, the server will know to + /// ignore the request if it has already been completed. The server will + /// guarantee that for at least 60 minutes since the first request. + /// + /// For example, consider a situation where you make an initial request and + /// the request times out. If you make the request again with the same request + /// ID, the server can check if original operation with the same request ID + /// was received, and if so, will ignore the second request. This prevents + /// clients from accidentally creating duplicate commitments. + /// + /// The request ID must be a valid UUID with the exception that zero UUID is + /// not supported (00000000-0000-0000-0000-000000000000). + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string RequestId { + get { return requestId_; } + set { + requestId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as CreateResourceAllowanceRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(CreateResourceAllowanceRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Parent != other.Parent) return false; + if (ResourceAllowanceId != other.ResourceAllowanceId) return false; + if (!object.Equals(ResourceAllowance, other.ResourceAllowance)) return false; + if (RequestId != other.RequestId) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Parent.Length != 0) hash ^= Parent.GetHashCode(); + if (ResourceAllowanceId.Length != 0) hash ^= ResourceAllowanceId.GetHashCode(); + if (resourceAllowance_ != null) hash ^= ResourceAllowance.GetHashCode(); + if (RequestId.Length != 0) hash ^= RequestId.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Parent.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Parent); + } + if (ResourceAllowanceId.Length != 0) { + output.WriteRawTag(18); + output.WriteString(ResourceAllowanceId); + } + if (resourceAllowance_ != null) { + output.WriteRawTag(26); + output.WriteMessage(ResourceAllowance); + } + if (RequestId.Length != 0) { + output.WriteRawTag(34); + output.WriteString(RequestId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Parent.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Parent); + } + if (ResourceAllowanceId.Length != 0) { + output.WriteRawTag(18); + output.WriteString(ResourceAllowanceId); + } + if (resourceAllowance_ != null) { + output.WriteRawTag(26); + output.WriteMessage(ResourceAllowance); + } + if (RequestId.Length != 0) { + output.WriteRawTag(34); + output.WriteString(RequestId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Parent.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Parent); + } + if (ResourceAllowanceId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ResourceAllowanceId); + } + if (resourceAllowance_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ResourceAllowance); + } + if (RequestId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(RequestId); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(CreateResourceAllowanceRequest other) { + if (other == null) { + return; + } + if (other.Parent.Length != 0) { + Parent = other.Parent; + } + if (other.ResourceAllowanceId.Length != 0) { + ResourceAllowanceId = other.ResourceAllowanceId; + } + if (other.resourceAllowance_ != null) { + if (resourceAllowance_ == null) { + ResourceAllowance = new global::Google.Cloud.Batch.V1Alpha.ResourceAllowance(); + } + ResourceAllowance.MergeFrom(other.ResourceAllowance); + } + if (other.RequestId.Length != 0) { + RequestId = other.RequestId; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Parent = input.ReadString(); + break; + } + case 18: { + ResourceAllowanceId = input.ReadString(); + break; + } + case 26: { + if (resourceAllowance_ == null) { + ResourceAllowance = new global::Google.Cloud.Batch.V1Alpha.ResourceAllowance(); + } + input.ReadMessage(ResourceAllowance); + break; + } + case 34: { + RequestId = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Parent = input.ReadString(); + break; + } + case 18: { + ResourceAllowanceId = input.ReadString(); + break; + } + case 26: { + if (resourceAllowance_ == null) { + ResourceAllowance = new global::Google.Cloud.Batch.V1Alpha.ResourceAllowance(); + } + input.ReadMessage(ResourceAllowance); + break; + } + case 34: { + RequestId = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// GetResourceAllowance Request. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class GetResourceAllowanceRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GetResourceAllowanceRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Batch.V1Alpha.BatchReflection.Descriptor.MessageTypes[12]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetResourceAllowanceRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetResourceAllowanceRequest(GetResourceAllowanceRequest other) : this() { + name_ = other.name_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetResourceAllowanceRequest Clone() { + return new GetResourceAllowanceRequest(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; + /// + /// Required. ResourceAllowance name. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as GetResourceAllowanceRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GetResourceAllowanceRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GetResourceAllowanceRequest other) { + if (other == null) { + return; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Name = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Name = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// DeleteResourceAllowance Request. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class DeleteResourceAllowanceRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DeleteResourceAllowanceRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Batch.V1Alpha.BatchReflection.Descriptor.MessageTypes[13]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeleteResourceAllowanceRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeleteResourceAllowanceRequest(DeleteResourceAllowanceRequest other) : this() { + name_ = other.name_; + reason_ = other.reason_; + requestId_ = other.requestId_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeleteResourceAllowanceRequest Clone() { + return new DeleteResourceAllowanceRequest(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; + /// + /// Required. ResourceAllowance name. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "reason" field. + public const int ReasonFieldNumber = 2; + private string reason_ = ""; + /// + /// Optional. Reason for this deletion. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Reason { + get { return reason_; } + set { + reason_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "request_id" field. + public const int RequestIdFieldNumber = 4; + private string requestId_ = ""; + /// + /// Optional. An optional request ID to identify requests. Specify a unique + /// request ID so that if you must retry your request, the server will know to + /// ignore the request if it has already been completed. The server will + /// guarantee that for at least 60 minutes after the first request. + /// + /// For example, consider a situation where you make an initial request and + /// the request times out. If you make the request again with the same request + /// ID, the server can check if original operation with the same request ID + /// was received, and if so, will ignore the second request. This prevents + /// clients from accidentally creating duplicate commitments. + /// + /// The request ID must be a valid UUID with the exception that zero UUID is + /// not supported (00000000-0000-0000-0000-000000000000). + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string RequestId { + get { return requestId_; } + set { + requestId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as DeleteResourceAllowanceRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(DeleteResourceAllowanceRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + if (Reason != other.Reason) return false; + if (RequestId != other.RequestId) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (Reason.Length != 0) hash ^= Reason.GetHashCode(); + if (RequestId.Length != 0) hash ^= RequestId.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (Reason.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Reason); + } + if (RequestId.Length != 0) { + output.WriteRawTag(34); + output.WriteString(RequestId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (Reason.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Reason); + } + if (RequestId.Length != 0) { + output.WriteRawTag(34); + output.WriteString(RequestId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (Reason.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Reason); + } + if (RequestId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(RequestId); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(DeleteResourceAllowanceRequest other) { + if (other == null) { + return; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + if (other.Reason.Length != 0) { + Reason = other.Reason; + } + if (other.RequestId.Length != 0) { + RequestId = other.RequestId; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + Reason = input.ReadString(); + break; + } + case 34: { + RequestId = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + Reason = input.ReadString(); + break; + } + case 34: { + RequestId = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// ListResourceAllowances Request. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ListResourceAllowancesRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ListResourceAllowancesRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Batch.V1Alpha.BatchReflection.Descriptor.MessageTypes[14]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ListResourceAllowancesRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ListResourceAllowancesRequest(ListResourceAllowancesRequest other) : this() { + parent_ = other.parent_; + pageSize_ = other.pageSize_; + pageToken_ = other.pageToken_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ListResourceAllowancesRequest Clone() { + return new ListResourceAllowancesRequest(this); + } + + /// Field number for the "parent" field. + public const int ParentFieldNumber = 1; + private string parent_ = ""; + /// + /// Required. Parent path. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Parent { + get { return parent_; } + set { + parent_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "page_size" field. + public const int PageSizeFieldNumber = 2; + private int pageSize_; + /// + /// Optional. Page size. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int PageSize { + get { return pageSize_; } + set { + pageSize_ = value; + } + } + + /// Field number for the "page_token" field. + public const int PageTokenFieldNumber = 3; + private string pageToken_ = ""; + /// + /// Optional. Page token. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string PageToken { + get { return pageToken_; } + set { + pageToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ListResourceAllowancesRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ListResourceAllowancesRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Parent != other.Parent) return false; + if (PageSize != other.PageSize) return false; + if (PageToken != other.PageToken) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Parent.Length != 0) hash ^= Parent.GetHashCode(); + if (PageSize != 0) hash ^= PageSize.GetHashCode(); + if (PageToken.Length != 0) hash ^= PageToken.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Parent.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Parent); + } + if (PageSize != 0) { + output.WriteRawTag(16); + output.WriteInt32(PageSize); + } + if (PageToken.Length != 0) { + output.WriteRawTag(26); + output.WriteString(PageToken); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Parent.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Parent); + } + if (PageSize != 0) { + output.WriteRawTag(16); + output.WriteInt32(PageSize); + } + if (PageToken.Length != 0) { + output.WriteRawTag(26); + output.WriteString(PageToken); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Parent.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Parent); + } + if (PageSize != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(PageSize); + } + if (PageToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(PageToken); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ListResourceAllowancesRequest other) { + if (other == null) { + return; + } + if (other.Parent.Length != 0) { + Parent = other.Parent; + } + if (other.PageSize != 0) { + PageSize = other.PageSize; + } + if (other.PageToken.Length != 0) { + PageToken = other.PageToken; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Parent = input.ReadString(); + break; + } + case 16: { + PageSize = input.ReadInt32(); + break; + } + case 26: { + PageToken = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Parent = input.ReadString(); + break; + } + case 16: { + PageSize = input.ReadInt32(); + break; + } + case 26: { + PageToken = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// ListResourceAllowances Response. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ListResourceAllowancesResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ListResourceAllowancesResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Batch.V1Alpha.BatchReflection.Descriptor.MessageTypes[15]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ListResourceAllowancesResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ListResourceAllowancesResponse(ListResourceAllowancesResponse other) : this() { + resourceAllowances_ = other.resourceAllowances_.Clone(); + nextPageToken_ = other.nextPageToken_; + unreachable_ = other.unreachable_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ListResourceAllowancesResponse Clone() { + return new ListResourceAllowancesResponse(this); + } + + /// Field number for the "resource_allowances" field. + public const int ResourceAllowancesFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_resourceAllowances_codec + = pb::FieldCodec.ForMessage(10, global::Google.Cloud.Batch.V1Alpha.ResourceAllowance.Parser); + private readonly pbc::RepeatedField resourceAllowances_ = new pbc::RepeatedField(); + /// + /// ResourceAllowances. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField ResourceAllowances { + get { return resourceAllowances_; } + } + + /// Field number for the "next_page_token" field. + public const int NextPageTokenFieldNumber = 2; + private string nextPageToken_ = ""; + /// + /// Next page token. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string NextPageToken { + get { return nextPageToken_; } + set { + nextPageToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "unreachable" field. + public const int UnreachableFieldNumber = 3; + private static readonly pb::FieldCodec _repeated_unreachable_codec + = pb::FieldCodec.ForString(26); + private readonly pbc::RepeatedField unreachable_ = new pbc::RepeatedField(); + /// + /// Locations that could not be reached. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Unreachable { + get { return unreachable_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ListResourceAllowancesResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ListResourceAllowancesResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!resourceAllowances_.Equals(other.resourceAllowances_)) return false; + if (NextPageToken != other.NextPageToken) return false; + if(!unreachable_.Equals(other.unreachable_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= resourceAllowances_.GetHashCode(); + if (NextPageToken.Length != 0) hash ^= NextPageToken.GetHashCode(); + hash ^= unreachable_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + resourceAllowances_.WriteTo(output, _repeated_resourceAllowances_codec); + if (NextPageToken.Length != 0) { + output.WriteRawTag(18); + output.WriteString(NextPageToken); + } + unreachable_.WriteTo(output, _repeated_unreachable_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + resourceAllowances_.WriteTo(ref output, _repeated_resourceAllowances_codec); + if (NextPageToken.Length != 0) { + output.WriteRawTag(18); + output.WriteString(NextPageToken); + } + unreachable_.WriteTo(ref output, _repeated_unreachable_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += resourceAllowances_.CalculateSize(_repeated_resourceAllowances_codec); + if (NextPageToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(NextPageToken); + } + size += unreachable_.CalculateSize(_repeated_unreachable_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ListResourceAllowancesResponse other) { + if (other == null) { + return; + } + resourceAllowances_.Add(other.resourceAllowances_); + if (other.NextPageToken.Length != 0) { + NextPageToken = other.NextPageToken; + } + unreachable_.Add(other.unreachable_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + resourceAllowances_.AddEntriesFrom(input, _repeated_resourceAllowances_codec); + break; + } + case 18: { + NextPageToken = input.ReadString(); + break; + } + case 26: { + unreachable_.AddEntriesFrom(input, _repeated_unreachable_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + resourceAllowances_.AddEntriesFrom(ref input, _repeated_resourceAllowances_codec); + break; + } + case 18: { + NextPageToken = input.ReadString(); + break; + } + case 26: { + unreachable_.AddEntriesFrom(ref input, _repeated_unreachable_codec); + break; + } + } + } + } + #endif + + } + + /// + /// UpdateResourceAllowance Request. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class UpdateResourceAllowanceRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UpdateResourceAllowanceRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Batch.V1Alpha.BatchReflection.Descriptor.MessageTypes[16]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UpdateResourceAllowanceRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UpdateResourceAllowanceRequest(UpdateResourceAllowanceRequest other) : this() { + resourceAllowance_ = other.resourceAllowance_ != null ? other.resourceAllowance_.Clone() : null; + updateMask_ = other.updateMask_ != null ? other.updateMask_.Clone() : null; + requestId_ = other.requestId_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UpdateResourceAllowanceRequest Clone() { + return new UpdateResourceAllowanceRequest(this); + } + + /// Field number for the "resource_allowance" field. + public const int ResourceAllowanceFieldNumber = 1; + private global::Google.Cloud.Batch.V1Alpha.ResourceAllowance resourceAllowance_; + /// + /// Required. The ResourceAllowance to update. + /// Update description. + /// Only fields specified in `update_mask` are updated. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Batch.V1Alpha.ResourceAllowance ResourceAllowance { + get { return resourceAllowance_; } + set { + resourceAllowance_ = value; + } + } + + /// Field number for the "update_mask" field. + public const int UpdateMaskFieldNumber = 2; + private global::Google.Protobuf.WellKnownTypes.FieldMask updateMask_; + /// + /// Required. Mask of fields to update. + /// + /// Field mask is used to specify the fields to be overwritten in the + /// ResourceAllowance resource by the update. + /// The fields specified in the update_mask are relative to the resource, not + /// the full request. A field will be overwritten if it is in the mask. If the + /// user does not provide a mask then all fields will be overwritten. + /// + /// UpdateResourceAllowance request now only supports update on `limit` field. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.WellKnownTypes.FieldMask UpdateMask { + get { return updateMask_; } + set { + updateMask_ = value; + } + } + + /// Field number for the "request_id" field. + public const int RequestIdFieldNumber = 3; + private string requestId_ = ""; + /// + /// Optional. An optional request ID to identify requests. Specify a unique + /// request ID so that if you must retry your request, the server will know to + /// ignore the request if it has already been completed. The server will + /// guarantee that for at least 60 minutes since the first request. + /// + /// For example, consider a situation where you make an initial request and + /// the request times out. If you make the request again with the same request + /// ID, the server can check if original operation with the same request ID + /// was received, and if so, will ignore the second request. This prevents + /// clients from accidentally creating duplicate commitments. + /// + /// The request ID must be a valid UUID with the exception that zero UUID is + /// not supported (00000000-0000-0000-0000-000000000000). + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string RequestId { + get { return requestId_; } + set { + requestId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as UpdateResourceAllowanceRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(UpdateResourceAllowanceRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(ResourceAllowance, other.ResourceAllowance)) return false; + if (!object.Equals(UpdateMask, other.UpdateMask)) return false; + if (RequestId != other.RequestId) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (resourceAllowance_ != null) hash ^= ResourceAllowance.GetHashCode(); + if (updateMask_ != null) hash ^= UpdateMask.GetHashCode(); + if (RequestId.Length != 0) hash ^= RequestId.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (resourceAllowance_ != null) { + output.WriteRawTag(10); + output.WriteMessage(ResourceAllowance); + } + if (updateMask_ != null) { + output.WriteRawTag(18); + output.WriteMessage(UpdateMask); + } + if (RequestId.Length != 0) { + output.WriteRawTag(26); + output.WriteString(RequestId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (resourceAllowance_ != null) { + output.WriteRawTag(10); + output.WriteMessage(ResourceAllowance); + } + if (updateMask_ != null) { + output.WriteRawTag(18); + output.WriteMessage(UpdateMask); + } + if (RequestId.Length != 0) { + output.WriteRawTag(26); + output.WriteString(RequestId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (resourceAllowance_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ResourceAllowance); + } + if (updateMask_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(UpdateMask); + } + if (RequestId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(RequestId); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(UpdateResourceAllowanceRequest other) { + if (other == null) { + return; + } + if (other.resourceAllowance_ != null) { + if (resourceAllowance_ == null) { + ResourceAllowance = new global::Google.Cloud.Batch.V1Alpha.ResourceAllowance(); + } + ResourceAllowance.MergeFrom(other.ResourceAllowance); + } + if (other.updateMask_ != null) { + if (updateMask_ == null) { + UpdateMask = new global::Google.Protobuf.WellKnownTypes.FieldMask(); + } + UpdateMask.MergeFrom(other.UpdateMask); + } + if (other.RequestId.Length != 0) { + RequestId = other.RequestId; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + if (resourceAllowance_ == null) { + ResourceAllowance = new global::Google.Cloud.Batch.V1Alpha.ResourceAllowance(); + } + input.ReadMessage(ResourceAllowance); + break; + } + case 18: { + if (updateMask_ == null) { + UpdateMask = new global::Google.Protobuf.WellKnownTypes.FieldMask(); + } + input.ReadMessage(UpdateMask); + break; + } + case 26: { + RequestId = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + if (resourceAllowance_ == null) { + ResourceAllowance = new global::Google.Cloud.Batch.V1Alpha.ResourceAllowance(); + } + input.ReadMessage(ResourceAllowance); + break; + } + case 18: { + if (updateMask_ == null) { + UpdateMask = new global::Google.Protobuf.WellKnownTypes.FieldMask(); + } + input.ReadMessage(UpdateMask); + break; + } + case 26: { + RequestId = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// Represents the metadata of the long-running operation. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class OperationMetadata : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new OperationMetadata()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Batch.V1Alpha.BatchReflection.Descriptor.MessageTypes[17]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public OperationMetadata() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public OperationMetadata(OperationMetadata other) : this() { + createTime_ = other.createTime_ != null ? other.createTime_.Clone() : null; + endTime_ = other.endTime_ != null ? other.endTime_.Clone() : null; + target_ = other.target_; + verb_ = other.verb_; + statusMessage_ = other.statusMessage_; + requestedCancellation_ = other.requestedCancellation_; + apiVersion_ = other.apiVersion_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public OperationMetadata Clone() { + return new OperationMetadata(this); + } + + /// Field number for the "create_time" field. + public const int CreateTimeFieldNumber = 1; + private global::Google.Protobuf.WellKnownTypes.Timestamp createTime_; + /// + /// Output only. The time the operation was created. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.WellKnownTypes.Timestamp CreateTime { + get { return createTime_; } + set { + createTime_ = value; + } + } + + /// Field number for the "end_time" field. + public const int EndTimeFieldNumber = 2; + private global::Google.Protobuf.WellKnownTypes.Timestamp endTime_; + /// + /// Output only. The time the operation finished running. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.WellKnownTypes.Timestamp EndTime { + get { return endTime_; } + set { + endTime_ = value; + } + } + + /// Field number for the "target" field. + public const int TargetFieldNumber = 3; + private string target_ = ""; + /// + /// Output only. Server-defined resource path for the target of the operation. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Target { + get { return target_; } + set { + target_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "verb" field. + public const int VerbFieldNumber = 4; + private string verb_ = ""; + /// + /// Output only. Name of the verb executed by the operation. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Verb { + get { return verb_; } + set { + verb_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "status_message" field. + public const int StatusMessageFieldNumber = 5; + private string statusMessage_ = ""; + /// + /// Output only. Human-readable status of the operation, if any. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string StatusMessage { + get { return statusMessage_; } + set { + statusMessage_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "requested_cancellation" field. + public const int RequestedCancellationFieldNumber = 6; + private bool requestedCancellation_; + /// + /// Output only. Identifies whether the user has requested cancellation + /// of the operation. Operations that have successfully been cancelled + /// have [Operation.error][] value with a + /// [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + /// `Code.CANCELLED`. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool RequestedCancellation { + get { return requestedCancellation_; } + set { + requestedCancellation_ = value; + } + } + + /// Field number for the "api_version" field. + public const int ApiVersionFieldNumber = 7; + private string apiVersion_ = ""; + /// + /// Output only. API version used to start the operation. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string ApiVersion { + get { return apiVersion_; } + set { + apiVersion_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as OperationMetadata); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(OperationMetadata other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(CreateTime, other.CreateTime)) return false; + if (!object.Equals(EndTime, other.EndTime)) return false; + if (Target != other.Target) return false; + if (Verb != other.Verb) return false; + if (StatusMessage != other.StatusMessage) return false; + if (RequestedCancellation != other.RequestedCancellation) return false; + if (ApiVersion != other.ApiVersion) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (createTime_ != null) hash ^= CreateTime.GetHashCode(); + if (endTime_ != null) hash ^= EndTime.GetHashCode(); + if (Target.Length != 0) hash ^= Target.GetHashCode(); + if (Verb.Length != 0) hash ^= Verb.GetHashCode(); + if (StatusMessage.Length != 0) hash ^= StatusMessage.GetHashCode(); + if (RequestedCancellation != false) hash ^= RequestedCancellation.GetHashCode(); + if (ApiVersion.Length != 0) hash ^= ApiVersion.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (createTime_ != null) { + output.WriteRawTag(10); + output.WriteMessage(CreateTime); + } + if (endTime_ != null) { + output.WriteRawTag(18); + output.WriteMessage(EndTime); + } + if (Target.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Target); + } + if (Verb.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Verb); + } + if (StatusMessage.Length != 0) { + output.WriteRawTag(42); + output.WriteString(StatusMessage); + } + if (RequestedCancellation != false) { + output.WriteRawTag(48); + output.WriteBool(RequestedCancellation); + } + if (ApiVersion.Length != 0) { + output.WriteRawTag(58); + output.WriteString(ApiVersion); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (createTime_ != null) { + output.WriteRawTag(10); + output.WriteMessage(CreateTime); + } + if (endTime_ != null) { + output.WriteRawTag(18); + output.WriteMessage(EndTime); + } + if (Target.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Target); + } + if (Verb.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Verb); + } + if (StatusMessage.Length != 0) { + output.WriteRawTag(42); + output.WriteString(StatusMessage); + } + if (RequestedCancellation != false) { + output.WriteRawTag(48); + output.WriteBool(RequestedCancellation); + } + if (ApiVersion.Length != 0) { + output.WriteRawTag(58); + output.WriteString(ApiVersion); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (createTime_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(CreateTime); + } + if (endTime_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(EndTime); + } + if (Target.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Target); + } + if (Verb.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Verb); + } + if (StatusMessage.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(StatusMessage); + } + if (RequestedCancellation != false) { + size += 1 + 1; + } + if (ApiVersion.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ApiVersion); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(OperationMetadata other) { + if (other == null) { + return; + } + if (other.createTime_ != null) { + if (createTime_ == null) { + CreateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + CreateTime.MergeFrom(other.CreateTime); + } + if (other.endTime_ != null) { + if (endTime_ == null) { + EndTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + EndTime.MergeFrom(other.EndTime); + } + if (other.Target.Length != 0) { + Target = other.Target; + } + if (other.Verb.Length != 0) { + Verb = other.Verb; + } + if (other.StatusMessage.Length != 0) { + StatusMessage = other.StatusMessage; + } + if (other.RequestedCancellation != false) { + RequestedCancellation = other.RequestedCancellation; + } + if (other.ApiVersion.Length != 0) { + ApiVersion = other.ApiVersion; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + if (createTime_ == null) { + CreateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + input.ReadMessage(CreateTime); + break; + } + case 18: { + if (endTime_ == null) { + EndTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + input.ReadMessage(EndTime); + break; + } + case 26: { + Target = input.ReadString(); + break; + } + case 34: { + Verb = input.ReadString(); + break; + } + case 42: { + StatusMessage = input.ReadString(); + break; + } + case 48: { + RequestedCancellation = input.ReadBool(); + break; + } + case 58: { + ApiVersion = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + if (createTime_ == null) { + CreateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + input.ReadMessage(CreateTime); + break; + } + case 18: { + if (endTime_ == null) { + EndTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + input.ReadMessage(EndTime); + break; + } + case 26: { + Target = input.ReadString(); + break; + } + case 34: { + Verb = input.ReadString(); + break; + } + case 42: { + StatusMessage = input.ReadString(); + break; + } + case 48: { + RequestedCancellation = input.ReadBool(); + break; + } + case 58: { + ApiVersion = input.ReadString(); + break; + } + } + } + } + #endif + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha/BatchGrpc.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha/BatchGrpc.g.cs new file mode 100755 index 000000000000..7971a2a9e86d --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha/BatchGrpc.g.cs @@ -0,0 +1,1085 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/batch/v1alpha/batch.proto +// +// Original file comments: +// 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 +// +// http://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. +// +#pragma warning disable 0414, 1591, 8981, 0612 +#region Designer generated code + +using grpc = global::Grpc.Core; + +namespace Google.Cloud.Batch.V1Alpha { + /// + /// Google Batch Service. + /// The service manages user submitted batch jobs and allocates Google Compute + /// Engine VM instances to run the jobs. + /// + public static partial class BatchService + { + static readonly string __ServiceName = "google.cloud.batch.v1alpha.BatchService"; + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static void __Helper_SerializeMessage(global::Google.Protobuf.IMessage message, grpc::SerializationContext context) + { + #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION + if (message is global::Google.Protobuf.IBufferMessage) + { + context.SetPayloadLength(message.CalculateSize()); + global::Google.Protobuf.MessageExtensions.WriteTo(message, context.GetBufferWriter()); + context.Complete(); + return; + } + #endif + context.Complete(global::Google.Protobuf.MessageExtensions.ToByteArray(message)); + } + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static class __Helper_MessageCache + { + public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T)); + } + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static T __Helper_DeserializeMessage(grpc::DeserializationContext context, global::Google.Protobuf.MessageParser parser) where T : global::Google.Protobuf.IMessage + { + #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION + if (__Helper_MessageCache.IsBufferMessage) + { + return parser.ParseFrom(context.PayloadAsReadOnlySequence()); + } + #endif + return parser.ParseFrom(context.PayloadAsNewBuffer()); + } + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_batch_v1alpha_CreateJobRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Batch.V1Alpha.CreateJobRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_batch_v1alpha_Job = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Batch.V1Alpha.Job.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_batch_v1alpha_GetJobRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Batch.V1Alpha.GetJobRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_batch_v1alpha_DeleteJobRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Batch.V1Alpha.DeleteJobRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_longrunning_Operation = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.LongRunning.Operation.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_batch_v1alpha_CancelJobRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Batch.V1Alpha.CancelJobRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_batch_v1alpha_UpdateJobRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Batch.V1Alpha.UpdateJobRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_batch_v1alpha_ListJobsRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Batch.V1Alpha.ListJobsRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_batch_v1alpha_ListJobsResponse = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Batch.V1Alpha.ListJobsResponse.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_batch_v1alpha_GetTaskRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Batch.V1Alpha.GetTaskRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_batch_v1alpha_Task = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Batch.V1Alpha.Task.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_batch_v1alpha_ListTasksRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Batch.V1Alpha.ListTasksRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_batch_v1alpha_ListTasksResponse = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Batch.V1Alpha.ListTasksResponse.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_batch_v1alpha_CreateResourceAllowanceRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Batch.V1Alpha.CreateResourceAllowanceRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_batch_v1alpha_ResourceAllowance = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Batch.V1Alpha.ResourceAllowance.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_batch_v1alpha_GetResourceAllowanceRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Batch.V1Alpha.GetResourceAllowanceRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_batch_v1alpha_DeleteResourceAllowanceRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Batch.V1Alpha.DeleteResourceAllowanceRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_batch_v1alpha_ListResourceAllowancesRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Batch.V1Alpha.ListResourceAllowancesRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_batch_v1alpha_ListResourceAllowancesResponse = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Batch.V1Alpha.ListResourceAllowancesResponse.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_batch_v1alpha_UpdateResourceAllowanceRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Batch.V1Alpha.UpdateResourceAllowanceRequest.Parser)); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_CreateJob = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "CreateJob", + __Marshaller_google_cloud_batch_v1alpha_CreateJobRequest, + __Marshaller_google_cloud_batch_v1alpha_Job); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_GetJob = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "GetJob", + __Marshaller_google_cloud_batch_v1alpha_GetJobRequest, + __Marshaller_google_cloud_batch_v1alpha_Job); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_DeleteJob = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "DeleteJob", + __Marshaller_google_cloud_batch_v1alpha_DeleteJobRequest, + __Marshaller_google_longrunning_Operation); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_CancelJob = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "CancelJob", + __Marshaller_google_cloud_batch_v1alpha_CancelJobRequest, + __Marshaller_google_longrunning_Operation); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_UpdateJob = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "UpdateJob", + __Marshaller_google_cloud_batch_v1alpha_UpdateJobRequest, + __Marshaller_google_cloud_batch_v1alpha_Job); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_ListJobs = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "ListJobs", + __Marshaller_google_cloud_batch_v1alpha_ListJobsRequest, + __Marshaller_google_cloud_batch_v1alpha_ListJobsResponse); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_GetTask = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "GetTask", + __Marshaller_google_cloud_batch_v1alpha_GetTaskRequest, + __Marshaller_google_cloud_batch_v1alpha_Task); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_ListTasks = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "ListTasks", + __Marshaller_google_cloud_batch_v1alpha_ListTasksRequest, + __Marshaller_google_cloud_batch_v1alpha_ListTasksResponse); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_CreateResourceAllowance = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "CreateResourceAllowance", + __Marshaller_google_cloud_batch_v1alpha_CreateResourceAllowanceRequest, + __Marshaller_google_cloud_batch_v1alpha_ResourceAllowance); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_GetResourceAllowance = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "GetResourceAllowance", + __Marshaller_google_cloud_batch_v1alpha_GetResourceAllowanceRequest, + __Marshaller_google_cloud_batch_v1alpha_ResourceAllowance); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_DeleteResourceAllowance = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "DeleteResourceAllowance", + __Marshaller_google_cloud_batch_v1alpha_DeleteResourceAllowanceRequest, + __Marshaller_google_longrunning_Operation); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_ListResourceAllowances = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "ListResourceAllowances", + __Marshaller_google_cloud_batch_v1alpha_ListResourceAllowancesRequest, + __Marshaller_google_cloud_batch_v1alpha_ListResourceAllowancesResponse); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_UpdateResourceAllowance = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "UpdateResourceAllowance", + __Marshaller_google_cloud_batch_v1alpha_UpdateResourceAllowanceRequest, + __Marshaller_google_cloud_batch_v1alpha_ResourceAllowance); + + /// Service descriptor + public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor + { + get { return global::Google.Cloud.Batch.V1Alpha.BatchReflection.Descriptor.Services[0]; } + } + + /// Base class for server-side implementations of BatchService + [grpc::BindServiceMethod(typeof(BatchService), "BindService")] + public abstract partial class BatchServiceBase + { + /// + /// Create a Job. + /// + /// The request received from the client. + /// The context of the server-side call handler being invoked. + /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::System.Threading.Tasks.Task CreateJob(global::Google.Cloud.Batch.V1Alpha.CreateJobRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + /// Get a Job specified by its resource name. + /// + /// The request received from the client. + /// The context of the server-side call handler being invoked. + /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::System.Threading.Tasks.Task GetJob(global::Google.Cloud.Batch.V1Alpha.GetJobRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + /// Delete a Job. + /// + /// The request received from the client. + /// The context of the server-side call handler being invoked. + /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::System.Threading.Tasks.Task DeleteJob(global::Google.Cloud.Batch.V1Alpha.DeleteJobRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + /// Cancel a Job. + /// + /// The request received from the client. + /// The context of the server-side call handler being invoked. + /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::System.Threading.Tasks.Task CancelJob(global::Google.Cloud.Batch.V1Alpha.CancelJobRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + /// Update a Job. + /// + /// The request received from the client. + /// The context of the server-side call handler being invoked. + /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::System.Threading.Tasks.Task UpdateJob(global::Google.Cloud.Batch.V1Alpha.UpdateJobRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + /// List all Jobs for a project within a region. + /// + /// The request received from the client. + /// The context of the server-side call handler being invoked. + /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::System.Threading.Tasks.Task ListJobs(global::Google.Cloud.Batch.V1Alpha.ListJobsRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + /// Return a single Task. + /// + /// The request received from the client. + /// The context of the server-side call handler being invoked. + /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::System.Threading.Tasks.Task GetTask(global::Google.Cloud.Batch.V1Alpha.GetTaskRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + /// List Tasks associated with a job. + /// + /// The request received from the client. + /// The context of the server-side call handler being invoked. + /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::System.Threading.Tasks.Task ListTasks(global::Google.Cloud.Batch.V1Alpha.ListTasksRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + /// Create a Resource Allowance. + /// + /// The request received from the client. + /// The context of the server-side call handler being invoked. + /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::System.Threading.Tasks.Task CreateResourceAllowance(global::Google.Cloud.Batch.V1Alpha.CreateResourceAllowanceRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + /// Get a ResourceAllowance specified by its resource name. + /// + /// The request received from the client. + /// The context of the server-side call handler being invoked. + /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::System.Threading.Tasks.Task GetResourceAllowance(global::Google.Cloud.Batch.V1Alpha.GetResourceAllowanceRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + /// Delete a ResourceAllowance. + /// + /// The request received from the client. + /// The context of the server-side call handler being invoked. + /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::System.Threading.Tasks.Task DeleteResourceAllowance(global::Google.Cloud.Batch.V1Alpha.DeleteResourceAllowanceRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + /// List all ResourceAllowances for a project within a region. + /// + /// The request received from the client. + /// The context of the server-side call handler being invoked. + /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::System.Threading.Tasks.Task ListResourceAllowances(global::Google.Cloud.Batch.V1Alpha.ListResourceAllowancesRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + /// Update a Resource Allowance. + /// + /// The request received from the client. + /// The context of the server-side call handler being invoked. + /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::System.Threading.Tasks.Task UpdateResourceAllowance(global::Google.Cloud.Batch.V1Alpha.UpdateResourceAllowanceRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + } + + /// Client for BatchService + public partial class BatchServiceClient : grpc::ClientBase + { + /// Creates a new client for BatchService + /// The channel to use to make remote calls. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public BatchServiceClient(grpc::ChannelBase channel) : base(channel) + { + } + /// Creates a new client for BatchService that uses a custom CallInvoker. + /// The callInvoker to use to make remote calls. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public BatchServiceClient(grpc::CallInvoker callInvoker) : base(callInvoker) + { + } + /// Protected parameterless constructor to allow creation of test doubles. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + protected BatchServiceClient() : base() + { + } + /// Protected constructor to allow creation of configured clients. + /// The client configuration. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + protected BatchServiceClient(ClientBaseConfiguration configuration) : base(configuration) + { + } + + /// + /// Create a Job. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.Batch.V1Alpha.Job CreateJob(global::Google.Cloud.Batch.V1Alpha.CreateJobRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return CreateJob(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Create a Job. + /// + /// The request to send to the server. + /// The options for the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.Batch.V1Alpha.Job CreateJob(global::Google.Cloud.Batch.V1Alpha.CreateJobRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_CreateJob, null, options, request); + } + /// + /// Create a Job. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall CreateJobAsync(global::Google.Cloud.Batch.V1Alpha.CreateJobRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return CreateJobAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Create a Job. + /// + /// The request to send to the server. + /// The options for the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall CreateJobAsync(global::Google.Cloud.Batch.V1Alpha.CreateJobRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_CreateJob, null, options, request); + } + /// + /// Get a Job specified by its resource name. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.Batch.V1Alpha.Job GetJob(global::Google.Cloud.Batch.V1Alpha.GetJobRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return GetJob(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Get a Job specified by its resource name. + /// + /// The request to send to the server. + /// The options for the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.Batch.V1Alpha.Job GetJob(global::Google.Cloud.Batch.V1Alpha.GetJobRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_GetJob, null, options, request); + } + /// + /// Get a Job specified by its resource name. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall GetJobAsync(global::Google.Cloud.Batch.V1Alpha.GetJobRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return GetJobAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Get a Job specified by its resource name. + /// + /// The request to send to the server. + /// The options for the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall GetJobAsync(global::Google.Cloud.Batch.V1Alpha.GetJobRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_GetJob, null, options, request); + } + /// + /// Delete a Job. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.LongRunning.Operation DeleteJob(global::Google.Cloud.Batch.V1Alpha.DeleteJobRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return DeleteJob(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Delete a Job. + /// + /// The request to send to the server. + /// The options for the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.LongRunning.Operation DeleteJob(global::Google.Cloud.Batch.V1Alpha.DeleteJobRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_DeleteJob, null, options, request); + } + /// + /// Delete a Job. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall DeleteJobAsync(global::Google.Cloud.Batch.V1Alpha.DeleteJobRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return DeleteJobAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Delete a Job. + /// + /// The request to send to the server. + /// The options for the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall DeleteJobAsync(global::Google.Cloud.Batch.V1Alpha.DeleteJobRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_DeleteJob, null, options, request); + } + /// + /// Cancel a Job. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.LongRunning.Operation CancelJob(global::Google.Cloud.Batch.V1Alpha.CancelJobRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return CancelJob(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Cancel a Job. + /// + /// The request to send to the server. + /// The options for the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.LongRunning.Operation CancelJob(global::Google.Cloud.Batch.V1Alpha.CancelJobRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_CancelJob, null, options, request); + } + /// + /// Cancel a Job. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall CancelJobAsync(global::Google.Cloud.Batch.V1Alpha.CancelJobRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return CancelJobAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Cancel a Job. + /// + /// The request to send to the server. + /// The options for the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall CancelJobAsync(global::Google.Cloud.Batch.V1Alpha.CancelJobRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_CancelJob, null, options, request); + } + /// + /// Update a Job. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.Batch.V1Alpha.Job UpdateJob(global::Google.Cloud.Batch.V1Alpha.UpdateJobRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return UpdateJob(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Update a Job. + /// + /// The request to send to the server. + /// The options for the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.Batch.V1Alpha.Job UpdateJob(global::Google.Cloud.Batch.V1Alpha.UpdateJobRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_UpdateJob, null, options, request); + } + /// + /// Update a Job. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall UpdateJobAsync(global::Google.Cloud.Batch.V1Alpha.UpdateJobRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return UpdateJobAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Update a Job. + /// + /// The request to send to the server. + /// The options for the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall UpdateJobAsync(global::Google.Cloud.Batch.V1Alpha.UpdateJobRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_UpdateJob, null, options, request); + } + /// + /// List all Jobs for a project within a region. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.Batch.V1Alpha.ListJobsResponse ListJobs(global::Google.Cloud.Batch.V1Alpha.ListJobsRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return ListJobs(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// List all Jobs for a project within a region. + /// + /// The request to send to the server. + /// The options for the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.Batch.V1Alpha.ListJobsResponse ListJobs(global::Google.Cloud.Batch.V1Alpha.ListJobsRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_ListJobs, null, options, request); + } + /// + /// List all Jobs for a project within a region. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall ListJobsAsync(global::Google.Cloud.Batch.V1Alpha.ListJobsRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return ListJobsAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// List all Jobs for a project within a region. + /// + /// The request to send to the server. + /// The options for the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall ListJobsAsync(global::Google.Cloud.Batch.V1Alpha.ListJobsRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_ListJobs, null, options, request); + } + /// + /// Return a single Task. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.Batch.V1Alpha.Task GetTask(global::Google.Cloud.Batch.V1Alpha.GetTaskRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return GetTask(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Return a single Task. + /// + /// The request to send to the server. + /// The options for the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.Batch.V1Alpha.Task GetTask(global::Google.Cloud.Batch.V1Alpha.GetTaskRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_GetTask, null, options, request); + } + /// + /// Return a single Task. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall GetTaskAsync(global::Google.Cloud.Batch.V1Alpha.GetTaskRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return GetTaskAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Return a single Task. + /// + /// The request to send to the server. + /// The options for the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall GetTaskAsync(global::Google.Cloud.Batch.V1Alpha.GetTaskRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_GetTask, null, options, request); + } + /// + /// List Tasks associated with a job. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.Batch.V1Alpha.ListTasksResponse ListTasks(global::Google.Cloud.Batch.V1Alpha.ListTasksRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return ListTasks(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// List Tasks associated with a job. + /// + /// The request to send to the server. + /// The options for the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.Batch.V1Alpha.ListTasksResponse ListTasks(global::Google.Cloud.Batch.V1Alpha.ListTasksRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_ListTasks, null, options, request); + } + /// + /// List Tasks associated with a job. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall ListTasksAsync(global::Google.Cloud.Batch.V1Alpha.ListTasksRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return ListTasksAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// List Tasks associated with a job. + /// + /// The request to send to the server. + /// The options for the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall ListTasksAsync(global::Google.Cloud.Batch.V1Alpha.ListTasksRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_ListTasks, null, options, request); + } + /// + /// Create a Resource Allowance. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.Batch.V1Alpha.ResourceAllowance CreateResourceAllowance(global::Google.Cloud.Batch.V1Alpha.CreateResourceAllowanceRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return CreateResourceAllowance(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Create a Resource Allowance. + /// + /// The request to send to the server. + /// The options for the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.Batch.V1Alpha.ResourceAllowance CreateResourceAllowance(global::Google.Cloud.Batch.V1Alpha.CreateResourceAllowanceRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_CreateResourceAllowance, null, options, request); + } + /// + /// Create a Resource Allowance. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall CreateResourceAllowanceAsync(global::Google.Cloud.Batch.V1Alpha.CreateResourceAllowanceRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return CreateResourceAllowanceAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Create a Resource Allowance. + /// + /// The request to send to the server. + /// The options for the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall CreateResourceAllowanceAsync(global::Google.Cloud.Batch.V1Alpha.CreateResourceAllowanceRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_CreateResourceAllowance, null, options, request); + } + /// + /// Get a ResourceAllowance specified by its resource name. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.Batch.V1Alpha.ResourceAllowance GetResourceAllowance(global::Google.Cloud.Batch.V1Alpha.GetResourceAllowanceRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return GetResourceAllowance(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Get a ResourceAllowance specified by its resource name. + /// + /// The request to send to the server. + /// The options for the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.Batch.V1Alpha.ResourceAllowance GetResourceAllowance(global::Google.Cloud.Batch.V1Alpha.GetResourceAllowanceRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_GetResourceAllowance, null, options, request); + } + /// + /// Get a ResourceAllowance specified by its resource name. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall GetResourceAllowanceAsync(global::Google.Cloud.Batch.V1Alpha.GetResourceAllowanceRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return GetResourceAllowanceAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Get a ResourceAllowance specified by its resource name. + /// + /// The request to send to the server. + /// The options for the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall GetResourceAllowanceAsync(global::Google.Cloud.Batch.V1Alpha.GetResourceAllowanceRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_GetResourceAllowance, null, options, request); + } + /// + /// Delete a ResourceAllowance. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.LongRunning.Operation DeleteResourceAllowance(global::Google.Cloud.Batch.V1Alpha.DeleteResourceAllowanceRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return DeleteResourceAllowance(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Delete a ResourceAllowance. + /// + /// The request to send to the server. + /// The options for the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.LongRunning.Operation DeleteResourceAllowance(global::Google.Cloud.Batch.V1Alpha.DeleteResourceAllowanceRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_DeleteResourceAllowance, null, options, request); + } + /// + /// Delete a ResourceAllowance. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall DeleteResourceAllowanceAsync(global::Google.Cloud.Batch.V1Alpha.DeleteResourceAllowanceRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return DeleteResourceAllowanceAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Delete a ResourceAllowance. + /// + /// The request to send to the server. + /// The options for the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall DeleteResourceAllowanceAsync(global::Google.Cloud.Batch.V1Alpha.DeleteResourceAllowanceRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_DeleteResourceAllowance, null, options, request); + } + /// + /// List all ResourceAllowances for a project within a region. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.Batch.V1Alpha.ListResourceAllowancesResponse ListResourceAllowances(global::Google.Cloud.Batch.V1Alpha.ListResourceAllowancesRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return ListResourceAllowances(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// List all ResourceAllowances for a project within a region. + /// + /// The request to send to the server. + /// The options for the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.Batch.V1Alpha.ListResourceAllowancesResponse ListResourceAllowances(global::Google.Cloud.Batch.V1Alpha.ListResourceAllowancesRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_ListResourceAllowances, null, options, request); + } + /// + /// List all ResourceAllowances for a project within a region. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall ListResourceAllowancesAsync(global::Google.Cloud.Batch.V1Alpha.ListResourceAllowancesRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return ListResourceAllowancesAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// List all ResourceAllowances for a project within a region. + /// + /// The request to send to the server. + /// The options for the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall ListResourceAllowancesAsync(global::Google.Cloud.Batch.V1Alpha.ListResourceAllowancesRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_ListResourceAllowances, null, options, request); + } + /// + /// Update a Resource Allowance. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.Batch.V1Alpha.ResourceAllowance UpdateResourceAllowance(global::Google.Cloud.Batch.V1Alpha.UpdateResourceAllowanceRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return UpdateResourceAllowance(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Update a Resource Allowance. + /// + /// The request to send to the server. + /// The options for the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.Batch.V1Alpha.ResourceAllowance UpdateResourceAllowance(global::Google.Cloud.Batch.V1Alpha.UpdateResourceAllowanceRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_UpdateResourceAllowance, null, options, request); + } + /// + /// Update a Resource Allowance. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall UpdateResourceAllowanceAsync(global::Google.Cloud.Batch.V1Alpha.UpdateResourceAllowanceRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return UpdateResourceAllowanceAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Update a Resource Allowance. + /// + /// The request to send to the server. + /// The options for the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall UpdateResourceAllowanceAsync(global::Google.Cloud.Batch.V1Alpha.UpdateResourceAllowanceRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_UpdateResourceAllowance, null, options, request); + } + /// Creates a new instance of client from given ClientBaseConfiguration. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + protected override BatchServiceClient NewInstance(ClientBaseConfiguration configuration) + { + return new BatchServiceClient(configuration); + } + } + + /// Creates service definition that can be registered with a server + /// An object implementing the server-side handling logic. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public static grpc::ServerServiceDefinition BindService(BatchServiceBase serviceImpl) + { + return grpc::ServerServiceDefinition.CreateBuilder() + .AddMethod(__Method_CreateJob, serviceImpl.CreateJob) + .AddMethod(__Method_GetJob, serviceImpl.GetJob) + .AddMethod(__Method_DeleteJob, serviceImpl.DeleteJob) + .AddMethod(__Method_CancelJob, serviceImpl.CancelJob) + .AddMethod(__Method_UpdateJob, serviceImpl.UpdateJob) + .AddMethod(__Method_ListJobs, serviceImpl.ListJobs) + .AddMethod(__Method_GetTask, serviceImpl.GetTask) + .AddMethod(__Method_ListTasks, serviceImpl.ListTasks) + .AddMethod(__Method_CreateResourceAllowance, serviceImpl.CreateResourceAllowance) + .AddMethod(__Method_GetResourceAllowance, serviceImpl.GetResourceAllowance) + .AddMethod(__Method_DeleteResourceAllowance, serviceImpl.DeleteResourceAllowance) + .AddMethod(__Method_ListResourceAllowances, serviceImpl.ListResourceAllowances) + .AddMethod(__Method_UpdateResourceAllowance, serviceImpl.UpdateResourceAllowance).Build(); + } + + /// Register service method with a service binder with or without implementation. Useful when customizing the service binding logic. + /// Note: this method is part of an experimental API that can change or be removed without any prior notice. + /// Service methods will be bound by calling AddMethod on this object. + /// An object implementing the server-side handling logic. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public static void BindService(grpc::ServiceBinderBase serviceBinder, BatchServiceBase serviceImpl) + { + serviceBinder.AddMethod(__Method_CreateJob, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.CreateJob)); + serviceBinder.AddMethod(__Method_GetJob, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.GetJob)); + serviceBinder.AddMethod(__Method_DeleteJob, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.DeleteJob)); + serviceBinder.AddMethod(__Method_CancelJob, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.CancelJob)); + serviceBinder.AddMethod(__Method_UpdateJob, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.UpdateJob)); + serviceBinder.AddMethod(__Method_ListJobs, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.ListJobs)); + serviceBinder.AddMethod(__Method_GetTask, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.GetTask)); + serviceBinder.AddMethod(__Method_ListTasks, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.ListTasks)); + serviceBinder.AddMethod(__Method_CreateResourceAllowance, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.CreateResourceAllowance)); + serviceBinder.AddMethod(__Method_GetResourceAllowance, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.GetResourceAllowance)); + serviceBinder.AddMethod(__Method_DeleteResourceAllowance, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.DeleteResourceAllowance)); + serviceBinder.AddMethod(__Method_ListResourceAllowances, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.ListResourceAllowances)); + serviceBinder.AddMethod(__Method_UpdateResourceAllowance, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.UpdateResourceAllowance)); + } + + } +} +#endregion diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha/BatchResourceNames.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha/BatchResourceNames.g.cs new file mode 100755 index 000000000000..e198376b658d --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha/BatchResourceNames.g.cs @@ -0,0 +1,130 @@ +// 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 +using gagr = Google.Api.Gax.ResourceNames; +using gcbv = Google.Cloud.Batch.V1Alpha; + +namespace Google.Cloud.Batch.V1Alpha +{ + public partial class CreateJobRequest + { + /// + /// -typed view over the resource name property. + /// + public gagr::LocationName ParentAsLocationName + { + get => string.IsNullOrEmpty(Parent) ? null : gagr::LocationName.Parse(Parent, allowUnparsed: true); + set => Parent = value?.ToString() ?? ""; + } + } + + public partial class GetJobRequest + { + /// + /// -typed view over the resource name property. + /// + public gcbv::JobName JobName + { + get => string.IsNullOrEmpty(Name) ? null : gcbv::JobName.Parse(Name, allowUnparsed: true); + set => Name = value?.ToString() ?? ""; + } + } + + public partial class CancelJobRequest + { + /// + /// -typed view over the resource name property. + /// + public gcbv::JobName JobName + { + get => string.IsNullOrEmpty(Name) ? null : gcbv::JobName.Parse(Name, allowUnparsed: true); + set => Name = value?.ToString() ?? ""; + } + } + + public partial class ListTasksRequest + { + /// + /// -typed view over the resource name property. + /// + public TaskGroupName ParentAsTaskGroupName + { + get => string.IsNullOrEmpty(Parent) ? null : TaskGroupName.Parse(Parent, allowUnparsed: true); + set => Parent = value?.ToString() ?? ""; + } + } + + public partial class GetTaskRequest + { + /// + /// -typed view over the resource name property. + /// + public gcbv::TaskName TaskName + { + get => string.IsNullOrEmpty(Name) ? null : gcbv::TaskName.Parse(Name, allowUnparsed: true); + set => Name = value?.ToString() ?? ""; + } + } + + public partial class CreateResourceAllowanceRequest + { + /// + /// -typed view over the resource name property. + /// + public gagr::LocationName ParentAsLocationName + { + get => string.IsNullOrEmpty(Parent) ? null : gagr::LocationName.Parse(Parent, allowUnparsed: true); + set => Parent = value?.ToString() ?? ""; + } + } + + public partial class GetResourceAllowanceRequest + { + /// + /// -typed view over the resource name property. + /// + public gcbv::ResourceAllowanceName ResourceAllowanceName + { + get => string.IsNullOrEmpty(Name) ? null : gcbv::ResourceAllowanceName.Parse(Name, allowUnparsed: true); + set => Name = value?.ToString() ?? ""; + } + } + + public partial class DeleteResourceAllowanceRequest + { + /// + /// -typed view over the resource name property. + /// + public gcbv::ResourceAllowanceName ResourceAllowanceName + { + get => string.IsNullOrEmpty(Name) ? null : gcbv::ResourceAllowanceName.Parse(Name, allowUnparsed: true); + set => Name = value?.ToString() ?? ""; + } + } + + public partial class ListResourceAllowancesRequest + { + /// + /// -typed view over the resource name property. + /// + public gagr::LocationName ParentAsLocationName + { + get => string.IsNullOrEmpty(Parent) ? null : gagr::LocationName.Parse(Parent, allowUnparsed: true); + set => Parent = value?.ToString() ?? ""; + } + } +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha/BatchServiceClient.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha/BatchServiceClient.g.cs new file mode 100755 index 000000000000..61998624d447 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha/BatchServiceClient.g.cs @@ -0,0 +1,2715 @@ +// 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 +using gagr = Google.Api.Gax.ResourceNames; +using gax = Google.Api.Gax; +using gaxgrpc = Google.Api.Gax.Grpc; +using gcl = Google.Cloud.Location; +using grpccore = Grpc.Core; +using grpcinter = Grpc.Core.Interceptors; +using lro = Google.LongRunning; +using mel = Microsoft.Extensions.Logging; +using proto = Google.Protobuf; +using sc = System.Collections; +using scg = System.Collections.Generic; +using sco = System.Collections.ObjectModel; +using st = System.Threading; +using stt = System.Threading.Tasks; +using sys = System; +using wkt = Google.Protobuf.WellKnownTypes; + +namespace Google.Cloud.Batch.V1Alpha +{ + /// Settings for instances. + public sealed partial class BatchServiceSettings : gaxgrpc::ServiceSettingsBase + { + /// Get a new instance of the default . + /// A new instance of the default . + public static BatchServiceSettings GetDefault() => new BatchServiceSettings(); + + /// Constructs a new object with default settings. + public BatchServiceSettings() + { + } + + private BatchServiceSettings(BatchServiceSettings existing) : base(existing) + { + gax::GaxPreconditions.CheckNotNull(existing, nameof(existing)); + CreateJobSettings = existing.CreateJobSettings; + GetJobSettings = existing.GetJobSettings; + DeleteJobSettings = existing.DeleteJobSettings; + DeleteJobOperationsSettings = existing.DeleteJobOperationsSettings.Clone(); + CancelJobSettings = existing.CancelJobSettings; + CancelJobOperationsSettings = existing.CancelJobOperationsSettings.Clone(); + UpdateJobSettings = existing.UpdateJobSettings; + ListJobsSettings = existing.ListJobsSettings; + GetTaskSettings = existing.GetTaskSettings; + ListTasksSettings = existing.ListTasksSettings; + CreateResourceAllowanceSettings = existing.CreateResourceAllowanceSettings; + GetResourceAllowanceSettings = existing.GetResourceAllowanceSettings; + DeleteResourceAllowanceSettings = existing.DeleteResourceAllowanceSettings; + DeleteResourceAllowanceOperationsSettings = existing.DeleteResourceAllowanceOperationsSettings.Clone(); + ListResourceAllowancesSettings = existing.ListResourceAllowancesSettings; + UpdateResourceAllowanceSettings = existing.UpdateResourceAllowanceSettings; + LocationsSettings = existing.LocationsSettings; + OnCopy(existing); + } + + partial void OnCopy(BatchServiceSettings existing); + + /// + /// for synchronous and asynchronous calls to + /// BatchServiceClient.CreateJob and BatchServiceClient.CreateJobAsync. + /// + /// + /// + /// This call will not be retried. + /// Timeout: 60 seconds. + /// + /// + public gaxgrpc::CallSettings CreateJobSettings { get; set; } = gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(60000))); + + /// + /// for synchronous and asynchronous calls to BatchServiceClient.GetJob + /// and BatchServiceClient.GetJobAsync. + /// + /// + /// + /// Initial retry delay: 1000 milliseconds. + /// Retry delay multiplier: 1.3 + /// Retry maximum delay: 10000 milliseconds. + /// Maximum attempts: 5 + /// + /// Retriable status codes: . + /// + /// Timeout: 60 seconds. + /// + /// + public gaxgrpc::CallSettings GetJobSettings { get; set; } = gaxgrpc::CallSettingsExtensions.WithRetry(gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(60000))), gaxgrpc::RetrySettings.FromExponentialBackoff(maxAttempts: 5, initialBackoff: sys::TimeSpan.FromMilliseconds(1000), maxBackoff: sys::TimeSpan.FromMilliseconds(10000), backoffMultiplier: 1.3, retryFilter: gaxgrpc::RetrySettings.FilterForStatusCodes(grpccore::StatusCode.Unavailable))); + + /// + /// for synchronous and asynchronous calls to + /// BatchServiceClient.DeleteJob and BatchServiceClient.DeleteJobAsync. + /// + /// + /// + /// This call will not be retried. + /// Timeout: 60 seconds. + /// + /// + public gaxgrpc::CallSettings DeleteJobSettings { get; set; } = gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(60000))); + + /// + /// Long Running Operation settings for calls to BatchServiceClient.DeleteJob and + /// BatchServiceClient.DeleteJobAsync. + /// + /// + /// Uses default of: + /// + /// Initial delay: 20 seconds. + /// Delay multiplier: 1.5 + /// Maximum delay: 45 seconds. + /// Total timeout: 24 hours. + /// + /// + public lro::OperationsSettings DeleteJobOperationsSettings { get; set; } = new lro::OperationsSettings + { + DefaultPollSettings = new gax::PollSettings(gax::Expiration.FromTimeout(sys::TimeSpan.FromHours(24)), sys::TimeSpan.FromSeconds(20), 1.5, sys::TimeSpan.FromSeconds(45)), + }; + + /// + /// for synchronous and asynchronous calls to + /// BatchServiceClient.CancelJob and BatchServiceClient.CancelJobAsync. + /// + /// + /// + /// This call will not be retried. + /// Timeout: 60 seconds. + /// + /// + public gaxgrpc::CallSettings CancelJobSettings { get; set; } = gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(60000))); + + /// + /// Long Running Operation settings for calls to BatchServiceClient.CancelJob and + /// BatchServiceClient.CancelJobAsync. + /// + /// + /// Uses default of: + /// + /// Initial delay: 20 seconds. + /// Delay multiplier: 1.5 + /// Maximum delay: 45 seconds. + /// Total timeout: 24 hours. + /// + /// + public lro::OperationsSettings CancelJobOperationsSettings { get; set; } = new lro::OperationsSettings + { + DefaultPollSettings = new gax::PollSettings(gax::Expiration.FromTimeout(sys::TimeSpan.FromHours(24)), sys::TimeSpan.FromSeconds(20), 1.5, sys::TimeSpan.FromSeconds(45)), + }; + + /// + /// for synchronous and asynchronous calls to + /// BatchServiceClient.UpdateJob and BatchServiceClient.UpdateJobAsync. + /// + /// + /// + /// This call will not be retried. + /// Timeout: 60 seconds. + /// + /// + public gaxgrpc::CallSettings UpdateJobSettings { get; set; } = gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(60000))); + + /// + /// for synchronous and asynchronous calls to BatchServiceClient.ListJobs + /// and BatchServiceClient.ListJobsAsync. + /// + /// + /// + /// Initial retry delay: 1000 milliseconds. + /// Retry delay multiplier: 1.3 + /// Retry maximum delay: 10000 milliseconds. + /// Maximum attempts: 5 + /// + /// Retriable status codes: . + /// + /// Timeout: 60 seconds. + /// + /// + public gaxgrpc::CallSettings ListJobsSettings { get; set; } = gaxgrpc::CallSettingsExtensions.WithRetry(gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(60000))), gaxgrpc::RetrySettings.FromExponentialBackoff(maxAttempts: 5, initialBackoff: sys::TimeSpan.FromMilliseconds(1000), maxBackoff: sys::TimeSpan.FromMilliseconds(10000), backoffMultiplier: 1.3, retryFilter: gaxgrpc::RetrySettings.FilterForStatusCodes(grpccore::StatusCode.Unavailable))); + + /// + /// for synchronous and asynchronous calls to BatchServiceClient.GetTask + /// and BatchServiceClient.GetTaskAsync. + /// + /// + /// + /// Initial retry delay: 1000 milliseconds. + /// Retry delay multiplier: 1.3 + /// Retry maximum delay: 10000 milliseconds. + /// Maximum attempts: 5 + /// + /// Retriable status codes: . + /// + /// Timeout: 60 seconds. + /// + /// + public gaxgrpc::CallSettings GetTaskSettings { get; set; } = gaxgrpc::CallSettingsExtensions.WithRetry(gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(60000))), gaxgrpc::RetrySettings.FromExponentialBackoff(maxAttempts: 5, initialBackoff: sys::TimeSpan.FromMilliseconds(1000), maxBackoff: sys::TimeSpan.FromMilliseconds(10000), backoffMultiplier: 1.3, retryFilter: gaxgrpc::RetrySettings.FilterForStatusCodes(grpccore::StatusCode.Unavailable))); + + /// + /// for synchronous and asynchronous calls to + /// BatchServiceClient.ListTasks and BatchServiceClient.ListTasksAsync. + /// + /// + /// + /// Initial retry delay: 1000 milliseconds. + /// Retry delay multiplier: 1.3 + /// Retry maximum delay: 10000 milliseconds. + /// Maximum attempts: 5 + /// + /// Retriable status codes: . + /// + /// Timeout: 60 seconds. + /// + /// + public gaxgrpc::CallSettings ListTasksSettings { get; set; } = gaxgrpc::CallSettingsExtensions.WithRetry(gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(60000))), gaxgrpc::RetrySettings.FromExponentialBackoff(maxAttempts: 5, initialBackoff: sys::TimeSpan.FromMilliseconds(1000), maxBackoff: sys::TimeSpan.FromMilliseconds(10000), backoffMultiplier: 1.3, retryFilter: gaxgrpc::RetrySettings.FilterForStatusCodes(grpccore::StatusCode.Unavailable))); + + /// + /// for synchronous and asynchronous calls to + /// BatchServiceClient.CreateResourceAllowance and BatchServiceClient.CreateResourceAllowanceAsync + /// . + /// + /// + /// + /// This call will not be retried. + /// Timeout: 60 seconds. + /// + /// + public gaxgrpc::CallSettings CreateResourceAllowanceSettings { get; set; } = gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(60000))); + + /// + /// for synchronous and asynchronous calls to + /// BatchServiceClient.GetResourceAllowance and BatchServiceClient.GetResourceAllowanceAsync. + /// + /// + /// + /// Initial retry delay: 1000 milliseconds. + /// Retry delay multiplier: 1.3 + /// Retry maximum delay: 10000 milliseconds. + /// Maximum attempts: 5 + /// + /// Retriable status codes: . + /// + /// Timeout: 60 seconds. + /// + /// + public gaxgrpc::CallSettings GetResourceAllowanceSettings { get; set; } = gaxgrpc::CallSettingsExtensions.WithRetry(gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(60000))), gaxgrpc::RetrySettings.FromExponentialBackoff(maxAttempts: 5, initialBackoff: sys::TimeSpan.FromMilliseconds(1000), maxBackoff: sys::TimeSpan.FromMilliseconds(10000), backoffMultiplier: 1.3, retryFilter: gaxgrpc::RetrySettings.FilterForStatusCodes(grpccore::StatusCode.Unavailable))); + + /// + /// for synchronous and asynchronous calls to + /// BatchServiceClient.DeleteResourceAllowance and BatchServiceClient.DeleteResourceAllowanceAsync + /// . + /// + /// + /// + /// This call will not be retried. + /// Timeout: 60 seconds. + /// + /// + public gaxgrpc::CallSettings DeleteResourceAllowanceSettings { get; set; } = gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(60000))); + + /// + /// Long Running Operation settings for calls to BatchServiceClient.DeleteResourceAllowance and + /// BatchServiceClient.DeleteResourceAllowanceAsync. + /// + /// + /// Uses default of: + /// + /// Initial delay: 20 seconds. + /// Delay multiplier: 1.5 + /// Maximum delay: 45 seconds. + /// Total timeout: 24 hours. + /// + /// + public lro::OperationsSettings DeleteResourceAllowanceOperationsSettings { get; set; } = new lro::OperationsSettings + { + DefaultPollSettings = new gax::PollSettings(gax::Expiration.FromTimeout(sys::TimeSpan.FromHours(24)), sys::TimeSpan.FromSeconds(20), 1.5, sys::TimeSpan.FromSeconds(45)), + }; + + /// + /// for synchronous and asynchronous calls to + /// BatchServiceClient.ListResourceAllowances and BatchServiceClient.ListResourceAllowancesAsync. + /// + /// + /// + /// Initial retry delay: 1000 milliseconds. + /// Retry delay multiplier: 1.3 + /// Retry maximum delay: 10000 milliseconds. + /// Maximum attempts: 5 + /// + /// Retriable status codes: . + /// + /// Timeout: 60 seconds. + /// + /// + public gaxgrpc::CallSettings ListResourceAllowancesSettings { get; set; } = gaxgrpc::CallSettingsExtensions.WithRetry(gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(60000))), gaxgrpc::RetrySettings.FromExponentialBackoff(maxAttempts: 5, initialBackoff: sys::TimeSpan.FromMilliseconds(1000), maxBackoff: sys::TimeSpan.FromMilliseconds(10000), backoffMultiplier: 1.3, retryFilter: gaxgrpc::RetrySettings.FilterForStatusCodes(grpccore::StatusCode.Unavailable))); + + /// + /// for synchronous and asynchronous calls to + /// BatchServiceClient.UpdateResourceAllowance and BatchServiceClient.UpdateResourceAllowanceAsync + /// . + /// + /// + /// + /// This call will not be retried. + /// Timeout: 60 seconds. + /// + /// + public gaxgrpc::CallSettings UpdateResourceAllowanceSettings { get; set; } = gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(60000))); + + /// + /// The settings to use for the associated with the client. + /// + public gcl::LocationsSettings LocationsSettings { get; set; } = gcl::LocationsSettings.GetDefault(); + + /// Creates a deep clone of this object, with all the same property values. + /// A deep clone of this object. + public BatchServiceSettings Clone() => new BatchServiceSettings(this); + } + + /// + /// Builder class for to provide simple configuration of credentials, endpoint etc. + /// + public sealed partial class BatchServiceClientBuilder : gaxgrpc::ClientBuilderBase + { + /// The settings to use for RPCs, or null for the default settings. + public BatchServiceSettings Settings { get; set; } + + /// Creates a new builder with default settings. + public BatchServiceClientBuilder() : base(BatchServiceClient.ServiceMetadata) + { + } + + partial void InterceptBuild(ref BatchServiceClient client); + + partial void InterceptBuildAsync(st::CancellationToken cancellationToken, ref stt::Task task); + + /// Builds the resulting client. + public override BatchServiceClient Build() + { + BatchServiceClient client = null; + InterceptBuild(ref client); + return client ?? BuildImpl(); + } + + /// Builds the resulting client asynchronously. + public override stt::Task BuildAsync(st::CancellationToken cancellationToken = default) + { + stt::Task task = null; + InterceptBuildAsync(cancellationToken, ref task); + return task ?? BuildAsyncImpl(cancellationToken); + } + + private BatchServiceClient BuildImpl() + { + Validate(); + grpccore::CallInvoker callInvoker = CreateCallInvoker(); + return BatchServiceClient.Create(callInvoker, GetEffectiveSettings(Settings?.Clone()), Logger); + } + + private async stt::Task BuildAsyncImpl(st::CancellationToken cancellationToken) + { + Validate(); + grpccore::CallInvoker callInvoker = await CreateCallInvokerAsync(cancellationToken).ConfigureAwait(false); + return BatchServiceClient.Create(callInvoker, GetEffectiveSettings(Settings?.Clone()), Logger); + } + + /// Returns the channel pool to use when no other options are specified. + protected override gaxgrpc::ChannelPool GetChannelPool() => BatchServiceClient.ChannelPool; + } + + /// BatchService client wrapper, for convenient use. + /// + /// Google Batch Service. + /// The service manages user submitted batch jobs and allocates Google Compute + /// Engine VM instances to run the jobs. + /// + public abstract partial class BatchServiceClient + { + /// + /// The default endpoint for the BatchService service, which is a host of "batch.googleapis.com" and a port of + /// 443. + /// + public static string DefaultEndpoint { get; } = "batch.googleapis.com:443"; + + /// The default BatchService scopes. + /// + /// The default BatchService scopes are: + /// + /// https://www.googleapis.com/auth/cloud-platform + /// + /// + public static scg::IReadOnlyList DefaultScopes { get; } = new sco::ReadOnlyCollection(new string[] + { + "https://www.googleapis.com/auth/cloud-platform", + }); + + /// The service metadata associated with this client type. + public static gaxgrpc::ServiceMetadata ServiceMetadata { get; } = new gaxgrpc::ServiceMetadata(BatchService.Descriptor, DefaultEndpoint, DefaultScopes, true, gax::ApiTransports.Grpc | gax::ApiTransports.Rest, PackageApiMetadata.ApiMetadata); + + internal static gaxgrpc::ChannelPool ChannelPool { get; } = new gaxgrpc::ChannelPool(ServiceMetadata); + + /// + /// Asynchronously creates a using the default credentials, endpoint and + /// settings. To specify custom credentials or other settings, use . + /// + /// + /// The to use while creating the client. + /// + /// The task representing the created . + public static stt::Task CreateAsync(st::CancellationToken cancellationToken = default) => + new BatchServiceClientBuilder().BuildAsync(cancellationToken); + + /// + /// Synchronously creates a using the default credentials, endpoint and + /// settings. To specify custom credentials or other settings, use . + /// + /// The created . + public static BatchServiceClient Create() => new BatchServiceClientBuilder().Build(); + + /// + /// Creates a which uses the specified call invoker for remote operations. + /// + /// + /// The for remote operations. Must not be null. + /// + /// Optional . + /// Optional . + /// The created . + internal static BatchServiceClient Create(grpccore::CallInvoker callInvoker, BatchServiceSettings settings = null, mel::ILogger logger = null) + { + gax::GaxPreconditions.CheckNotNull(callInvoker, nameof(callInvoker)); + grpcinter::Interceptor interceptor = settings?.Interceptor; + if (interceptor != null) + { + callInvoker = grpcinter::CallInvokerExtensions.Intercept(callInvoker, interceptor); + } + BatchService.BatchServiceClient grpcClient = new BatchService.BatchServiceClient(callInvoker); + return new BatchServiceClientImpl(grpcClient, settings, logger); + } + + /// + /// Shuts down any channels automatically created by and + /// . Channels which weren't automatically created are not + /// affected. + /// + /// + /// After calling this method, further calls to and + /// will create new channels, which could in turn be shut down + /// by another call to this method. + /// + /// A task representing the asynchronous shutdown operation. + public static stt::Task ShutdownDefaultChannelsAsync() => ChannelPool.ShutdownChannelsAsync(); + + /// The underlying gRPC BatchService client + public virtual BatchService.BatchServiceClient GrpcClient => throw new sys::NotImplementedException(); + + /// The associated with this client. + public virtual gcl::LocationsClient LocationsClient => throw new sys::NotImplementedException(); + + /// + /// Create a Job. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual Job CreateJob(CreateJobRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Create a Job. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task CreateJobAsync(CreateJobRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Create a Job. + /// + /// The request object containing all of the parameters for the API call. + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task CreateJobAsync(CreateJobRequest request, st::CancellationToken cancellationToken) => + CreateJobAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Create a Job. + /// + /// + /// Required. The parent resource name where the Job will be created. + /// Pattern: "projects/{project}/locations/{location}" + /// + /// + /// Required. The Job to create. + /// + /// + /// ID used to uniquely identify the Job within its parent scope. + /// This field should contain at most 63 characters and must start with + /// lowercase characters. + /// Only lowercase characters, numbers and '-' are accepted. + /// The '-' character cannot be the first or the last one. + /// A system generated ID will be used if the field is not set. + /// + /// The job.name field in the request will be ignored and the created resource + /// name of the Job will be "{parent}/jobs/{job_id}". + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual Job CreateJob(string parent, Job job, string jobId, gaxgrpc::CallSettings callSettings = null) => + CreateJob(new CreateJobRequest + { + Parent = gax::GaxPreconditions.CheckNotNullOrEmpty(parent, nameof(parent)), + JobId = jobId ?? "", + Job = gax::GaxPreconditions.CheckNotNull(job, nameof(job)), + }, callSettings); + + /// + /// Create a Job. + /// + /// + /// Required. The parent resource name where the Job will be created. + /// Pattern: "projects/{project}/locations/{location}" + /// + /// + /// Required. The Job to create. + /// + /// + /// ID used to uniquely identify the Job within its parent scope. + /// This field should contain at most 63 characters and must start with + /// lowercase characters. + /// Only lowercase characters, numbers and '-' are accepted. + /// The '-' character cannot be the first or the last one. + /// A system generated ID will be used if the field is not set. + /// + /// The job.name field in the request will be ignored and the created resource + /// name of the Job will be "{parent}/jobs/{job_id}". + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task CreateJobAsync(string parent, Job job, string jobId, gaxgrpc::CallSettings callSettings = null) => + CreateJobAsync(new CreateJobRequest + { + Parent = gax::GaxPreconditions.CheckNotNullOrEmpty(parent, nameof(parent)), + JobId = jobId ?? "", + Job = gax::GaxPreconditions.CheckNotNull(job, nameof(job)), + }, callSettings); + + /// + /// Create a Job. + /// + /// + /// Required. The parent resource name where the Job will be created. + /// Pattern: "projects/{project}/locations/{location}" + /// + /// + /// Required. The Job to create. + /// + /// + /// ID used to uniquely identify the Job within its parent scope. + /// This field should contain at most 63 characters and must start with + /// lowercase characters. + /// Only lowercase characters, numbers and '-' are accepted. + /// The '-' character cannot be the first or the last one. + /// A system generated ID will be used if the field is not set. + /// + /// The job.name field in the request will be ignored and the created resource + /// name of the Job will be "{parent}/jobs/{job_id}". + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task CreateJobAsync(string parent, Job job, string jobId, st::CancellationToken cancellationToken) => + CreateJobAsync(parent, job, jobId, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Create a Job. + /// + /// + /// Required. The parent resource name where the Job will be created. + /// Pattern: "projects/{project}/locations/{location}" + /// + /// + /// Required. The Job to create. + /// + /// + /// ID used to uniquely identify the Job within its parent scope. + /// This field should contain at most 63 characters and must start with + /// lowercase characters. + /// Only lowercase characters, numbers and '-' are accepted. + /// The '-' character cannot be the first or the last one. + /// A system generated ID will be used if the field is not set. + /// + /// The job.name field in the request will be ignored and the created resource + /// name of the Job will be "{parent}/jobs/{job_id}". + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual Job CreateJob(gagr::LocationName parent, Job job, string jobId, gaxgrpc::CallSettings callSettings = null) => + CreateJob(new CreateJobRequest + { + ParentAsLocationName = gax::GaxPreconditions.CheckNotNull(parent, nameof(parent)), + JobId = jobId ?? "", + Job = gax::GaxPreconditions.CheckNotNull(job, nameof(job)), + }, callSettings); + + /// + /// Create a Job. + /// + /// + /// Required. The parent resource name where the Job will be created. + /// Pattern: "projects/{project}/locations/{location}" + /// + /// + /// Required. The Job to create. + /// + /// + /// ID used to uniquely identify the Job within its parent scope. + /// This field should contain at most 63 characters and must start with + /// lowercase characters. + /// Only lowercase characters, numbers and '-' are accepted. + /// The '-' character cannot be the first or the last one. + /// A system generated ID will be used if the field is not set. + /// + /// The job.name field in the request will be ignored and the created resource + /// name of the Job will be "{parent}/jobs/{job_id}". + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task CreateJobAsync(gagr::LocationName parent, Job job, string jobId, gaxgrpc::CallSettings callSettings = null) => + CreateJobAsync(new CreateJobRequest + { + ParentAsLocationName = gax::GaxPreconditions.CheckNotNull(parent, nameof(parent)), + JobId = jobId ?? "", + Job = gax::GaxPreconditions.CheckNotNull(job, nameof(job)), + }, callSettings); + + /// + /// Create a Job. + /// + /// + /// Required. The parent resource name where the Job will be created. + /// Pattern: "projects/{project}/locations/{location}" + /// + /// + /// Required. The Job to create. + /// + /// + /// ID used to uniquely identify the Job within its parent scope. + /// This field should contain at most 63 characters and must start with + /// lowercase characters. + /// Only lowercase characters, numbers and '-' are accepted. + /// The '-' character cannot be the first or the last one. + /// A system generated ID will be used if the field is not set. + /// + /// The job.name field in the request will be ignored and the created resource + /// name of the Job will be "{parent}/jobs/{job_id}". + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task CreateJobAsync(gagr::LocationName parent, Job job, string jobId, st::CancellationToken cancellationToken) => + CreateJobAsync(parent, job, jobId, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Get a Job specified by its resource name. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual Job GetJob(GetJobRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Get a Job specified by its resource name. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task GetJobAsync(GetJobRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Get a Job specified by its resource name. + /// + /// The request object containing all of the parameters for the API call. + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task GetJobAsync(GetJobRequest request, st::CancellationToken cancellationToken) => + GetJobAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Get a Job specified by its resource name. + /// + /// + /// Required. Job name. + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual Job GetJob(string name, gaxgrpc::CallSettings callSettings = null) => + GetJob(new GetJobRequest + { + Name = gax::GaxPreconditions.CheckNotNullOrEmpty(name, nameof(name)), + }, callSettings); + + /// + /// Get a Job specified by its resource name. + /// + /// + /// Required. Job name. + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task GetJobAsync(string name, gaxgrpc::CallSettings callSettings = null) => + GetJobAsync(new GetJobRequest + { + Name = gax::GaxPreconditions.CheckNotNullOrEmpty(name, nameof(name)), + }, callSettings); + + /// + /// Get a Job specified by its resource name. + /// + /// + /// Required. Job name. + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task GetJobAsync(string name, st::CancellationToken cancellationToken) => + GetJobAsync(name, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Get a Job specified by its resource name. + /// + /// + /// Required. Job name. + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual Job GetJob(JobName name, gaxgrpc::CallSettings callSettings = null) => + GetJob(new GetJobRequest + { + JobName = gax::GaxPreconditions.CheckNotNull(name, nameof(name)), + }, callSettings); + + /// + /// Get a Job specified by its resource name. + /// + /// + /// Required. Job name. + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task GetJobAsync(JobName name, gaxgrpc::CallSettings callSettings = null) => + GetJobAsync(new GetJobRequest + { + JobName = gax::GaxPreconditions.CheckNotNull(name, nameof(name)), + }, callSettings); + + /// + /// Get a Job specified by its resource name. + /// + /// + /// Required. Job name. + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task GetJobAsync(JobName name, st::CancellationToken cancellationToken) => + GetJobAsync(name, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Delete a Job. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual lro::Operation DeleteJob(DeleteJobRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Delete a Job. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task> DeleteJobAsync(DeleteJobRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Delete a Job. + /// + /// The request object containing all of the parameters for the API call. + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task> DeleteJobAsync(DeleteJobRequest request, st::CancellationToken cancellationToken) => + DeleteJobAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// The long-running operations client for DeleteJob. + public virtual lro::OperationsClient DeleteJobOperationsClient => throw new sys::NotImplementedException(); + + /// + /// Poll an operation once, using an operationName from a previous invocation of DeleteJob. + /// + /// + /// The name of a previously invoked operation. Must not be null or empty. + /// + /// If not null, applies overrides to this RPC call. + /// The result of polling the operation. + public virtual lro::Operation PollOnceDeleteJob(string operationName, gaxgrpc::CallSettings callSettings = null) => + lro::Operation.PollOnceFromName(gax::GaxPreconditions.CheckNotNullOrEmpty(operationName, nameof(operationName)), DeleteJobOperationsClient, callSettings); + + /// + /// Asynchronously poll an operation once, using an operationName from a previous invocation of + /// DeleteJob. + /// + /// + /// The name of a previously invoked operation. Must not be null or empty. + /// + /// If not null, applies overrides to this RPC call. + /// A task representing the result of polling the operation. + public virtual stt::Task> PollOnceDeleteJobAsync(string operationName, gaxgrpc::CallSettings callSettings = null) => + lro::Operation.PollOnceFromNameAsync(gax::GaxPreconditions.CheckNotNullOrEmpty(operationName, nameof(operationName)), DeleteJobOperationsClient, callSettings); + + /// + /// Delete a Job. + /// + /// + /// Job name. + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual lro::Operation DeleteJob(string name, gaxgrpc::CallSettings callSettings = null) => + DeleteJob(new DeleteJobRequest { Name = name ?? "", }, callSettings); + + /// + /// Delete a Job. + /// + /// + /// Job name. + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task> DeleteJobAsync(string name, gaxgrpc::CallSettings callSettings = null) => + DeleteJobAsync(new DeleteJobRequest { Name = name ?? "", }, callSettings); + + /// + /// Delete a Job. + /// + /// + /// Job name. + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task> DeleteJobAsync(string name, st::CancellationToken cancellationToken) => + DeleteJobAsync(name, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Cancel a Job. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual lro::Operation CancelJob(CancelJobRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Cancel a Job. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task> CancelJobAsync(CancelJobRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Cancel a Job. + /// + /// The request object containing all of the parameters for the API call. + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task> CancelJobAsync(CancelJobRequest request, st::CancellationToken cancellationToken) => + CancelJobAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// The long-running operations client for CancelJob. + public virtual lro::OperationsClient CancelJobOperationsClient => throw new sys::NotImplementedException(); + + /// + /// Poll an operation once, using an operationName from a previous invocation of CancelJob. + /// + /// + /// The name of a previously invoked operation. Must not be null or empty. + /// + /// If not null, applies overrides to this RPC call. + /// The result of polling the operation. + public virtual lro::Operation PollOnceCancelJob(string operationName, gaxgrpc::CallSettings callSettings = null) => + lro::Operation.PollOnceFromName(gax::GaxPreconditions.CheckNotNullOrEmpty(operationName, nameof(operationName)), CancelJobOperationsClient, callSettings); + + /// + /// Asynchronously poll an operation once, using an operationName from a previous invocation of + /// CancelJob. + /// + /// + /// The name of a previously invoked operation. Must not be null or empty. + /// + /// If not null, applies overrides to this RPC call. + /// A task representing the result of polling the operation. + public virtual stt::Task> PollOnceCancelJobAsync(string operationName, gaxgrpc::CallSettings callSettings = null) => + lro::Operation.PollOnceFromNameAsync(gax::GaxPreconditions.CheckNotNullOrEmpty(operationName, nameof(operationName)), CancelJobOperationsClient, callSettings); + + /// + /// Cancel a Job. + /// + /// + /// Required. Job name. + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual lro::Operation CancelJob(string name, gaxgrpc::CallSettings callSettings = null) => + CancelJob(new CancelJobRequest + { + Name = gax::GaxPreconditions.CheckNotNullOrEmpty(name, nameof(name)), + }, callSettings); + + /// + /// Cancel a Job. + /// + /// + /// Required. Job name. + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task> CancelJobAsync(string name, gaxgrpc::CallSettings callSettings = null) => + CancelJobAsync(new CancelJobRequest + { + Name = gax::GaxPreconditions.CheckNotNullOrEmpty(name, nameof(name)), + }, callSettings); + + /// + /// Cancel a Job. + /// + /// + /// Required. Job name. + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task> CancelJobAsync(string name, st::CancellationToken cancellationToken) => + CancelJobAsync(name, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Cancel a Job. + /// + /// + /// Required. Job name. + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual lro::Operation CancelJob(JobName name, gaxgrpc::CallSettings callSettings = null) => + CancelJob(new CancelJobRequest + { + JobName = gax::GaxPreconditions.CheckNotNull(name, nameof(name)), + }, callSettings); + + /// + /// Cancel a Job. + /// + /// + /// Required. Job name. + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task> CancelJobAsync(JobName name, gaxgrpc::CallSettings callSettings = null) => + CancelJobAsync(new CancelJobRequest + { + JobName = gax::GaxPreconditions.CheckNotNull(name, nameof(name)), + }, callSettings); + + /// + /// Cancel a Job. + /// + /// + /// Required. Job name. + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task> CancelJobAsync(JobName name, st::CancellationToken cancellationToken) => + CancelJobAsync(name, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Update a Job. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual Job UpdateJob(UpdateJobRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Update a Job. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task UpdateJobAsync(UpdateJobRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Update a Job. + /// + /// The request object containing all of the parameters for the API call. + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task UpdateJobAsync(UpdateJobRequest request, st::CancellationToken cancellationToken) => + UpdateJobAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Update a Job. + /// + /// + /// Required. The Job to update. + /// Only fields specified in `updateMask` are updated. + /// + /// + /// Required. Mask of fields to update. + /// + /// The `jobs.patch` method can only be used while a job is in the `QUEUED`, + /// `SCHEDULED`, or `RUNNING` state and currently only supports increasing the + /// value of the first `taskCount` field in the job's `taskGroups` field. + /// Therefore, you must set the value of `updateMask` to `taskGroups`. Any + /// other job fields in the update request will be ignored. + /// + /// For example, to update a job's `taskCount` to `2`, set `updateMask` to + /// `taskGroups` and use the following request body: + /// ``` + /// { + /// "taskGroups":[{ + /// "taskCount": 2 + /// }] + /// } + /// ``` + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual Job UpdateJob(Job job, wkt::FieldMask updateMask, gaxgrpc::CallSettings callSettings = null) => + UpdateJob(new UpdateJobRequest + { + Job = gax::GaxPreconditions.CheckNotNull(job, nameof(job)), + UpdateMask = gax::GaxPreconditions.CheckNotNull(updateMask, nameof(updateMask)), + }, callSettings); + + /// + /// Update a Job. + /// + /// + /// Required. The Job to update. + /// Only fields specified in `updateMask` are updated. + /// + /// + /// Required. Mask of fields to update. + /// + /// The `jobs.patch` method can only be used while a job is in the `QUEUED`, + /// `SCHEDULED`, or `RUNNING` state and currently only supports increasing the + /// value of the first `taskCount` field in the job's `taskGroups` field. + /// Therefore, you must set the value of `updateMask` to `taskGroups`. Any + /// other job fields in the update request will be ignored. + /// + /// For example, to update a job's `taskCount` to `2`, set `updateMask` to + /// `taskGroups` and use the following request body: + /// ``` + /// { + /// "taskGroups":[{ + /// "taskCount": 2 + /// }] + /// } + /// ``` + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task UpdateJobAsync(Job job, wkt::FieldMask updateMask, gaxgrpc::CallSettings callSettings = null) => + UpdateJobAsync(new UpdateJobRequest + { + Job = gax::GaxPreconditions.CheckNotNull(job, nameof(job)), + UpdateMask = gax::GaxPreconditions.CheckNotNull(updateMask, nameof(updateMask)), + }, callSettings); + + /// + /// Update a Job. + /// + /// + /// Required. The Job to update. + /// Only fields specified in `updateMask` are updated. + /// + /// + /// Required. Mask of fields to update. + /// + /// The `jobs.patch` method can only be used while a job is in the `QUEUED`, + /// `SCHEDULED`, or `RUNNING` state and currently only supports increasing the + /// value of the first `taskCount` field in the job's `taskGroups` field. + /// Therefore, you must set the value of `updateMask` to `taskGroups`. Any + /// other job fields in the update request will be ignored. + /// + /// For example, to update a job's `taskCount` to `2`, set `updateMask` to + /// `taskGroups` and use the following request body: + /// ``` + /// { + /// "taskGroups":[{ + /// "taskCount": 2 + /// }] + /// } + /// ``` + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task UpdateJobAsync(Job job, wkt::FieldMask updateMask, st::CancellationToken cancellationToken) => + UpdateJobAsync(job, updateMask, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// List all Jobs for a project within a region. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A pageable sequence of resources. + public virtual gax::PagedEnumerable ListJobs(ListJobsRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// List all Jobs for a project within a region. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A pageable asynchronous sequence of resources. + public virtual gax::PagedAsyncEnumerable ListJobsAsync(ListJobsRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// List all Jobs for a project within a region. + /// + /// + /// Parent path. + /// + /// + /// The token returned from the previous request. A value of null or an empty string retrieves the first + /// page. + /// + /// + /// The size of page to request. The response will not be larger than this, but may be smaller. A value of + /// null or 0 uses a server-defined page size. + /// + /// If not null, applies overrides to this RPC call. + /// A pageable sequence of resources. + public virtual gax::PagedEnumerable ListJobs(string parent, string pageToken = null, int? pageSize = null, gaxgrpc::CallSettings callSettings = null) + { + ListJobsRequest request = new ListJobsRequest { Parent = parent ?? "", }; + if (pageToken != null) + { + request.PageToken = pageToken; + } + if (pageSize != null) + { + request.PageSize = pageSize.Value; + } + return ListJobs(request, callSettings); + } + + /// + /// List all Jobs for a project within a region. + /// + /// + /// Parent path. + /// + /// + /// The token returned from the previous request. A value of null or an empty string retrieves the first + /// page. + /// + /// + /// The size of page to request. The response will not be larger than this, but may be smaller. A value of + /// null or 0 uses a server-defined page size. + /// + /// If not null, applies overrides to this RPC call. + /// A pageable asynchronous sequence of resources. + public virtual gax::PagedAsyncEnumerable ListJobsAsync(string parent, string pageToken = null, int? pageSize = null, gaxgrpc::CallSettings callSettings = null) + { + ListJobsRequest request = new ListJobsRequest { Parent = parent ?? "", }; + if (pageToken != null) + { + request.PageToken = pageToken; + } + if (pageSize != null) + { + request.PageSize = pageSize.Value; + } + return ListJobsAsync(request, callSettings); + } + + /// + /// Return a single Task. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual Task GetTask(GetTaskRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Return a single Task. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task GetTaskAsync(GetTaskRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Return a single Task. + /// + /// The request object containing all of the parameters for the API call. + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task GetTaskAsync(GetTaskRequest request, st::CancellationToken cancellationToken) => + GetTaskAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Return a single Task. + /// + /// + /// Required. Task name. + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual Task GetTask(string name, gaxgrpc::CallSettings callSettings = null) => + GetTask(new GetTaskRequest + { + Name = gax::GaxPreconditions.CheckNotNullOrEmpty(name, nameof(name)), + }, callSettings); + + /// + /// Return a single Task. + /// + /// + /// Required. Task name. + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task GetTaskAsync(string name, gaxgrpc::CallSettings callSettings = null) => + GetTaskAsync(new GetTaskRequest + { + Name = gax::GaxPreconditions.CheckNotNullOrEmpty(name, nameof(name)), + }, callSettings); + + /// + /// Return a single Task. + /// + /// + /// Required. Task name. + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task GetTaskAsync(string name, st::CancellationToken cancellationToken) => + GetTaskAsync(name, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Return a single Task. + /// + /// + /// Required. Task name. + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual Task GetTask(TaskName name, gaxgrpc::CallSettings callSettings = null) => + GetTask(new GetTaskRequest + { + TaskName = gax::GaxPreconditions.CheckNotNull(name, nameof(name)), + }, callSettings); + + /// + /// Return a single Task. + /// + /// + /// Required. Task name. + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task GetTaskAsync(TaskName name, gaxgrpc::CallSettings callSettings = null) => + GetTaskAsync(new GetTaskRequest + { + TaskName = gax::GaxPreconditions.CheckNotNull(name, nameof(name)), + }, callSettings); + + /// + /// Return a single Task. + /// + /// + /// Required. Task name. + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task GetTaskAsync(TaskName name, st::CancellationToken cancellationToken) => + GetTaskAsync(name, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// List Tasks associated with a job. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A pageable sequence of resources. + public virtual gax::PagedEnumerable ListTasks(ListTasksRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// List Tasks associated with a job. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A pageable asynchronous sequence of resources. + public virtual gax::PagedAsyncEnumerable ListTasksAsync(ListTasksRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// List Tasks associated with a job. + /// + /// + /// Required. Name of a TaskGroup from which Tasks are being requested. + /// Pattern: + /// "projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}" + /// + /// + /// The token returned from the previous request. A value of null or an empty string retrieves the first + /// page. + /// + /// + /// The size of page to request. The response will not be larger than this, but may be smaller. A value of + /// null or 0 uses a server-defined page size. + /// + /// If not null, applies overrides to this RPC call. + /// A pageable sequence of resources. + public virtual gax::PagedEnumerable ListTasks(string parent, string pageToken = null, int? pageSize = null, gaxgrpc::CallSettings callSettings = null) + { + ListTasksRequest request = new ListTasksRequest + { + Parent = gax::GaxPreconditions.CheckNotNullOrEmpty(parent, nameof(parent)), + }; + if (pageToken != null) + { + request.PageToken = pageToken; + } + if (pageSize != null) + { + request.PageSize = pageSize.Value; + } + return ListTasks(request, callSettings); + } + + /// + /// List Tasks associated with a job. + /// + /// + /// Required. Name of a TaskGroup from which Tasks are being requested. + /// Pattern: + /// "projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}" + /// + /// + /// The token returned from the previous request. A value of null or an empty string retrieves the first + /// page. + /// + /// + /// The size of page to request. The response will not be larger than this, but may be smaller. A value of + /// null or 0 uses a server-defined page size. + /// + /// If not null, applies overrides to this RPC call. + /// A pageable asynchronous sequence of resources. + public virtual gax::PagedAsyncEnumerable ListTasksAsync(string parent, string pageToken = null, int? pageSize = null, gaxgrpc::CallSettings callSettings = null) + { + ListTasksRequest request = new ListTasksRequest + { + Parent = gax::GaxPreconditions.CheckNotNullOrEmpty(parent, nameof(parent)), + }; + if (pageToken != null) + { + request.PageToken = pageToken; + } + if (pageSize != null) + { + request.PageSize = pageSize.Value; + } + return ListTasksAsync(request, callSettings); + } + + /// + /// List Tasks associated with a job. + /// + /// + /// Required. Name of a TaskGroup from which Tasks are being requested. + /// Pattern: + /// "projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}" + /// + /// + /// The token returned from the previous request. A value of null or an empty string retrieves the first + /// page. + /// + /// + /// The size of page to request. The response will not be larger than this, but may be smaller. A value of + /// null or 0 uses a server-defined page size. + /// + /// If not null, applies overrides to this RPC call. + /// A pageable sequence of resources. + public virtual gax::PagedEnumerable ListTasks(TaskGroupName parent, string pageToken = null, int? pageSize = null, gaxgrpc::CallSettings callSettings = null) + { + ListTasksRequest request = new ListTasksRequest + { + ParentAsTaskGroupName = gax::GaxPreconditions.CheckNotNull(parent, nameof(parent)), + }; + if (pageToken != null) + { + request.PageToken = pageToken; + } + if (pageSize != null) + { + request.PageSize = pageSize.Value; + } + return ListTasks(request, callSettings); + } + + /// + /// List Tasks associated with a job. + /// + /// + /// Required. Name of a TaskGroup from which Tasks are being requested. + /// Pattern: + /// "projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}" + /// + /// + /// The token returned from the previous request. A value of null or an empty string retrieves the first + /// page. + /// + /// + /// The size of page to request. The response will not be larger than this, but may be smaller. A value of + /// null or 0 uses a server-defined page size. + /// + /// If not null, applies overrides to this RPC call. + /// A pageable asynchronous sequence of resources. + public virtual gax::PagedAsyncEnumerable ListTasksAsync(TaskGroupName parent, string pageToken = null, int? pageSize = null, gaxgrpc::CallSettings callSettings = null) + { + ListTasksRequest request = new ListTasksRequest + { + ParentAsTaskGroupName = gax::GaxPreconditions.CheckNotNull(parent, nameof(parent)), + }; + if (pageToken != null) + { + request.PageToken = pageToken; + } + if (pageSize != null) + { + request.PageSize = pageSize.Value; + } + return ListTasksAsync(request, callSettings); + } + + /// + /// Create a Resource Allowance. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual ResourceAllowance CreateResourceAllowance(CreateResourceAllowanceRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Create a Resource Allowance. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task CreateResourceAllowanceAsync(CreateResourceAllowanceRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Create a Resource Allowance. + /// + /// The request object containing all of the parameters for the API call. + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task CreateResourceAllowanceAsync(CreateResourceAllowanceRequest request, st::CancellationToken cancellationToken) => + CreateResourceAllowanceAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Create a Resource Allowance. + /// + /// + /// Required. The parent resource name where the ResourceAllowance will be + /// created. Pattern: "projects/{project}/locations/{location}" + /// + /// + /// Required. The ResourceAllowance to create. + /// + /// + /// ID used to uniquely identify the ResourceAllowance within its parent scope. + /// This field should contain at most 63 characters and must start with + /// lowercase characters. + /// Only lowercase characters, numbers and '-' are accepted. + /// The '-' character cannot be the first or the last one. + /// A system generated ID will be used if the field is not set. + /// + /// The resource_allowance.name field in the request will be ignored and the + /// created resource name of the ResourceAllowance will be + /// "{parent}/resourceAllowances/{resource_allowance_id}". + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual ResourceAllowance CreateResourceAllowance(string parent, ResourceAllowance resourceAllowance, string resourceAllowanceId, gaxgrpc::CallSettings callSettings = null) => + CreateResourceAllowance(new CreateResourceAllowanceRequest + { + Parent = gax::GaxPreconditions.CheckNotNullOrEmpty(parent, nameof(parent)), + ResourceAllowanceId = resourceAllowanceId ?? "", + ResourceAllowance = gax::GaxPreconditions.CheckNotNull(resourceAllowance, nameof(resourceAllowance)), + }, callSettings); + + /// + /// Create a Resource Allowance. + /// + /// + /// Required. The parent resource name where the ResourceAllowance will be + /// created. Pattern: "projects/{project}/locations/{location}" + /// + /// + /// Required. The ResourceAllowance to create. + /// + /// + /// ID used to uniquely identify the ResourceAllowance within its parent scope. + /// This field should contain at most 63 characters and must start with + /// lowercase characters. + /// Only lowercase characters, numbers and '-' are accepted. + /// The '-' character cannot be the first or the last one. + /// A system generated ID will be used if the field is not set. + /// + /// The resource_allowance.name field in the request will be ignored and the + /// created resource name of the ResourceAllowance will be + /// "{parent}/resourceAllowances/{resource_allowance_id}". + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task CreateResourceAllowanceAsync(string parent, ResourceAllowance resourceAllowance, string resourceAllowanceId, gaxgrpc::CallSettings callSettings = null) => + CreateResourceAllowanceAsync(new CreateResourceAllowanceRequest + { + Parent = gax::GaxPreconditions.CheckNotNullOrEmpty(parent, nameof(parent)), + ResourceAllowanceId = resourceAllowanceId ?? "", + ResourceAllowance = gax::GaxPreconditions.CheckNotNull(resourceAllowance, nameof(resourceAllowance)), + }, callSettings); + + /// + /// Create a Resource Allowance. + /// + /// + /// Required. The parent resource name where the ResourceAllowance will be + /// created. Pattern: "projects/{project}/locations/{location}" + /// + /// + /// Required. The ResourceAllowance to create. + /// + /// + /// ID used to uniquely identify the ResourceAllowance within its parent scope. + /// This field should contain at most 63 characters and must start with + /// lowercase characters. + /// Only lowercase characters, numbers and '-' are accepted. + /// The '-' character cannot be the first or the last one. + /// A system generated ID will be used if the field is not set. + /// + /// The resource_allowance.name field in the request will be ignored and the + /// created resource name of the ResourceAllowance will be + /// "{parent}/resourceAllowances/{resource_allowance_id}". + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task CreateResourceAllowanceAsync(string parent, ResourceAllowance resourceAllowance, string resourceAllowanceId, st::CancellationToken cancellationToken) => + CreateResourceAllowanceAsync(parent, resourceAllowance, resourceAllowanceId, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Create a Resource Allowance. + /// + /// + /// Required. The parent resource name where the ResourceAllowance will be + /// created. Pattern: "projects/{project}/locations/{location}" + /// + /// + /// Required. The ResourceAllowance to create. + /// + /// + /// ID used to uniquely identify the ResourceAllowance within its parent scope. + /// This field should contain at most 63 characters and must start with + /// lowercase characters. + /// Only lowercase characters, numbers and '-' are accepted. + /// The '-' character cannot be the first or the last one. + /// A system generated ID will be used if the field is not set. + /// + /// The resource_allowance.name field in the request will be ignored and the + /// created resource name of the ResourceAllowance will be + /// "{parent}/resourceAllowances/{resource_allowance_id}". + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual ResourceAllowance CreateResourceAllowance(gagr::LocationName parent, ResourceAllowance resourceAllowance, string resourceAllowanceId, gaxgrpc::CallSettings callSettings = null) => + CreateResourceAllowance(new CreateResourceAllowanceRequest + { + ParentAsLocationName = gax::GaxPreconditions.CheckNotNull(parent, nameof(parent)), + ResourceAllowanceId = resourceAllowanceId ?? "", + ResourceAllowance = gax::GaxPreconditions.CheckNotNull(resourceAllowance, nameof(resourceAllowance)), + }, callSettings); + + /// + /// Create a Resource Allowance. + /// + /// + /// Required. The parent resource name where the ResourceAllowance will be + /// created. Pattern: "projects/{project}/locations/{location}" + /// + /// + /// Required. The ResourceAllowance to create. + /// + /// + /// ID used to uniquely identify the ResourceAllowance within its parent scope. + /// This field should contain at most 63 characters and must start with + /// lowercase characters. + /// Only lowercase characters, numbers and '-' are accepted. + /// The '-' character cannot be the first or the last one. + /// A system generated ID will be used if the field is not set. + /// + /// The resource_allowance.name field in the request will be ignored and the + /// created resource name of the ResourceAllowance will be + /// "{parent}/resourceAllowances/{resource_allowance_id}". + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task CreateResourceAllowanceAsync(gagr::LocationName parent, ResourceAllowance resourceAllowance, string resourceAllowanceId, gaxgrpc::CallSettings callSettings = null) => + CreateResourceAllowanceAsync(new CreateResourceAllowanceRequest + { + ParentAsLocationName = gax::GaxPreconditions.CheckNotNull(parent, nameof(parent)), + ResourceAllowanceId = resourceAllowanceId ?? "", + ResourceAllowance = gax::GaxPreconditions.CheckNotNull(resourceAllowance, nameof(resourceAllowance)), + }, callSettings); + + /// + /// Create a Resource Allowance. + /// + /// + /// Required. The parent resource name where the ResourceAllowance will be + /// created. Pattern: "projects/{project}/locations/{location}" + /// + /// + /// Required. The ResourceAllowance to create. + /// + /// + /// ID used to uniquely identify the ResourceAllowance within its parent scope. + /// This field should contain at most 63 characters and must start with + /// lowercase characters. + /// Only lowercase characters, numbers and '-' are accepted. + /// The '-' character cannot be the first or the last one. + /// A system generated ID will be used if the field is not set. + /// + /// The resource_allowance.name field in the request will be ignored and the + /// created resource name of the ResourceAllowance will be + /// "{parent}/resourceAllowances/{resource_allowance_id}". + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task CreateResourceAllowanceAsync(gagr::LocationName parent, ResourceAllowance resourceAllowance, string resourceAllowanceId, st::CancellationToken cancellationToken) => + CreateResourceAllowanceAsync(parent, resourceAllowance, resourceAllowanceId, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Get a ResourceAllowance specified by its resource name. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual ResourceAllowance GetResourceAllowance(GetResourceAllowanceRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Get a ResourceAllowance specified by its resource name. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task GetResourceAllowanceAsync(GetResourceAllowanceRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Get a ResourceAllowance specified by its resource name. + /// + /// The request object containing all of the parameters for the API call. + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task GetResourceAllowanceAsync(GetResourceAllowanceRequest request, st::CancellationToken cancellationToken) => + GetResourceAllowanceAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Get a ResourceAllowance specified by its resource name. + /// + /// + /// Required. ResourceAllowance name. + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual ResourceAllowance GetResourceAllowance(string name, gaxgrpc::CallSettings callSettings = null) => + GetResourceAllowance(new GetResourceAllowanceRequest + { + Name = gax::GaxPreconditions.CheckNotNullOrEmpty(name, nameof(name)), + }, callSettings); + + /// + /// Get a ResourceAllowance specified by its resource name. + /// + /// + /// Required. ResourceAllowance name. + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task GetResourceAllowanceAsync(string name, gaxgrpc::CallSettings callSettings = null) => + GetResourceAllowanceAsync(new GetResourceAllowanceRequest + { + Name = gax::GaxPreconditions.CheckNotNullOrEmpty(name, nameof(name)), + }, callSettings); + + /// + /// Get a ResourceAllowance specified by its resource name. + /// + /// + /// Required. ResourceAllowance name. + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task GetResourceAllowanceAsync(string name, st::CancellationToken cancellationToken) => + GetResourceAllowanceAsync(name, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Get a ResourceAllowance specified by its resource name. + /// + /// + /// Required. ResourceAllowance name. + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual ResourceAllowance GetResourceAllowance(ResourceAllowanceName name, gaxgrpc::CallSettings callSettings = null) => + GetResourceAllowance(new GetResourceAllowanceRequest + { + ResourceAllowanceName = gax::GaxPreconditions.CheckNotNull(name, nameof(name)), + }, callSettings); + + /// + /// Get a ResourceAllowance specified by its resource name. + /// + /// + /// Required. ResourceAllowance name. + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task GetResourceAllowanceAsync(ResourceAllowanceName name, gaxgrpc::CallSettings callSettings = null) => + GetResourceAllowanceAsync(new GetResourceAllowanceRequest + { + ResourceAllowanceName = gax::GaxPreconditions.CheckNotNull(name, nameof(name)), + }, callSettings); + + /// + /// Get a ResourceAllowance specified by its resource name. + /// + /// + /// Required. ResourceAllowance name. + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task GetResourceAllowanceAsync(ResourceAllowanceName name, st::CancellationToken cancellationToken) => + GetResourceAllowanceAsync(name, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Delete a ResourceAllowance. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual lro::Operation DeleteResourceAllowance(DeleteResourceAllowanceRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Delete a ResourceAllowance. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task> DeleteResourceAllowanceAsync(DeleteResourceAllowanceRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Delete a ResourceAllowance. + /// + /// The request object containing all of the parameters for the API call. + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task> DeleteResourceAllowanceAsync(DeleteResourceAllowanceRequest request, st::CancellationToken cancellationToken) => + DeleteResourceAllowanceAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// The long-running operations client for DeleteResourceAllowance. + public virtual lro::OperationsClient DeleteResourceAllowanceOperationsClient => throw new sys::NotImplementedException(); + + /// + /// Poll an operation once, using an operationName from a previous invocation of + /// DeleteResourceAllowance. + /// + /// + /// The name of a previously invoked operation. Must not be null or empty. + /// + /// If not null, applies overrides to this RPC call. + /// The result of polling the operation. + public virtual lro::Operation PollOnceDeleteResourceAllowance(string operationName, gaxgrpc::CallSettings callSettings = null) => + lro::Operation.PollOnceFromName(gax::GaxPreconditions.CheckNotNullOrEmpty(operationName, nameof(operationName)), DeleteResourceAllowanceOperationsClient, callSettings); + + /// + /// Asynchronously poll an operation once, using an operationName from a previous invocation of + /// DeleteResourceAllowance. + /// + /// + /// The name of a previously invoked operation. Must not be null or empty. + /// + /// If not null, applies overrides to this RPC call. + /// A task representing the result of polling the operation. + public virtual stt::Task> PollOnceDeleteResourceAllowanceAsync(string operationName, gaxgrpc::CallSettings callSettings = null) => + lro::Operation.PollOnceFromNameAsync(gax::GaxPreconditions.CheckNotNullOrEmpty(operationName, nameof(operationName)), DeleteResourceAllowanceOperationsClient, callSettings); + + /// + /// Delete a ResourceAllowance. + /// + /// + /// Required. ResourceAllowance name. + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual lro::Operation DeleteResourceAllowance(string name, gaxgrpc::CallSettings callSettings = null) => + DeleteResourceAllowance(new DeleteResourceAllowanceRequest + { + Name = gax::GaxPreconditions.CheckNotNullOrEmpty(name, nameof(name)), + }, callSettings); + + /// + /// Delete a ResourceAllowance. + /// + /// + /// Required. ResourceAllowance name. + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task> DeleteResourceAllowanceAsync(string name, gaxgrpc::CallSettings callSettings = null) => + DeleteResourceAllowanceAsync(new DeleteResourceAllowanceRequest + { + Name = gax::GaxPreconditions.CheckNotNullOrEmpty(name, nameof(name)), + }, callSettings); + + /// + /// Delete a ResourceAllowance. + /// + /// + /// Required. ResourceAllowance name. + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task> DeleteResourceAllowanceAsync(string name, st::CancellationToken cancellationToken) => + DeleteResourceAllowanceAsync(name, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Delete a ResourceAllowance. + /// + /// + /// Required. ResourceAllowance name. + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual lro::Operation DeleteResourceAllowance(ResourceAllowanceName name, gaxgrpc::CallSettings callSettings = null) => + DeleteResourceAllowance(new DeleteResourceAllowanceRequest + { + ResourceAllowanceName = gax::GaxPreconditions.CheckNotNull(name, nameof(name)), + }, callSettings); + + /// + /// Delete a ResourceAllowance. + /// + /// + /// Required. ResourceAllowance name. + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task> DeleteResourceAllowanceAsync(ResourceAllowanceName name, gaxgrpc::CallSettings callSettings = null) => + DeleteResourceAllowanceAsync(new DeleteResourceAllowanceRequest + { + ResourceAllowanceName = gax::GaxPreconditions.CheckNotNull(name, nameof(name)), + }, callSettings); + + /// + /// Delete a ResourceAllowance. + /// + /// + /// Required. ResourceAllowance name. + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task> DeleteResourceAllowanceAsync(ResourceAllowanceName name, st::CancellationToken cancellationToken) => + DeleteResourceAllowanceAsync(name, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// List all ResourceAllowances for a project within a region. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A pageable sequence of resources. + public virtual gax::PagedEnumerable ListResourceAllowances(ListResourceAllowancesRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// List all ResourceAllowances for a project within a region. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A pageable asynchronous sequence of resources. + public virtual gax::PagedAsyncEnumerable ListResourceAllowancesAsync(ListResourceAllowancesRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// List all ResourceAllowances for a project within a region. + /// + /// + /// Required. Parent path. + /// + /// + /// The token returned from the previous request. A value of null or an empty string retrieves the first + /// page. + /// + /// + /// The size of page to request. The response will not be larger than this, but may be smaller. A value of + /// null or 0 uses a server-defined page size. + /// + /// If not null, applies overrides to this RPC call. + /// A pageable sequence of resources. + public virtual gax::PagedEnumerable ListResourceAllowances(string parent, string pageToken = null, int? pageSize = null, gaxgrpc::CallSettings callSettings = null) + { + ListResourceAllowancesRequest request = new ListResourceAllowancesRequest + { + Parent = gax::GaxPreconditions.CheckNotNullOrEmpty(parent, nameof(parent)), + }; + if (pageToken != null) + { + request.PageToken = pageToken; + } + if (pageSize != null) + { + request.PageSize = pageSize.Value; + } + return ListResourceAllowances(request, callSettings); + } + + /// + /// List all ResourceAllowances for a project within a region. + /// + /// + /// Required. Parent path. + /// + /// + /// The token returned from the previous request. A value of null or an empty string retrieves the first + /// page. + /// + /// + /// The size of page to request. The response will not be larger than this, but may be smaller. A value of + /// null or 0 uses a server-defined page size. + /// + /// If not null, applies overrides to this RPC call. + /// A pageable asynchronous sequence of resources. + public virtual gax::PagedAsyncEnumerable ListResourceAllowancesAsync(string parent, string pageToken = null, int? pageSize = null, gaxgrpc::CallSettings callSettings = null) + { + ListResourceAllowancesRequest request = new ListResourceAllowancesRequest + { + Parent = gax::GaxPreconditions.CheckNotNullOrEmpty(parent, nameof(parent)), + }; + if (pageToken != null) + { + request.PageToken = pageToken; + } + if (pageSize != null) + { + request.PageSize = pageSize.Value; + } + return ListResourceAllowancesAsync(request, callSettings); + } + + /// + /// List all ResourceAllowances for a project within a region. + /// + /// + /// Required. Parent path. + /// + /// + /// The token returned from the previous request. A value of null or an empty string retrieves the first + /// page. + /// + /// + /// The size of page to request. The response will not be larger than this, but may be smaller. A value of + /// null or 0 uses a server-defined page size. + /// + /// If not null, applies overrides to this RPC call. + /// A pageable sequence of resources. + public virtual gax::PagedEnumerable ListResourceAllowances(gagr::LocationName parent, string pageToken = null, int? pageSize = null, gaxgrpc::CallSettings callSettings = null) + { + ListResourceAllowancesRequest request = new ListResourceAllowancesRequest + { + ParentAsLocationName = gax::GaxPreconditions.CheckNotNull(parent, nameof(parent)), + }; + if (pageToken != null) + { + request.PageToken = pageToken; + } + if (pageSize != null) + { + request.PageSize = pageSize.Value; + } + return ListResourceAllowances(request, callSettings); + } + + /// + /// List all ResourceAllowances for a project within a region. + /// + /// + /// Required. Parent path. + /// + /// + /// The token returned from the previous request. A value of null or an empty string retrieves the first + /// page. + /// + /// + /// The size of page to request. The response will not be larger than this, but may be smaller. A value of + /// null or 0 uses a server-defined page size. + /// + /// If not null, applies overrides to this RPC call. + /// A pageable asynchronous sequence of resources. + public virtual gax::PagedAsyncEnumerable ListResourceAllowancesAsync(gagr::LocationName parent, string pageToken = null, int? pageSize = null, gaxgrpc::CallSettings callSettings = null) + { + ListResourceAllowancesRequest request = new ListResourceAllowancesRequest + { + ParentAsLocationName = gax::GaxPreconditions.CheckNotNull(parent, nameof(parent)), + }; + if (pageToken != null) + { + request.PageToken = pageToken; + } + if (pageSize != null) + { + request.PageSize = pageSize.Value; + } + return ListResourceAllowancesAsync(request, callSettings); + } + + /// + /// Update a Resource Allowance. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual ResourceAllowance UpdateResourceAllowance(UpdateResourceAllowanceRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Update a Resource Allowance. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task UpdateResourceAllowanceAsync(UpdateResourceAllowanceRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Update a Resource Allowance. + /// + /// The request object containing all of the parameters for the API call. + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task UpdateResourceAllowanceAsync(UpdateResourceAllowanceRequest request, st::CancellationToken cancellationToken) => + UpdateResourceAllowanceAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Update a Resource Allowance. + /// + /// + /// Required. The ResourceAllowance to update. + /// Update description. + /// Only fields specified in `update_mask` are updated. + /// + /// + /// Required. Mask of fields to update. + /// + /// Field mask is used to specify the fields to be overwritten in the + /// ResourceAllowance resource by the update. + /// The fields specified in the update_mask are relative to the resource, not + /// the full request. A field will be overwritten if it is in the mask. If the + /// user does not provide a mask then all fields will be overwritten. + /// + /// UpdateResourceAllowance request now only supports update on `limit` field. + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual ResourceAllowance UpdateResourceAllowance(ResourceAllowance resourceAllowance, wkt::FieldMask updateMask, gaxgrpc::CallSettings callSettings = null) => + UpdateResourceAllowance(new UpdateResourceAllowanceRequest + { + ResourceAllowance = gax::GaxPreconditions.CheckNotNull(resourceAllowance, nameof(resourceAllowance)), + UpdateMask = gax::GaxPreconditions.CheckNotNull(updateMask, nameof(updateMask)), + }, callSettings); + + /// + /// Update a Resource Allowance. + /// + /// + /// Required. The ResourceAllowance to update. + /// Update description. + /// Only fields specified in `update_mask` are updated. + /// + /// + /// Required. Mask of fields to update. + /// + /// Field mask is used to specify the fields to be overwritten in the + /// ResourceAllowance resource by the update. + /// The fields specified in the update_mask are relative to the resource, not + /// the full request. A field will be overwritten if it is in the mask. If the + /// user does not provide a mask then all fields will be overwritten. + /// + /// UpdateResourceAllowance request now only supports update on `limit` field. + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task UpdateResourceAllowanceAsync(ResourceAllowance resourceAllowance, wkt::FieldMask updateMask, gaxgrpc::CallSettings callSettings = null) => + UpdateResourceAllowanceAsync(new UpdateResourceAllowanceRequest + { + ResourceAllowance = gax::GaxPreconditions.CheckNotNull(resourceAllowance, nameof(resourceAllowance)), + UpdateMask = gax::GaxPreconditions.CheckNotNull(updateMask, nameof(updateMask)), + }, callSettings); + + /// + /// Update a Resource Allowance. + /// + /// + /// Required. The ResourceAllowance to update. + /// Update description. + /// Only fields specified in `update_mask` are updated. + /// + /// + /// Required. Mask of fields to update. + /// + /// Field mask is used to specify the fields to be overwritten in the + /// ResourceAllowance resource by the update. + /// The fields specified in the update_mask are relative to the resource, not + /// the full request. A field will be overwritten if it is in the mask. If the + /// user does not provide a mask then all fields will be overwritten. + /// + /// UpdateResourceAllowance request now only supports update on `limit` field. + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task UpdateResourceAllowanceAsync(ResourceAllowance resourceAllowance, wkt::FieldMask updateMask, st::CancellationToken cancellationToken) => + UpdateResourceAllowanceAsync(resourceAllowance, updateMask, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + } + + /// BatchService client wrapper implementation, for convenient use. + /// + /// Google Batch Service. + /// The service manages user submitted batch jobs and allocates Google Compute + /// Engine VM instances to run the jobs. + /// + public sealed partial class BatchServiceClientImpl : BatchServiceClient + { + private readonly gaxgrpc::ApiCall _callCreateJob; + + private readonly gaxgrpc::ApiCall _callGetJob; + + private readonly gaxgrpc::ApiCall _callDeleteJob; + + private readonly gaxgrpc::ApiCall _callCancelJob; + + private readonly gaxgrpc::ApiCall _callUpdateJob; + + private readonly gaxgrpc::ApiCall _callListJobs; + + private readonly gaxgrpc::ApiCall _callGetTask; + + private readonly gaxgrpc::ApiCall _callListTasks; + + private readonly gaxgrpc::ApiCall _callCreateResourceAllowance; + + private readonly gaxgrpc::ApiCall _callGetResourceAllowance; + + private readonly gaxgrpc::ApiCall _callDeleteResourceAllowance; + + private readonly gaxgrpc::ApiCall _callListResourceAllowances; + + private readonly gaxgrpc::ApiCall _callUpdateResourceAllowance; + + /// + /// Constructs a client wrapper for the BatchService service, with the specified gRPC client and settings. + /// + /// The underlying gRPC client. + /// The base used within this client. + /// Optional to use within this client. + public BatchServiceClientImpl(BatchService.BatchServiceClient grpcClient, BatchServiceSettings settings, mel::ILogger logger) + { + GrpcClient = grpcClient; + BatchServiceSettings effectiveSettings = settings ?? BatchServiceSettings.GetDefault(); + gaxgrpc::ClientHelper clientHelper = new gaxgrpc::ClientHelper(new gaxgrpc::ClientHelper.Options + { + Settings = effectiveSettings, + Logger = logger, + }); + DeleteJobOperationsClient = new lro::OperationsClientImpl(grpcClient.CreateOperationsClient(), effectiveSettings.DeleteJobOperationsSettings, logger); + CancelJobOperationsClient = new lro::OperationsClientImpl(grpcClient.CreateOperationsClient(), effectiveSettings.CancelJobOperationsSettings, logger); + DeleteResourceAllowanceOperationsClient = new lro::OperationsClientImpl(grpcClient.CreateOperationsClient(), effectiveSettings.DeleteResourceAllowanceOperationsSettings, logger); + LocationsClient = new gcl::LocationsClientImpl(grpcClient.CreateLocationsClient(), effectiveSettings.LocationsSettings, logger); + _callCreateJob = clientHelper.BuildApiCall("CreateJob", grpcClient.CreateJobAsync, grpcClient.CreateJob, effectiveSettings.CreateJobSettings).WithGoogleRequestParam("parent", request => request.Parent); + Modify_ApiCall(ref _callCreateJob); + Modify_CreateJobApiCall(ref _callCreateJob); + _callGetJob = clientHelper.BuildApiCall("GetJob", grpcClient.GetJobAsync, grpcClient.GetJob, effectiveSettings.GetJobSettings).WithGoogleRequestParam("name", request => request.Name); + Modify_ApiCall(ref _callGetJob); + Modify_GetJobApiCall(ref _callGetJob); + _callDeleteJob = clientHelper.BuildApiCall("DeleteJob", grpcClient.DeleteJobAsync, grpcClient.DeleteJob, effectiveSettings.DeleteJobSettings).WithGoogleRequestParam("name", request => request.Name); + Modify_ApiCall(ref _callDeleteJob); + Modify_DeleteJobApiCall(ref _callDeleteJob); + _callCancelJob = clientHelper.BuildApiCall("CancelJob", grpcClient.CancelJobAsync, grpcClient.CancelJob, effectiveSettings.CancelJobSettings).WithGoogleRequestParam("name", request => request.Name); + Modify_ApiCall(ref _callCancelJob); + Modify_CancelJobApiCall(ref _callCancelJob); + _callUpdateJob = clientHelper.BuildApiCall("UpdateJob", grpcClient.UpdateJobAsync, grpcClient.UpdateJob, effectiveSettings.UpdateJobSettings).WithGoogleRequestParam("job.name", request => request.Job?.Name); + Modify_ApiCall(ref _callUpdateJob); + Modify_UpdateJobApiCall(ref _callUpdateJob); + _callListJobs = clientHelper.BuildApiCall("ListJobs", grpcClient.ListJobsAsync, grpcClient.ListJobs, effectiveSettings.ListJobsSettings).WithGoogleRequestParam("parent", request => request.Parent); + Modify_ApiCall(ref _callListJobs); + Modify_ListJobsApiCall(ref _callListJobs); + _callGetTask = clientHelper.BuildApiCall("GetTask", grpcClient.GetTaskAsync, grpcClient.GetTask, effectiveSettings.GetTaskSettings).WithGoogleRequestParam("name", request => request.Name); + Modify_ApiCall(ref _callGetTask); + Modify_GetTaskApiCall(ref _callGetTask); + _callListTasks = clientHelper.BuildApiCall("ListTasks", grpcClient.ListTasksAsync, grpcClient.ListTasks, effectiveSettings.ListTasksSettings).WithGoogleRequestParam("parent", request => request.Parent); + Modify_ApiCall(ref _callListTasks); + Modify_ListTasksApiCall(ref _callListTasks); + _callCreateResourceAllowance = clientHelper.BuildApiCall("CreateResourceAllowance", grpcClient.CreateResourceAllowanceAsync, grpcClient.CreateResourceAllowance, effectiveSettings.CreateResourceAllowanceSettings).WithGoogleRequestParam("parent", request => request.Parent); + Modify_ApiCall(ref _callCreateResourceAllowance); + Modify_CreateResourceAllowanceApiCall(ref _callCreateResourceAllowance); + _callGetResourceAllowance = clientHelper.BuildApiCall("GetResourceAllowance", grpcClient.GetResourceAllowanceAsync, grpcClient.GetResourceAllowance, effectiveSettings.GetResourceAllowanceSettings).WithGoogleRequestParam("name", request => request.Name); + Modify_ApiCall(ref _callGetResourceAllowance); + Modify_GetResourceAllowanceApiCall(ref _callGetResourceAllowance); + _callDeleteResourceAllowance = clientHelper.BuildApiCall("DeleteResourceAllowance", grpcClient.DeleteResourceAllowanceAsync, grpcClient.DeleteResourceAllowance, effectiveSettings.DeleteResourceAllowanceSettings).WithGoogleRequestParam("name", request => request.Name); + Modify_ApiCall(ref _callDeleteResourceAllowance); + Modify_DeleteResourceAllowanceApiCall(ref _callDeleteResourceAllowance); + _callListResourceAllowances = clientHelper.BuildApiCall("ListResourceAllowances", grpcClient.ListResourceAllowancesAsync, grpcClient.ListResourceAllowances, effectiveSettings.ListResourceAllowancesSettings).WithGoogleRequestParam("parent", request => request.Parent); + Modify_ApiCall(ref _callListResourceAllowances); + Modify_ListResourceAllowancesApiCall(ref _callListResourceAllowances); + _callUpdateResourceAllowance = clientHelper.BuildApiCall("UpdateResourceAllowance", grpcClient.UpdateResourceAllowanceAsync, grpcClient.UpdateResourceAllowance, effectiveSettings.UpdateResourceAllowanceSettings).WithGoogleRequestParam("resource_allowance.name", request => request.ResourceAllowance?.Name); + Modify_ApiCall(ref _callUpdateResourceAllowance); + Modify_UpdateResourceAllowanceApiCall(ref _callUpdateResourceAllowance); + OnConstruction(grpcClient, effectiveSettings, clientHelper); + } + + partial void Modify_ApiCall(ref gaxgrpc::ApiCall call) where TRequest : class, proto::IMessage where TResponse : class, proto::IMessage; + + partial void Modify_CreateJobApiCall(ref gaxgrpc::ApiCall call); + + partial void Modify_GetJobApiCall(ref gaxgrpc::ApiCall call); + + partial void Modify_DeleteJobApiCall(ref gaxgrpc::ApiCall call); + + partial void Modify_CancelJobApiCall(ref gaxgrpc::ApiCall call); + + partial void Modify_UpdateJobApiCall(ref gaxgrpc::ApiCall call); + + partial void Modify_ListJobsApiCall(ref gaxgrpc::ApiCall call); + + partial void Modify_GetTaskApiCall(ref gaxgrpc::ApiCall call); + + partial void Modify_ListTasksApiCall(ref gaxgrpc::ApiCall call); + + partial void Modify_CreateResourceAllowanceApiCall(ref gaxgrpc::ApiCall call); + + partial void Modify_GetResourceAllowanceApiCall(ref gaxgrpc::ApiCall call); + + partial void Modify_DeleteResourceAllowanceApiCall(ref gaxgrpc::ApiCall call); + + partial void Modify_ListResourceAllowancesApiCall(ref gaxgrpc::ApiCall call); + + partial void Modify_UpdateResourceAllowanceApiCall(ref gaxgrpc::ApiCall call); + + partial void OnConstruction(BatchService.BatchServiceClient grpcClient, BatchServiceSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper); + + /// The underlying gRPC BatchService client + public override BatchService.BatchServiceClient GrpcClient { get; } + + /// The associated with this client. + public override gcl::LocationsClient LocationsClient { get; } + + partial void Modify_CreateJobRequest(ref CreateJobRequest request, ref gaxgrpc::CallSettings settings); + + partial void Modify_GetJobRequest(ref GetJobRequest request, ref gaxgrpc::CallSettings settings); + + partial void Modify_DeleteJobRequest(ref DeleteJobRequest request, ref gaxgrpc::CallSettings settings); + + partial void Modify_CancelJobRequest(ref CancelJobRequest request, ref gaxgrpc::CallSettings settings); + + partial void Modify_UpdateJobRequest(ref UpdateJobRequest request, ref gaxgrpc::CallSettings settings); + + partial void Modify_ListJobsRequest(ref ListJobsRequest request, ref gaxgrpc::CallSettings settings); + + partial void Modify_GetTaskRequest(ref GetTaskRequest request, ref gaxgrpc::CallSettings settings); + + partial void Modify_ListTasksRequest(ref ListTasksRequest request, ref gaxgrpc::CallSettings settings); + + partial void Modify_CreateResourceAllowanceRequest(ref CreateResourceAllowanceRequest request, ref gaxgrpc::CallSettings settings); + + partial void Modify_GetResourceAllowanceRequest(ref GetResourceAllowanceRequest request, ref gaxgrpc::CallSettings settings); + + partial void Modify_DeleteResourceAllowanceRequest(ref DeleteResourceAllowanceRequest request, ref gaxgrpc::CallSettings settings); + + partial void Modify_ListResourceAllowancesRequest(ref ListResourceAllowancesRequest request, ref gaxgrpc::CallSettings settings); + + partial void Modify_UpdateResourceAllowanceRequest(ref UpdateResourceAllowanceRequest request, ref gaxgrpc::CallSettings settings); + + /// + /// Create a Job. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public override Job CreateJob(CreateJobRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_CreateJobRequest(ref request, ref callSettings); + return _callCreateJob.Sync(request, callSettings); + } + + /// + /// Create a Job. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public override stt::Task CreateJobAsync(CreateJobRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_CreateJobRequest(ref request, ref callSettings); + return _callCreateJob.Async(request, callSettings); + } + + /// + /// Get a Job specified by its resource name. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public override Job GetJob(GetJobRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_GetJobRequest(ref request, ref callSettings); + return _callGetJob.Sync(request, callSettings); + } + + /// + /// Get a Job specified by its resource name. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public override stt::Task GetJobAsync(GetJobRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_GetJobRequest(ref request, ref callSettings); + return _callGetJob.Async(request, callSettings); + } + + /// The long-running operations client for DeleteJob. + public override lro::OperationsClient DeleteJobOperationsClient { get; } + + /// + /// Delete a Job. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public override lro::Operation DeleteJob(DeleteJobRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_DeleteJobRequest(ref request, ref callSettings); + return new lro::Operation(_callDeleteJob.Sync(request, callSettings), DeleteJobOperationsClient); + } + + /// + /// Delete a Job. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public override async stt::Task> DeleteJobAsync(DeleteJobRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_DeleteJobRequest(ref request, ref callSettings); + return new lro::Operation(await _callDeleteJob.Async(request, callSettings).ConfigureAwait(false), DeleteJobOperationsClient); + } + + /// The long-running operations client for CancelJob. + public override lro::OperationsClient CancelJobOperationsClient { get; } + + /// + /// Cancel a Job. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public override lro::Operation CancelJob(CancelJobRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_CancelJobRequest(ref request, ref callSettings); + return new lro::Operation(_callCancelJob.Sync(request, callSettings), CancelJobOperationsClient); + } + + /// + /// Cancel a Job. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public override async stt::Task> CancelJobAsync(CancelJobRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_CancelJobRequest(ref request, ref callSettings); + return new lro::Operation(await _callCancelJob.Async(request, callSettings).ConfigureAwait(false), CancelJobOperationsClient); + } + + /// + /// Update a Job. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public override Job UpdateJob(UpdateJobRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_UpdateJobRequest(ref request, ref callSettings); + return _callUpdateJob.Sync(request, callSettings); + } + + /// + /// Update a Job. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public override stt::Task UpdateJobAsync(UpdateJobRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_UpdateJobRequest(ref request, ref callSettings); + return _callUpdateJob.Async(request, callSettings); + } + + /// + /// List all Jobs for a project within a region. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A pageable sequence of resources. + public override gax::PagedEnumerable ListJobs(ListJobsRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_ListJobsRequest(ref request, ref callSettings); + return new gaxgrpc::GrpcPagedEnumerable(_callListJobs, request, callSettings); + } + + /// + /// List all Jobs for a project within a region. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A pageable asynchronous sequence of resources. + public override gax::PagedAsyncEnumerable ListJobsAsync(ListJobsRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_ListJobsRequest(ref request, ref callSettings); + return new gaxgrpc::GrpcPagedAsyncEnumerable(_callListJobs, request, callSettings); + } + + /// + /// Return a single Task. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public override Task GetTask(GetTaskRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_GetTaskRequest(ref request, ref callSettings); + return _callGetTask.Sync(request, callSettings); + } + + /// + /// Return a single Task. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public override stt::Task GetTaskAsync(GetTaskRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_GetTaskRequest(ref request, ref callSettings); + return _callGetTask.Async(request, callSettings); + } + + /// + /// List Tasks associated with a job. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A pageable sequence of resources. + public override gax::PagedEnumerable ListTasks(ListTasksRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_ListTasksRequest(ref request, ref callSettings); + return new gaxgrpc::GrpcPagedEnumerable(_callListTasks, request, callSettings); + } + + /// + /// List Tasks associated with a job. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A pageable asynchronous sequence of resources. + public override gax::PagedAsyncEnumerable ListTasksAsync(ListTasksRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_ListTasksRequest(ref request, ref callSettings); + return new gaxgrpc::GrpcPagedAsyncEnumerable(_callListTasks, request, callSettings); + } + + /// + /// Create a Resource Allowance. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public override ResourceAllowance CreateResourceAllowance(CreateResourceAllowanceRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_CreateResourceAllowanceRequest(ref request, ref callSettings); + return _callCreateResourceAllowance.Sync(request, callSettings); + } + + /// + /// Create a Resource Allowance. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public override stt::Task CreateResourceAllowanceAsync(CreateResourceAllowanceRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_CreateResourceAllowanceRequest(ref request, ref callSettings); + return _callCreateResourceAllowance.Async(request, callSettings); + } + + /// + /// Get a ResourceAllowance specified by its resource name. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public override ResourceAllowance GetResourceAllowance(GetResourceAllowanceRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_GetResourceAllowanceRequest(ref request, ref callSettings); + return _callGetResourceAllowance.Sync(request, callSettings); + } + + /// + /// Get a ResourceAllowance specified by its resource name. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public override stt::Task GetResourceAllowanceAsync(GetResourceAllowanceRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_GetResourceAllowanceRequest(ref request, ref callSettings); + return _callGetResourceAllowance.Async(request, callSettings); + } + + /// The long-running operations client for DeleteResourceAllowance. + public override lro::OperationsClient DeleteResourceAllowanceOperationsClient { get; } + + /// + /// Delete a ResourceAllowance. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public override lro::Operation DeleteResourceAllowance(DeleteResourceAllowanceRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_DeleteResourceAllowanceRequest(ref request, ref callSettings); + return new lro::Operation(_callDeleteResourceAllowance.Sync(request, callSettings), DeleteResourceAllowanceOperationsClient); + } + + /// + /// Delete a ResourceAllowance. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public override async stt::Task> DeleteResourceAllowanceAsync(DeleteResourceAllowanceRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_DeleteResourceAllowanceRequest(ref request, ref callSettings); + return new lro::Operation(await _callDeleteResourceAllowance.Async(request, callSettings).ConfigureAwait(false), DeleteResourceAllowanceOperationsClient); + } + + /// + /// List all ResourceAllowances for a project within a region. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A pageable sequence of resources. + public override gax::PagedEnumerable ListResourceAllowances(ListResourceAllowancesRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_ListResourceAllowancesRequest(ref request, ref callSettings); + return new gaxgrpc::GrpcPagedEnumerable(_callListResourceAllowances, request, callSettings); + } + + /// + /// List all ResourceAllowances for a project within a region. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A pageable asynchronous sequence of resources. + public override gax::PagedAsyncEnumerable ListResourceAllowancesAsync(ListResourceAllowancesRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_ListResourceAllowancesRequest(ref request, ref callSettings); + return new gaxgrpc::GrpcPagedAsyncEnumerable(_callListResourceAllowances, request, callSettings); + } + + /// + /// Update a Resource Allowance. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public override ResourceAllowance UpdateResourceAllowance(UpdateResourceAllowanceRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_UpdateResourceAllowanceRequest(ref request, ref callSettings); + return _callUpdateResourceAllowance.Sync(request, callSettings); + } + + /// + /// Update a Resource Allowance. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public override stt::Task UpdateResourceAllowanceAsync(UpdateResourceAllowanceRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_UpdateResourceAllowanceRequest(ref request, ref callSettings); + return _callUpdateResourceAllowance.Async(request, callSettings); + } + } + + public partial class ListJobsRequest : gaxgrpc::IPageRequest + { + } + + public partial class ListTasksRequest : gaxgrpc::IPageRequest + { + } + + public partial class ListResourceAllowancesRequest : gaxgrpc::IPageRequest + { + } + + public partial class ListJobsResponse : gaxgrpc::IPageResponse + { + /// Returns an enumerator that iterates through the resources in this response. + public scg::IEnumerator GetEnumerator() => Jobs.GetEnumerator(); + + sc::IEnumerator sc::IEnumerable.GetEnumerator() => GetEnumerator(); + } + + public partial class ListTasksResponse : gaxgrpc::IPageResponse + { + /// Returns an enumerator that iterates through the resources in this response. + public scg::IEnumerator GetEnumerator() => Tasks.GetEnumerator(); + + sc::IEnumerator sc::IEnumerable.GetEnumerator() => GetEnumerator(); + } + + public partial class ListResourceAllowancesResponse : gaxgrpc::IPageResponse + { + /// Returns an enumerator that iterates through the resources in this response. + public scg::IEnumerator GetEnumerator() => ResourceAllowances.GetEnumerator(); + + sc::IEnumerator sc::IEnumerable.GetEnumerator() => GetEnumerator(); + } + + public static partial class BatchService + { + public partial class BatchServiceClient + { + /// + /// Creates a new instance of using the same call invoker as + /// this client. + /// + /// A new Operations client for the same target as this client. + public virtual lro::Operations.OperationsClient CreateOperationsClient() => + new lro::Operations.OperationsClient(CallInvoker); + } + } + + public static partial class BatchService + { + public partial class BatchServiceClient + { + /// + /// Creates a new instance of using the same call invoker as + /// this client. + /// + /// + /// A new for the same target as this client. + /// + public virtual gcl::Locations.LocationsClient CreateLocationsClient() => + new gcl::Locations.LocationsClient(CallInvoker); + } + } +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.csproj b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.csproj new file mode 100755 index 000000000000..dee47678efdd --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha.csproj @@ -0,0 +1,49 @@ + + + + + + 1.0.0-alpha01 + + + + + + + + + netstandard2.0;net462 + latest + true + true + true + + + + + + + + + + + + \ No newline at end of file diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha/Job.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha/Job.g.cs new file mode 100755 index 000000000000..e91367987606 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha/Job.g.cs @@ -0,0 +1,8049 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/batch/v1alpha/job.proto +// +#pragma warning disable 1591, 0612, 3021, 8981 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Google.Cloud.Batch.V1Alpha { + + /// Holder for reflection information generated from google/cloud/batch/v1alpha/job.proto + public static partial class JobReflection { + + #region Descriptor + /// File descriptor for google/cloud/batch/v1alpha/job.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static JobReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CiRnb29nbGUvY2xvdWQvYmF0Y2gvdjFhbHBoYS9qb2IucHJvdG8SGmdvb2ds", + "ZS5jbG91ZC5iYXRjaC52MWFscGhhGh9nb29nbGUvYXBpL2ZpZWxkX2JlaGF2", + "aW9yLnByb3RvGhlnb29nbGUvYXBpL3Jlc291cmNlLnByb3RvGiVnb29nbGUv", + "Y2xvdWQvYmF0Y2gvdjFhbHBoYS90YXNrLnByb3RvGh5nb29nbGUvcHJvdG9i", + "dWYvZHVyYXRpb24ucHJvdG8aH2dvb2dsZS9wcm90b2J1Zi90aW1lc3RhbXAu", + "cHJvdG8i0wcKA0pvYhIRCgRuYW1lGAEgASgJQgPgQQMSEAoDdWlkGAIgASgJ", + "QgPgQQMSEAoIcHJpb3JpdHkYAyABKAMSPwoLdGFza19ncm91cHMYBCADKAsy", + "JS5nb29nbGUuY2xvdWQuYmF0Y2gudjFhbHBoYS5UYXNrR3JvdXBCA+BBAhJL", + "ChFzY2hlZHVsaW5nX3BvbGljeRgFIAEoDjIwLmdvb2dsZS5jbG91ZC5iYXRj", + "aC52MWFscGhhLkpvYi5TY2hlZHVsaW5nUG9saWN5Ej8KDGRlcGVuZGVuY2ll", + "cxgGIAMoCzIpLmdvb2dsZS5jbG91ZC5iYXRjaC52MWFscGhhLkpvYkRlcGVu", + "ZGVuY3kSRwoRYWxsb2NhdGlvbl9wb2xpY3kYByABKAsyLC5nb29nbGUuY2xv", + "dWQuYmF0Y2gudjFhbHBoYS5BbGxvY2F0aW9uUG9saWN5EjsKBmxhYmVscxgI", + "IAMoCzIrLmdvb2dsZS5jbG91ZC5iYXRjaC52MWFscGhhLkpvYi5MYWJlbHNF", + "bnRyeRI6CgZzdGF0dXMYCSABKAsyJS5nb29nbGUuY2xvdWQuYmF0Y2gudjFh", + "bHBoYS5Kb2JTdGF0dXNCA+BBAxJFCgxub3RpZmljYXRpb24YCiABKAsyKy5n", + "b29nbGUuY2xvdWQuYmF0Y2gudjFhbHBoYS5Kb2JOb3RpZmljYXRpb25CAhgB", + "EjQKC2NyZWF0ZV90aW1lGAsgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVz", + "dGFtcEID4EEDEjQKC3VwZGF0ZV90aW1lGAwgASgLMhouZ29vZ2xlLnByb3Rv", + "YnVmLlRpbWVzdGFtcEID4EEDEjsKC2xvZ3NfcG9saWN5GA0gASgLMiYuZ29v", + "Z2xlLmNsb3VkLmJhdGNoLnYxYWxwaGEuTG9nc1BvbGljeRJCCg1ub3RpZmlj", + "YXRpb25zGA4gAygLMisuZ29vZ2xlLmNsb3VkLmJhdGNoLnYxYWxwaGEuSm9i", + "Tm90aWZpY2F0aW9uGi0KC0xhYmVsc0VudHJ5EgsKA2tleRgBIAEoCRINCgV2", + "YWx1ZRgCIAEoCToCOAEiTgoQU2NoZWR1bGluZ1BvbGljeRIhCh1TQ0hFRFVM", + "SU5HX1BPTElDWV9VTlNQRUNJRklFRBAAEhcKE0FTX1NPT05fQVNfUE9TU0lC", + "TEUQATpR6kFOChhiYXRjaC5nb29nbGVhcGlzLmNvbS9Kb2ISMnByb2plY3Rz", + "L3twcm9qZWN0fS9sb2NhdGlvbnMve2xvY2F0aW9ufS9qb2JzL3tqb2J9ItcC", + "CgpMb2dzUG9saWN5EkcKC2Rlc3RpbmF0aW9uGAEgASgOMjIuZ29vZ2xlLmNs", + "b3VkLmJhdGNoLnYxYWxwaGEuTG9nc1BvbGljeS5EZXN0aW5hdGlvbhIRCgls", + "b2dzX3BhdGgYAiABKAkSXAoUY2xvdWRfbG9nZ2luZ19vcHRpb24YAyABKAsy", + "OS5nb29nbGUuY2xvdWQuYmF0Y2gudjFhbHBoYS5Mb2dzUG9saWN5LkNsb3Vk", + "TG9nZ2luZ09wdGlvbkID4EEBGkYKEkNsb3VkTG9nZ2luZ09wdGlvbhIwCiN1", + "c2VfZ2VuZXJpY190YXNrX21vbml0b3JlZF9yZXNvdXJjZRgBIAEoCEID4EEB", + "IkcKC0Rlc3RpbmF0aW9uEhsKF0RFU1RJTkFUSU9OX1VOU1BFQ0lGSUVEEAAS", + "EQoNQ0xPVURfTE9HR0lORxABEggKBFBBVEgQAiL5AQoNSm9iRGVwZW5kZW5j", + "eRJDCgVpdGVtcxgBIAMoCzI0Lmdvb2dsZS5jbG91ZC5iYXRjaC52MWFscGhh", + "LkpvYkRlcGVuZGVuY3kuSXRlbXNFbnRyeRpcCgpJdGVtc0VudHJ5EgsKA2tl", + "eRgBIAEoCRI9CgV2YWx1ZRgCIAEoDjIuLmdvb2dsZS5jbG91ZC5iYXRjaC52", + "MWFscGhhLkpvYkRlcGVuZGVuY3kuVHlwZToCOAEiRQoEVHlwZRIUChBUWVBF", + "X1VOU1BFQ0lGSUVEEAASDQoJU1VDQ0VFREVEEAESCgoGRkFJTEVEEAISDAoI", + "RklOSVNIRUQQAyKZCAoJSm9iU3RhdHVzEjoKBXN0YXRlGAEgASgOMisuZ29v", + "Z2xlLmNsb3VkLmJhdGNoLnYxYWxwaGEuSm9iU3RhdHVzLlN0YXRlEj4KDXN0", + "YXR1c19ldmVudHMYAiADKAsyJy5nb29nbGUuY2xvdWQuYmF0Y2gudjFhbHBo", + "YS5TdGF0dXNFdmVudBJKCgt0YXNrX2dyb3VwcxgEIAMoCzI1Lmdvb2dsZS5j", + "bG91ZC5iYXRjaC52MWFscGhhLkpvYlN0YXR1cy5UYXNrR3JvdXBzRW50cnkS", + "LwoMcnVuX2R1cmF0aW9uGAUgASgLMhkuZ29vZ2xlLnByb3RvYnVmLkR1cmF0", + "aW9uEkEKDnJlc291cmNlX3VzYWdlGAYgASgLMikuZ29vZ2xlLmNsb3VkLmJh", + "dGNoLnYxYWxwaGEuUmVzb3VyY2VVc2FnZRrbAQoOSW5zdGFuY2VTdGF0dXMS", + "FAoMbWFjaGluZV90eXBlGAEgASgJEloKEnByb3Zpc2lvbmluZ19tb2RlbBgC", + "IAEoDjI+Lmdvb2dsZS5jbG91ZC5iYXRjaC52MWFscGhhLkFsbG9jYXRpb25Q", + "b2xpY3kuUHJvdmlzaW9uaW5nTW9kZWwSEQoJdGFza19wYWNrGAMgASgDEkQK", + "CWJvb3RfZGlzaxgEIAEoCzIxLmdvb2dsZS5jbG91ZC5iYXRjaC52MWFscGhh", + "LkFsbG9jYXRpb25Qb2xpY3kuRGlzaxrcAQoPVGFza0dyb3VwU3RhdHVzElEK", + "BmNvdW50cxgBIAMoCzJBLmdvb2dsZS5jbG91ZC5iYXRjaC52MWFscGhhLkpv", + "YlN0YXR1cy5UYXNrR3JvdXBTdGF0dXMuQ291bnRzRW50cnkSRwoJaW5zdGFu", + "Y2VzGAIgAygLMjQuZ29vZ2xlLmNsb3VkLmJhdGNoLnYxYWxwaGEuSm9iU3Rh", + "dHVzLkluc3RhbmNlU3RhdHVzGi0KC0NvdW50c0VudHJ5EgsKA2tleRgBIAEo", + "CRINCgV2YWx1ZRgCIAEoAzoCOAEaaAoPVGFza0dyb3Vwc0VudHJ5EgsKA2tl", + "eRgBIAEoCRJECgV2YWx1ZRgCIAEoCzI1Lmdvb2dsZS5jbG91ZC5iYXRjaC52", + "MWFscGhhLkpvYlN0YXR1cy5UYXNrR3JvdXBTdGF0dXM6AjgBIqgBCgVTdGF0", + "ZRIVChFTVEFURV9VTlNQRUNJRklFRBAAEgoKBlFVRVVFRBABEg0KCVNDSEVE", + "VUxFRBACEgsKB1JVTk5JTkcQAxINCglTVUNDRUVERUQQBBIKCgZGQUlMRUQQ", + "BRIYChRERUxFVElPTl9JTl9QUk9HUkVTUxAGEhwKGENBTkNFTExBVElPTl9J", + "Tl9QUk9HUkVTUxAHEg0KCUNBTkNFTExFRBAIIiMKDVJlc291cmNlVXNhZ2US", + "EgoKY29yZV9ob3VycxgBIAEoASKQAwoPSm9iTm90aWZpY2F0aW9uEhQKDHB1", + "YnN1Yl90b3BpYxgBIAEoCRJECgdtZXNzYWdlGAIgASgLMjMuZ29vZ2xlLmNs", + "b3VkLmJhdGNoLnYxYWxwaGEuSm9iTm90aWZpY2F0aW9uLk1lc3NhZ2Ua0wEK", + "B01lc3NhZ2USPgoEdHlwZRgBIAEoDjIwLmdvb2dsZS5jbG91ZC5iYXRjaC52", + "MWFscGhhLkpvYk5vdGlmaWNhdGlvbi5UeXBlEkIKDW5ld19qb2Jfc3RhdGUY", + "AiABKA4yKy5nb29nbGUuY2xvdWQuYmF0Y2gudjFhbHBoYS5Kb2JTdGF0dXMu", + "U3RhdGUSRAoObmV3X3Rhc2tfc3RhdGUYAyABKA4yLC5nb29nbGUuY2xvdWQu", + "YmF0Y2gudjFhbHBoYS5UYXNrU3RhdHVzLlN0YXRlIksKBFR5cGUSFAoQVFlQ", + "RV9VTlNQRUNJRklFRBAAEhUKEUpPQl9TVEFURV9DSEFOR0VEEAESFgoSVEFT", + "S19TVEFURV9DSEFOR0VEEAIi9hEKEEFsbG9jYXRpb25Qb2xpY3kSTQoIbG9j", + "YXRpb24YASABKAsyOy5nb29nbGUuY2xvdWQuYmF0Y2gudjFhbHBoYS5BbGxv", + "Y2F0aW9uUG9saWN5LkxvY2F0aW9uUG9saWN5ElEKCGluc3RhbmNlGAIgASgL", + "MjsuZ29vZ2xlLmNsb3VkLmJhdGNoLnYxYWxwaGEuQWxsb2NhdGlvblBvbGlj", + "eS5JbnN0YW5jZVBvbGljeUICGAESWAoJaW5zdGFuY2VzGAggAygLMkUuZ29v", + "Z2xlLmNsb3VkLmJhdGNoLnYxYWxwaGEuQWxsb2NhdGlvblBvbGljeS5JbnN0", + "YW5jZVBvbGljeU9yVGVtcGxhdGUSHgoSaW5zdGFuY2VfdGVtcGxhdGVzGAMg", + "AygJQgIYARJfChNwcm92aXNpb25pbmdfbW9kZWxzGAQgAygOMj4uZ29vZ2xl", + "LmNsb3VkLmJhdGNoLnYxYWxwaGEuQWxsb2NhdGlvblBvbGljeS5Qcm92aXNp", + "b25pbmdNb2RlbEICGAESIQoVc2VydmljZV9hY2NvdW50X2VtYWlsGAUgASgJ", + "QgIYARJDCg9zZXJ2aWNlX2FjY291bnQYCSABKAsyKi5nb29nbGUuY2xvdWQu", + "YmF0Y2gudjFhbHBoYS5TZXJ2aWNlQWNjb3VudBJICgZsYWJlbHMYBiADKAsy", + "OC5nb29nbGUuY2xvdWQuYmF0Y2gudjFhbHBoYS5BbGxvY2F0aW9uUG9saWN5", + "LkxhYmVsc0VudHJ5EksKB25ldHdvcmsYByABKAsyOi5nb29nbGUuY2xvdWQu", + "YmF0Y2gudjFhbHBoYS5BbGxvY2F0aW9uUG9saWN5Lk5ldHdvcmtQb2xpY3kS", + "TwoJcGxhY2VtZW50GAogASgLMjwuZ29vZ2xlLmNsb3VkLmJhdGNoLnYxYWxw", + "aGEuQWxsb2NhdGlvblBvbGljeS5QbGFjZW1lbnRQb2xpY3kSEQoEdGFncxgL", + "IAMoCUID4EEBGkUKDkxvY2F0aW9uUG9saWN5EhkKEWFsbG93ZWRfbG9jYXRp", + "b25zGAEgAygJEhgKEGRlbmllZF9sb2NhdGlvbnMYAiADKAkacQoERGlzaxIP", + "CgVpbWFnZRgEIAEoCUgAEhIKCHNuYXBzaG90GAUgASgJSAASDAoEdHlwZRgB", + "IAEoCRIPCgdzaXplX2diGAIgASgDEhYKDmRpc2tfaW50ZXJmYWNlGAYgASgJ", + "Qg0KC2RhdGFfc291cmNlGo8BCgxBdHRhY2hlZERpc2sSRQoIbmV3X2Rpc2sY", + "ASABKAsyMS5nb29nbGUuY2xvdWQuYmF0Y2gudjFhbHBoYS5BbGxvY2F0aW9u", + "UG9saWN5LkRpc2tIABIXCg1leGlzdGluZ19kaXNrGAIgASgJSAASEwoLZGV2", + "aWNlX25hbWUYAyABKAlCCgoIYXR0YWNoZWQaaAoLQWNjZWxlcmF0b3ISDAoE", + "dHlwZRgBIAEoCRINCgVjb3VudBgCIAEoAxIfChNpbnN0YWxsX2dwdV9kcml2", + "ZXJzGAMgASgIQgIYARIbCg5kcml2ZXJfdmVyc2lvbhgEIAEoCUID4EEBGrkD", + "Cg5JbnN0YW5jZVBvbGljeRIhChVhbGxvd2VkX21hY2hpbmVfdHlwZXMYASAD", + "KAlCAhgBEhQKDG1hY2hpbmVfdHlwZRgCIAEoCRIYChBtaW5fY3B1X3BsYXRm", + "b3JtGAMgASgJEloKEnByb3Zpc2lvbmluZ19tb2RlbBgEIAEoDjI+Lmdvb2ds", + "ZS5jbG91ZC5iYXRjaC52MWFscGhhLkFsbG9jYXRpb25Qb2xpY3kuUHJvdmlz", + "aW9uaW5nTW9kZWwSTgoMYWNjZWxlcmF0b3JzGAUgAygLMjguZ29vZ2xlLmNs", + "b3VkLmJhdGNoLnYxYWxwaGEuQWxsb2NhdGlvblBvbGljeS5BY2NlbGVyYXRv", + "chJECglib290X2Rpc2sYCCABKAsyMS5nb29nbGUuY2xvdWQuYmF0Y2gudjFh", + "bHBoYS5BbGxvY2F0aW9uUG9saWN5LkRpc2sSSAoFZGlza3MYBiADKAsyOS5n", + "b29nbGUuY2xvdWQuYmF0Y2gudjFhbHBoYS5BbGxvY2F0aW9uUG9saWN5LkF0", + "dGFjaGVkRGlzaxIYCgtyZXNlcnZhdGlvbhgHIAEoCUID4EEBGvsBChhJbnN0", + "YW5jZVBvbGljeU9yVGVtcGxhdGUSTQoGcG9saWN5GAEgASgLMjsuZ29vZ2xl", + "LmNsb3VkLmJhdGNoLnYxYWxwaGEuQWxsb2NhdGlvblBvbGljeS5JbnN0YW5j", + "ZVBvbGljeUgAEhsKEWluc3RhbmNlX3RlbXBsYXRlGAIgASgJSAASGwoTaW5z", + "dGFsbF9ncHVfZHJpdmVycxgDIAEoCBIeChFpbnN0YWxsX29wc19hZ2VudBgE", + "IAEoCEID4EEBEiMKFmJsb2NrX3Byb2plY3Rfc3NoX2tleXMYBSABKAhCA+BB", + "AUIRCg9wb2xpY3lfdGVtcGxhdGUaVwoQTmV0d29ya0ludGVyZmFjZRIPCgdu", + "ZXR3b3JrGAEgASgJEhIKCnN1Ym5ldHdvcmsYAiABKAkSHgoWbm9fZXh0ZXJu", + "YWxfaXBfYWRkcmVzcxgDIAEoCBpqCg1OZXR3b3JrUG9saWN5ElkKEm5ldHdv", + "cmtfaW50ZXJmYWNlcxgBIAMoCzI9Lmdvb2dsZS5jbG91ZC5iYXRjaC52MWFs", + "cGhhLkFsbG9jYXRpb25Qb2xpY3kuTmV0d29ya0ludGVyZmFjZRo8Cg9QbGFj", + "ZW1lbnRQb2xpY3kSEwoLY29sbG9jYXRpb24YASABKAkSFAoMbWF4X2Rpc3Rh", + "bmNlGAIgASgDGi0KC0xhYmVsc0VudHJ5EgsKA2tleRgBIAEoCRINCgV2YWx1", + "ZRgCIAEoCToCOAEiYAoRUHJvdmlzaW9uaW5nTW9kZWwSIgoeUFJPVklTSU9O", + "SU5HX01PREVMX1VOU1BFQ0lGSUVEEAASDAoIU1RBTkRBUkQQARIICgRTUE9U", + "EAISDwoLUFJFRU1QVElCTEUQAyLfBgoJVGFza0dyb3VwEhEKBG5hbWUYASAB", + "KAlCA+BBAxI8Cgl0YXNrX3NwZWMYAyABKAsyJC5nb29nbGUuY2xvdWQuYmF0", + "Y2gudjFhbHBoYS5UYXNrU3BlY0ID4EECEhIKCnRhc2tfY291bnQYBCABKAMS", + "EwoLcGFyYWxsZWxpc20YBSABKAMSUQoRc2NoZWR1bGluZ19wb2xpY3kYBiAB", + "KA4yNi5nb29nbGUuY2xvdWQuYmF0Y2gudjFhbHBoYS5UYXNrR3JvdXAuU2No", + "ZWR1bGluZ1BvbGljeRJHChFhbGxvY2F0aW9uX3BvbGljeRgHIAEoCzIsLmdv", + "b2dsZS5jbG91ZC5iYXRjaC52MWFscGhhLkFsbG9jYXRpb25Qb2xpY3kSQQoG", + "bGFiZWxzGAggAygLMjEuZ29vZ2xlLmNsb3VkLmJhdGNoLnYxYWxwaGEuVGFz", + "a0dyb3VwLkxhYmVsc0VudHJ5EkIKEXRhc2tfZW52aXJvbm1lbnRzGAkgAygL", + "MicuZ29vZ2xlLmNsb3VkLmJhdGNoLnYxYWxwaGEuRW52aXJvbm1lbnQSGwoT", + "dGFza19jb3VudF9wZXJfbm9kZRgKIAEoAxIaChJyZXF1aXJlX2hvc3RzX2Zp", + "bGUYCyABKAgSFgoOcGVybWlzc2l2ZV9zc2gYDCABKAgSHAoPcnVuX2FzX25v", + "bl9yb290GA4gASgIQgPgQQESSAoPc2VydmljZV9hY2NvdW50GA8gASgLMiou", + "Z29vZ2xlLmNsb3VkLmJhdGNoLnYxYWxwaGEuU2VydmljZUFjY291bnRCA+BB", + "ARotCgtMYWJlbHNFbnRyeRILCgNrZXkYASABKAkSDQoFdmFsdWUYAiABKAk6", + "AjgBIlwKEFNjaGVkdWxpbmdQb2xpY3kSIQodU0NIRURVTElOR19QT0xJQ1lf", + "VU5TUEVDSUZJRUQQABIXChNBU19TT09OX0FTX1BPU1NJQkxFEAESDAoISU5f", + "T1JERVIQAjpv6kFsCh5iYXRjaC5nb29nbGVhcGlzLmNvbS9UYXNrR3JvdXAS", + "SnByb2plY3RzL3twcm9qZWN0fS9sb2NhdGlvbnMve2xvY2F0aW9ufS9qb2Jz", + "L3tqb2J9L3Rhc2tHcm91cHMve3Rhc2tfZ3JvdXB9Ii8KDlNlcnZpY2VBY2Nv", + "dW50Eg0KBWVtYWlsGAEgASgJEg4KBnNjb3BlcxgCIAMoCULCAQoeY29tLmdv", + "b2dsZS5jbG91ZC5iYXRjaC52MWFscGhhQghKb2JQcm90b1ABWjRjbG91ZC5n", + "b29nbGUuY29tL2dvL2JhdGNoL2FwaXYxYWxwaGEvYmF0Y2hwYjtiYXRjaHBi", + "ogIDR0NCqgIaR29vZ2xlLkNsb3VkLkJhdGNoLlYxQWxwaGHKAhpHb29nbGVc", + "Q2xvdWRcQmF0Y2hcVjFhbHBoYeoCHUdvb2dsZTo6Q2xvdWQ6OkJhdGNoOjpW", + "MWFscGhhYgZwcm90bzM=")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { global::Google.Api.FieldBehaviorReflection.Descriptor, global::Google.Api.ResourceReflection.Descriptor, global::Google.Cloud.Batch.V1Alpha.TaskReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.DurationReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.TimestampReflection.Descriptor, }, + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Batch.V1Alpha.Job), global::Google.Cloud.Batch.V1Alpha.Job.Parser, new[]{ "Name", "Uid", "Priority", "TaskGroups", "SchedulingPolicy", "Dependencies", "AllocationPolicy", "Labels", "Status", "Notification", "CreateTime", "UpdateTime", "LogsPolicy", "Notifications" }, null, new[]{ typeof(global::Google.Cloud.Batch.V1Alpha.Job.Types.SchedulingPolicy) }, null, new pbr::GeneratedClrTypeInfo[] { null, }), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Batch.V1Alpha.LogsPolicy), global::Google.Cloud.Batch.V1Alpha.LogsPolicy.Parser, new[]{ "Destination", "LogsPath", "CloudLoggingOption" }, null, new[]{ typeof(global::Google.Cloud.Batch.V1Alpha.LogsPolicy.Types.Destination) }, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Batch.V1Alpha.LogsPolicy.Types.CloudLoggingOption), global::Google.Cloud.Batch.V1Alpha.LogsPolicy.Types.CloudLoggingOption.Parser, new[]{ "UseGenericTaskMonitoredResource" }, null, null, null, null)}), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Batch.V1Alpha.JobDependency), global::Google.Cloud.Batch.V1Alpha.JobDependency.Parser, new[]{ "Items" }, null, new[]{ typeof(global::Google.Cloud.Batch.V1Alpha.JobDependency.Types.Type) }, null, new pbr::GeneratedClrTypeInfo[] { null, }), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Batch.V1Alpha.JobStatus), global::Google.Cloud.Batch.V1Alpha.JobStatus.Parser, new[]{ "State", "StatusEvents", "TaskGroups", "RunDuration", "ResourceUsage" }, null, new[]{ typeof(global::Google.Cloud.Batch.V1Alpha.JobStatus.Types.State) }, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Batch.V1Alpha.JobStatus.Types.InstanceStatus), global::Google.Cloud.Batch.V1Alpha.JobStatus.Types.InstanceStatus.Parser, new[]{ "MachineType", "ProvisioningModel", "TaskPack", "BootDisk" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Batch.V1Alpha.JobStatus.Types.TaskGroupStatus), global::Google.Cloud.Batch.V1Alpha.JobStatus.Types.TaskGroupStatus.Parser, new[]{ "Counts", "Instances" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, }), + null, }), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Batch.V1Alpha.ResourceUsage), global::Google.Cloud.Batch.V1Alpha.ResourceUsage.Parser, new[]{ "CoreHours" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Batch.V1Alpha.JobNotification), global::Google.Cloud.Batch.V1Alpha.JobNotification.Parser, new[]{ "PubsubTopic", "Message" }, null, new[]{ typeof(global::Google.Cloud.Batch.V1Alpha.JobNotification.Types.Type) }, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Batch.V1Alpha.JobNotification.Types.Message), global::Google.Cloud.Batch.V1Alpha.JobNotification.Types.Message.Parser, new[]{ "Type", "NewJobState", "NewTaskState" }, null, null, null, null)}), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Batch.V1Alpha.AllocationPolicy), global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Parser, new[]{ "Location", "Instance", "Instances", "InstanceTemplates", "ProvisioningModels", "ServiceAccountEmail", "ServiceAccount", "Labels", "Network", "Placement", "Tags" }, null, new[]{ typeof(global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.ProvisioningModel) }, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.LocationPolicy), global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.LocationPolicy.Parser, new[]{ "AllowedLocations", "DeniedLocations" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.Disk), global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.Disk.Parser, new[]{ "Image", "Snapshot", "Type", "SizeGb", "DiskInterface" }, new[]{ "DataSource" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.AttachedDisk), global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.AttachedDisk.Parser, new[]{ "NewDisk", "ExistingDisk", "DeviceName" }, new[]{ "Attached" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.Accelerator), global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.Accelerator.Parser, new[]{ "Type", "Count", "InstallGpuDrivers", "DriverVersion" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.InstancePolicy), global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.InstancePolicy.Parser, new[]{ "AllowedMachineTypes", "MachineType", "MinCpuPlatform", "ProvisioningModel", "Accelerators", "BootDisk", "Disks", "Reservation" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.InstancePolicyOrTemplate), global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.InstancePolicyOrTemplate.Parser, new[]{ "Policy", "InstanceTemplate", "InstallGpuDrivers", "InstallOpsAgent", "BlockProjectSshKeys" }, new[]{ "PolicyTemplate" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.NetworkInterface), global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.NetworkInterface.Parser, new[]{ "Network", "Subnetwork", "NoExternalIpAddress" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.NetworkPolicy), global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.NetworkPolicy.Parser, new[]{ "NetworkInterfaces" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.PlacementPolicy), global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.PlacementPolicy.Parser, new[]{ "Collocation", "MaxDistance" }, null, null, null, null), + null, }), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Batch.V1Alpha.TaskGroup), global::Google.Cloud.Batch.V1Alpha.TaskGroup.Parser, new[]{ "Name", "TaskSpec", "TaskCount", "Parallelism", "SchedulingPolicy", "AllocationPolicy", "Labels", "TaskEnvironments", "TaskCountPerNode", "RequireHostsFile", "PermissiveSsh", "RunAsNonRoot", "ServiceAccount" }, null, new[]{ typeof(global::Google.Cloud.Batch.V1Alpha.TaskGroup.Types.SchedulingPolicy) }, null, new pbr::GeneratedClrTypeInfo[] { null, }), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Batch.V1Alpha.ServiceAccount), global::Google.Cloud.Batch.V1Alpha.ServiceAccount.Parser, new[]{ "Email", "Scopes" }, null, null, null, null) + })); + } + #endregion + + } + #region Messages + /// + /// The Cloud Batch Job description. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Job : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Job()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Batch.V1Alpha.JobReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Job() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Job(Job other) : this() { + name_ = other.name_; + uid_ = other.uid_; + priority_ = other.priority_; + taskGroups_ = other.taskGroups_.Clone(); + schedulingPolicy_ = other.schedulingPolicy_; + dependencies_ = other.dependencies_.Clone(); + allocationPolicy_ = other.allocationPolicy_ != null ? other.allocationPolicy_.Clone() : null; + labels_ = other.labels_.Clone(); + status_ = other.status_ != null ? other.status_.Clone() : null; + notification_ = other.notification_ != null ? other.notification_.Clone() : null; + createTime_ = other.createTime_ != null ? other.createTime_.Clone() : null; + updateTime_ = other.updateTime_ != null ? other.updateTime_.Clone() : null; + logsPolicy_ = other.logsPolicy_ != null ? other.logsPolicy_.Clone() : null; + notifications_ = other.notifications_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Job Clone() { + return new Job(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; + /// + /// Output only. Job name. + /// For example: "projects/123456/locations/us-central1/jobs/job01". + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "uid" field. + public const int UidFieldNumber = 2; + private string uid_ = ""; + /// + /// Output only. A system generated unique ID for the Job. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Uid { + get { return uid_; } + set { + uid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "priority" field. + public const int PriorityFieldNumber = 3; + private long priority_; + /// + /// Priority of the Job. + /// The valid value range is [0, 100). Default value is 0. + /// Higher value indicates higher priority. + /// A job with higher priority value is more likely to run earlier if all other + /// requirements are satisfied. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Priority { + get { return priority_; } + set { + priority_ = value; + } + } + + /// Field number for the "task_groups" field. + public const int TaskGroupsFieldNumber = 4; + private static readonly pb::FieldCodec _repeated_taskGroups_codec + = pb::FieldCodec.ForMessage(34, global::Google.Cloud.Batch.V1Alpha.TaskGroup.Parser); + private readonly pbc::RepeatedField taskGroups_ = new pbc::RepeatedField(); + /// + /// Required. TaskGroups in the Job. Only one TaskGroup is supported now. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField TaskGroups { + get { return taskGroups_; } + } + + /// Field number for the "scheduling_policy" field. + public const int SchedulingPolicyFieldNumber = 5; + private global::Google.Cloud.Batch.V1Alpha.Job.Types.SchedulingPolicy schedulingPolicy_ = global::Google.Cloud.Batch.V1Alpha.Job.Types.SchedulingPolicy.Unspecified; + /// + /// Scheduling policy for TaskGroups in the job. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Batch.V1Alpha.Job.Types.SchedulingPolicy SchedulingPolicy { + get { return schedulingPolicy_; } + set { + schedulingPolicy_ = value; + } + } + + /// Field number for the "dependencies" field. + public const int DependenciesFieldNumber = 6; + private static readonly pb::FieldCodec _repeated_dependencies_codec + = pb::FieldCodec.ForMessage(50, global::Google.Cloud.Batch.V1Alpha.JobDependency.Parser); + private readonly pbc::RepeatedField dependencies_ = new pbc::RepeatedField(); + /// + /// At least one of the dependencies must be satisfied before the Job is + /// scheduled to run. + /// Only one JobDependency is supported now. + /// Not yet implemented. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Dependencies { + get { return dependencies_; } + } + + /// Field number for the "allocation_policy" field. + public const int AllocationPolicyFieldNumber = 7; + private global::Google.Cloud.Batch.V1Alpha.AllocationPolicy allocationPolicy_; + /// + /// Compute resource allocation for all TaskGroups in the Job. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Batch.V1Alpha.AllocationPolicy AllocationPolicy { + get { return allocationPolicy_; } + set { + allocationPolicy_ = value; + } + } + + /// Field number for the "labels" field. + public const int LabelsFieldNumber = 8; + private static readonly pbc::MapField.Codec _map_labels_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForString(18, ""), 66); + private readonly pbc::MapField labels_ = new pbc::MapField(); + /// + /// Custom labels to apply to the job and any Cloud Logging + /// [LogEntry](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry) + /// that it generates. + /// + /// Use labels to group and describe the resources they are applied to. Batch + /// automatically applies predefined labels and supports multiple `labels` + /// fields for each job, which each let you apply custom labels to various + /// resources. Label names that start with "goog-" or "google-" are + /// reserved for predefined labels. For more information about labels with + /// Batch, see + /// [Organize resources using + /// labels](https://cloud.google.com/batch/docs/organize-resources-using-labels). + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::MapField Labels { + get { return labels_; } + } + + /// Field number for the "status" field. + public const int StatusFieldNumber = 9; + private global::Google.Cloud.Batch.V1Alpha.JobStatus status_; + /// + /// Output only. Job status. It is read only for users. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Batch.V1Alpha.JobStatus Status { + get { return status_; } + set { + status_ = value; + } + } + + /// Field number for the "notification" field. + public const int NotificationFieldNumber = 10; + private global::Google.Cloud.Batch.V1Alpha.JobNotification notification_; + /// + /// Deprecated: please use notifications instead. + /// + [global::System.ObsoleteAttribute] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Batch.V1Alpha.JobNotification Notification { + get { return notification_; } + set { + notification_ = value; + } + } + + /// Field number for the "create_time" field. + public const int CreateTimeFieldNumber = 11; + private global::Google.Protobuf.WellKnownTypes.Timestamp createTime_; + /// + /// Output only. When the Job was created. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.WellKnownTypes.Timestamp CreateTime { + get { return createTime_; } + set { + createTime_ = value; + } + } + + /// Field number for the "update_time" field. + public const int UpdateTimeFieldNumber = 12; + private global::Google.Protobuf.WellKnownTypes.Timestamp updateTime_; + /// + /// Output only. The last time the Job was updated. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.WellKnownTypes.Timestamp UpdateTime { + get { return updateTime_; } + set { + updateTime_ = value; + } + } + + /// Field number for the "logs_policy" field. + public const int LogsPolicyFieldNumber = 13; + private global::Google.Cloud.Batch.V1Alpha.LogsPolicy logsPolicy_; + /// + /// Log preservation policy for the Job. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Batch.V1Alpha.LogsPolicy LogsPolicy { + get { return logsPolicy_; } + set { + logsPolicy_ = value; + } + } + + /// Field number for the "notifications" field. + public const int NotificationsFieldNumber = 14; + private static readonly pb::FieldCodec _repeated_notifications_codec + = pb::FieldCodec.ForMessage(114, global::Google.Cloud.Batch.V1Alpha.JobNotification.Parser); + private readonly pbc::RepeatedField notifications_ = new pbc::RepeatedField(); + /// + /// Notification configurations. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Notifications { + get { return notifications_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Job); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Job other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + if (Uid != other.Uid) return false; + if (Priority != other.Priority) return false; + if(!taskGroups_.Equals(other.taskGroups_)) return false; + if (SchedulingPolicy != other.SchedulingPolicy) return false; + if(!dependencies_.Equals(other.dependencies_)) return false; + if (!object.Equals(AllocationPolicy, other.AllocationPolicy)) return false; + if (!Labels.Equals(other.Labels)) return false; + if (!object.Equals(Status, other.Status)) return false; + if (!object.Equals(Notification, other.Notification)) return false; + if (!object.Equals(CreateTime, other.CreateTime)) return false; + if (!object.Equals(UpdateTime, other.UpdateTime)) return false; + if (!object.Equals(LogsPolicy, other.LogsPolicy)) return false; + if(!notifications_.Equals(other.notifications_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (Uid.Length != 0) hash ^= Uid.GetHashCode(); + if (Priority != 0L) hash ^= Priority.GetHashCode(); + hash ^= taskGroups_.GetHashCode(); + if (SchedulingPolicy != global::Google.Cloud.Batch.V1Alpha.Job.Types.SchedulingPolicy.Unspecified) hash ^= SchedulingPolicy.GetHashCode(); + hash ^= dependencies_.GetHashCode(); + if (allocationPolicy_ != null) hash ^= AllocationPolicy.GetHashCode(); + hash ^= Labels.GetHashCode(); + if (status_ != null) hash ^= Status.GetHashCode(); + if (notification_ != null) hash ^= Notification.GetHashCode(); + if (createTime_ != null) hash ^= CreateTime.GetHashCode(); + if (updateTime_ != null) hash ^= UpdateTime.GetHashCode(); + if (logsPolicy_ != null) hash ^= LogsPolicy.GetHashCode(); + hash ^= notifications_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (Uid.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Uid); + } + if (Priority != 0L) { + output.WriteRawTag(24); + output.WriteInt64(Priority); + } + taskGroups_.WriteTo(output, _repeated_taskGroups_codec); + if (SchedulingPolicy != global::Google.Cloud.Batch.V1Alpha.Job.Types.SchedulingPolicy.Unspecified) { + output.WriteRawTag(40); + output.WriteEnum((int) SchedulingPolicy); + } + dependencies_.WriteTo(output, _repeated_dependencies_codec); + if (allocationPolicy_ != null) { + output.WriteRawTag(58); + output.WriteMessage(AllocationPolicy); + } + labels_.WriteTo(output, _map_labels_codec); + if (status_ != null) { + output.WriteRawTag(74); + output.WriteMessage(Status); + } + if (notification_ != null) { + output.WriteRawTag(82); + output.WriteMessage(Notification); + } + if (createTime_ != null) { + output.WriteRawTag(90); + output.WriteMessage(CreateTime); + } + if (updateTime_ != null) { + output.WriteRawTag(98); + output.WriteMessage(UpdateTime); + } + if (logsPolicy_ != null) { + output.WriteRawTag(106); + output.WriteMessage(LogsPolicy); + } + notifications_.WriteTo(output, _repeated_notifications_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (Uid.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Uid); + } + if (Priority != 0L) { + output.WriteRawTag(24); + output.WriteInt64(Priority); + } + taskGroups_.WriteTo(ref output, _repeated_taskGroups_codec); + if (SchedulingPolicy != global::Google.Cloud.Batch.V1Alpha.Job.Types.SchedulingPolicy.Unspecified) { + output.WriteRawTag(40); + output.WriteEnum((int) SchedulingPolicy); + } + dependencies_.WriteTo(ref output, _repeated_dependencies_codec); + if (allocationPolicy_ != null) { + output.WriteRawTag(58); + output.WriteMessage(AllocationPolicy); + } + labels_.WriteTo(ref output, _map_labels_codec); + if (status_ != null) { + output.WriteRawTag(74); + output.WriteMessage(Status); + } + if (notification_ != null) { + output.WriteRawTag(82); + output.WriteMessage(Notification); + } + if (createTime_ != null) { + output.WriteRawTag(90); + output.WriteMessage(CreateTime); + } + if (updateTime_ != null) { + output.WriteRawTag(98); + output.WriteMessage(UpdateTime); + } + if (logsPolicy_ != null) { + output.WriteRawTag(106); + output.WriteMessage(LogsPolicy); + } + notifications_.WriteTo(ref output, _repeated_notifications_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (Uid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Uid); + } + if (Priority != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Priority); + } + size += taskGroups_.CalculateSize(_repeated_taskGroups_codec); + if (SchedulingPolicy != global::Google.Cloud.Batch.V1Alpha.Job.Types.SchedulingPolicy.Unspecified) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) SchedulingPolicy); + } + size += dependencies_.CalculateSize(_repeated_dependencies_codec); + if (allocationPolicy_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(AllocationPolicy); + } + size += labels_.CalculateSize(_map_labels_codec); + if (status_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Status); + } + if (notification_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Notification); + } + if (createTime_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(CreateTime); + } + if (updateTime_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(UpdateTime); + } + if (logsPolicy_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(LogsPolicy); + } + size += notifications_.CalculateSize(_repeated_notifications_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Job other) { + if (other == null) { + return; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + if (other.Uid.Length != 0) { + Uid = other.Uid; + } + if (other.Priority != 0L) { + Priority = other.Priority; + } + taskGroups_.Add(other.taskGroups_); + if (other.SchedulingPolicy != global::Google.Cloud.Batch.V1Alpha.Job.Types.SchedulingPolicy.Unspecified) { + SchedulingPolicy = other.SchedulingPolicy; + } + dependencies_.Add(other.dependencies_); + if (other.allocationPolicy_ != null) { + if (allocationPolicy_ == null) { + AllocationPolicy = new global::Google.Cloud.Batch.V1Alpha.AllocationPolicy(); + } + AllocationPolicy.MergeFrom(other.AllocationPolicy); + } + labels_.MergeFrom(other.labels_); + if (other.status_ != null) { + if (status_ == null) { + Status = new global::Google.Cloud.Batch.V1Alpha.JobStatus(); + } + Status.MergeFrom(other.Status); + } + if (other.notification_ != null) { + if (notification_ == null) { + Notification = new global::Google.Cloud.Batch.V1Alpha.JobNotification(); + } + Notification.MergeFrom(other.Notification); + } + if (other.createTime_ != null) { + if (createTime_ == null) { + CreateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + CreateTime.MergeFrom(other.CreateTime); + } + if (other.updateTime_ != null) { + if (updateTime_ == null) { + UpdateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + UpdateTime.MergeFrom(other.UpdateTime); + } + if (other.logsPolicy_ != null) { + if (logsPolicy_ == null) { + LogsPolicy = new global::Google.Cloud.Batch.V1Alpha.LogsPolicy(); + } + LogsPolicy.MergeFrom(other.LogsPolicy); + } + notifications_.Add(other.notifications_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + Uid = input.ReadString(); + break; + } + case 24: { + Priority = input.ReadInt64(); + break; + } + case 34: { + taskGroups_.AddEntriesFrom(input, _repeated_taskGroups_codec); + break; + } + case 40: { + SchedulingPolicy = (global::Google.Cloud.Batch.V1Alpha.Job.Types.SchedulingPolicy) input.ReadEnum(); + break; + } + case 50: { + dependencies_.AddEntriesFrom(input, _repeated_dependencies_codec); + break; + } + case 58: { + if (allocationPolicy_ == null) { + AllocationPolicy = new global::Google.Cloud.Batch.V1Alpha.AllocationPolicy(); + } + input.ReadMessage(AllocationPolicy); + break; + } + case 66: { + labels_.AddEntriesFrom(input, _map_labels_codec); + break; + } + case 74: { + if (status_ == null) { + Status = new global::Google.Cloud.Batch.V1Alpha.JobStatus(); + } + input.ReadMessage(Status); + break; + } + case 82: { + if (notification_ == null) { + Notification = new global::Google.Cloud.Batch.V1Alpha.JobNotification(); + } + input.ReadMessage(Notification); + break; + } + case 90: { + if (createTime_ == null) { + CreateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + input.ReadMessage(CreateTime); + break; + } + case 98: { + if (updateTime_ == null) { + UpdateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + input.ReadMessage(UpdateTime); + break; + } + case 106: { + if (logsPolicy_ == null) { + LogsPolicy = new global::Google.Cloud.Batch.V1Alpha.LogsPolicy(); + } + input.ReadMessage(LogsPolicy); + break; + } + case 114: { + notifications_.AddEntriesFrom(input, _repeated_notifications_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + Uid = input.ReadString(); + break; + } + case 24: { + Priority = input.ReadInt64(); + break; + } + case 34: { + taskGroups_.AddEntriesFrom(ref input, _repeated_taskGroups_codec); + break; + } + case 40: { + SchedulingPolicy = (global::Google.Cloud.Batch.V1Alpha.Job.Types.SchedulingPolicy) input.ReadEnum(); + break; + } + case 50: { + dependencies_.AddEntriesFrom(ref input, _repeated_dependencies_codec); + break; + } + case 58: { + if (allocationPolicy_ == null) { + AllocationPolicy = new global::Google.Cloud.Batch.V1Alpha.AllocationPolicy(); + } + input.ReadMessage(AllocationPolicy); + break; + } + case 66: { + labels_.AddEntriesFrom(ref input, _map_labels_codec); + break; + } + case 74: { + if (status_ == null) { + Status = new global::Google.Cloud.Batch.V1Alpha.JobStatus(); + } + input.ReadMessage(Status); + break; + } + case 82: { + if (notification_ == null) { + Notification = new global::Google.Cloud.Batch.V1Alpha.JobNotification(); + } + input.ReadMessage(Notification); + break; + } + case 90: { + if (createTime_ == null) { + CreateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + input.ReadMessage(CreateTime); + break; + } + case 98: { + if (updateTime_ == null) { + UpdateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + input.ReadMessage(UpdateTime); + break; + } + case 106: { + if (logsPolicy_ == null) { + LogsPolicy = new global::Google.Cloud.Batch.V1Alpha.LogsPolicy(); + } + input.ReadMessage(LogsPolicy); + break; + } + case 114: { + notifications_.AddEntriesFrom(ref input, _repeated_notifications_codec); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the Job message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// The order that TaskGroups are scheduled relative to each other. + /// + /// Not yet implemented. + /// + public enum SchedulingPolicy { + /// + /// Unspecified. + /// + [pbr::OriginalName("SCHEDULING_POLICY_UNSPECIFIED")] Unspecified = 0, + /// + /// Run all TaskGroups as soon as possible. + /// + [pbr::OriginalName("AS_SOON_AS_POSSIBLE")] AsSoonAsPossible = 1, + } + + } + #endregion + + } + + /// + /// LogsPolicy describes how outputs from a Job's Tasks (stdout/stderr) will be + /// preserved. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class LogsPolicy : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new LogsPolicy()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Batch.V1Alpha.JobReflection.Descriptor.MessageTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public LogsPolicy() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public LogsPolicy(LogsPolicy other) : this() { + destination_ = other.destination_; + logsPath_ = other.logsPath_; + cloudLoggingOption_ = other.cloudLoggingOption_ != null ? other.cloudLoggingOption_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public LogsPolicy Clone() { + return new LogsPolicy(this); + } + + /// Field number for the "destination" field. + public const int DestinationFieldNumber = 1; + private global::Google.Cloud.Batch.V1Alpha.LogsPolicy.Types.Destination destination_ = global::Google.Cloud.Batch.V1Alpha.LogsPolicy.Types.Destination.Unspecified; + /// + /// Where logs should be saved. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Batch.V1Alpha.LogsPolicy.Types.Destination Destination { + get { return destination_; } + set { + destination_ = value; + } + } + + /// Field number for the "logs_path" field. + public const int LogsPathFieldNumber = 2; + private string logsPath_ = ""; + /// + /// The path to which logs are saved when the destination = PATH. This can be a + /// local file path on the VM, or under the mount point of a Persistent Disk or + /// Filestore, or a Cloud Storage path. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string LogsPath { + get { return logsPath_; } + set { + logsPath_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "cloud_logging_option" field. + public const int CloudLoggingOptionFieldNumber = 3; + private global::Google.Cloud.Batch.V1Alpha.LogsPolicy.Types.CloudLoggingOption cloudLoggingOption_; + /// + /// Optional. Additional settings for Cloud Logging. It will only take effect + /// when the destination of `LogsPolicy` is set to `CLOUD_LOGGING`. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Batch.V1Alpha.LogsPolicy.Types.CloudLoggingOption CloudLoggingOption { + get { return cloudLoggingOption_; } + set { + cloudLoggingOption_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as LogsPolicy); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(LogsPolicy other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Destination != other.Destination) return false; + if (LogsPath != other.LogsPath) return false; + if (!object.Equals(CloudLoggingOption, other.CloudLoggingOption)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Destination != global::Google.Cloud.Batch.V1Alpha.LogsPolicy.Types.Destination.Unspecified) hash ^= Destination.GetHashCode(); + if (LogsPath.Length != 0) hash ^= LogsPath.GetHashCode(); + if (cloudLoggingOption_ != null) hash ^= CloudLoggingOption.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Destination != global::Google.Cloud.Batch.V1Alpha.LogsPolicy.Types.Destination.Unspecified) { + output.WriteRawTag(8); + output.WriteEnum((int) Destination); + } + if (LogsPath.Length != 0) { + output.WriteRawTag(18); + output.WriteString(LogsPath); + } + if (cloudLoggingOption_ != null) { + output.WriteRawTag(26); + output.WriteMessage(CloudLoggingOption); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Destination != global::Google.Cloud.Batch.V1Alpha.LogsPolicy.Types.Destination.Unspecified) { + output.WriteRawTag(8); + output.WriteEnum((int) Destination); + } + if (LogsPath.Length != 0) { + output.WriteRawTag(18); + output.WriteString(LogsPath); + } + if (cloudLoggingOption_ != null) { + output.WriteRawTag(26); + output.WriteMessage(CloudLoggingOption); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Destination != global::Google.Cloud.Batch.V1Alpha.LogsPolicy.Types.Destination.Unspecified) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Destination); + } + if (LogsPath.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(LogsPath); + } + if (cloudLoggingOption_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(CloudLoggingOption); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(LogsPolicy other) { + if (other == null) { + return; + } + if (other.Destination != global::Google.Cloud.Batch.V1Alpha.LogsPolicy.Types.Destination.Unspecified) { + Destination = other.Destination; + } + if (other.LogsPath.Length != 0) { + LogsPath = other.LogsPath; + } + if (other.cloudLoggingOption_ != null) { + if (cloudLoggingOption_ == null) { + CloudLoggingOption = new global::Google.Cloud.Batch.V1Alpha.LogsPolicy.Types.CloudLoggingOption(); + } + CloudLoggingOption.MergeFrom(other.CloudLoggingOption); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Destination = (global::Google.Cloud.Batch.V1Alpha.LogsPolicy.Types.Destination) input.ReadEnum(); + break; + } + case 18: { + LogsPath = input.ReadString(); + break; + } + case 26: { + if (cloudLoggingOption_ == null) { + CloudLoggingOption = new global::Google.Cloud.Batch.V1Alpha.LogsPolicy.Types.CloudLoggingOption(); + } + input.ReadMessage(CloudLoggingOption); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Destination = (global::Google.Cloud.Batch.V1Alpha.LogsPolicy.Types.Destination) input.ReadEnum(); + break; + } + case 18: { + LogsPath = input.ReadString(); + break; + } + case 26: { + if (cloudLoggingOption_ == null) { + CloudLoggingOption = new global::Google.Cloud.Batch.V1Alpha.LogsPolicy.Types.CloudLoggingOption(); + } + input.ReadMessage(CloudLoggingOption); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the LogsPolicy message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// The destination (if any) for logs. + /// + public enum Destination { + /// + /// Logs are not preserved. + /// + [pbr::OriginalName("DESTINATION_UNSPECIFIED")] Unspecified = 0, + /// + /// Logs are streamed to Cloud Logging. + /// + [pbr::OriginalName("CLOUD_LOGGING")] CloudLogging = 1, + /// + /// Logs are saved to a file path. + /// + [pbr::OriginalName("PATH")] Path = 2, + } + + /// + /// `CloudLoggingOption` contains additional settings for Cloud Logging logs + /// generated by Batch job. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class CloudLoggingOption : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new CloudLoggingOption()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Batch.V1Alpha.LogsPolicy.Descriptor.NestedTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CloudLoggingOption() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CloudLoggingOption(CloudLoggingOption other) : this() { + useGenericTaskMonitoredResource_ = other.useGenericTaskMonitoredResource_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CloudLoggingOption Clone() { + return new CloudLoggingOption(this); + } + + /// Field number for the "use_generic_task_monitored_resource" field. + public const int UseGenericTaskMonitoredResourceFieldNumber = 1; + private bool useGenericTaskMonitoredResource_; + /// + /// Optional. Set this flag to true to change the [monitored resource + /// type](https://cloud.google.com/monitoring/api/resources) for + /// Cloud Logging logs generated by this Batch job from + /// the + /// [`batch.googleapis.com/Job`](https://cloud.google.com/monitoring/api/resources#tag_batch.googleapis.com/Job) + /// type to the formerly used + /// [`generic_task`](https://cloud.google.com/monitoring/api/resources#tag_generic_task) + /// type. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool UseGenericTaskMonitoredResource { + get { return useGenericTaskMonitoredResource_; } + set { + useGenericTaskMonitoredResource_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as CloudLoggingOption); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(CloudLoggingOption other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (UseGenericTaskMonitoredResource != other.UseGenericTaskMonitoredResource) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (UseGenericTaskMonitoredResource != false) hash ^= UseGenericTaskMonitoredResource.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (UseGenericTaskMonitoredResource != false) { + output.WriteRawTag(8); + output.WriteBool(UseGenericTaskMonitoredResource); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (UseGenericTaskMonitoredResource != false) { + output.WriteRawTag(8); + output.WriteBool(UseGenericTaskMonitoredResource); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (UseGenericTaskMonitoredResource != false) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(CloudLoggingOption other) { + if (other == null) { + return; + } + if (other.UseGenericTaskMonitoredResource != false) { + UseGenericTaskMonitoredResource = other.UseGenericTaskMonitoredResource; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + UseGenericTaskMonitoredResource = input.ReadBool(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + UseGenericTaskMonitoredResource = input.ReadBool(); + break; + } + } + } + } + #endif + + } + + } + #endregion + + } + + /// + /// JobDependency describes the state of other Jobs that the start of this Job + /// depends on. + /// All dependent Jobs must have been submitted in the same region. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class JobDependency : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new JobDependency()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Batch.V1Alpha.JobReflection.Descriptor.MessageTypes[2]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public JobDependency() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public JobDependency(JobDependency other) : this() { + items_ = other.items_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public JobDependency Clone() { + return new JobDependency(this); + } + + /// Field number for the "items" field. + public const int ItemsFieldNumber = 1; + private static readonly pbc::MapField.Codec _map_items_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForEnum(16, x => (int) x, x => (global::Google.Cloud.Batch.V1Alpha.JobDependency.Types.Type) x, global::Google.Cloud.Batch.V1Alpha.JobDependency.Types.Type.Unspecified), 10); + private readonly pbc::MapField items_ = new pbc::MapField(); + /// + /// Each item maps a Job name to a Type. + /// All items must be satisfied for the JobDependency to be satisfied (the AND + /// operation). + /// Once a condition for one item becomes true, it won't go back to false + /// even the dependent Job state changes again. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::MapField Items { + get { return items_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as JobDependency); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(JobDependency other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!Items.Equals(other.Items)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= Items.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + items_.WriteTo(output, _map_items_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + items_.WriteTo(ref output, _map_items_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += items_.CalculateSize(_map_items_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(JobDependency other) { + if (other == null) { + return; + } + items_.MergeFrom(other.items_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + items_.AddEntriesFrom(input, _map_items_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + items_.AddEntriesFrom(ref input, _map_items_codec); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the JobDependency message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// Dependency type. + /// + public enum Type { + /// + /// Unspecified. + /// + [pbr::OriginalName("TYPE_UNSPECIFIED")] Unspecified = 0, + /// + /// The dependent Job has succeeded. + /// + [pbr::OriginalName("SUCCEEDED")] Succeeded = 1, + /// + /// The dependent Job has failed. + /// + [pbr::OriginalName("FAILED")] Failed = 2, + /// + /// SUCCEEDED or FAILED. + /// + [pbr::OriginalName("FINISHED")] Finished = 3, + } + + } + #endregion + + } + + /// + /// Job status. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class JobStatus : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new JobStatus()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Batch.V1Alpha.JobReflection.Descriptor.MessageTypes[3]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public JobStatus() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public JobStatus(JobStatus other) : this() { + state_ = other.state_; + statusEvents_ = other.statusEvents_.Clone(); + taskGroups_ = other.taskGroups_.Clone(); + runDuration_ = other.runDuration_ != null ? other.runDuration_.Clone() : null; + resourceUsage_ = other.resourceUsage_ != null ? other.resourceUsage_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public JobStatus Clone() { + return new JobStatus(this); + } + + /// Field number for the "state" field. + public const int StateFieldNumber = 1; + private global::Google.Cloud.Batch.V1Alpha.JobStatus.Types.State state_ = global::Google.Cloud.Batch.V1Alpha.JobStatus.Types.State.Unspecified; + /// + /// Job state + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Batch.V1Alpha.JobStatus.Types.State State { + get { return state_; } + set { + state_ = value; + } + } + + /// Field number for the "status_events" field. + public const int StatusEventsFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_statusEvents_codec + = pb::FieldCodec.ForMessage(18, global::Google.Cloud.Batch.V1Alpha.StatusEvent.Parser); + private readonly pbc::RepeatedField statusEvents_ = new pbc::RepeatedField(); + /// + /// Job status events + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField StatusEvents { + get { return statusEvents_; } + } + + /// Field number for the "task_groups" field. + public const int TaskGroupsFieldNumber = 4; + private static readonly pbc::MapField.Codec _map_taskGroups_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForMessage(18, global::Google.Cloud.Batch.V1Alpha.JobStatus.Types.TaskGroupStatus.Parser), 34); + private readonly pbc::MapField taskGroups_ = new pbc::MapField(); + /// + /// Aggregated task status for each TaskGroup in the Job. + /// The map key is TaskGroup ID. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::MapField TaskGroups { + get { return taskGroups_; } + } + + /// Field number for the "run_duration" field. + public const int RunDurationFieldNumber = 5; + private global::Google.Protobuf.WellKnownTypes.Duration runDuration_; + /// + /// The duration of time that the Job spent in status RUNNING. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.WellKnownTypes.Duration RunDuration { + get { return runDuration_; } + set { + runDuration_ = value; + } + } + + /// Field number for the "resource_usage" field. + public const int ResourceUsageFieldNumber = 6; + private global::Google.Cloud.Batch.V1Alpha.ResourceUsage resourceUsage_; + /// + /// The resource usage of the job. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Batch.V1Alpha.ResourceUsage ResourceUsage { + get { return resourceUsage_; } + set { + resourceUsage_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as JobStatus); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(JobStatus other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (State != other.State) return false; + if(!statusEvents_.Equals(other.statusEvents_)) return false; + if (!TaskGroups.Equals(other.TaskGroups)) return false; + if (!object.Equals(RunDuration, other.RunDuration)) return false; + if (!object.Equals(ResourceUsage, other.ResourceUsage)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (State != global::Google.Cloud.Batch.V1Alpha.JobStatus.Types.State.Unspecified) hash ^= State.GetHashCode(); + hash ^= statusEvents_.GetHashCode(); + hash ^= TaskGroups.GetHashCode(); + if (runDuration_ != null) hash ^= RunDuration.GetHashCode(); + if (resourceUsage_ != null) hash ^= ResourceUsage.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (State != global::Google.Cloud.Batch.V1Alpha.JobStatus.Types.State.Unspecified) { + output.WriteRawTag(8); + output.WriteEnum((int) State); + } + statusEvents_.WriteTo(output, _repeated_statusEvents_codec); + taskGroups_.WriteTo(output, _map_taskGroups_codec); + if (runDuration_ != null) { + output.WriteRawTag(42); + output.WriteMessage(RunDuration); + } + if (resourceUsage_ != null) { + output.WriteRawTag(50); + output.WriteMessage(ResourceUsage); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (State != global::Google.Cloud.Batch.V1Alpha.JobStatus.Types.State.Unspecified) { + output.WriteRawTag(8); + output.WriteEnum((int) State); + } + statusEvents_.WriteTo(ref output, _repeated_statusEvents_codec); + taskGroups_.WriteTo(ref output, _map_taskGroups_codec); + if (runDuration_ != null) { + output.WriteRawTag(42); + output.WriteMessage(RunDuration); + } + if (resourceUsage_ != null) { + output.WriteRawTag(50); + output.WriteMessage(ResourceUsage); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (State != global::Google.Cloud.Batch.V1Alpha.JobStatus.Types.State.Unspecified) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) State); + } + size += statusEvents_.CalculateSize(_repeated_statusEvents_codec); + size += taskGroups_.CalculateSize(_map_taskGroups_codec); + if (runDuration_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(RunDuration); + } + if (resourceUsage_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ResourceUsage); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(JobStatus other) { + if (other == null) { + return; + } + if (other.State != global::Google.Cloud.Batch.V1Alpha.JobStatus.Types.State.Unspecified) { + State = other.State; + } + statusEvents_.Add(other.statusEvents_); + taskGroups_.MergeFrom(other.taskGroups_); + if (other.runDuration_ != null) { + if (runDuration_ == null) { + RunDuration = new global::Google.Protobuf.WellKnownTypes.Duration(); + } + RunDuration.MergeFrom(other.RunDuration); + } + if (other.resourceUsage_ != null) { + if (resourceUsage_ == null) { + ResourceUsage = new global::Google.Cloud.Batch.V1Alpha.ResourceUsage(); + } + ResourceUsage.MergeFrom(other.ResourceUsage); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + State = (global::Google.Cloud.Batch.V1Alpha.JobStatus.Types.State) input.ReadEnum(); + break; + } + case 18: { + statusEvents_.AddEntriesFrom(input, _repeated_statusEvents_codec); + break; + } + case 34: { + taskGroups_.AddEntriesFrom(input, _map_taskGroups_codec); + break; + } + case 42: { + if (runDuration_ == null) { + RunDuration = new global::Google.Protobuf.WellKnownTypes.Duration(); + } + input.ReadMessage(RunDuration); + break; + } + case 50: { + if (resourceUsage_ == null) { + ResourceUsage = new global::Google.Cloud.Batch.V1Alpha.ResourceUsage(); + } + input.ReadMessage(ResourceUsage); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + State = (global::Google.Cloud.Batch.V1Alpha.JobStatus.Types.State) input.ReadEnum(); + break; + } + case 18: { + statusEvents_.AddEntriesFrom(ref input, _repeated_statusEvents_codec); + break; + } + case 34: { + taskGroups_.AddEntriesFrom(ref input, _map_taskGroups_codec); + break; + } + case 42: { + if (runDuration_ == null) { + RunDuration = new global::Google.Protobuf.WellKnownTypes.Duration(); + } + input.ReadMessage(RunDuration); + break; + } + case 50: { + if (resourceUsage_ == null) { + ResourceUsage = new global::Google.Cloud.Batch.V1Alpha.ResourceUsage(); + } + input.ReadMessage(ResourceUsage); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the JobStatus message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// Valid Job states. + /// + public enum State { + /// + /// Job state unspecified. + /// + [pbr::OriginalName("STATE_UNSPECIFIED")] Unspecified = 0, + /// + /// Job is admitted (validated and persisted) and waiting for resources. + /// + [pbr::OriginalName("QUEUED")] Queued = 1, + /// + /// Job is scheduled to run as soon as resource allocation is ready. + /// The resource allocation may happen at a later time but with a high + /// chance to succeed. + /// + [pbr::OriginalName("SCHEDULED")] Scheduled = 2, + /// + /// Resource allocation has been successful. At least one Task in the Job is + /// RUNNING. + /// + [pbr::OriginalName("RUNNING")] Running = 3, + /// + /// All Tasks in the Job have finished successfully. + /// + [pbr::OriginalName("SUCCEEDED")] Succeeded = 4, + /// + /// At least one Task in the Job has failed. + /// + [pbr::OriginalName("FAILED")] Failed = 5, + /// + /// The Job will be deleted, but has not been deleted yet. Typically this is + /// because resources used by the Job are still being cleaned up. + /// + [pbr::OriginalName("DELETION_IN_PROGRESS")] DeletionInProgress = 6, + /// + /// The Job cancellation is in progress, this is because the resources used + /// by the Job are still being cleaned up. + /// + [pbr::OriginalName("CANCELLATION_IN_PROGRESS")] CancellationInProgress = 7, + /// + /// The Job has been cancelled, the task executions were stopped and the + /// resources were cleaned up. + /// + [pbr::OriginalName("CANCELLED")] Cancelled = 8, + } + + /// + /// VM instance status. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class InstanceStatus : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new InstanceStatus()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Batch.V1Alpha.JobStatus.Descriptor.NestedTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public InstanceStatus() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public InstanceStatus(InstanceStatus other) : this() { + machineType_ = other.machineType_; + provisioningModel_ = other.provisioningModel_; + taskPack_ = other.taskPack_; + bootDisk_ = other.bootDisk_ != null ? other.bootDisk_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public InstanceStatus Clone() { + return new InstanceStatus(this); + } + + /// Field number for the "machine_type" field. + public const int MachineTypeFieldNumber = 1; + private string machineType_ = ""; + /// + /// The Compute Engine machine type. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string MachineType { + get { return machineType_; } + set { + machineType_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "provisioning_model" field. + public const int ProvisioningModelFieldNumber = 2; + private global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.ProvisioningModel provisioningModel_ = global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.ProvisioningModel.Unspecified; + /// + /// The VM instance provisioning model. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.ProvisioningModel ProvisioningModel { + get { return provisioningModel_; } + set { + provisioningModel_ = value; + } + } + + /// Field number for the "task_pack" field. + public const int TaskPackFieldNumber = 3; + private long taskPack_; + /// + /// The max number of tasks can be assigned to this instance type. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long TaskPack { + get { return taskPack_; } + set { + taskPack_ = value; + } + } + + /// Field number for the "boot_disk" field. + public const int BootDiskFieldNumber = 4; + private global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.Disk bootDisk_; + /// + /// The VM boot disk. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.Disk BootDisk { + get { return bootDisk_; } + set { + bootDisk_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as InstanceStatus); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(InstanceStatus other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (MachineType != other.MachineType) return false; + if (ProvisioningModel != other.ProvisioningModel) return false; + if (TaskPack != other.TaskPack) return false; + if (!object.Equals(BootDisk, other.BootDisk)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (MachineType.Length != 0) hash ^= MachineType.GetHashCode(); + if (ProvisioningModel != global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.ProvisioningModel.Unspecified) hash ^= ProvisioningModel.GetHashCode(); + if (TaskPack != 0L) hash ^= TaskPack.GetHashCode(); + if (bootDisk_ != null) hash ^= BootDisk.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (MachineType.Length != 0) { + output.WriteRawTag(10); + output.WriteString(MachineType); + } + if (ProvisioningModel != global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.ProvisioningModel.Unspecified) { + output.WriteRawTag(16); + output.WriteEnum((int) ProvisioningModel); + } + if (TaskPack != 0L) { + output.WriteRawTag(24); + output.WriteInt64(TaskPack); + } + if (bootDisk_ != null) { + output.WriteRawTag(34); + output.WriteMessage(BootDisk); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (MachineType.Length != 0) { + output.WriteRawTag(10); + output.WriteString(MachineType); + } + if (ProvisioningModel != global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.ProvisioningModel.Unspecified) { + output.WriteRawTag(16); + output.WriteEnum((int) ProvisioningModel); + } + if (TaskPack != 0L) { + output.WriteRawTag(24); + output.WriteInt64(TaskPack); + } + if (bootDisk_ != null) { + output.WriteRawTag(34); + output.WriteMessage(BootDisk); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (MachineType.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(MachineType); + } + if (ProvisioningModel != global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.ProvisioningModel.Unspecified) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ProvisioningModel); + } + if (TaskPack != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(TaskPack); + } + if (bootDisk_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(BootDisk); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(InstanceStatus other) { + if (other == null) { + return; + } + if (other.MachineType.Length != 0) { + MachineType = other.MachineType; + } + if (other.ProvisioningModel != global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.ProvisioningModel.Unspecified) { + ProvisioningModel = other.ProvisioningModel; + } + if (other.TaskPack != 0L) { + TaskPack = other.TaskPack; + } + if (other.bootDisk_ != null) { + if (bootDisk_ == null) { + BootDisk = new global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.Disk(); + } + BootDisk.MergeFrom(other.BootDisk); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + MachineType = input.ReadString(); + break; + } + case 16: { + ProvisioningModel = (global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.ProvisioningModel) input.ReadEnum(); + break; + } + case 24: { + TaskPack = input.ReadInt64(); + break; + } + case 34: { + if (bootDisk_ == null) { + BootDisk = new global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.Disk(); + } + input.ReadMessage(BootDisk); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + MachineType = input.ReadString(); + break; + } + case 16: { + ProvisioningModel = (global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.ProvisioningModel) input.ReadEnum(); + break; + } + case 24: { + TaskPack = input.ReadInt64(); + break; + } + case 34: { + if (bootDisk_ == null) { + BootDisk = new global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.Disk(); + } + input.ReadMessage(BootDisk); + break; + } + } + } + } + #endif + + } + + /// + /// Aggregated task status for a TaskGroup. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class TaskGroupStatus : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TaskGroupStatus()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Batch.V1Alpha.JobStatus.Descriptor.NestedTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TaskGroupStatus() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TaskGroupStatus(TaskGroupStatus other) : this() { + counts_ = other.counts_.Clone(); + instances_ = other.instances_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TaskGroupStatus Clone() { + return new TaskGroupStatus(this); + } + + /// Field number for the "counts" field. + public const int CountsFieldNumber = 1; + private static readonly pbc::MapField.Codec _map_counts_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForInt64(16, 0L), 10); + private readonly pbc::MapField counts_ = new pbc::MapField(); + /// + /// Count of task in each state in the TaskGroup. + /// The map key is task state name. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::MapField Counts { + get { return counts_; } + } + + /// Field number for the "instances" field. + public const int InstancesFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_instances_codec + = pb::FieldCodec.ForMessage(18, global::Google.Cloud.Batch.V1Alpha.JobStatus.Types.InstanceStatus.Parser); + private readonly pbc::RepeatedField instances_ = new pbc::RepeatedField(); + /// + /// Status of instances allocated for the TaskGroup. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Instances { + get { return instances_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as TaskGroupStatus); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(TaskGroupStatus other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!Counts.Equals(other.Counts)) return false; + if(!instances_.Equals(other.instances_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= Counts.GetHashCode(); + hash ^= instances_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + counts_.WriteTo(output, _map_counts_codec); + instances_.WriteTo(output, _repeated_instances_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + counts_.WriteTo(ref output, _map_counts_codec); + instances_.WriteTo(ref output, _repeated_instances_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += counts_.CalculateSize(_map_counts_codec); + size += instances_.CalculateSize(_repeated_instances_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(TaskGroupStatus other) { + if (other == null) { + return; + } + counts_.MergeFrom(other.counts_); + instances_.Add(other.instances_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + counts_.AddEntriesFrom(input, _map_counts_codec); + break; + } + case 18: { + instances_.AddEntriesFrom(input, _repeated_instances_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + counts_.AddEntriesFrom(ref input, _map_counts_codec); + break; + } + case 18: { + instances_.AddEntriesFrom(ref input, _repeated_instances_codec); + break; + } + } + } + } + #endif + + } + + } + #endregion + + } + + /// + /// ResourceUsage describes the resource usage of the job. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ResourceUsage : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ResourceUsage()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Batch.V1Alpha.JobReflection.Descriptor.MessageTypes[4]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ResourceUsage() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ResourceUsage(ResourceUsage other) : this() { + coreHours_ = other.coreHours_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ResourceUsage Clone() { + return new ResourceUsage(this); + } + + /// Field number for the "core_hours" field. + public const int CoreHoursFieldNumber = 1; + private double coreHours_; + /// + /// The CPU core hours that the job consumes. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public double CoreHours { + get { return coreHours_; } + set { + coreHours_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ResourceUsage); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ResourceUsage other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(CoreHours, other.CoreHours)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (CoreHours != 0D) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(CoreHours); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (CoreHours != 0D) { + output.WriteRawTag(9); + output.WriteDouble(CoreHours); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (CoreHours != 0D) { + output.WriteRawTag(9); + output.WriteDouble(CoreHours); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (CoreHours != 0D) { + size += 1 + 8; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ResourceUsage other) { + if (other == null) { + return; + } + if (other.CoreHours != 0D) { + CoreHours = other.CoreHours; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 9: { + CoreHours = input.ReadDouble(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 9: { + CoreHours = input.ReadDouble(); + break; + } + } + } + } + #endif + + } + + /// + /// Notification configurations. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class JobNotification : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new JobNotification()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Batch.V1Alpha.JobReflection.Descriptor.MessageTypes[5]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public JobNotification() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public JobNotification(JobNotification other) : this() { + pubsubTopic_ = other.pubsubTopic_; + message_ = other.message_ != null ? other.message_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public JobNotification Clone() { + return new JobNotification(this); + } + + /// Field number for the "pubsub_topic" field. + public const int PubsubTopicFieldNumber = 1; + private string pubsubTopic_ = ""; + /// + /// The Pub/Sub topic where notifications for the job, like state + /// changes, will be published. If undefined, no Pub/Sub notifications + /// are sent for this job. + /// + /// Specify the topic using the following format: + /// `projects/{project}/topics/{topic}`. + /// Notably, if you want to specify a Pub/Sub topic that is in a + /// different project than the job, your administrator must grant your + /// project's Batch service agent permission to publish to that topic. + /// + /// For more information about configuring Pub/Sub notifications for + /// a job, see + /// https://cloud.google.com/batch/docs/enable-notifications. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string PubsubTopic { + get { return pubsubTopic_; } + set { + pubsubTopic_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "message" field. + public const int MessageFieldNumber = 2; + private global::Google.Cloud.Batch.V1Alpha.JobNotification.Types.Message message_; + /// + /// The attribute requirements of messages to be sent to this Pub/Sub topic. + /// Without this field, no message will be sent. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Batch.V1Alpha.JobNotification.Types.Message Message { + get { return message_; } + set { + message_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as JobNotification); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(JobNotification other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (PubsubTopic != other.PubsubTopic) return false; + if (!object.Equals(Message, other.Message)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (PubsubTopic.Length != 0) hash ^= PubsubTopic.GetHashCode(); + if (message_ != null) hash ^= Message.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (PubsubTopic.Length != 0) { + output.WriteRawTag(10); + output.WriteString(PubsubTopic); + } + if (message_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Message); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (PubsubTopic.Length != 0) { + output.WriteRawTag(10); + output.WriteString(PubsubTopic); + } + if (message_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Message); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (PubsubTopic.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(PubsubTopic); + } + if (message_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Message); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(JobNotification other) { + if (other == null) { + return; + } + if (other.PubsubTopic.Length != 0) { + PubsubTopic = other.PubsubTopic; + } + if (other.message_ != null) { + if (message_ == null) { + Message = new global::Google.Cloud.Batch.V1Alpha.JobNotification.Types.Message(); + } + Message.MergeFrom(other.Message); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + PubsubTopic = input.ReadString(); + break; + } + case 18: { + if (message_ == null) { + Message = new global::Google.Cloud.Batch.V1Alpha.JobNotification.Types.Message(); + } + input.ReadMessage(Message); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + PubsubTopic = input.ReadString(); + break; + } + case 18: { + if (message_ == null) { + Message = new global::Google.Cloud.Batch.V1Alpha.JobNotification.Types.Message(); + } + input.ReadMessage(Message); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the JobNotification message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// The message type. + /// + public enum Type { + /// + /// Unspecified. + /// + [pbr::OriginalName("TYPE_UNSPECIFIED")] Unspecified = 0, + /// + /// Notify users that the job state has changed. + /// + [pbr::OriginalName("JOB_STATE_CHANGED")] JobStateChanged = 1, + /// + /// Notify users that the task state has changed. + /// + [pbr::OriginalName("TASK_STATE_CHANGED")] TaskStateChanged = 2, + } + + /// + /// Message details. + /// Describe the conditions under which messages will be sent. + /// If no attribute is defined, no message will be sent by default. + /// One message should specify either the job or the task level attributes, + /// but not both. For example, + /// job level: JOB_STATE_CHANGED and/or a specified new_job_state; + /// task level: TASK_STATE_CHANGED and/or a specified new_task_state. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Message : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Message()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Batch.V1Alpha.JobNotification.Descriptor.NestedTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Message() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Message(Message other) : this() { + type_ = other.type_; + newJobState_ = other.newJobState_; + newTaskState_ = other.newTaskState_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Message Clone() { + return new Message(this); + } + + /// Field number for the "type" field. + public const int TypeFieldNumber = 1; + private global::Google.Cloud.Batch.V1Alpha.JobNotification.Types.Type type_ = global::Google.Cloud.Batch.V1Alpha.JobNotification.Types.Type.Unspecified; + /// + /// The message type. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Batch.V1Alpha.JobNotification.Types.Type Type { + get { return type_; } + set { + type_ = value; + } + } + + /// Field number for the "new_job_state" field. + public const int NewJobStateFieldNumber = 2; + private global::Google.Cloud.Batch.V1Alpha.JobStatus.Types.State newJobState_ = global::Google.Cloud.Batch.V1Alpha.JobStatus.Types.State.Unspecified; + /// + /// The new job state. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Batch.V1Alpha.JobStatus.Types.State NewJobState { + get { return newJobState_; } + set { + newJobState_ = value; + } + } + + /// Field number for the "new_task_state" field. + public const int NewTaskStateFieldNumber = 3; + private global::Google.Cloud.Batch.V1Alpha.TaskStatus.Types.State newTaskState_ = global::Google.Cloud.Batch.V1Alpha.TaskStatus.Types.State.Unspecified; + /// + /// The new task state. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Batch.V1Alpha.TaskStatus.Types.State NewTaskState { + get { return newTaskState_; } + set { + newTaskState_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Message); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Message other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Type != other.Type) return false; + if (NewJobState != other.NewJobState) return false; + if (NewTaskState != other.NewTaskState) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Type != global::Google.Cloud.Batch.V1Alpha.JobNotification.Types.Type.Unspecified) hash ^= Type.GetHashCode(); + if (NewJobState != global::Google.Cloud.Batch.V1Alpha.JobStatus.Types.State.Unspecified) hash ^= NewJobState.GetHashCode(); + if (NewTaskState != global::Google.Cloud.Batch.V1Alpha.TaskStatus.Types.State.Unspecified) hash ^= NewTaskState.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Type != global::Google.Cloud.Batch.V1Alpha.JobNotification.Types.Type.Unspecified) { + output.WriteRawTag(8); + output.WriteEnum((int) Type); + } + if (NewJobState != global::Google.Cloud.Batch.V1Alpha.JobStatus.Types.State.Unspecified) { + output.WriteRawTag(16); + output.WriteEnum((int) NewJobState); + } + if (NewTaskState != global::Google.Cloud.Batch.V1Alpha.TaskStatus.Types.State.Unspecified) { + output.WriteRawTag(24); + output.WriteEnum((int) NewTaskState); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Type != global::Google.Cloud.Batch.V1Alpha.JobNotification.Types.Type.Unspecified) { + output.WriteRawTag(8); + output.WriteEnum((int) Type); + } + if (NewJobState != global::Google.Cloud.Batch.V1Alpha.JobStatus.Types.State.Unspecified) { + output.WriteRawTag(16); + output.WriteEnum((int) NewJobState); + } + if (NewTaskState != global::Google.Cloud.Batch.V1Alpha.TaskStatus.Types.State.Unspecified) { + output.WriteRawTag(24); + output.WriteEnum((int) NewTaskState); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Type != global::Google.Cloud.Batch.V1Alpha.JobNotification.Types.Type.Unspecified) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Type); + } + if (NewJobState != global::Google.Cloud.Batch.V1Alpha.JobStatus.Types.State.Unspecified) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) NewJobState); + } + if (NewTaskState != global::Google.Cloud.Batch.V1Alpha.TaskStatus.Types.State.Unspecified) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) NewTaskState); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Message other) { + if (other == null) { + return; + } + if (other.Type != global::Google.Cloud.Batch.V1Alpha.JobNotification.Types.Type.Unspecified) { + Type = other.Type; + } + if (other.NewJobState != global::Google.Cloud.Batch.V1Alpha.JobStatus.Types.State.Unspecified) { + NewJobState = other.NewJobState; + } + if (other.NewTaskState != global::Google.Cloud.Batch.V1Alpha.TaskStatus.Types.State.Unspecified) { + NewTaskState = other.NewTaskState; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Type = (global::Google.Cloud.Batch.V1Alpha.JobNotification.Types.Type) input.ReadEnum(); + break; + } + case 16: { + NewJobState = (global::Google.Cloud.Batch.V1Alpha.JobStatus.Types.State) input.ReadEnum(); + break; + } + case 24: { + NewTaskState = (global::Google.Cloud.Batch.V1Alpha.TaskStatus.Types.State) input.ReadEnum(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Type = (global::Google.Cloud.Batch.V1Alpha.JobNotification.Types.Type) input.ReadEnum(); + break; + } + case 16: { + NewJobState = (global::Google.Cloud.Batch.V1Alpha.JobStatus.Types.State) input.ReadEnum(); + break; + } + case 24: { + NewTaskState = (global::Google.Cloud.Batch.V1Alpha.TaskStatus.Types.State) input.ReadEnum(); + break; + } + } + } + } + #endif + + } + + } + #endregion + + } + + /// + /// A Job's resource allocation policy describes when, where, and how compute + /// resources should be allocated for the Job. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class AllocationPolicy : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new AllocationPolicy()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Batch.V1Alpha.JobReflection.Descriptor.MessageTypes[6]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AllocationPolicy() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AllocationPolicy(AllocationPolicy other) : this() { + location_ = other.location_ != null ? other.location_.Clone() : null; + instance_ = other.instance_ != null ? other.instance_.Clone() : null; + instances_ = other.instances_.Clone(); + instanceTemplates_ = other.instanceTemplates_.Clone(); + provisioningModels_ = other.provisioningModels_.Clone(); + serviceAccountEmail_ = other.serviceAccountEmail_; + serviceAccount_ = other.serviceAccount_ != null ? other.serviceAccount_.Clone() : null; + labels_ = other.labels_.Clone(); + network_ = other.network_ != null ? other.network_.Clone() : null; + placement_ = other.placement_ != null ? other.placement_.Clone() : null; + tags_ = other.tags_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AllocationPolicy Clone() { + return new AllocationPolicy(this); + } + + /// Field number for the "location" field. + public const int LocationFieldNumber = 1; + private global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.LocationPolicy location_; + /// + /// Location where compute resources should be allocated for the Job. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.LocationPolicy Location { + get { return location_; } + set { + location_ = value; + } + } + + /// Field number for the "instance" field. + public const int InstanceFieldNumber = 2; + private global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.InstancePolicy instance_; + /// + /// Deprecated: please use instances[0].policy instead. + /// + [global::System.ObsoleteAttribute] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.InstancePolicy Instance { + get { return instance_; } + set { + instance_ = value; + } + } + + /// Field number for the "instances" field. + public const int InstancesFieldNumber = 8; + private static readonly pb::FieldCodec _repeated_instances_codec + = pb::FieldCodec.ForMessage(66, global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.InstancePolicyOrTemplate.Parser); + private readonly pbc::RepeatedField instances_ = new pbc::RepeatedField(); + /// + /// Describe instances that can be created by this AllocationPolicy. + /// Only instances[0] is supported now. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Instances { + get { return instances_; } + } + + /// Field number for the "instance_templates" field. + public const int InstanceTemplatesFieldNumber = 3; + private static readonly pb::FieldCodec _repeated_instanceTemplates_codec + = pb::FieldCodec.ForString(26); + private readonly pbc::RepeatedField instanceTemplates_ = new pbc::RepeatedField(); + /// + /// Deprecated: please use instances[0].template instead. + /// + [global::System.ObsoleteAttribute] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField InstanceTemplates { + get { return instanceTemplates_; } + } + + /// Field number for the "provisioning_models" field. + public const int ProvisioningModelsFieldNumber = 4; + private static readonly pb::FieldCodec _repeated_provisioningModels_codec + = pb::FieldCodec.ForEnum(34, x => (int) x, x => (global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.ProvisioningModel) x); + private readonly pbc::RepeatedField provisioningModels_ = new pbc::RepeatedField(); + /// + /// Deprecated: please use instances[0].policy.provisioning_model instead. + /// + [global::System.ObsoleteAttribute] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField ProvisioningModels { + get { return provisioningModels_; } + } + + /// Field number for the "service_account_email" field. + public const int ServiceAccountEmailFieldNumber = 5; + private string serviceAccountEmail_ = ""; + /// + /// Deprecated: please use service_account instead. + /// + [global::System.ObsoleteAttribute] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string ServiceAccountEmail { + get { return serviceAccountEmail_; } + set { + serviceAccountEmail_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "service_account" field. + public const int ServiceAccountFieldNumber = 9; + private global::Google.Cloud.Batch.V1Alpha.ServiceAccount serviceAccount_; + /// + /// Defines the service account for Batch-created VMs. If omitted, the [default + /// Compute Engine service + /// account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) + /// is used. Must match the service account specified in any used instance + /// template configured in the Batch job. + /// + /// Includes the following fields: + /// * email: The service account's email address. If not set, the default + /// Compute Engine service account is used. + /// * scopes: Additional OAuth scopes to grant the service account, beyond the + /// default cloud-platform scope. (list of strings) + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Batch.V1Alpha.ServiceAccount ServiceAccount { + get { return serviceAccount_; } + set { + serviceAccount_ = value; + } + } + + /// Field number for the "labels" field. + public const int LabelsFieldNumber = 6; + private static readonly pbc::MapField.Codec _map_labels_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForString(18, ""), 50); + private readonly pbc::MapField labels_ = new pbc::MapField(); + /// + /// Custom labels to apply to the job and all the Compute Engine resources + /// that both are created by this allocation policy and support labels. + /// + /// Use labels to group and describe the resources they are applied to. Batch + /// automatically applies predefined labels and supports multiple `labels` + /// fields for each job, which each let you apply custom labels to various + /// resources. Label names that start with "goog-" or "google-" are + /// reserved for predefined labels. For more information about labels with + /// Batch, see + /// [Organize resources using + /// labels](https://cloud.google.com/batch/docs/organize-resources-using-labels). + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::MapField Labels { + get { return labels_; } + } + + /// Field number for the "network" field. + public const int NetworkFieldNumber = 7; + private global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.NetworkPolicy network_; + /// + /// The network policy. + /// + /// If you define an instance template in the `InstancePolicyOrTemplate` field, + /// Batch will use the network settings in the instance template instead of + /// this field. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.NetworkPolicy Network { + get { return network_; } + set { + network_ = value; + } + } + + /// Field number for the "placement" field. + public const int PlacementFieldNumber = 10; + private global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.PlacementPolicy placement_; + /// + /// The placement policy. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.PlacementPolicy Placement { + get { return placement_; } + set { + placement_ = value; + } + } + + /// Field number for the "tags" field. + public const int TagsFieldNumber = 11; + private static readonly pb::FieldCodec _repeated_tags_codec + = pb::FieldCodec.ForString(90); + private readonly pbc::RepeatedField tags_ = new pbc::RepeatedField(); + /// + /// Optional. Tags applied to the VM instances. + /// + /// The tags identify valid sources or targets for network firewalls. + /// Each tag must be 1-63 characters long, and comply with + /// [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Tags { + get { return tags_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as AllocationPolicy); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(AllocationPolicy other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(Location, other.Location)) return false; + if (!object.Equals(Instance, other.Instance)) return false; + if(!instances_.Equals(other.instances_)) return false; + if(!instanceTemplates_.Equals(other.instanceTemplates_)) return false; + if(!provisioningModels_.Equals(other.provisioningModels_)) return false; + if (ServiceAccountEmail != other.ServiceAccountEmail) return false; + if (!object.Equals(ServiceAccount, other.ServiceAccount)) return false; + if (!Labels.Equals(other.Labels)) return false; + if (!object.Equals(Network, other.Network)) return false; + if (!object.Equals(Placement, other.Placement)) return false; + if(!tags_.Equals(other.tags_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (location_ != null) hash ^= Location.GetHashCode(); + if (instance_ != null) hash ^= Instance.GetHashCode(); + hash ^= instances_.GetHashCode(); + hash ^= instanceTemplates_.GetHashCode(); + hash ^= provisioningModels_.GetHashCode(); + if (ServiceAccountEmail.Length != 0) hash ^= ServiceAccountEmail.GetHashCode(); + if (serviceAccount_ != null) hash ^= ServiceAccount.GetHashCode(); + hash ^= Labels.GetHashCode(); + if (network_ != null) hash ^= Network.GetHashCode(); + if (placement_ != null) hash ^= Placement.GetHashCode(); + hash ^= tags_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (location_ != null) { + output.WriteRawTag(10); + output.WriteMessage(Location); + } + if (instance_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Instance); + } + instanceTemplates_.WriteTo(output, _repeated_instanceTemplates_codec); + provisioningModels_.WriteTo(output, _repeated_provisioningModels_codec); + if (ServiceAccountEmail.Length != 0) { + output.WriteRawTag(42); + output.WriteString(ServiceAccountEmail); + } + labels_.WriteTo(output, _map_labels_codec); + if (network_ != null) { + output.WriteRawTag(58); + output.WriteMessage(Network); + } + instances_.WriteTo(output, _repeated_instances_codec); + if (serviceAccount_ != null) { + output.WriteRawTag(74); + output.WriteMessage(ServiceAccount); + } + if (placement_ != null) { + output.WriteRawTag(82); + output.WriteMessage(Placement); + } + tags_.WriteTo(output, _repeated_tags_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (location_ != null) { + output.WriteRawTag(10); + output.WriteMessage(Location); + } + if (instance_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Instance); + } + instanceTemplates_.WriteTo(ref output, _repeated_instanceTemplates_codec); + provisioningModels_.WriteTo(ref output, _repeated_provisioningModels_codec); + if (ServiceAccountEmail.Length != 0) { + output.WriteRawTag(42); + output.WriteString(ServiceAccountEmail); + } + labels_.WriteTo(ref output, _map_labels_codec); + if (network_ != null) { + output.WriteRawTag(58); + output.WriteMessage(Network); + } + instances_.WriteTo(ref output, _repeated_instances_codec); + if (serviceAccount_ != null) { + output.WriteRawTag(74); + output.WriteMessage(ServiceAccount); + } + if (placement_ != null) { + output.WriteRawTag(82); + output.WriteMessage(Placement); + } + tags_.WriteTo(ref output, _repeated_tags_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (location_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Location); + } + if (instance_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Instance); + } + size += instances_.CalculateSize(_repeated_instances_codec); + size += instanceTemplates_.CalculateSize(_repeated_instanceTemplates_codec); + size += provisioningModels_.CalculateSize(_repeated_provisioningModels_codec); + if (ServiceAccountEmail.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ServiceAccountEmail); + } + if (serviceAccount_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ServiceAccount); + } + size += labels_.CalculateSize(_map_labels_codec); + if (network_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Network); + } + if (placement_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Placement); + } + size += tags_.CalculateSize(_repeated_tags_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(AllocationPolicy other) { + if (other == null) { + return; + } + if (other.location_ != null) { + if (location_ == null) { + Location = new global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.LocationPolicy(); + } + Location.MergeFrom(other.Location); + } + if (other.instance_ != null) { + if (instance_ == null) { + Instance = new global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.InstancePolicy(); + } + Instance.MergeFrom(other.Instance); + } + instances_.Add(other.instances_); + instanceTemplates_.Add(other.instanceTemplates_); + provisioningModels_.Add(other.provisioningModels_); + if (other.ServiceAccountEmail.Length != 0) { + ServiceAccountEmail = other.ServiceAccountEmail; + } + if (other.serviceAccount_ != null) { + if (serviceAccount_ == null) { + ServiceAccount = new global::Google.Cloud.Batch.V1Alpha.ServiceAccount(); + } + ServiceAccount.MergeFrom(other.ServiceAccount); + } + labels_.MergeFrom(other.labels_); + if (other.network_ != null) { + if (network_ == null) { + Network = new global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.NetworkPolicy(); + } + Network.MergeFrom(other.Network); + } + if (other.placement_ != null) { + if (placement_ == null) { + Placement = new global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.PlacementPolicy(); + } + Placement.MergeFrom(other.Placement); + } + tags_.Add(other.tags_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + if (location_ == null) { + Location = new global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.LocationPolicy(); + } + input.ReadMessage(Location); + break; + } + case 18: { + if (instance_ == null) { + Instance = new global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.InstancePolicy(); + } + input.ReadMessage(Instance); + break; + } + case 26: { + instanceTemplates_.AddEntriesFrom(input, _repeated_instanceTemplates_codec); + break; + } + case 34: + case 32: { + provisioningModels_.AddEntriesFrom(input, _repeated_provisioningModels_codec); + break; + } + case 42: { + ServiceAccountEmail = input.ReadString(); + break; + } + case 50: { + labels_.AddEntriesFrom(input, _map_labels_codec); + break; + } + case 58: { + if (network_ == null) { + Network = new global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.NetworkPolicy(); + } + input.ReadMessage(Network); + break; + } + case 66: { + instances_.AddEntriesFrom(input, _repeated_instances_codec); + break; + } + case 74: { + if (serviceAccount_ == null) { + ServiceAccount = new global::Google.Cloud.Batch.V1Alpha.ServiceAccount(); + } + input.ReadMessage(ServiceAccount); + break; + } + case 82: { + if (placement_ == null) { + Placement = new global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.PlacementPolicy(); + } + input.ReadMessage(Placement); + break; + } + case 90: { + tags_.AddEntriesFrom(input, _repeated_tags_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + if (location_ == null) { + Location = new global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.LocationPolicy(); + } + input.ReadMessage(Location); + break; + } + case 18: { + if (instance_ == null) { + Instance = new global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.InstancePolicy(); + } + input.ReadMessage(Instance); + break; + } + case 26: { + instanceTemplates_.AddEntriesFrom(ref input, _repeated_instanceTemplates_codec); + break; + } + case 34: + case 32: { + provisioningModels_.AddEntriesFrom(ref input, _repeated_provisioningModels_codec); + break; + } + case 42: { + ServiceAccountEmail = input.ReadString(); + break; + } + case 50: { + labels_.AddEntriesFrom(ref input, _map_labels_codec); + break; + } + case 58: { + if (network_ == null) { + Network = new global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.NetworkPolicy(); + } + input.ReadMessage(Network); + break; + } + case 66: { + instances_.AddEntriesFrom(ref input, _repeated_instances_codec); + break; + } + case 74: { + if (serviceAccount_ == null) { + ServiceAccount = new global::Google.Cloud.Batch.V1Alpha.ServiceAccount(); + } + input.ReadMessage(ServiceAccount); + break; + } + case 82: { + if (placement_ == null) { + Placement = new global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.PlacementPolicy(); + } + input.ReadMessage(Placement); + break; + } + case 90: { + tags_.AddEntriesFrom(ref input, _repeated_tags_codec); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the AllocationPolicy message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// Compute Engine VM instance provisioning model. + /// + public enum ProvisioningModel { + /// + /// Unspecified. + /// + [pbr::OriginalName("PROVISIONING_MODEL_UNSPECIFIED")] Unspecified = 0, + /// + /// Standard VM. + /// + [pbr::OriginalName("STANDARD")] Standard = 1, + /// + /// SPOT VM. + /// + [pbr::OriginalName("SPOT")] Spot = 2, + /// + /// Preemptible VM (PVM). + /// + /// Above SPOT VM is the preferable model for preemptible VM instances: the + /// old preemptible VM model (indicated by this field) is the older model, + /// and has been migrated to use the SPOT model as the underlying technology. + /// This old model will still be supported. + /// + [pbr::OriginalName("PREEMPTIBLE")] Preemptible = 3, + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class LocationPolicy : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new LocationPolicy()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Descriptor.NestedTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public LocationPolicy() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public LocationPolicy(LocationPolicy other) : this() { + allowedLocations_ = other.allowedLocations_.Clone(); + deniedLocations_ = other.deniedLocations_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public LocationPolicy Clone() { + return new LocationPolicy(this); + } + + /// Field number for the "allowed_locations" field. + public const int AllowedLocationsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_allowedLocations_codec + = pb::FieldCodec.ForString(10); + private readonly pbc::RepeatedField allowedLocations_ = new pbc::RepeatedField(); + /// + /// A list of allowed location names represented by internal URLs. + /// + /// Each location can be a region or a zone. + /// Only one region or multiple zones in one region is supported now. + /// For example, + /// ["regions/us-central1"] allow VMs in any zones in region us-central1. + /// ["zones/us-central1-a", "zones/us-central1-c"] only allow VMs + /// in zones us-central1-a and us-central1-c. + /// + /// Mixing locations from different regions would cause errors. + /// For example, + /// ["regions/us-central1", "zones/us-central1-a", "zones/us-central1-b", + /// "zones/us-west1-a"] contains locations from two distinct regions: + /// us-central1 and us-west1. This combination will trigger an error. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField AllowedLocations { + get { return allowedLocations_; } + } + + /// Field number for the "denied_locations" field. + public const int DeniedLocationsFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_deniedLocations_codec + = pb::FieldCodec.ForString(18); + private readonly pbc::RepeatedField deniedLocations_ = new pbc::RepeatedField(); + /// + /// A list of denied location names. + /// + /// Not yet implemented. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField DeniedLocations { + get { return deniedLocations_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as LocationPolicy); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(LocationPolicy other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!allowedLocations_.Equals(other.allowedLocations_)) return false; + if(!deniedLocations_.Equals(other.deniedLocations_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= allowedLocations_.GetHashCode(); + hash ^= deniedLocations_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + allowedLocations_.WriteTo(output, _repeated_allowedLocations_codec); + deniedLocations_.WriteTo(output, _repeated_deniedLocations_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + allowedLocations_.WriteTo(ref output, _repeated_allowedLocations_codec); + deniedLocations_.WriteTo(ref output, _repeated_deniedLocations_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += allowedLocations_.CalculateSize(_repeated_allowedLocations_codec); + size += deniedLocations_.CalculateSize(_repeated_deniedLocations_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(LocationPolicy other) { + if (other == null) { + return; + } + allowedLocations_.Add(other.allowedLocations_); + deniedLocations_.Add(other.deniedLocations_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + allowedLocations_.AddEntriesFrom(input, _repeated_allowedLocations_codec); + break; + } + case 18: { + deniedLocations_.AddEntriesFrom(input, _repeated_deniedLocations_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + allowedLocations_.AddEntriesFrom(ref input, _repeated_allowedLocations_codec); + break; + } + case 18: { + deniedLocations_.AddEntriesFrom(ref input, _repeated_deniedLocations_codec); + break; + } + } + } + } + #endif + + } + + /// + /// A new persistent disk or a local ssd. + /// A VM can only have one local SSD setting but multiple local SSD partitions. + /// See https://cloud.google.com/compute/docs/disks#pdspecs and + /// https://cloud.google.com/compute/docs/disks#localssds. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Disk : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Disk()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Descriptor.NestedTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Disk() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Disk(Disk other) : this() { + type_ = other.type_; + sizeGb_ = other.sizeGb_; + diskInterface_ = other.diskInterface_; + switch (other.DataSourceCase) { + case DataSourceOneofCase.Image: + Image = other.Image; + break; + case DataSourceOneofCase.Snapshot: + Snapshot = other.Snapshot; + break; + } + + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Disk Clone() { + return new Disk(this); + } + + /// Field number for the "image" field. + public const int ImageFieldNumber = 4; + /// + /// URL for a VM image to use as the data source for this disk. + /// For example, the following are all valid URLs: + /// + /// * Specify the image by its family name: + /// projects/{project}/global/images/family/{image_family} + /// * Specify the image version: + /// projects/{project}/global/images/{image_version} + /// + /// You can also use Batch customized image in short names. + /// The following image values are supported for a boot disk: + /// + /// * `batch-debian`: use Batch Debian images. + /// * `batch-cos`: use Batch Container-Optimized images. + /// * `batch-hpc-rocky`: use Batch HPC Rocky Linux images. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Image { + get { return HasImage ? (string) dataSource_ : ""; } + set { + dataSource_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + dataSourceCase_ = DataSourceOneofCase.Image; + } + } + /// Gets whether the "image" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasImage { + get { return dataSourceCase_ == DataSourceOneofCase.Image; } + } + /// Clears the value of the oneof if it's currently set to "image" + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearImage() { + if (HasImage) { + ClearDataSource(); + } + } + + /// Field number for the "snapshot" field. + public const int SnapshotFieldNumber = 5; + /// + /// Name of a snapshot used as the data source. + /// Snapshot is not supported as boot disk now. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Snapshot { + get { return HasSnapshot ? (string) dataSource_ : ""; } + set { + dataSource_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + dataSourceCase_ = DataSourceOneofCase.Snapshot; + } + } + /// Gets whether the "snapshot" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasSnapshot { + get { return dataSourceCase_ == DataSourceOneofCase.Snapshot; } + } + /// Clears the value of the oneof if it's currently set to "snapshot" + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearSnapshot() { + if (HasSnapshot) { + ClearDataSource(); + } + } + + /// Field number for the "type" field. + public const int TypeFieldNumber = 1; + private string type_ = ""; + /// + /// Disk type as shown in `gcloud compute disk-types list`. + /// For example, local SSD uses type "local-ssd". + /// Persistent disks and boot disks use "pd-balanced", "pd-extreme", "pd-ssd" + /// or "pd-standard". If not specified, "pd-standard" will be used as the + /// default type for non-boot disks, "pd-balanced" will be used as the + /// default type for boot disks. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Type { + get { return type_; } + set { + type_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "size_gb" field. + public const int SizeGbFieldNumber = 2; + private long sizeGb_; + /// + /// Disk size in GB. + /// + /// **Non-Boot Disk**: + /// If the `type` specifies a persistent disk, this field + /// is ignored if `data_source` is set as `image` or `snapshot`. + /// If the `type` specifies a local SSD, this field should be a multiple of + /// 375 GB, otherwise, the final size will be the next greater multiple of + /// 375 GB. + /// + /// **Boot Disk**: + /// Batch will calculate the boot disk size based on source + /// image and task requirements if you do not speicify the size. + /// If both this field and the `boot_disk_mib` field in task spec's + /// `compute_resource` are defined, Batch will only honor this field. + /// Also, this field should be no smaller than the source disk's + /// size when the `data_source` is set as `snapshot` or `image`. + /// For example, if you set an image as the `data_source` field and the + /// image's default disk size 30 GB, you can only use this field to make the + /// disk larger or equal to 30 GB. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long SizeGb { + get { return sizeGb_; } + set { + sizeGb_ = value; + } + } + + /// Field number for the "disk_interface" field. + public const int DiskInterfaceFieldNumber = 6; + private string diskInterface_ = ""; + /// + /// Local SSDs are available through both "SCSI" and "NVMe" interfaces. + /// If not indicated, "NVMe" will be the default one for local ssds. + /// This field is ignored for persistent disks as the interface is chosen + /// automatically. See + /// https://cloud.google.com/compute/docs/disks/persistent-disks#choose_an_interface. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string DiskInterface { + get { return diskInterface_; } + set { + diskInterface_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + private object dataSource_; + /// Enum of possible cases for the "data_source" oneof. + public enum DataSourceOneofCase { + None = 0, + Image = 4, + Snapshot = 5, + } + private DataSourceOneofCase dataSourceCase_ = DataSourceOneofCase.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DataSourceOneofCase DataSourceCase { + get { return dataSourceCase_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearDataSource() { + dataSourceCase_ = DataSourceOneofCase.None; + dataSource_ = null; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Disk); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Disk other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Image != other.Image) return false; + if (Snapshot != other.Snapshot) return false; + if (Type != other.Type) return false; + if (SizeGb != other.SizeGb) return false; + if (DiskInterface != other.DiskInterface) return false; + if (DataSourceCase != other.DataSourceCase) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (HasImage) hash ^= Image.GetHashCode(); + if (HasSnapshot) hash ^= Snapshot.GetHashCode(); + if (Type.Length != 0) hash ^= Type.GetHashCode(); + if (SizeGb != 0L) hash ^= SizeGb.GetHashCode(); + if (DiskInterface.Length != 0) hash ^= DiskInterface.GetHashCode(); + hash ^= (int) dataSourceCase_; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Type.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Type); + } + if (SizeGb != 0L) { + output.WriteRawTag(16); + output.WriteInt64(SizeGb); + } + if (HasImage) { + output.WriteRawTag(34); + output.WriteString(Image); + } + if (HasSnapshot) { + output.WriteRawTag(42); + output.WriteString(Snapshot); + } + if (DiskInterface.Length != 0) { + output.WriteRawTag(50); + output.WriteString(DiskInterface); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Type.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Type); + } + if (SizeGb != 0L) { + output.WriteRawTag(16); + output.WriteInt64(SizeGb); + } + if (HasImage) { + output.WriteRawTag(34); + output.WriteString(Image); + } + if (HasSnapshot) { + output.WriteRawTag(42); + output.WriteString(Snapshot); + } + if (DiskInterface.Length != 0) { + output.WriteRawTag(50); + output.WriteString(DiskInterface); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (HasImage) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Image); + } + if (HasSnapshot) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Snapshot); + } + if (Type.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Type); + } + if (SizeGb != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(SizeGb); + } + if (DiskInterface.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(DiskInterface); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Disk other) { + if (other == null) { + return; + } + if (other.Type.Length != 0) { + Type = other.Type; + } + if (other.SizeGb != 0L) { + SizeGb = other.SizeGb; + } + if (other.DiskInterface.Length != 0) { + DiskInterface = other.DiskInterface; + } + switch (other.DataSourceCase) { + case DataSourceOneofCase.Image: + Image = other.Image; + break; + case DataSourceOneofCase.Snapshot: + Snapshot = other.Snapshot; + break; + } + + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Type = input.ReadString(); + break; + } + case 16: { + SizeGb = input.ReadInt64(); + break; + } + case 34: { + Image = input.ReadString(); + break; + } + case 42: { + Snapshot = input.ReadString(); + break; + } + case 50: { + DiskInterface = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Type = input.ReadString(); + break; + } + case 16: { + SizeGb = input.ReadInt64(); + break; + } + case 34: { + Image = input.ReadString(); + break; + } + case 42: { + Snapshot = input.ReadString(); + break; + } + case 50: { + DiskInterface = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// A new or an existing persistent disk (PD) or a local ssd attached to a VM + /// instance. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class AttachedDisk : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new AttachedDisk()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Descriptor.NestedTypes[2]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AttachedDisk() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AttachedDisk(AttachedDisk other) : this() { + deviceName_ = other.deviceName_; + switch (other.AttachedCase) { + case AttachedOneofCase.NewDisk: + NewDisk = other.NewDisk.Clone(); + break; + case AttachedOneofCase.ExistingDisk: + ExistingDisk = other.ExistingDisk; + break; + } + + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AttachedDisk Clone() { + return new AttachedDisk(this); + } + + /// Field number for the "new_disk" field. + public const int NewDiskFieldNumber = 1; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.Disk NewDisk { + get { return attachedCase_ == AttachedOneofCase.NewDisk ? (global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.Disk) attached_ : null; } + set { + attached_ = value; + attachedCase_ = value == null ? AttachedOneofCase.None : AttachedOneofCase.NewDisk; + } + } + + /// Field number for the "existing_disk" field. + public const int ExistingDiskFieldNumber = 2; + /// + /// Name of an existing PD. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string ExistingDisk { + get { return HasExistingDisk ? (string) attached_ : ""; } + set { + attached_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + attachedCase_ = AttachedOneofCase.ExistingDisk; + } + } + /// Gets whether the "existing_disk" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasExistingDisk { + get { return attachedCase_ == AttachedOneofCase.ExistingDisk; } + } + /// Clears the value of the oneof if it's currently set to "existing_disk" + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearExistingDisk() { + if (HasExistingDisk) { + ClearAttached(); + } + } + + /// Field number for the "device_name" field. + public const int DeviceNameFieldNumber = 3; + private string deviceName_ = ""; + /// + /// Device name that the guest operating system will see. + /// It is used by Runnable.volumes field to mount disks. So please specify + /// the device_name if you want Batch to help mount the disk, and it should + /// match the device_name field in volumes. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string DeviceName { + get { return deviceName_; } + set { + deviceName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + private object attached_; + /// Enum of possible cases for the "attached" oneof. + public enum AttachedOneofCase { + None = 0, + NewDisk = 1, + ExistingDisk = 2, + } + private AttachedOneofCase attachedCase_ = AttachedOneofCase.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AttachedOneofCase AttachedCase { + get { return attachedCase_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearAttached() { + attachedCase_ = AttachedOneofCase.None; + attached_ = null; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as AttachedDisk); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(AttachedDisk other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(NewDisk, other.NewDisk)) return false; + if (ExistingDisk != other.ExistingDisk) return false; + if (DeviceName != other.DeviceName) return false; + if (AttachedCase != other.AttachedCase) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (attachedCase_ == AttachedOneofCase.NewDisk) hash ^= NewDisk.GetHashCode(); + if (HasExistingDisk) hash ^= ExistingDisk.GetHashCode(); + if (DeviceName.Length != 0) hash ^= DeviceName.GetHashCode(); + hash ^= (int) attachedCase_; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (attachedCase_ == AttachedOneofCase.NewDisk) { + output.WriteRawTag(10); + output.WriteMessage(NewDisk); + } + if (HasExistingDisk) { + output.WriteRawTag(18); + output.WriteString(ExistingDisk); + } + if (DeviceName.Length != 0) { + output.WriteRawTag(26); + output.WriteString(DeviceName); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (attachedCase_ == AttachedOneofCase.NewDisk) { + output.WriteRawTag(10); + output.WriteMessage(NewDisk); + } + if (HasExistingDisk) { + output.WriteRawTag(18); + output.WriteString(ExistingDisk); + } + if (DeviceName.Length != 0) { + output.WriteRawTag(26); + output.WriteString(DeviceName); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (attachedCase_ == AttachedOneofCase.NewDisk) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(NewDisk); + } + if (HasExistingDisk) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ExistingDisk); + } + if (DeviceName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(DeviceName); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(AttachedDisk other) { + if (other == null) { + return; + } + if (other.DeviceName.Length != 0) { + DeviceName = other.DeviceName; + } + switch (other.AttachedCase) { + case AttachedOneofCase.NewDisk: + if (NewDisk == null) { + NewDisk = new global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.Disk(); + } + NewDisk.MergeFrom(other.NewDisk); + break; + case AttachedOneofCase.ExistingDisk: + ExistingDisk = other.ExistingDisk; + break; + } + + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.Disk subBuilder = new global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.Disk(); + if (attachedCase_ == AttachedOneofCase.NewDisk) { + subBuilder.MergeFrom(NewDisk); + } + input.ReadMessage(subBuilder); + NewDisk = subBuilder; + break; + } + case 18: { + ExistingDisk = input.ReadString(); + break; + } + case 26: { + DeviceName = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.Disk subBuilder = new global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.Disk(); + if (attachedCase_ == AttachedOneofCase.NewDisk) { + subBuilder.MergeFrom(NewDisk); + } + input.ReadMessage(subBuilder); + NewDisk = subBuilder; + break; + } + case 18: { + ExistingDisk = input.ReadString(); + break; + } + case 26: { + DeviceName = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// Accelerator describes Compute Engine accelerators to be attached to the VM. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Accelerator : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Accelerator()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Descriptor.NestedTypes[3]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Accelerator() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Accelerator(Accelerator other) : this() { + type_ = other.type_; + count_ = other.count_; + installGpuDrivers_ = other.installGpuDrivers_; + driverVersion_ = other.driverVersion_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Accelerator Clone() { + return new Accelerator(this); + } + + /// Field number for the "type" field. + public const int TypeFieldNumber = 1; + private string type_ = ""; + /// + /// The accelerator type. For example, "nvidia-tesla-t4". + /// See `gcloud compute accelerator-types list`. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Type { + get { return type_; } + set { + type_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "count" field. + public const int CountFieldNumber = 2; + private long count_; + /// + /// The number of accelerators of this type. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Count { + get { return count_; } + set { + count_ = value; + } + } + + /// Field number for the "install_gpu_drivers" field. + public const int InstallGpuDriversFieldNumber = 3; + private bool installGpuDrivers_; + /// + /// Deprecated: please use instances[0].install_gpu_drivers instead. + /// + [global::System.ObsoleteAttribute] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool InstallGpuDrivers { + get { return installGpuDrivers_; } + set { + installGpuDrivers_ = value; + } + } + + /// Field number for the "driver_version" field. + public const int DriverVersionFieldNumber = 4; + private string driverVersion_ = ""; + /// + /// Optional. The NVIDIA GPU driver version that should be installed for this + /// type. + /// + /// You can define the specific driver version such as "470.103.01", + /// following the driver version requirements in + /// https://cloud.google.com/compute/docs/gpus/install-drivers-gpu#minimum-driver. + /// Batch will install the specific accelerator driver if qualified. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string DriverVersion { + get { return driverVersion_; } + set { + driverVersion_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Accelerator); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Accelerator other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Type != other.Type) return false; + if (Count != other.Count) return false; + if (InstallGpuDrivers != other.InstallGpuDrivers) return false; + if (DriverVersion != other.DriverVersion) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Type.Length != 0) hash ^= Type.GetHashCode(); + if (Count != 0L) hash ^= Count.GetHashCode(); + if (InstallGpuDrivers != false) hash ^= InstallGpuDrivers.GetHashCode(); + if (DriverVersion.Length != 0) hash ^= DriverVersion.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Type.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Type); + } + if (Count != 0L) { + output.WriteRawTag(16); + output.WriteInt64(Count); + } + if (InstallGpuDrivers != false) { + output.WriteRawTag(24); + output.WriteBool(InstallGpuDrivers); + } + if (DriverVersion.Length != 0) { + output.WriteRawTag(34); + output.WriteString(DriverVersion); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Type.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Type); + } + if (Count != 0L) { + output.WriteRawTag(16); + output.WriteInt64(Count); + } + if (InstallGpuDrivers != false) { + output.WriteRawTag(24); + output.WriteBool(InstallGpuDrivers); + } + if (DriverVersion.Length != 0) { + output.WriteRawTag(34); + output.WriteString(DriverVersion); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Type.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Type); + } + if (Count != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Count); + } + if (InstallGpuDrivers != false) { + size += 1 + 1; + } + if (DriverVersion.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(DriverVersion); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Accelerator other) { + if (other == null) { + return; + } + if (other.Type.Length != 0) { + Type = other.Type; + } + if (other.Count != 0L) { + Count = other.Count; + } + if (other.InstallGpuDrivers != false) { + InstallGpuDrivers = other.InstallGpuDrivers; + } + if (other.DriverVersion.Length != 0) { + DriverVersion = other.DriverVersion; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Type = input.ReadString(); + break; + } + case 16: { + Count = input.ReadInt64(); + break; + } + case 24: { + InstallGpuDrivers = input.ReadBool(); + break; + } + case 34: { + DriverVersion = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Type = input.ReadString(); + break; + } + case 16: { + Count = input.ReadInt64(); + break; + } + case 24: { + InstallGpuDrivers = input.ReadBool(); + break; + } + case 34: { + DriverVersion = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// InstancePolicy describes an instance type and resources attached to each VM + /// created by this InstancePolicy. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class InstancePolicy : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new InstancePolicy()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Descriptor.NestedTypes[4]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public InstancePolicy() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public InstancePolicy(InstancePolicy other) : this() { + allowedMachineTypes_ = other.allowedMachineTypes_.Clone(); + machineType_ = other.machineType_; + minCpuPlatform_ = other.minCpuPlatform_; + provisioningModel_ = other.provisioningModel_; + accelerators_ = other.accelerators_.Clone(); + bootDisk_ = other.bootDisk_ != null ? other.bootDisk_.Clone() : null; + disks_ = other.disks_.Clone(); + reservation_ = other.reservation_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public InstancePolicy Clone() { + return new InstancePolicy(this); + } + + /// Field number for the "allowed_machine_types" field. + public const int AllowedMachineTypesFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_allowedMachineTypes_codec + = pb::FieldCodec.ForString(10); + private readonly pbc::RepeatedField allowedMachineTypes_ = new pbc::RepeatedField(); + /// + /// Deprecated: please use machine_type instead. + /// + [global::System.ObsoleteAttribute] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField AllowedMachineTypes { + get { return allowedMachineTypes_; } + } + + /// Field number for the "machine_type" field. + public const int MachineTypeFieldNumber = 2; + private string machineType_ = ""; + /// + /// The Compute Engine machine type. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string MachineType { + get { return machineType_; } + set { + machineType_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "min_cpu_platform" field. + public const int MinCpuPlatformFieldNumber = 3; + private string minCpuPlatform_ = ""; + /// + /// The minimum CPU platform. + /// See + /// https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string MinCpuPlatform { + get { return minCpuPlatform_; } + set { + minCpuPlatform_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "provisioning_model" field. + public const int ProvisioningModelFieldNumber = 4; + private global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.ProvisioningModel provisioningModel_ = global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.ProvisioningModel.Unspecified; + /// + /// The provisioning model. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.ProvisioningModel ProvisioningModel { + get { return provisioningModel_; } + set { + provisioningModel_ = value; + } + } + + /// Field number for the "accelerators" field. + public const int AcceleratorsFieldNumber = 5; + private static readonly pb::FieldCodec _repeated_accelerators_codec + = pb::FieldCodec.ForMessage(42, global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.Accelerator.Parser); + private readonly pbc::RepeatedField accelerators_ = new pbc::RepeatedField(); + /// + /// The accelerators attached to each VM instance. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Accelerators { + get { return accelerators_; } + } + + /// Field number for the "boot_disk" field. + public const int BootDiskFieldNumber = 8; + private global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.Disk bootDisk_; + /// + /// Boot disk to be created and attached to each VM by this InstancePolicy. + /// Boot disk will be deleted when the VM is deleted. + /// Batch API now only supports booting from image. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.Disk BootDisk { + get { return bootDisk_; } + set { + bootDisk_ = value; + } + } + + /// Field number for the "disks" field. + public const int DisksFieldNumber = 6; + private static readonly pb::FieldCodec _repeated_disks_codec + = pb::FieldCodec.ForMessage(50, global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.AttachedDisk.Parser); + private readonly pbc::RepeatedField disks_ = new pbc::RepeatedField(); + /// + /// Non-boot disks to be attached for each VM created by this InstancePolicy. + /// New disks will be deleted when the VM is deleted. + /// A non-boot disk is a disk that can be of a device with a + /// file system or a raw storage drive that is not ready for data + /// storage and accessing. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Disks { + get { return disks_; } + } + + /// Field number for the "reservation" field. + public const int ReservationFieldNumber = 7; + private string reservation_ = ""; + /// + /// Optional. If not specified (default), VMs will consume any applicable + /// reservation. If "NO_RESERVATION" is specified, VMs will not consume any + /// reservation. Otherwise, if specified, VMs will consume only the specified + /// reservation. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Reservation { + get { return reservation_; } + set { + reservation_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as InstancePolicy); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(InstancePolicy other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!allowedMachineTypes_.Equals(other.allowedMachineTypes_)) return false; + if (MachineType != other.MachineType) return false; + if (MinCpuPlatform != other.MinCpuPlatform) return false; + if (ProvisioningModel != other.ProvisioningModel) return false; + if(!accelerators_.Equals(other.accelerators_)) return false; + if (!object.Equals(BootDisk, other.BootDisk)) return false; + if(!disks_.Equals(other.disks_)) return false; + if (Reservation != other.Reservation) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= allowedMachineTypes_.GetHashCode(); + if (MachineType.Length != 0) hash ^= MachineType.GetHashCode(); + if (MinCpuPlatform.Length != 0) hash ^= MinCpuPlatform.GetHashCode(); + if (ProvisioningModel != global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.ProvisioningModel.Unspecified) hash ^= ProvisioningModel.GetHashCode(); + hash ^= accelerators_.GetHashCode(); + if (bootDisk_ != null) hash ^= BootDisk.GetHashCode(); + hash ^= disks_.GetHashCode(); + if (Reservation.Length != 0) hash ^= Reservation.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + allowedMachineTypes_.WriteTo(output, _repeated_allowedMachineTypes_codec); + if (MachineType.Length != 0) { + output.WriteRawTag(18); + output.WriteString(MachineType); + } + if (MinCpuPlatform.Length != 0) { + output.WriteRawTag(26); + output.WriteString(MinCpuPlatform); + } + if (ProvisioningModel != global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.ProvisioningModel.Unspecified) { + output.WriteRawTag(32); + output.WriteEnum((int) ProvisioningModel); + } + accelerators_.WriteTo(output, _repeated_accelerators_codec); + disks_.WriteTo(output, _repeated_disks_codec); + if (Reservation.Length != 0) { + output.WriteRawTag(58); + output.WriteString(Reservation); + } + if (bootDisk_ != null) { + output.WriteRawTag(66); + output.WriteMessage(BootDisk); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + allowedMachineTypes_.WriteTo(ref output, _repeated_allowedMachineTypes_codec); + if (MachineType.Length != 0) { + output.WriteRawTag(18); + output.WriteString(MachineType); + } + if (MinCpuPlatform.Length != 0) { + output.WriteRawTag(26); + output.WriteString(MinCpuPlatform); + } + if (ProvisioningModel != global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.ProvisioningModel.Unspecified) { + output.WriteRawTag(32); + output.WriteEnum((int) ProvisioningModel); + } + accelerators_.WriteTo(ref output, _repeated_accelerators_codec); + disks_.WriteTo(ref output, _repeated_disks_codec); + if (Reservation.Length != 0) { + output.WriteRawTag(58); + output.WriteString(Reservation); + } + if (bootDisk_ != null) { + output.WriteRawTag(66); + output.WriteMessage(BootDisk); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += allowedMachineTypes_.CalculateSize(_repeated_allowedMachineTypes_codec); + if (MachineType.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(MachineType); + } + if (MinCpuPlatform.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(MinCpuPlatform); + } + if (ProvisioningModel != global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.ProvisioningModel.Unspecified) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ProvisioningModel); + } + size += accelerators_.CalculateSize(_repeated_accelerators_codec); + if (bootDisk_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(BootDisk); + } + size += disks_.CalculateSize(_repeated_disks_codec); + if (Reservation.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Reservation); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(InstancePolicy other) { + if (other == null) { + return; + } + allowedMachineTypes_.Add(other.allowedMachineTypes_); + if (other.MachineType.Length != 0) { + MachineType = other.MachineType; + } + if (other.MinCpuPlatform.Length != 0) { + MinCpuPlatform = other.MinCpuPlatform; + } + if (other.ProvisioningModel != global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.ProvisioningModel.Unspecified) { + ProvisioningModel = other.ProvisioningModel; + } + accelerators_.Add(other.accelerators_); + if (other.bootDisk_ != null) { + if (bootDisk_ == null) { + BootDisk = new global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.Disk(); + } + BootDisk.MergeFrom(other.BootDisk); + } + disks_.Add(other.disks_); + if (other.Reservation.Length != 0) { + Reservation = other.Reservation; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + allowedMachineTypes_.AddEntriesFrom(input, _repeated_allowedMachineTypes_codec); + break; + } + case 18: { + MachineType = input.ReadString(); + break; + } + case 26: { + MinCpuPlatform = input.ReadString(); + break; + } + case 32: { + ProvisioningModel = (global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.ProvisioningModel) input.ReadEnum(); + break; + } + case 42: { + accelerators_.AddEntriesFrom(input, _repeated_accelerators_codec); + break; + } + case 50: { + disks_.AddEntriesFrom(input, _repeated_disks_codec); + break; + } + case 58: { + Reservation = input.ReadString(); + break; + } + case 66: { + if (bootDisk_ == null) { + BootDisk = new global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.Disk(); + } + input.ReadMessage(BootDisk); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + allowedMachineTypes_.AddEntriesFrom(ref input, _repeated_allowedMachineTypes_codec); + break; + } + case 18: { + MachineType = input.ReadString(); + break; + } + case 26: { + MinCpuPlatform = input.ReadString(); + break; + } + case 32: { + ProvisioningModel = (global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.ProvisioningModel) input.ReadEnum(); + break; + } + case 42: { + accelerators_.AddEntriesFrom(ref input, _repeated_accelerators_codec); + break; + } + case 50: { + disks_.AddEntriesFrom(ref input, _repeated_disks_codec); + break; + } + case 58: { + Reservation = input.ReadString(); + break; + } + case 66: { + if (bootDisk_ == null) { + BootDisk = new global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.Disk(); + } + input.ReadMessage(BootDisk); + break; + } + } + } + } + #endif + + } + + /// + /// InstancePolicyOrTemplate lets you define the type of resources to use for + /// this job either with an InstancePolicy or an instance template. + /// If undefined, Batch picks the type of VM to use and doesn't include + /// optional VM resources such as GPUs and extra disks. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class InstancePolicyOrTemplate : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new InstancePolicyOrTemplate()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Descriptor.NestedTypes[5]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public InstancePolicyOrTemplate() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public InstancePolicyOrTemplate(InstancePolicyOrTemplate other) : this() { + installGpuDrivers_ = other.installGpuDrivers_; + installOpsAgent_ = other.installOpsAgent_; + blockProjectSshKeys_ = other.blockProjectSshKeys_; + switch (other.PolicyTemplateCase) { + case PolicyTemplateOneofCase.Policy: + Policy = other.Policy.Clone(); + break; + case PolicyTemplateOneofCase.InstanceTemplate: + InstanceTemplate = other.InstanceTemplate; + break; + } + + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public InstancePolicyOrTemplate Clone() { + return new InstancePolicyOrTemplate(this); + } + + /// Field number for the "policy" field. + public const int PolicyFieldNumber = 1; + /// + /// InstancePolicy. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.InstancePolicy Policy { + get { return policyTemplateCase_ == PolicyTemplateOneofCase.Policy ? (global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.InstancePolicy) policyTemplate_ : null; } + set { + policyTemplate_ = value; + policyTemplateCase_ = value == null ? PolicyTemplateOneofCase.None : PolicyTemplateOneofCase.Policy; + } + } + + /// Field number for the "instance_template" field. + public const int InstanceTemplateFieldNumber = 2; + /// + /// Name of an instance template used to create VMs. + /// Named the field as 'instance_template' instead of 'template' to avoid + /// C++ keyword conflict. + /// + /// Batch only supports global instance templates. + /// You can specify the global instance template as a full or partial URL. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string InstanceTemplate { + get { return HasInstanceTemplate ? (string) policyTemplate_ : ""; } + set { + policyTemplate_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + policyTemplateCase_ = PolicyTemplateOneofCase.InstanceTemplate; + } + } + /// Gets whether the "instance_template" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasInstanceTemplate { + get { return policyTemplateCase_ == PolicyTemplateOneofCase.InstanceTemplate; } + } + /// Clears the value of the oneof if it's currently set to "instance_template" + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearInstanceTemplate() { + if (HasInstanceTemplate) { + ClearPolicyTemplate(); + } + } + + /// Field number for the "install_gpu_drivers" field. + public const int InstallGpuDriversFieldNumber = 3; + private bool installGpuDrivers_; + /// + /// Set this field true if you want Batch to help fetch drivers from a third + /// party location and install them for GPUs specified in + /// `policy.accelerators` or `instance_template` on your behalf. Default is + /// false. + /// + /// For Container-Optimized Image cases, Batch will install the + /// accelerator driver following milestones of + /// https://cloud.google.com/container-optimized-os/docs/release-notes. For + /// non Container-Optimized Image cases, following + /// https://github.com/GoogleCloudPlatform/compute-gpu-installation/blob/main/linux/install_gpu_driver.py. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool InstallGpuDrivers { + get { return installGpuDrivers_; } + set { + installGpuDrivers_ = value; + } + } + + /// Field number for the "install_ops_agent" field. + public const int InstallOpsAgentFieldNumber = 4; + private bool installOpsAgent_; + /// + /// Optional. Set this field true if you want Batch to install Ops Agent on + /// your behalf. Default is false. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool InstallOpsAgent { + get { return installOpsAgent_; } + set { + installOpsAgent_ = value; + } + } + + /// Field number for the "block_project_ssh_keys" field. + public const int BlockProjectSshKeysFieldNumber = 5; + private bool blockProjectSshKeys_; + /// + /// Optional. Set this field to `true` if you want Batch to block + /// project-level SSH keys from accessing this job's VMs. Alternatively, you + /// can configure the job to specify a VM instance template that blocks + /// project-level SSH keys. In either case, Batch blocks project-level SSH + /// keys while creating the VMs for this job. + /// + /// Batch allows project-level SSH keys for a job's VMs only if all + /// the following are true: + /// + /// + This field is undefined or set to `false`. + /// + The job's VM instance template (if any) doesn't block project-level + /// SSH keys. + /// + /// Notably, you can override this behavior by manually updating a VM to + /// block or allow project-level SSH keys. For more information about + /// blocking project-level SSH keys, see the Compute Engine documentation: + /// https://cloud.google.com/compute/docs/connect/restrict-ssh-keys#block-keys + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool BlockProjectSshKeys { + get { return blockProjectSshKeys_; } + set { + blockProjectSshKeys_ = value; + } + } + + private object policyTemplate_; + /// Enum of possible cases for the "policy_template" oneof. + public enum PolicyTemplateOneofCase { + None = 0, + Policy = 1, + InstanceTemplate = 2, + } + private PolicyTemplateOneofCase policyTemplateCase_ = PolicyTemplateOneofCase.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PolicyTemplateOneofCase PolicyTemplateCase { + get { return policyTemplateCase_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearPolicyTemplate() { + policyTemplateCase_ = PolicyTemplateOneofCase.None; + policyTemplate_ = null; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as InstancePolicyOrTemplate); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(InstancePolicyOrTemplate other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(Policy, other.Policy)) return false; + if (InstanceTemplate != other.InstanceTemplate) return false; + if (InstallGpuDrivers != other.InstallGpuDrivers) return false; + if (InstallOpsAgent != other.InstallOpsAgent) return false; + if (BlockProjectSshKeys != other.BlockProjectSshKeys) return false; + if (PolicyTemplateCase != other.PolicyTemplateCase) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (policyTemplateCase_ == PolicyTemplateOneofCase.Policy) hash ^= Policy.GetHashCode(); + if (HasInstanceTemplate) hash ^= InstanceTemplate.GetHashCode(); + if (InstallGpuDrivers != false) hash ^= InstallGpuDrivers.GetHashCode(); + if (InstallOpsAgent != false) hash ^= InstallOpsAgent.GetHashCode(); + if (BlockProjectSshKeys != false) hash ^= BlockProjectSshKeys.GetHashCode(); + hash ^= (int) policyTemplateCase_; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (policyTemplateCase_ == PolicyTemplateOneofCase.Policy) { + output.WriteRawTag(10); + output.WriteMessage(Policy); + } + if (HasInstanceTemplate) { + output.WriteRawTag(18); + output.WriteString(InstanceTemplate); + } + if (InstallGpuDrivers != false) { + output.WriteRawTag(24); + output.WriteBool(InstallGpuDrivers); + } + if (InstallOpsAgent != false) { + output.WriteRawTag(32); + output.WriteBool(InstallOpsAgent); + } + if (BlockProjectSshKeys != false) { + output.WriteRawTag(40); + output.WriteBool(BlockProjectSshKeys); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (policyTemplateCase_ == PolicyTemplateOneofCase.Policy) { + output.WriteRawTag(10); + output.WriteMessage(Policy); + } + if (HasInstanceTemplate) { + output.WriteRawTag(18); + output.WriteString(InstanceTemplate); + } + if (InstallGpuDrivers != false) { + output.WriteRawTag(24); + output.WriteBool(InstallGpuDrivers); + } + if (InstallOpsAgent != false) { + output.WriteRawTag(32); + output.WriteBool(InstallOpsAgent); + } + if (BlockProjectSshKeys != false) { + output.WriteRawTag(40); + output.WriteBool(BlockProjectSshKeys); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (policyTemplateCase_ == PolicyTemplateOneofCase.Policy) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Policy); + } + if (HasInstanceTemplate) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(InstanceTemplate); + } + if (InstallGpuDrivers != false) { + size += 1 + 1; + } + if (InstallOpsAgent != false) { + size += 1 + 1; + } + if (BlockProjectSshKeys != false) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(InstancePolicyOrTemplate other) { + if (other == null) { + return; + } + if (other.InstallGpuDrivers != false) { + InstallGpuDrivers = other.InstallGpuDrivers; + } + if (other.InstallOpsAgent != false) { + InstallOpsAgent = other.InstallOpsAgent; + } + if (other.BlockProjectSshKeys != false) { + BlockProjectSshKeys = other.BlockProjectSshKeys; + } + switch (other.PolicyTemplateCase) { + case PolicyTemplateOneofCase.Policy: + if (Policy == null) { + Policy = new global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.InstancePolicy(); + } + Policy.MergeFrom(other.Policy); + break; + case PolicyTemplateOneofCase.InstanceTemplate: + InstanceTemplate = other.InstanceTemplate; + break; + } + + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.InstancePolicy subBuilder = new global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.InstancePolicy(); + if (policyTemplateCase_ == PolicyTemplateOneofCase.Policy) { + subBuilder.MergeFrom(Policy); + } + input.ReadMessage(subBuilder); + Policy = subBuilder; + break; + } + case 18: { + InstanceTemplate = input.ReadString(); + break; + } + case 24: { + InstallGpuDrivers = input.ReadBool(); + break; + } + case 32: { + InstallOpsAgent = input.ReadBool(); + break; + } + case 40: { + BlockProjectSshKeys = input.ReadBool(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.InstancePolicy subBuilder = new global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.InstancePolicy(); + if (policyTemplateCase_ == PolicyTemplateOneofCase.Policy) { + subBuilder.MergeFrom(Policy); + } + input.ReadMessage(subBuilder); + Policy = subBuilder; + break; + } + case 18: { + InstanceTemplate = input.ReadString(); + break; + } + case 24: { + InstallGpuDrivers = input.ReadBool(); + break; + } + case 32: { + InstallOpsAgent = input.ReadBool(); + break; + } + case 40: { + BlockProjectSshKeys = input.ReadBool(); + break; + } + } + } + } + #endif + + } + + /// + /// A network interface. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class NetworkInterface : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new NetworkInterface()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Descriptor.NestedTypes[6]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public NetworkInterface() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public NetworkInterface(NetworkInterface other) : this() { + network_ = other.network_; + subnetwork_ = other.subnetwork_; + noExternalIpAddress_ = other.noExternalIpAddress_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public NetworkInterface Clone() { + return new NetworkInterface(this); + } + + /// Field number for the "network" field. + public const int NetworkFieldNumber = 1; + private string network_ = ""; + /// + /// The URL of an existing network resource. + /// You can specify the network as a full or partial URL. + /// + /// For example, the following are all valid URLs: + /// + /// * https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network} + /// * projects/{project}/global/networks/{network} + /// * global/networks/{network} + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Network { + get { return network_; } + set { + network_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "subnetwork" field. + public const int SubnetworkFieldNumber = 2; + private string subnetwork_ = ""; + /// + /// The URL of an existing subnetwork resource in the network. + /// You can specify the subnetwork as a full or partial URL. + /// + /// For example, the following are all valid URLs: + /// + /// * https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetwork} + /// * projects/{project}/regions/{region}/subnetworks/{subnetwork} + /// * regions/{region}/subnetworks/{subnetwork} + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Subnetwork { + get { return subnetwork_; } + set { + subnetwork_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "no_external_ip_address" field. + public const int NoExternalIpAddressFieldNumber = 3; + private bool noExternalIpAddress_; + /// + /// Default is false (with an external IP address). Required if + /// no external public IP address is attached to the VM. If no external + /// public IP address, additional configuration is required to allow the VM + /// to access Google Services. See + /// https://cloud.google.com/vpc/docs/configure-private-google-access and + /// https://cloud.google.com/nat/docs/gce-example#create-nat for more + /// information. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool NoExternalIpAddress { + get { return noExternalIpAddress_; } + set { + noExternalIpAddress_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as NetworkInterface); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(NetworkInterface other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Network != other.Network) return false; + if (Subnetwork != other.Subnetwork) return false; + if (NoExternalIpAddress != other.NoExternalIpAddress) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Network.Length != 0) hash ^= Network.GetHashCode(); + if (Subnetwork.Length != 0) hash ^= Subnetwork.GetHashCode(); + if (NoExternalIpAddress != false) hash ^= NoExternalIpAddress.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Network.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Network); + } + if (Subnetwork.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Subnetwork); + } + if (NoExternalIpAddress != false) { + output.WriteRawTag(24); + output.WriteBool(NoExternalIpAddress); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Network.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Network); + } + if (Subnetwork.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Subnetwork); + } + if (NoExternalIpAddress != false) { + output.WriteRawTag(24); + output.WriteBool(NoExternalIpAddress); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Network.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Network); + } + if (Subnetwork.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Subnetwork); + } + if (NoExternalIpAddress != false) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(NetworkInterface other) { + if (other == null) { + return; + } + if (other.Network.Length != 0) { + Network = other.Network; + } + if (other.Subnetwork.Length != 0) { + Subnetwork = other.Subnetwork; + } + if (other.NoExternalIpAddress != false) { + NoExternalIpAddress = other.NoExternalIpAddress; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Network = input.ReadString(); + break; + } + case 18: { + Subnetwork = input.ReadString(); + break; + } + case 24: { + NoExternalIpAddress = input.ReadBool(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Network = input.ReadString(); + break; + } + case 18: { + Subnetwork = input.ReadString(); + break; + } + case 24: { + NoExternalIpAddress = input.ReadBool(); + break; + } + } + } + } + #endif + + } + + /// + /// NetworkPolicy describes VM instance network configurations. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class NetworkPolicy : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new NetworkPolicy()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Descriptor.NestedTypes[7]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public NetworkPolicy() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public NetworkPolicy(NetworkPolicy other) : this() { + networkInterfaces_ = other.networkInterfaces_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public NetworkPolicy Clone() { + return new NetworkPolicy(this); + } + + /// Field number for the "network_interfaces" field. + public const int NetworkInterfacesFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_networkInterfaces_codec + = pb::FieldCodec.ForMessage(10, global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.NetworkInterface.Parser); + private readonly pbc::RepeatedField networkInterfaces_ = new pbc::RepeatedField(); + /// + /// Network configurations. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField NetworkInterfaces { + get { return networkInterfaces_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as NetworkPolicy); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(NetworkPolicy other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!networkInterfaces_.Equals(other.networkInterfaces_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= networkInterfaces_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + networkInterfaces_.WriteTo(output, _repeated_networkInterfaces_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + networkInterfaces_.WriteTo(ref output, _repeated_networkInterfaces_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += networkInterfaces_.CalculateSize(_repeated_networkInterfaces_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(NetworkPolicy other) { + if (other == null) { + return; + } + networkInterfaces_.Add(other.networkInterfaces_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + networkInterfaces_.AddEntriesFrom(input, _repeated_networkInterfaces_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + networkInterfaces_.AddEntriesFrom(ref input, _repeated_networkInterfaces_codec); + break; + } + } + } + } + #endif + + } + + /// + /// PlacementPolicy describes a group placement policy for the VMs controlled + /// by this AllocationPolicy. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class PlacementPolicy : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new PlacementPolicy()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Batch.V1Alpha.AllocationPolicy.Descriptor.NestedTypes[8]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PlacementPolicy() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PlacementPolicy(PlacementPolicy other) : this() { + collocation_ = other.collocation_; + maxDistance_ = other.maxDistance_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PlacementPolicy Clone() { + return new PlacementPolicy(this); + } + + /// Field number for the "collocation" field. + public const int CollocationFieldNumber = 1; + private string collocation_ = ""; + /// + /// UNSPECIFIED vs. COLLOCATED (default UNSPECIFIED). Use COLLOCATED when you + /// want VMs to be located close to each other for low network latency + /// between the VMs. No placement policy will be generated when collocation + /// is UNSPECIFIED. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Collocation { + get { return collocation_; } + set { + collocation_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "max_distance" field. + public const int MaxDistanceFieldNumber = 2; + private long maxDistance_; + /// + /// When specified, causes the job to fail if more than max_distance logical + /// switches are required between VMs. Batch uses the most compact possible + /// placement of VMs even when max_distance is not specified. An explicit + /// max_distance makes that level of compactness a strict requirement. + /// Not yet implemented + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long MaxDistance { + get { return maxDistance_; } + set { + maxDistance_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as PlacementPolicy); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(PlacementPolicy other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Collocation != other.Collocation) return false; + if (MaxDistance != other.MaxDistance) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Collocation.Length != 0) hash ^= Collocation.GetHashCode(); + if (MaxDistance != 0L) hash ^= MaxDistance.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Collocation.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Collocation); + } + if (MaxDistance != 0L) { + output.WriteRawTag(16); + output.WriteInt64(MaxDistance); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Collocation.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Collocation); + } + if (MaxDistance != 0L) { + output.WriteRawTag(16); + output.WriteInt64(MaxDistance); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Collocation.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Collocation); + } + if (MaxDistance != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(MaxDistance); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(PlacementPolicy other) { + if (other == null) { + return; + } + if (other.Collocation.Length != 0) { + Collocation = other.Collocation; + } + if (other.MaxDistance != 0L) { + MaxDistance = other.MaxDistance; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Collocation = input.ReadString(); + break; + } + case 16: { + MaxDistance = input.ReadInt64(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Collocation = input.ReadString(); + break; + } + case 16: { + MaxDistance = input.ReadInt64(); + break; + } + } + } + } + #endif + + } + + } + #endregion + + } + + /// + /// A TaskGroup defines one or more Tasks that all share the same TaskSpec. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class TaskGroup : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TaskGroup()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Batch.V1Alpha.JobReflection.Descriptor.MessageTypes[7]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TaskGroup() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TaskGroup(TaskGroup other) : this() { + name_ = other.name_; + taskSpec_ = other.taskSpec_ != null ? other.taskSpec_.Clone() : null; + taskCount_ = other.taskCount_; + parallelism_ = other.parallelism_; + schedulingPolicy_ = other.schedulingPolicy_; + allocationPolicy_ = other.allocationPolicy_ != null ? other.allocationPolicy_.Clone() : null; + labels_ = other.labels_.Clone(); + taskEnvironments_ = other.taskEnvironments_.Clone(); + taskCountPerNode_ = other.taskCountPerNode_; + requireHostsFile_ = other.requireHostsFile_; + permissiveSsh_ = other.permissiveSsh_; + runAsNonRoot_ = other.runAsNonRoot_; + serviceAccount_ = other.serviceAccount_ != null ? other.serviceAccount_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TaskGroup Clone() { + return new TaskGroup(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; + /// + /// Output only. TaskGroup name. + /// The system generates this field based on parent Job name. + /// For example: + /// "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01". + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "task_spec" field. + public const int TaskSpecFieldNumber = 3; + private global::Google.Cloud.Batch.V1Alpha.TaskSpec taskSpec_; + /// + /// Required. Tasks in the group share the same task spec. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Batch.V1Alpha.TaskSpec TaskSpec { + get { return taskSpec_; } + set { + taskSpec_ = value; + } + } + + /// Field number for the "task_count" field. + public const int TaskCountFieldNumber = 4; + private long taskCount_; + /// + /// Number of Tasks in the TaskGroup. + /// Default is 1. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long TaskCount { + get { return taskCount_; } + set { + taskCount_ = value; + } + } + + /// Field number for the "parallelism" field. + public const int ParallelismFieldNumber = 5; + private long parallelism_; + /// + /// Max number of tasks that can run in parallel. + /// Default to min(task_count, parallel tasks per job limit). + /// See: [Job Limits](https://cloud.google.com/batch/quotas#job_limits). + /// Field parallelism must be 1 if the scheduling_policy is IN_ORDER. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Parallelism { + get { return parallelism_; } + set { + parallelism_ = value; + } + } + + /// Field number for the "scheduling_policy" field. + public const int SchedulingPolicyFieldNumber = 6; + private global::Google.Cloud.Batch.V1Alpha.TaskGroup.Types.SchedulingPolicy schedulingPolicy_ = global::Google.Cloud.Batch.V1Alpha.TaskGroup.Types.SchedulingPolicy.Unspecified; + /// + /// Scheduling policy for Tasks in the TaskGroup. + /// The default value is AS_SOON_AS_POSSIBLE. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Batch.V1Alpha.TaskGroup.Types.SchedulingPolicy SchedulingPolicy { + get { return schedulingPolicy_; } + set { + schedulingPolicy_ = value; + } + } + + /// Field number for the "allocation_policy" field. + public const int AllocationPolicyFieldNumber = 7; + private global::Google.Cloud.Batch.V1Alpha.AllocationPolicy allocationPolicy_; + /// + /// Compute resource allocation for the TaskGroup. + /// If specified, it overrides resources in Job. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Batch.V1Alpha.AllocationPolicy AllocationPolicy { + get { return allocationPolicy_; } + set { + allocationPolicy_ = value; + } + } + + /// Field number for the "labels" field. + public const int LabelsFieldNumber = 8; + private static readonly pbc::MapField.Codec _map_labels_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForString(18, ""), 66); + private readonly pbc::MapField labels_ = new pbc::MapField(); + /// + /// Labels for the TaskGroup. + /// Labels could be user provided or system generated. + /// You can assign up to 64 labels. [Google Compute Engine label + /// restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions) + /// apply. + /// Label names that start with "goog-" or "google-" are reserved. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::MapField Labels { + get { return labels_; } + } + + /// Field number for the "task_environments" field. + public const int TaskEnvironmentsFieldNumber = 9; + private static readonly pb::FieldCodec _repeated_taskEnvironments_codec + = pb::FieldCodec.ForMessage(74, global::Google.Cloud.Batch.V1Alpha.Environment.Parser); + private readonly pbc::RepeatedField taskEnvironments_ = new pbc::RepeatedField(); + /// + /// An array of environment variable mappings, which are passed to Tasks with + /// matching indices. If task_environments is used then task_count should + /// not be specified in the request (and will be ignored). Task count will be + /// the length of task_environments. + /// + /// Tasks get a BATCH_TASK_INDEX and BATCH_TASK_COUNT environment variable, in + /// addition to any environment variables set in task_environments, specifying + /// the number of Tasks in the Task's parent TaskGroup, and the specific Task's + /// index in the TaskGroup (0 through BATCH_TASK_COUNT - 1). + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField TaskEnvironments { + get { return taskEnvironments_; } + } + + /// Field number for the "task_count_per_node" field. + public const int TaskCountPerNodeFieldNumber = 10; + private long taskCountPerNode_; + /// + /// Max number of tasks that can be run on a VM at the same time. + /// If not specified, the system will decide a value based on available + /// compute resources on a VM and task requirements. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long TaskCountPerNode { + get { return taskCountPerNode_; } + set { + taskCountPerNode_ = value; + } + } + + /// Field number for the "require_hosts_file" field. + public const int RequireHostsFileFieldNumber = 11; + private bool requireHostsFile_; + /// + /// When true, Batch will populate a file with a list of all VMs assigned to + /// the TaskGroup and set the BATCH_HOSTS_FILE environment variable to the path + /// of that file. Defaults to false. The host file supports up to 1000 VMs. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool RequireHostsFile { + get { return requireHostsFile_; } + set { + requireHostsFile_ = value; + } + } + + /// Field number for the "permissive_ssh" field. + public const int PermissiveSshFieldNumber = 12; + private bool permissiveSsh_; + /// + /// When true, Batch will configure SSH to allow passwordless login between + /// VMs running the Batch tasks in the same TaskGroup. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool PermissiveSsh { + get { return permissiveSsh_; } + set { + permissiveSsh_ = value; + } + } + + /// Field number for the "run_as_non_root" field. + public const int RunAsNonRootFieldNumber = 14; + private bool runAsNonRoot_; + /// + /// Optional. If not set or set to false, Batch uses the root user to execute + /// runnables. If set to true, Batch runs the runnables using a non-root user. + /// Currently, the non-root user Batch used is generated by OS Login. For more + /// information, see [About OS + /// Login](https://cloud.google.com/compute/docs/oslogin). + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool RunAsNonRoot { + get { return runAsNonRoot_; } + set { + runAsNonRoot_ = value; + } + } + + /// Field number for the "service_account" field. + public const int ServiceAccountFieldNumber = 15; + private global::Google.Cloud.Batch.V1Alpha.ServiceAccount serviceAccount_; + /// + /// Optional. ServiceAccount used by tasks within the task group for the access + /// to other Cloud resources. This allows tasks to operate with permissions + /// distinct from the service account for the VM set at `AllocationPolicy`. Use + /// this field when tasks require different access rights than those of the VM. + /// + /// Specify the service account's `email` field. Ensure `scopes` + /// include any necessary permissions for tasks, in addition to the default + /// 'cloud-platform' scope. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Batch.V1Alpha.ServiceAccount ServiceAccount { + get { return serviceAccount_; } + set { + serviceAccount_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as TaskGroup); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(TaskGroup other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + if (!object.Equals(TaskSpec, other.TaskSpec)) return false; + if (TaskCount != other.TaskCount) return false; + if (Parallelism != other.Parallelism) return false; + if (SchedulingPolicy != other.SchedulingPolicy) return false; + if (!object.Equals(AllocationPolicy, other.AllocationPolicy)) return false; + if (!Labels.Equals(other.Labels)) return false; + if(!taskEnvironments_.Equals(other.taskEnvironments_)) return false; + if (TaskCountPerNode != other.TaskCountPerNode) return false; + if (RequireHostsFile != other.RequireHostsFile) return false; + if (PermissiveSsh != other.PermissiveSsh) return false; + if (RunAsNonRoot != other.RunAsNonRoot) return false; + if (!object.Equals(ServiceAccount, other.ServiceAccount)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (taskSpec_ != null) hash ^= TaskSpec.GetHashCode(); + if (TaskCount != 0L) hash ^= TaskCount.GetHashCode(); + if (Parallelism != 0L) hash ^= Parallelism.GetHashCode(); + if (SchedulingPolicy != global::Google.Cloud.Batch.V1Alpha.TaskGroup.Types.SchedulingPolicy.Unspecified) hash ^= SchedulingPolicy.GetHashCode(); + if (allocationPolicy_ != null) hash ^= AllocationPolicy.GetHashCode(); + hash ^= Labels.GetHashCode(); + hash ^= taskEnvironments_.GetHashCode(); + if (TaskCountPerNode != 0L) hash ^= TaskCountPerNode.GetHashCode(); + if (RequireHostsFile != false) hash ^= RequireHostsFile.GetHashCode(); + if (PermissiveSsh != false) hash ^= PermissiveSsh.GetHashCode(); + if (RunAsNonRoot != false) hash ^= RunAsNonRoot.GetHashCode(); + if (serviceAccount_ != null) hash ^= ServiceAccount.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (taskSpec_ != null) { + output.WriteRawTag(26); + output.WriteMessage(TaskSpec); + } + if (TaskCount != 0L) { + output.WriteRawTag(32); + output.WriteInt64(TaskCount); + } + if (Parallelism != 0L) { + output.WriteRawTag(40); + output.WriteInt64(Parallelism); + } + if (SchedulingPolicy != global::Google.Cloud.Batch.V1Alpha.TaskGroup.Types.SchedulingPolicy.Unspecified) { + output.WriteRawTag(48); + output.WriteEnum((int) SchedulingPolicy); + } + if (allocationPolicy_ != null) { + output.WriteRawTag(58); + output.WriteMessage(AllocationPolicy); + } + labels_.WriteTo(output, _map_labels_codec); + taskEnvironments_.WriteTo(output, _repeated_taskEnvironments_codec); + if (TaskCountPerNode != 0L) { + output.WriteRawTag(80); + output.WriteInt64(TaskCountPerNode); + } + if (RequireHostsFile != false) { + output.WriteRawTag(88); + output.WriteBool(RequireHostsFile); + } + if (PermissiveSsh != false) { + output.WriteRawTag(96); + output.WriteBool(PermissiveSsh); + } + if (RunAsNonRoot != false) { + output.WriteRawTag(112); + output.WriteBool(RunAsNonRoot); + } + if (serviceAccount_ != null) { + output.WriteRawTag(122); + output.WriteMessage(ServiceAccount); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (taskSpec_ != null) { + output.WriteRawTag(26); + output.WriteMessage(TaskSpec); + } + if (TaskCount != 0L) { + output.WriteRawTag(32); + output.WriteInt64(TaskCount); + } + if (Parallelism != 0L) { + output.WriteRawTag(40); + output.WriteInt64(Parallelism); + } + if (SchedulingPolicy != global::Google.Cloud.Batch.V1Alpha.TaskGroup.Types.SchedulingPolicy.Unspecified) { + output.WriteRawTag(48); + output.WriteEnum((int) SchedulingPolicy); + } + if (allocationPolicy_ != null) { + output.WriteRawTag(58); + output.WriteMessage(AllocationPolicy); + } + labels_.WriteTo(ref output, _map_labels_codec); + taskEnvironments_.WriteTo(ref output, _repeated_taskEnvironments_codec); + if (TaskCountPerNode != 0L) { + output.WriteRawTag(80); + output.WriteInt64(TaskCountPerNode); + } + if (RequireHostsFile != false) { + output.WriteRawTag(88); + output.WriteBool(RequireHostsFile); + } + if (PermissiveSsh != false) { + output.WriteRawTag(96); + output.WriteBool(PermissiveSsh); + } + if (RunAsNonRoot != false) { + output.WriteRawTag(112); + output.WriteBool(RunAsNonRoot); + } + if (serviceAccount_ != null) { + output.WriteRawTag(122); + output.WriteMessage(ServiceAccount); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (taskSpec_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(TaskSpec); + } + if (TaskCount != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(TaskCount); + } + if (Parallelism != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Parallelism); + } + if (SchedulingPolicy != global::Google.Cloud.Batch.V1Alpha.TaskGroup.Types.SchedulingPolicy.Unspecified) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) SchedulingPolicy); + } + if (allocationPolicy_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(AllocationPolicy); + } + size += labels_.CalculateSize(_map_labels_codec); + size += taskEnvironments_.CalculateSize(_repeated_taskEnvironments_codec); + if (TaskCountPerNode != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(TaskCountPerNode); + } + if (RequireHostsFile != false) { + size += 1 + 1; + } + if (PermissiveSsh != false) { + size += 1 + 1; + } + if (RunAsNonRoot != false) { + size += 1 + 1; + } + if (serviceAccount_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ServiceAccount); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(TaskGroup other) { + if (other == null) { + return; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + if (other.taskSpec_ != null) { + if (taskSpec_ == null) { + TaskSpec = new global::Google.Cloud.Batch.V1Alpha.TaskSpec(); + } + TaskSpec.MergeFrom(other.TaskSpec); + } + if (other.TaskCount != 0L) { + TaskCount = other.TaskCount; + } + if (other.Parallelism != 0L) { + Parallelism = other.Parallelism; + } + if (other.SchedulingPolicy != global::Google.Cloud.Batch.V1Alpha.TaskGroup.Types.SchedulingPolicy.Unspecified) { + SchedulingPolicy = other.SchedulingPolicy; + } + if (other.allocationPolicy_ != null) { + if (allocationPolicy_ == null) { + AllocationPolicy = new global::Google.Cloud.Batch.V1Alpha.AllocationPolicy(); + } + AllocationPolicy.MergeFrom(other.AllocationPolicy); + } + labels_.MergeFrom(other.labels_); + taskEnvironments_.Add(other.taskEnvironments_); + if (other.TaskCountPerNode != 0L) { + TaskCountPerNode = other.TaskCountPerNode; + } + if (other.RequireHostsFile != false) { + RequireHostsFile = other.RequireHostsFile; + } + if (other.PermissiveSsh != false) { + PermissiveSsh = other.PermissiveSsh; + } + if (other.RunAsNonRoot != false) { + RunAsNonRoot = other.RunAsNonRoot; + } + if (other.serviceAccount_ != null) { + if (serviceAccount_ == null) { + ServiceAccount = new global::Google.Cloud.Batch.V1Alpha.ServiceAccount(); + } + ServiceAccount.MergeFrom(other.ServiceAccount); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 26: { + if (taskSpec_ == null) { + TaskSpec = new global::Google.Cloud.Batch.V1Alpha.TaskSpec(); + } + input.ReadMessage(TaskSpec); + break; + } + case 32: { + TaskCount = input.ReadInt64(); + break; + } + case 40: { + Parallelism = input.ReadInt64(); + break; + } + case 48: { + SchedulingPolicy = (global::Google.Cloud.Batch.V1Alpha.TaskGroup.Types.SchedulingPolicy) input.ReadEnum(); + break; + } + case 58: { + if (allocationPolicy_ == null) { + AllocationPolicy = new global::Google.Cloud.Batch.V1Alpha.AllocationPolicy(); + } + input.ReadMessage(AllocationPolicy); + break; + } + case 66: { + labels_.AddEntriesFrom(input, _map_labels_codec); + break; + } + case 74: { + taskEnvironments_.AddEntriesFrom(input, _repeated_taskEnvironments_codec); + break; + } + case 80: { + TaskCountPerNode = input.ReadInt64(); + break; + } + case 88: { + RequireHostsFile = input.ReadBool(); + break; + } + case 96: { + PermissiveSsh = input.ReadBool(); + break; + } + case 112: { + RunAsNonRoot = input.ReadBool(); + break; + } + case 122: { + if (serviceAccount_ == null) { + ServiceAccount = new global::Google.Cloud.Batch.V1Alpha.ServiceAccount(); + } + input.ReadMessage(ServiceAccount); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 26: { + if (taskSpec_ == null) { + TaskSpec = new global::Google.Cloud.Batch.V1Alpha.TaskSpec(); + } + input.ReadMessage(TaskSpec); + break; + } + case 32: { + TaskCount = input.ReadInt64(); + break; + } + case 40: { + Parallelism = input.ReadInt64(); + break; + } + case 48: { + SchedulingPolicy = (global::Google.Cloud.Batch.V1Alpha.TaskGroup.Types.SchedulingPolicy) input.ReadEnum(); + break; + } + case 58: { + if (allocationPolicy_ == null) { + AllocationPolicy = new global::Google.Cloud.Batch.V1Alpha.AllocationPolicy(); + } + input.ReadMessage(AllocationPolicy); + break; + } + case 66: { + labels_.AddEntriesFrom(ref input, _map_labels_codec); + break; + } + case 74: { + taskEnvironments_.AddEntriesFrom(ref input, _repeated_taskEnvironments_codec); + break; + } + case 80: { + TaskCountPerNode = input.ReadInt64(); + break; + } + case 88: { + RequireHostsFile = input.ReadBool(); + break; + } + case 96: { + PermissiveSsh = input.ReadBool(); + break; + } + case 112: { + RunAsNonRoot = input.ReadBool(); + break; + } + case 122: { + if (serviceAccount_ == null) { + ServiceAccount = new global::Google.Cloud.Batch.V1Alpha.ServiceAccount(); + } + input.ReadMessage(ServiceAccount); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the TaskGroup message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// How Tasks in the TaskGroup should be scheduled relative to each other. + /// + public enum SchedulingPolicy { + /// + /// Unspecified. + /// + [pbr::OriginalName("SCHEDULING_POLICY_UNSPECIFIED")] Unspecified = 0, + /// + /// Run Tasks as soon as resources are available. + /// + /// Tasks might be executed in parallel depending on parallelism and + /// task_count values. + /// + [pbr::OriginalName("AS_SOON_AS_POSSIBLE")] AsSoonAsPossible = 1, + /// + /// Run Tasks sequentially with increased task index. + /// + [pbr::OriginalName("IN_ORDER")] InOrder = 2, + } + + } + #endregion + + } + + /// + /// Carries information about a Google Cloud service account. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ServiceAccount : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ServiceAccount()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Batch.V1Alpha.JobReflection.Descriptor.MessageTypes[8]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ServiceAccount() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ServiceAccount(ServiceAccount other) : this() { + email_ = other.email_; + scopes_ = other.scopes_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ServiceAccount Clone() { + return new ServiceAccount(this); + } + + /// Field number for the "email" field. + public const int EmailFieldNumber = 1; + private string email_ = ""; + /// + /// Email address of the service account. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Email { + get { return email_; } + set { + email_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "scopes" field. + public const int ScopesFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_scopes_codec + = pb::FieldCodec.ForString(18); + private readonly pbc::RepeatedField scopes_ = new pbc::RepeatedField(); + /// + /// List of scopes to be enabled for this service account. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Scopes { + get { return scopes_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ServiceAccount); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ServiceAccount other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Email != other.Email) return false; + if(!scopes_.Equals(other.scopes_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Email.Length != 0) hash ^= Email.GetHashCode(); + hash ^= scopes_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Email.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Email); + } + scopes_.WriteTo(output, _repeated_scopes_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Email.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Email); + } + scopes_.WriteTo(ref output, _repeated_scopes_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Email.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Email); + } + size += scopes_.CalculateSize(_repeated_scopes_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ServiceAccount other) { + if (other == null) { + return; + } + if (other.Email.Length != 0) { + Email = other.Email; + } + scopes_.Add(other.scopes_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Email = input.ReadString(); + break; + } + case 18: { + scopes_.AddEntriesFrom(input, _repeated_scopes_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Email = input.ReadString(); + break; + } + case 18: { + scopes_.AddEntriesFrom(ref input, _repeated_scopes_codec); + break; + } + } + } + } + #endif + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha/JobResourceNames.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha/JobResourceNames.g.cs new file mode 100755 index 000000000000..b6460592148e --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha/JobResourceNames.g.cs @@ -0,0 +1,554 @@ +// 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 +using gax = Google.Api.Gax; +using gcbv = Google.Cloud.Batch.V1Alpha; +using sys = System; + +namespace Google.Cloud.Batch.V1Alpha +{ + /// Resource name for the Job resource. + public sealed partial class JobName : gax::IResourceName, sys::IEquatable + { + /// The possible contents of . + public enum ResourceNameType + { + /// An unparsed resource name. + Unparsed = 0, + + /// + /// A resource name with pattern projects/{project}/locations/{location}/jobs/{job}. + /// + ProjectLocationJob = 1, + } + + private static gax::PathTemplate s_projectLocationJob = new gax::PathTemplate("projects/{project}/locations/{location}/jobs/{job}"); + + /// Creates a containing an unparsed resource name. + /// The unparsed resource name. Must not be null. + /// + /// A new instance of containing the provided . + /// + public static JobName FromUnparsed(gax::UnparsedResourceName unparsedResourceName) => + new JobName(ResourceNameType.Unparsed, gax::GaxPreconditions.CheckNotNull(unparsedResourceName, nameof(unparsedResourceName))); + + /// + /// Creates a with the pattern projects/{project}/locations/{location}/jobs/{job}. + /// + /// The Project ID. Must not be null or empty. + /// The Location ID. Must not be null or empty. + /// The Job ID. Must not be null or empty. + /// A new instance of constructed from the provided ids. + public static JobName FromProjectLocationJob(string projectId, string locationId, string jobId) => + new JobName(ResourceNameType.ProjectLocationJob, projectId: gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), locationId: gax::GaxPreconditions.CheckNotNullOrEmpty(locationId, nameof(locationId)), jobId: gax::GaxPreconditions.CheckNotNullOrEmpty(jobId, nameof(jobId))); + + /// + /// Formats the IDs into the string representation of this with pattern + /// projects/{project}/locations/{location}/jobs/{job}. + /// + /// The Project ID. Must not be null or empty. + /// The Location ID. Must not be null or empty. + /// The Job ID. Must not be null or empty. + /// + /// The string representation of this with pattern + /// projects/{project}/locations/{location}/jobs/{job}. + /// + public static string Format(string projectId, string locationId, string jobId) => + FormatProjectLocationJob(projectId, locationId, jobId); + + /// + /// Formats the IDs into the string representation of this with pattern + /// projects/{project}/locations/{location}/jobs/{job}. + /// + /// The Project ID. Must not be null or empty. + /// The Location ID. Must not be null or empty. + /// The Job ID. Must not be null or empty. + /// + /// The string representation of this with pattern + /// projects/{project}/locations/{location}/jobs/{job}. + /// + public static string FormatProjectLocationJob(string projectId, string locationId, string jobId) => + s_projectLocationJob.Expand(gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), gax::GaxPreconditions.CheckNotNullOrEmpty(locationId, nameof(locationId)), gax::GaxPreconditions.CheckNotNullOrEmpty(jobId, nameof(jobId))); + + /// Parses the given resource name string into a new instance. + /// + /// To parse successfully, the resource name must be formatted as one of the following: + /// + /// projects/{project}/locations/{location}/jobs/{job} + /// + /// + /// The resource name in string form. Must not be null. + /// The parsed if successful. + public static JobName Parse(string jobName) => Parse(jobName, false); + + /// + /// Parses the given resource name string into a new instance; optionally allowing an + /// unparseable resource name. + /// + /// + /// To parse successfully, the resource name must be formatted as one of the following: + /// + /// projects/{project}/locations/{location}/jobs/{job} + /// + /// Or may be in any format if is true. + /// + /// The resource name in string form. Must not be null. + /// + /// If true will successfully store an unparseable resource name into the + /// property; otherwise will throw an if an unparseable resource name is + /// specified. + /// + /// The parsed if successful. + public static JobName Parse(string jobName, bool allowUnparsed) => + TryParse(jobName, allowUnparsed, out JobName result) ? result : throw new sys::ArgumentException("The given resource-name matches no pattern."); + + /// Tries to parse the given resource name string into a new instance. + /// + /// To parse successfully, the resource name must be formatted as one of the following: + /// + /// projects/{project}/locations/{location}/jobs/{job} + /// + /// + /// The resource name in string form. Must not be null. + /// + /// When this method returns, the parsed , or null if parsing failed. + /// + /// true if the name was parsed successfully; false otherwise. + public static bool TryParse(string jobName, out JobName result) => TryParse(jobName, false, out result); + + /// + /// Tries to parse the given resource name string into a new instance; optionally allowing + /// an unparseable resource name. + /// + /// + /// To parse successfully, the resource name must be formatted as one of the following: + /// + /// projects/{project}/locations/{location}/jobs/{job} + /// + /// Or may be in any format if is true. + /// + /// The resource name in string form. Must not be null. + /// + /// If true will successfully store an unparseable resource name into the + /// property; otherwise will throw an if an unparseable resource name is + /// specified. + /// + /// + /// When this method returns, the parsed , or null if parsing failed. + /// + /// true if the name was parsed successfully; false otherwise. + public static bool TryParse(string jobName, bool allowUnparsed, out JobName result) + { + gax::GaxPreconditions.CheckNotNull(jobName, nameof(jobName)); + gax::TemplatedResourceName resourceName; + if (s_projectLocationJob.TryParseName(jobName, out resourceName)) + { + result = FromProjectLocationJob(resourceName[0], resourceName[1], resourceName[2]); + return true; + } + if (allowUnparsed) + { + if (gax::UnparsedResourceName.TryParse(jobName, out gax::UnparsedResourceName unparsedResourceName)) + { + result = FromUnparsed(unparsedResourceName); + return true; + } + } + result = null; + return false; + } + + private JobName(ResourceNameType type, gax::UnparsedResourceName unparsedResourceName = null, string jobId = null, string locationId = null, string projectId = null) + { + Type = type; + UnparsedResource = unparsedResourceName; + JobId = jobId; + LocationId = locationId; + ProjectId = projectId; + } + + /// + /// Constructs a new instance of a class from the component parts of pattern + /// projects/{project}/locations/{location}/jobs/{job} + /// + /// The Project ID. Must not be null or empty. + /// The Location ID. Must not be null or empty. + /// The Job ID. Must not be null or empty. + public JobName(string projectId, string locationId, string jobId) : this(ResourceNameType.ProjectLocationJob, projectId: gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), locationId: gax::GaxPreconditions.CheckNotNullOrEmpty(locationId, nameof(locationId)), jobId: gax::GaxPreconditions.CheckNotNullOrEmpty(jobId, nameof(jobId))) + { + } + + /// The of the contained resource name. + public ResourceNameType Type { get; } + + /// + /// The contained . Only non-null if this instance contains an + /// unparsed resource name. + /// + public gax::UnparsedResourceName UnparsedResource { get; } + + /// + /// The Job ID. Will not be null, unless this instance contains an unparsed resource name. + /// + public string JobId { get; } + + /// + /// The Location ID. Will not be null, unless this instance contains an unparsed resource name. + /// + public string LocationId { get; } + + /// + /// The Project ID. Will not be null, unless this instance contains an unparsed resource name. + /// + public string ProjectId { get; } + + /// Whether this instance contains a resource name with a known pattern. + public bool IsKnownPattern => Type != ResourceNameType.Unparsed; + + /// The string representation of the resource name. + /// The string representation of the resource name. + public override string ToString() + { + switch (Type) + { + case ResourceNameType.Unparsed: return UnparsedResource.ToString(); + case ResourceNameType.ProjectLocationJob: return s_projectLocationJob.Expand(ProjectId, LocationId, JobId); + default: throw new sys::InvalidOperationException("Unrecognized resource-type."); + } + } + + /// Returns a hash code for this resource name. + public override int GetHashCode() => ToString().GetHashCode(); + + /// + public override bool Equals(object obj) => Equals(obj as JobName); + + /// + public bool Equals(JobName other) => ToString() == other?.ToString(); + + /// Determines whether two specified resource names have the same value. + /// The first resource name to compare, or null. + /// The second resource name to compare, or null. + /// + /// true if the value of is the same as the value of ; otherwise, + /// false. + /// + public static bool operator ==(JobName a, JobName b) => ReferenceEquals(a, b) || (a?.Equals(b) ?? false); + + /// Determines whether two specified resource names have different values. + /// The first resource name to compare, or null. + /// The second resource name to compare, or null. + /// + /// true if the value of is different from the value of ; otherwise, + /// false. + /// + public static bool operator !=(JobName a, JobName b) => !(a == b); + } + + /// Resource name for the TaskGroup resource. + public sealed partial class TaskGroupName : gax::IResourceName, sys::IEquatable + { + /// The possible contents of . + public enum ResourceNameType + { + /// An unparsed resource name. + Unparsed = 0, + + /// + /// A resource name with pattern + /// projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}. + /// + ProjectLocationJobTaskGroup = 1, + } + + private static gax::PathTemplate s_projectLocationJobTaskGroup = new gax::PathTemplate("projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}"); + + /// Creates a containing an unparsed resource name. + /// The unparsed resource name. Must not be null. + /// + /// A new instance of containing the provided + /// . + /// + public static TaskGroupName FromUnparsed(gax::UnparsedResourceName unparsedResourceName) => + new TaskGroupName(ResourceNameType.Unparsed, gax::GaxPreconditions.CheckNotNull(unparsedResourceName, nameof(unparsedResourceName))); + + /// + /// Creates a with the pattern + /// projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}. + /// + /// The Project ID. Must not be null or empty. + /// The Location ID. Must not be null or empty. + /// The Job ID. Must not be null or empty. + /// The TaskGroup ID. Must not be null or empty. + /// A new instance of constructed from the provided ids. + public static TaskGroupName FromProjectLocationJobTaskGroup(string projectId, string locationId, string jobId, string taskGroupId) => + new TaskGroupName(ResourceNameType.ProjectLocationJobTaskGroup, projectId: gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), locationId: gax::GaxPreconditions.CheckNotNullOrEmpty(locationId, nameof(locationId)), jobId: gax::GaxPreconditions.CheckNotNullOrEmpty(jobId, nameof(jobId)), taskGroupId: gax::GaxPreconditions.CheckNotNullOrEmpty(taskGroupId, nameof(taskGroupId))); + + /// + /// Formats the IDs into the string representation of this with pattern + /// projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}. + /// + /// The Project ID. Must not be null or empty. + /// The Location ID. Must not be null or empty. + /// The Job ID. Must not be null or empty. + /// The TaskGroup ID. Must not be null or empty. + /// + /// The string representation of this with pattern + /// projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}. + /// + public static string Format(string projectId, string locationId, string jobId, string taskGroupId) => + FormatProjectLocationJobTaskGroup(projectId, locationId, jobId, taskGroupId); + + /// + /// Formats the IDs into the string representation of this with pattern + /// projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}. + /// + /// The Project ID. Must not be null or empty. + /// The Location ID. Must not be null or empty. + /// The Job ID. Must not be null or empty. + /// The TaskGroup ID. Must not be null or empty. + /// + /// The string representation of this with pattern + /// projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}. + /// + public static string FormatProjectLocationJobTaskGroup(string projectId, string locationId, string jobId, string taskGroupId) => + s_projectLocationJobTaskGroup.Expand(gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), gax::GaxPreconditions.CheckNotNullOrEmpty(locationId, nameof(locationId)), gax::GaxPreconditions.CheckNotNullOrEmpty(jobId, nameof(jobId)), gax::GaxPreconditions.CheckNotNullOrEmpty(taskGroupId, nameof(taskGroupId))); + + /// Parses the given resource name string into a new instance. + /// + /// To parse successfully, the resource name must be formatted as one of the following: + /// + /// + /// + /// projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group} + /// + /// + /// + /// + /// The resource name in string form. Must not be null. + /// The parsed if successful. + public static TaskGroupName Parse(string taskGroupName) => Parse(taskGroupName, false); + + /// + /// Parses the given resource name string into a new instance; optionally allowing + /// an unparseable resource name. + /// + /// + /// To parse successfully, the resource name must be formatted as one of the following: + /// + /// + /// + /// projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group} + /// + /// + /// + /// Or may be in any format if is true. + /// + /// The resource name in string form. Must not be null. + /// + /// If true will successfully store an unparseable resource name into the + /// property; otherwise will throw an if an unparseable resource name is + /// specified. + /// + /// The parsed if successful. + public static TaskGroupName Parse(string taskGroupName, bool allowUnparsed) => + TryParse(taskGroupName, allowUnparsed, out TaskGroupName result) ? result : throw new sys::ArgumentException("The given resource-name matches no pattern."); + + /// + /// Tries to parse the given resource name string into a new instance. + /// + /// + /// To parse successfully, the resource name must be formatted as one of the following: + /// + /// + /// + /// projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group} + /// + /// + /// + /// + /// The resource name in string form. Must not be null. + /// + /// When this method returns, the parsed , or null if parsing failed. + /// + /// true if the name was parsed successfully; false otherwise. + public static bool TryParse(string taskGroupName, out TaskGroupName result) => TryParse(taskGroupName, false, out result); + + /// + /// Tries to parse the given resource name string into a new instance; optionally + /// allowing an unparseable resource name. + /// + /// + /// To parse successfully, the resource name must be formatted as one of the following: + /// + /// + /// + /// projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group} + /// + /// + /// + /// Or may be in any format if is true. + /// + /// The resource name in string form. Must not be null. + /// + /// If true will successfully store an unparseable resource name into the + /// property; otherwise will throw an if an unparseable resource name is + /// specified. + /// + /// + /// When this method returns, the parsed , or null if parsing failed. + /// + /// true if the name was parsed successfully; false otherwise. + public static bool TryParse(string taskGroupName, bool allowUnparsed, out TaskGroupName result) + { + gax::GaxPreconditions.CheckNotNull(taskGroupName, nameof(taskGroupName)); + gax::TemplatedResourceName resourceName; + if (s_projectLocationJobTaskGroup.TryParseName(taskGroupName, out resourceName)) + { + result = FromProjectLocationJobTaskGroup(resourceName[0], resourceName[1], resourceName[2], resourceName[3]); + return true; + } + if (allowUnparsed) + { + if (gax::UnparsedResourceName.TryParse(taskGroupName, out gax::UnparsedResourceName unparsedResourceName)) + { + result = FromUnparsed(unparsedResourceName); + return true; + } + } + result = null; + return false; + } + + private TaskGroupName(ResourceNameType type, gax::UnparsedResourceName unparsedResourceName = null, string jobId = null, string locationId = null, string projectId = null, string taskGroupId = null) + { + Type = type; + UnparsedResource = unparsedResourceName; + JobId = jobId; + LocationId = locationId; + ProjectId = projectId; + TaskGroupId = taskGroupId; + } + + /// + /// Constructs a new instance of a class from the component parts of pattern + /// projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group} + /// + /// The Project ID. Must not be null or empty. + /// The Location ID. Must not be null or empty. + /// The Job ID. Must not be null or empty. + /// The TaskGroup ID. Must not be null or empty. + public TaskGroupName(string projectId, string locationId, string jobId, string taskGroupId) : this(ResourceNameType.ProjectLocationJobTaskGroup, projectId: gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), locationId: gax::GaxPreconditions.CheckNotNullOrEmpty(locationId, nameof(locationId)), jobId: gax::GaxPreconditions.CheckNotNullOrEmpty(jobId, nameof(jobId)), taskGroupId: gax::GaxPreconditions.CheckNotNullOrEmpty(taskGroupId, nameof(taskGroupId))) + { + } + + /// The of the contained resource name. + public ResourceNameType Type { get; } + + /// + /// The contained . Only non-null if this instance contains an + /// unparsed resource name. + /// + public gax::UnparsedResourceName UnparsedResource { get; } + + /// + /// The Job ID. Will not be null, unless this instance contains an unparsed resource name. + /// + public string JobId { get; } + + /// + /// The Location ID. Will not be null, unless this instance contains an unparsed resource name. + /// + public string LocationId { get; } + + /// + /// The Project ID. Will not be null, unless this instance contains an unparsed resource name. + /// + public string ProjectId { get; } + + /// + /// The TaskGroup ID. Will not be null, unless this instance contains an unparsed resource name. + /// + public string TaskGroupId { get; } + + /// Whether this instance contains a resource name with a known pattern. + public bool IsKnownPattern => Type != ResourceNameType.Unparsed; + + /// The string representation of the resource name. + /// The string representation of the resource name. + public override string ToString() + { + switch (Type) + { + case ResourceNameType.Unparsed: return UnparsedResource.ToString(); + case ResourceNameType.ProjectLocationJobTaskGroup: return s_projectLocationJobTaskGroup.Expand(ProjectId, LocationId, JobId, TaskGroupId); + default: throw new sys::InvalidOperationException("Unrecognized resource-type."); + } + } + + /// Returns a hash code for this resource name. + public override int GetHashCode() => ToString().GetHashCode(); + + /// + public override bool Equals(object obj) => Equals(obj as TaskGroupName); + + /// + public bool Equals(TaskGroupName other) => ToString() == other?.ToString(); + + /// Determines whether two specified resource names have the same value. + /// The first resource name to compare, or null. + /// The second resource name to compare, or null. + /// + /// true if the value of is the same as the value of ; otherwise, + /// false. + /// + public static bool operator ==(TaskGroupName a, TaskGroupName b) => ReferenceEquals(a, b) || (a?.Equals(b) ?? false); + + /// Determines whether two specified resource names have different values. + /// The first resource name to compare, or null. + /// The second resource name to compare, or null. + /// + /// true if the value of is different from the value of ; otherwise, + /// false. + /// + public static bool operator !=(TaskGroupName a, TaskGroupName b) => !(a == b); + } + + public partial class Job + { + /// + /// -typed view over the resource name property. + /// + public gcbv::JobName JobName + { + get => string.IsNullOrEmpty(Name) ? null : gcbv::JobName.Parse(Name, allowUnparsed: true); + set => Name = value?.ToString() ?? ""; + } + } + + public partial class TaskGroup + { + /// + /// -typed view over the resource name property. + /// + public gcbv::TaskGroupName TaskGroupName + { + get => string.IsNullOrEmpty(Name) ? null : gcbv::TaskGroupName.Parse(Name, allowUnparsed: true); + set => Name = value?.ToString() ?? ""; + } + } +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha/Notification.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha/Notification.g.cs new file mode 100755 index 000000000000..c021b13655e1 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha/Notification.g.cs @@ -0,0 +1,250 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/batch/v1alpha/notification.proto +// +#pragma warning disable 1591, 0612, 3021, 8981 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Google.Cloud.Batch.V1Alpha { + + /// Holder for reflection information generated from google/cloud/batch/v1alpha/notification.proto + public static partial class NotificationReflection { + + #region Descriptor + /// File descriptor for google/cloud/batch/v1alpha/notification.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static NotificationReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "Ci1nb29nbGUvY2xvdWQvYmF0Y2gvdjFhbHBoYS9ub3RpZmljYXRpb24ucHJv", + "dG8SGmdvb2dsZS5jbG91ZC5iYXRjaC52MWFscGhhGh9nb29nbGUvYXBpL2Zp", + "ZWxkX2JlaGF2aW9yLnByb3RvIikKDE5vdGlmaWNhdGlvbhIZCgxwdWJzdWJf", + "dG9waWMYASABKAlCA+BBAkLLAQoeY29tLmdvb2dsZS5jbG91ZC5iYXRjaC52", + "MWFscGhhQhFOb3RpZmljYXRpb25Qcm90b1ABWjRjbG91ZC5nb29nbGUuY29t", + "L2dvL2JhdGNoL2FwaXYxYWxwaGEvYmF0Y2hwYjtiYXRjaHBiogIDR0NCqgIa", + "R29vZ2xlLkNsb3VkLkJhdGNoLlYxQWxwaGHKAhpHb29nbGVcQ2xvdWRcQmF0", + "Y2hcVjFhbHBoYeoCHUdvb2dsZTo6Q2xvdWQ6OkJhdGNoOjpWMWFscGhhYgZw", + "cm90bzM=")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { global::Google.Api.FieldBehaviorReflection.Descriptor, }, + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Batch.V1Alpha.Notification), global::Google.Cloud.Batch.V1Alpha.Notification.Parser, new[]{ "PubsubTopic" }, null, null, null, null) + })); + } + #endregion + + } + #region Messages + /// + /// Notification on resource state change. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Notification : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Notification()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Batch.V1Alpha.NotificationReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Notification() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Notification(Notification other) : this() { + pubsubTopic_ = other.pubsubTopic_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Notification Clone() { + return new Notification(this); + } + + /// Field number for the "pubsub_topic" field. + public const int PubsubTopicFieldNumber = 1; + private string pubsubTopic_ = ""; + /// + /// Required. The Pub/Sub topic where notifications like the resource allowance + /// state changes will be published. The topic must exist in the same project + /// as the job and billings will be charged to this project. If not specified, + /// no Pub/Sub messages will be sent. Topic format: + /// `projects/{project}/topics/{topic}`. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string PubsubTopic { + get { return pubsubTopic_; } + set { + pubsubTopic_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Notification); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Notification other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (PubsubTopic != other.PubsubTopic) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (PubsubTopic.Length != 0) hash ^= PubsubTopic.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (PubsubTopic.Length != 0) { + output.WriteRawTag(10); + output.WriteString(PubsubTopic); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (PubsubTopic.Length != 0) { + output.WriteRawTag(10); + output.WriteString(PubsubTopic); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (PubsubTopic.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(PubsubTopic); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Notification other) { + if (other == null) { + return; + } + if (other.PubsubTopic.Length != 0) { + PubsubTopic = other.PubsubTopic; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + PubsubTopic = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + PubsubTopic = input.ReadString(); + break; + } + } + } + } + #endif + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha/PackageApiMetadata.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha/PackageApiMetadata.g.cs new file mode 100755 index 000000000000..b27f0e24fc9d --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha/PackageApiMetadata.g.cs @@ -0,0 +1,79 @@ +// 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 +using gaxgrpc = Google.Api.Gax.Grpc; +using gcl = Google.Cloud.Location; +using gpr = Google.Protobuf.Reflection; +using lro = Google.LongRunning; +using proto = Google.Protobuf; +using scg = System.Collections.Generic; + +namespace Google.Cloud.Batch.V1Alpha +{ + /// Static class to provide common access to package-wide API metadata. + internal static class PackageApiMetadata + { + /// The for services in this package. + internal static gaxgrpc::ApiMetadata ApiMetadata { get; } = new gaxgrpc::ApiMetadata("Google.Cloud.Batch.V1Alpha", GetFileDescriptors) + .WithRequestNumericEnumJsonEncoding(true) + .WithHttpRuleOverrides(new scg::Dictionary + { + { + "google.cloud.location.Locations.GetLocation", + // { "get": "/v1alpha/{name=projects/*/locations/*}" } + proto::ByteString.FromBase64("EiYvdjFhbHBoYS97bmFtZT1wcm9qZWN0cy8qL2xvY2F0aW9ucy8qfQ==") + }, + { + "google.cloud.location.Locations.ListLocations", + // { "get": "/v1alpha/{name=projects/*}/locations" } + proto::ByteString.FromBase64("EiQvdjFhbHBoYS97bmFtZT1wcm9qZWN0cy8qfS9sb2NhdGlvbnM=") + }, + { + "google.longrunning.Operations.CancelOperation", + // { "post": "/v1alpha/{name=projects/*/locations/*/operations/*}:cancel", "body": "*" } + proto::ByteString.FromBase64("IjovdjFhbHBoYS97bmFtZT1wcm9qZWN0cy8qL2xvY2F0aW9ucy8qL29wZXJhdGlvbnMvKn06Y2FuY2VsOgEq") + }, + { + "google.longrunning.Operations.DeleteOperation", + // { "delete": "/v1alpha/{name=projects/*/locations/*/operations/*}" } + proto::ByteString.FromBase64("KjMvdjFhbHBoYS97bmFtZT1wcm9qZWN0cy8qL2xvY2F0aW9ucy8qL29wZXJhdGlvbnMvKn0=") + }, + { + "google.longrunning.Operations.GetOperation", + // { "get": "/v1alpha/{name=projects/*/locations/*/operations/*}" } + proto::ByteString.FromBase64("EjMvdjFhbHBoYS97bmFtZT1wcm9qZWN0cy8qL2xvY2F0aW9ucy8qL29wZXJhdGlvbnMvKn0=") + }, + { + "google.longrunning.Operations.ListOperations", + // { "get": "/v1alpha/{name=projects/*/locations/*}/operations" } + proto::ByteString.FromBase64("EjEvdjFhbHBoYS97bmFtZT1wcm9qZWN0cy8qL2xvY2F0aW9ucy8qfS9vcGVyYXRpb25z") + }, + }); + + private static scg::IEnumerable GetFileDescriptors() + { + yield return BatchReflection.Descriptor; + yield return JobReflection.Descriptor; + yield return NotificationReflection.Descriptor; + yield return ResourceAllowanceReflection.Descriptor; + yield return TaskReflection.Descriptor; + yield return VolumeReflection.Descriptor; + yield return gcl::LocationsReflection.Descriptor; + yield return lro::OperationsReflection.Descriptor; + } + } +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha/ResourceAllowance.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha/ResourceAllowance.g.cs new file mode 100755 index 000000000000..70bf6484e82a --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha/ResourceAllowance.g.cs @@ -0,0 +1,2486 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/batch/v1alpha/resource_allowance.proto +// +#pragma warning disable 1591, 0612, 3021, 8981 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Google.Cloud.Batch.V1Alpha { + + /// Holder for reflection information generated from google/cloud/batch/v1alpha/resource_allowance.proto + public static partial class ResourceAllowanceReflection { + + #region Descriptor + /// File descriptor for google/cloud/batch/v1alpha/resource_allowance.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static ResourceAllowanceReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CjNnb29nbGUvY2xvdWQvYmF0Y2gvdjFhbHBoYS9yZXNvdXJjZV9hbGxvd2Fu", + "Y2UucHJvdG8SGmdvb2dsZS5jbG91ZC5iYXRjaC52MWFscGhhGh9nb29nbGUv", + "YXBpL2ZpZWxkX2JlaGF2aW9yLnByb3RvGhtnb29nbGUvYXBpL2ZpZWxkX2lu", + "Zm8ucHJvdG8aGWdvb2dsZS9hcGkvcmVzb3VyY2UucHJvdG8aLWdvb2dsZS9j", + "bG91ZC9iYXRjaC92MWFscGhhL25vdGlmaWNhdGlvbi5wcm90bxofZ29vZ2xl", + "L3Byb3RvYnVmL3RpbWVzdGFtcC5wcm90bxoaZ29vZ2xlL3R5cGUvaW50ZXJ2", + "YWwucHJvdG8i0AQKEVJlc291cmNlQWxsb3dhbmNlElYKGHVzYWdlX3Jlc291", + "cmNlX2FsbG93YW5jZRgEIAEoCzIyLmdvb2dsZS5jbG91ZC5iYXRjaC52MWFs", + "cGhhLlVzYWdlUmVzb3VyY2VBbGxvd2FuY2VIABIRCgRuYW1lGAEgASgJQgPg", + "QQgSGAoDdWlkGAIgASgJQgvgQQPijM/XCAIIARI0CgtjcmVhdGVfdGltZRgD", + "IAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBCA+BBAxJOCgZsYWJl", + "bHMYBSADKAsyOS5nb29nbGUuY2xvdWQuYmF0Y2gudjFhbHBoYS5SZXNvdXJj", + "ZUFsbG93YW5jZS5MYWJlbHNFbnRyeUID4EEBEkQKDW5vdGlmaWNhdGlvbnMY", + "BiADKAsyKC5nb29nbGUuY2xvdWQuYmF0Y2gudjFhbHBoYS5Ob3RpZmljYXRp", + "b25CA+BBARotCgtMYWJlbHNFbnRyeRILCgNrZXkYASABKAkSDQoFdmFsdWUY", + "AiABKAk6AjgBOqQB6kGgAQomYmF0Y2guZ29vZ2xlYXBpcy5jb20vUmVzb3Vy", + "Y2VBbGxvd2FuY2UST3Byb2plY3RzL3twcm9qZWN0fS9sb2NhdGlvbnMve2xv", + "Y2F0aW9ufS9yZXNvdXJjZUFsbG93YW5jZXMve3Jlc291cmNlX2FsbG93YW5j", + "ZX0qEnJlc291cmNlQWxsb3dhbmNlczIRcmVzb3VyY2VBbGxvd2FuY2VCFAoS", + "cmVzb3VyY2VfYWxsb3dhbmNlIrIBChZVc2FnZVJlc291cmNlQWxsb3dhbmNl", + "EkkKBHNwZWMYASABKAsyNi5nb29nbGUuY2xvdWQuYmF0Y2gudjFhbHBoYS5V", + "c2FnZVJlc291cmNlQWxsb3dhbmNlU3BlY0ID4EECEk0KBnN0YXR1cxgCIAEo", + "CzI4Lmdvb2dsZS5jbG91ZC5iYXRjaC52MWFscGhhLlVzYWdlUmVzb3VyY2VB", + "bGxvd2FuY2VTdGF0dXNCA+BBAyKGAgoaVXNhZ2VSZXNvdXJjZUFsbG93YW5j", + "ZVNwZWMSEQoEdHlwZRgBIAEoCUID4EECElAKBWxpbWl0GAIgASgLMjwuZ29v", + "Z2xlLmNsb3VkLmJhdGNoLnYxYWxwaGEuVXNhZ2VSZXNvdXJjZUFsbG93YW5j", + "ZVNwZWMuTGltaXRCA+BBAhqCAQoFTGltaXQSSgoPY2FsZW5kYXJfcGVyaW9k", + "GAEgASgOMiouZ29vZ2xlLmNsb3VkLmJhdGNoLnYxYWxwaGEuQ2FsZW5kYXJQ", + "ZXJpb2RCA+BBAUgAEhcKBWxpbWl0GAIgASgBQgPgQQJIAYgBAUIKCghkdXJh", + "dGlvbkIICgZfbGltaXQi7gYKHFVzYWdlUmVzb3VyY2VBbGxvd2FuY2VTdGF0", + "dXMSRgoFc3RhdGUYASABKA4yMi5nb29nbGUuY2xvdWQuYmF0Y2gudjFhbHBo", + "YS5SZXNvdXJjZUFsbG93YW5jZVN0YXRlQgPgQQMSXwoMbGltaXRfc3RhdHVz", + "GAIgASgLMkQuZ29vZ2xlLmNsb3VkLmJhdGNoLnYxYWxwaGEuVXNhZ2VSZXNv", + "dXJjZUFsbG93YW5jZVN0YXR1cy5MaW1pdFN0YXR1c0ID4EEDEl8KBnJlcG9y", + "dBgDIAEoCzJKLmdvb2dsZS5jbG91ZC5iYXRjaC52MWFscGhhLlVzYWdlUmVz", + "b3VyY2VBbGxvd2FuY2VTdGF0dXMuQ29uc3VtcHRpb25SZXBvcnRCA+BBAxqT", + "AQoLTGltaXRTdGF0dXMSOAoUY29uc3VtcHRpb25faW50ZXJ2YWwYASABKAsy", + "FS5nb29nbGUudHlwZS5JbnRlcnZhbEID4EEDEhcKBWxpbWl0GAIgASgBQgPg", + "QQNIAIgBARIaCghjb25zdW1lZBgDIAEoAUID4EEDSAGIAQFCCAoGX2xpbWl0", + "QgsKCV9jb25zdW1lZBp2ChFQZXJpb2RDb25zdW1wdGlvbhI4ChRjb25zdW1w", + "dGlvbl9pbnRlcnZhbBgBIAEoCzIVLmdvb2dsZS50eXBlLkludGVydmFsQgPg", + "QQMSGgoIY29uc3VtZWQYAiABKAFCA+BBA0gAiAEBQgsKCV9jb25zdW1lZBq1", + "AgoRQ29uc3VtcHRpb25SZXBvcnQSkQEKGmxhdGVzdF9wZXJpb2RfY29uc3Vt", + "cHRpb25zGAEgAygLMmguZ29vZ2xlLmNsb3VkLmJhdGNoLnYxYWxwaGEuVXNh", + "Z2VSZXNvdXJjZUFsbG93YW5jZVN0YXR1cy5Db25zdW1wdGlvblJlcG9ydC5M", + "YXRlc3RQZXJpb2RDb25zdW1wdGlvbnNFbnRyeUID4EEDGosBCh1MYXRlc3RQ", + "ZXJpb2RDb25zdW1wdGlvbnNFbnRyeRILCgNrZXkYASABKAkSWQoFdmFsdWUY", + "AiABKAsySi5nb29nbGUuY2xvdWQuYmF0Y2gudjFhbHBoYS5Vc2FnZVJlc291", + "cmNlQWxsb3dhbmNlU3RhdHVzLlBlcmlvZENvbnN1bXB0aW9uOgI4ASpmCg5D", + "YWxlbmRhclBlcmlvZBIfChtDQUxFTkRBUl9QRVJJT0RfVU5TUEVDSUZJRUQQ", + "ABIJCgVNT05USBABEgsKB1FVQVJURVIQAhIICgRZRUFSEAMSCAoEV0VFSxAE", + "EgcKA0RBWRAFKoIBChZSZXNvdXJjZUFsbG93YW5jZVN0YXRlEigKJFJFU09V", + "UkNFX0FMTE9XQU5DRV9TVEFURV9VTlNQRUNJRklFRBAAEh0KGVJFU09VUkNF", + "X0FMTE9XQU5DRV9BQ1RJVkUQARIfChtSRVNPVVJDRV9BTExPV0FOQ0VfREVQ", + "TEVURUQQAkLQAQoeY29tLmdvb2dsZS5jbG91ZC5iYXRjaC52MWFscGhhQhZS", + "ZXNvdXJjZUFsbG93YW5jZVByb3RvUAFaNGNsb3VkLmdvb2dsZS5jb20vZ28v", + "YmF0Y2gvYXBpdjFhbHBoYS9iYXRjaHBiO2JhdGNocGKiAgNHQ0KqAhpHb29n", + "bGUuQ2xvdWQuQmF0Y2guVjFBbHBoYcoCGkdvb2dsZVxDbG91ZFxCYXRjaFxW", + "MWFscGhh6gIdR29vZ2xlOjpDbG91ZDo6QmF0Y2g6OlYxYWxwaGFiBnByb3Rv", + "Mw==")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { global::Google.Api.FieldBehaviorReflection.Descriptor, global::Google.Api.FieldInfoReflection.Descriptor, global::Google.Api.ResourceReflection.Descriptor, global::Google.Cloud.Batch.V1Alpha.NotificationReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.TimestampReflection.Descriptor, global::Google.Type.IntervalReflection.Descriptor, }, + new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Google.Cloud.Batch.V1Alpha.CalendarPeriod), typeof(global::Google.Cloud.Batch.V1Alpha.ResourceAllowanceState), }, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Batch.V1Alpha.ResourceAllowance), global::Google.Cloud.Batch.V1Alpha.ResourceAllowance.Parser, new[]{ "UsageResourceAllowance", "Name", "Uid", "CreateTime", "Labels", "Notifications" }, new[]{ "ResourceAllowance" }, null, null, new pbr::GeneratedClrTypeInfo[] { null, }), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Batch.V1Alpha.UsageResourceAllowance), global::Google.Cloud.Batch.V1Alpha.UsageResourceAllowance.Parser, new[]{ "Spec", "Status" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Batch.V1Alpha.UsageResourceAllowanceSpec), global::Google.Cloud.Batch.V1Alpha.UsageResourceAllowanceSpec.Parser, new[]{ "Type", "Limit" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Batch.V1Alpha.UsageResourceAllowanceSpec.Types.Limit), global::Google.Cloud.Batch.V1Alpha.UsageResourceAllowanceSpec.Types.Limit.Parser, new[]{ "CalendarPeriod", "Limit_" }, new[]{ "Duration", "Limit" }, null, null, null)}), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Batch.V1Alpha.UsageResourceAllowanceStatus), global::Google.Cloud.Batch.V1Alpha.UsageResourceAllowanceStatus.Parser, new[]{ "State", "LimitStatus", "Report" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Batch.V1Alpha.UsageResourceAllowanceStatus.Types.LimitStatus), global::Google.Cloud.Batch.V1Alpha.UsageResourceAllowanceStatus.Types.LimitStatus.Parser, new[]{ "ConsumptionInterval", "Limit", "Consumed" }, new[]{ "Limit", "Consumed" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Batch.V1Alpha.UsageResourceAllowanceStatus.Types.PeriodConsumption), global::Google.Cloud.Batch.V1Alpha.UsageResourceAllowanceStatus.Types.PeriodConsumption.Parser, new[]{ "ConsumptionInterval", "Consumed" }, new[]{ "Consumed" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Batch.V1Alpha.UsageResourceAllowanceStatus.Types.ConsumptionReport), global::Google.Cloud.Batch.V1Alpha.UsageResourceAllowanceStatus.Types.ConsumptionReport.Parser, new[]{ "LatestPeriodConsumptions" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, })}) + })); + } + #endregion + + } + #region Enums + /// + /// A `CalendarPeriod` represents the abstract concept of a time period that + /// has a canonical start. All calendar times begin at 12 AM US and Canadian + /// Pacific Time (UTC-8). + /// + public enum CalendarPeriod { + /// + /// Unspecified. + /// + [pbr::OriginalName("CALENDAR_PERIOD_UNSPECIFIED")] Unspecified = 0, + /// + /// The month starts on the first date of the month and resets at the beginning + /// of each month. + /// + [pbr::OriginalName("MONTH")] Month = 1, + /// + /// The quarter starts on dates January 1, April 1, July 1, and October 1 of + /// each year and resets at the beginning of the next quarter. + /// + [pbr::OriginalName("QUARTER")] Quarter = 2, + /// + /// The year starts on January 1 and resets at the beginning of the next year. + /// + [pbr::OriginalName("YEAR")] Year = 3, + /// + /// The week period starts and resets every Monday. + /// + [pbr::OriginalName("WEEK")] Week = 4, + /// + /// The day starts at 12:00am. + /// + [pbr::OriginalName("DAY")] Day = 5, + } + + /// + /// ResourceAllowance valid state. + /// + public enum ResourceAllowanceState { + /// + /// Unspecified. + /// + [pbr::OriginalName("RESOURCE_ALLOWANCE_STATE_UNSPECIFIED")] Unspecified = 0, + /// + /// ResourceAllowance is active and in use. + /// + [pbr::OriginalName("RESOURCE_ALLOWANCE_ACTIVE")] ResourceAllowanceActive = 1, + /// + /// ResourceAllowance limit is reached. + /// + [pbr::OriginalName("RESOURCE_ALLOWANCE_DEPLETED")] ResourceAllowanceDepleted = 2, + } + + #endregion + + #region Messages + /// + /// The Resource Allowance description for Cloud Batch. + /// Only one Resource Allowance is supported now under a specific location and + /// project. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ResourceAllowance : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ResourceAllowance()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Batch.V1Alpha.ResourceAllowanceReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ResourceAllowance() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ResourceAllowance(ResourceAllowance other) : this() { + name_ = other.name_; + uid_ = other.uid_; + createTime_ = other.createTime_ != null ? other.createTime_.Clone() : null; + labels_ = other.labels_.Clone(); + notifications_ = other.notifications_.Clone(); + switch (other.ResourceAllowanceCase) { + case ResourceAllowanceOneofCase.UsageResourceAllowance: + UsageResourceAllowance = other.UsageResourceAllowance.Clone(); + break; + } + + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ResourceAllowance Clone() { + return new ResourceAllowance(this); + } + + /// Field number for the "usage_resource_allowance" field. + public const int UsageResourceAllowanceFieldNumber = 4; + /// + /// The detail of usage resource allowance. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Batch.V1Alpha.UsageResourceAllowance UsageResourceAllowance { + get { return resourceAllowanceCase_ == ResourceAllowanceOneofCase.UsageResourceAllowance ? (global::Google.Cloud.Batch.V1Alpha.UsageResourceAllowance) resourceAllowance_ : null; } + set { + resourceAllowance_ = value; + resourceAllowanceCase_ = value == null ? ResourceAllowanceOneofCase.None : ResourceAllowanceOneofCase.UsageResourceAllowance; + } + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; + /// + /// Identifier. ResourceAllowance name. + /// For example: + /// "projects/123456/locations/us-central1/resourceAllowances/resource-allowance-1". + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "uid" field. + public const int UidFieldNumber = 2; + private string uid_ = ""; + /// + /// Output only. A system generated unique ID (in UUID4 format) for the + /// ResourceAllowance. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Uid { + get { return uid_; } + set { + uid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "create_time" field. + public const int CreateTimeFieldNumber = 3; + private global::Google.Protobuf.WellKnownTypes.Timestamp createTime_; + /// + /// Output only. Time when the ResourceAllowance was created. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.WellKnownTypes.Timestamp CreateTime { + get { return createTime_; } + set { + createTime_ = value; + } + } + + /// Field number for the "labels" field. + public const int LabelsFieldNumber = 5; + private static readonly pbc::MapField.Codec _map_labels_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForString(18, ""), 42); + private readonly pbc::MapField labels_ = new pbc::MapField(); + /// + /// Optional. Labels are attributes that can be set and used by both the + /// user and by Batch. Labels must meet the following constraints: + /// + /// * Keys and values can contain only lowercase letters, numeric characters, + /// underscores, and dashes. + /// * All characters must use UTF-8 encoding, and international characters are + /// allowed. + /// * Keys must start with a lowercase letter or international character. + /// * Each resource is limited to a maximum of 64 labels. + /// + /// Both keys and values are additionally constrained to be <= 128 bytes. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::MapField Labels { + get { return labels_; } + } + + /// Field number for the "notifications" field. + public const int NotificationsFieldNumber = 6; + private static readonly pb::FieldCodec _repeated_notifications_codec + = pb::FieldCodec.ForMessage(50, global::Google.Cloud.Batch.V1Alpha.Notification.Parser); + private readonly pbc::RepeatedField notifications_ = new pbc::RepeatedField(); + /// + /// Optional. Notification configurations. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Notifications { + get { return notifications_; } + } + + private object resourceAllowance_; + /// Enum of possible cases for the "resource_allowance" oneof. + public enum ResourceAllowanceOneofCase { + None = 0, + UsageResourceAllowance = 4, + } + private ResourceAllowanceOneofCase resourceAllowanceCase_ = ResourceAllowanceOneofCase.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ResourceAllowanceOneofCase ResourceAllowanceCase { + get { return resourceAllowanceCase_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearResourceAllowance() { + resourceAllowanceCase_ = ResourceAllowanceOneofCase.None; + resourceAllowance_ = null; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ResourceAllowance); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ResourceAllowance other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(UsageResourceAllowance, other.UsageResourceAllowance)) return false; + if (Name != other.Name) return false; + if (Uid != other.Uid) return false; + if (!object.Equals(CreateTime, other.CreateTime)) return false; + if (!Labels.Equals(other.Labels)) return false; + if(!notifications_.Equals(other.notifications_)) return false; + if (ResourceAllowanceCase != other.ResourceAllowanceCase) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (resourceAllowanceCase_ == ResourceAllowanceOneofCase.UsageResourceAllowance) hash ^= UsageResourceAllowance.GetHashCode(); + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (Uid.Length != 0) hash ^= Uid.GetHashCode(); + if (createTime_ != null) hash ^= CreateTime.GetHashCode(); + hash ^= Labels.GetHashCode(); + hash ^= notifications_.GetHashCode(); + hash ^= (int) resourceAllowanceCase_; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (Uid.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Uid); + } + if (createTime_ != null) { + output.WriteRawTag(26); + output.WriteMessage(CreateTime); + } + if (resourceAllowanceCase_ == ResourceAllowanceOneofCase.UsageResourceAllowance) { + output.WriteRawTag(34); + output.WriteMessage(UsageResourceAllowance); + } + labels_.WriteTo(output, _map_labels_codec); + notifications_.WriteTo(output, _repeated_notifications_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (Uid.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Uid); + } + if (createTime_ != null) { + output.WriteRawTag(26); + output.WriteMessage(CreateTime); + } + if (resourceAllowanceCase_ == ResourceAllowanceOneofCase.UsageResourceAllowance) { + output.WriteRawTag(34); + output.WriteMessage(UsageResourceAllowance); + } + labels_.WriteTo(ref output, _map_labels_codec); + notifications_.WriteTo(ref output, _repeated_notifications_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (resourceAllowanceCase_ == ResourceAllowanceOneofCase.UsageResourceAllowance) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(UsageResourceAllowance); + } + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (Uid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Uid); + } + if (createTime_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(CreateTime); + } + size += labels_.CalculateSize(_map_labels_codec); + size += notifications_.CalculateSize(_repeated_notifications_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ResourceAllowance other) { + if (other == null) { + return; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + if (other.Uid.Length != 0) { + Uid = other.Uid; + } + if (other.createTime_ != null) { + if (createTime_ == null) { + CreateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + CreateTime.MergeFrom(other.CreateTime); + } + labels_.MergeFrom(other.labels_); + notifications_.Add(other.notifications_); + switch (other.ResourceAllowanceCase) { + case ResourceAllowanceOneofCase.UsageResourceAllowance: + if (UsageResourceAllowance == null) { + UsageResourceAllowance = new global::Google.Cloud.Batch.V1Alpha.UsageResourceAllowance(); + } + UsageResourceAllowance.MergeFrom(other.UsageResourceAllowance); + break; + } + + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + Uid = input.ReadString(); + break; + } + case 26: { + if (createTime_ == null) { + CreateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + input.ReadMessage(CreateTime); + break; + } + case 34: { + global::Google.Cloud.Batch.V1Alpha.UsageResourceAllowance subBuilder = new global::Google.Cloud.Batch.V1Alpha.UsageResourceAllowance(); + if (resourceAllowanceCase_ == ResourceAllowanceOneofCase.UsageResourceAllowance) { + subBuilder.MergeFrom(UsageResourceAllowance); + } + input.ReadMessage(subBuilder); + UsageResourceAllowance = subBuilder; + break; + } + case 42: { + labels_.AddEntriesFrom(input, _map_labels_codec); + break; + } + case 50: { + notifications_.AddEntriesFrom(input, _repeated_notifications_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + Uid = input.ReadString(); + break; + } + case 26: { + if (createTime_ == null) { + CreateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + input.ReadMessage(CreateTime); + break; + } + case 34: { + global::Google.Cloud.Batch.V1Alpha.UsageResourceAllowance subBuilder = new global::Google.Cloud.Batch.V1Alpha.UsageResourceAllowance(); + if (resourceAllowanceCase_ == ResourceAllowanceOneofCase.UsageResourceAllowance) { + subBuilder.MergeFrom(UsageResourceAllowance); + } + input.ReadMessage(subBuilder); + UsageResourceAllowance = subBuilder; + break; + } + case 42: { + labels_.AddEntriesFrom(ref input, _map_labels_codec); + break; + } + case 50: { + notifications_.AddEntriesFrom(ref input, _repeated_notifications_codec); + break; + } + } + } + } + #endif + + } + + /// + /// UsageResourceAllowance describes the detail of usage resource allowance. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class UsageResourceAllowance : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UsageResourceAllowance()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Batch.V1Alpha.ResourceAllowanceReflection.Descriptor.MessageTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UsageResourceAllowance() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UsageResourceAllowance(UsageResourceAllowance other) : this() { + spec_ = other.spec_ != null ? other.spec_.Clone() : null; + status_ = other.status_ != null ? other.status_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UsageResourceAllowance Clone() { + return new UsageResourceAllowance(this); + } + + /// Field number for the "spec" field. + public const int SpecFieldNumber = 1; + private global::Google.Cloud.Batch.V1Alpha.UsageResourceAllowanceSpec spec_; + /// + /// Required. Spec of a usage ResourceAllowance. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Batch.V1Alpha.UsageResourceAllowanceSpec Spec { + get { return spec_; } + set { + spec_ = value; + } + } + + /// Field number for the "status" field. + public const int StatusFieldNumber = 2; + private global::Google.Cloud.Batch.V1Alpha.UsageResourceAllowanceStatus status_; + /// + /// Output only. Status of a usage ResourceAllowance. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Batch.V1Alpha.UsageResourceAllowanceStatus Status { + get { return status_; } + set { + status_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as UsageResourceAllowance); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(UsageResourceAllowance other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(Spec, other.Spec)) return false; + if (!object.Equals(Status, other.Status)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (spec_ != null) hash ^= Spec.GetHashCode(); + if (status_ != null) hash ^= Status.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (spec_ != null) { + output.WriteRawTag(10); + output.WriteMessage(Spec); + } + if (status_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Status); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (spec_ != null) { + output.WriteRawTag(10); + output.WriteMessage(Spec); + } + if (status_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Status); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (spec_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Spec); + } + if (status_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Status); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(UsageResourceAllowance other) { + if (other == null) { + return; + } + if (other.spec_ != null) { + if (spec_ == null) { + Spec = new global::Google.Cloud.Batch.V1Alpha.UsageResourceAllowanceSpec(); + } + Spec.MergeFrom(other.Spec); + } + if (other.status_ != null) { + if (status_ == null) { + Status = new global::Google.Cloud.Batch.V1Alpha.UsageResourceAllowanceStatus(); + } + Status.MergeFrom(other.Status); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + if (spec_ == null) { + Spec = new global::Google.Cloud.Batch.V1Alpha.UsageResourceAllowanceSpec(); + } + input.ReadMessage(Spec); + break; + } + case 18: { + if (status_ == null) { + Status = new global::Google.Cloud.Batch.V1Alpha.UsageResourceAllowanceStatus(); + } + input.ReadMessage(Status); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + if (spec_ == null) { + Spec = new global::Google.Cloud.Batch.V1Alpha.UsageResourceAllowanceSpec(); + } + input.ReadMessage(Spec); + break; + } + case 18: { + if (status_ == null) { + Status = new global::Google.Cloud.Batch.V1Alpha.UsageResourceAllowanceStatus(); + } + input.ReadMessage(Status); + break; + } + } + } + } + #endif + + } + + /// + /// Spec of a usage ResourceAllowance. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class UsageResourceAllowanceSpec : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UsageResourceAllowanceSpec()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Batch.V1Alpha.ResourceAllowanceReflection.Descriptor.MessageTypes[2]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UsageResourceAllowanceSpec() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UsageResourceAllowanceSpec(UsageResourceAllowanceSpec other) : this() { + type_ = other.type_; + limit_ = other.limit_ != null ? other.limit_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UsageResourceAllowanceSpec Clone() { + return new UsageResourceAllowanceSpec(this); + } + + /// Field number for the "type" field. + public const int TypeFieldNumber = 1; + private string type_ = ""; + /// + /// Required. Spec type is unique for each usage ResourceAllowance. + /// Batch now only supports type as "cpu-core-hours" for CPU usage consumption + /// tracking. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Type { + get { return type_; } + set { + type_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "limit" field. + public const int LimitFieldNumber = 2; + private global::Google.Cloud.Batch.V1Alpha.UsageResourceAllowanceSpec.Types.Limit limit_; + /// + /// Required. Threshold of a UsageResourceAllowance limiting how many resources + /// can be consumed for each type. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Batch.V1Alpha.UsageResourceAllowanceSpec.Types.Limit Limit { + get { return limit_; } + set { + limit_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as UsageResourceAllowanceSpec); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(UsageResourceAllowanceSpec other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Type != other.Type) return false; + if (!object.Equals(Limit, other.Limit)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Type.Length != 0) hash ^= Type.GetHashCode(); + if (limit_ != null) hash ^= Limit.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Type.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Type); + } + if (limit_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Limit); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Type.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Type); + } + if (limit_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Limit); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Type.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Type); + } + if (limit_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Limit); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(UsageResourceAllowanceSpec other) { + if (other == null) { + return; + } + if (other.Type.Length != 0) { + Type = other.Type; + } + if (other.limit_ != null) { + if (limit_ == null) { + Limit = new global::Google.Cloud.Batch.V1Alpha.UsageResourceAllowanceSpec.Types.Limit(); + } + Limit.MergeFrom(other.Limit); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Type = input.ReadString(); + break; + } + case 18: { + if (limit_ == null) { + Limit = new global::Google.Cloud.Batch.V1Alpha.UsageResourceAllowanceSpec.Types.Limit(); + } + input.ReadMessage(Limit); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Type = input.ReadString(); + break; + } + case 18: { + if (limit_ == null) { + Limit = new global::Google.Cloud.Batch.V1Alpha.UsageResourceAllowanceSpec.Types.Limit(); + } + input.ReadMessage(Limit); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the UsageResourceAllowanceSpec message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// UsageResourceAllowance limitation. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Limit : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Limit()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Batch.V1Alpha.UsageResourceAllowanceSpec.Descriptor.NestedTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Limit() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Limit(Limit other) : this() { + _hasBits0 = other._hasBits0; + limit_ = other.limit_; + switch (other.DurationCase) { + case DurationOneofCase.CalendarPeriod: + CalendarPeriod = other.CalendarPeriod; + break; + } + + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Limit Clone() { + return new Limit(this); + } + + /// Field number for the "calendar_period" field. + public const int CalendarPeriodFieldNumber = 1; + /// + /// Optional. A CalendarPeriod represents the abstract concept of a time + /// period that has a canonical start. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Batch.V1Alpha.CalendarPeriod CalendarPeriod { + get { return HasCalendarPeriod ? (global::Google.Cloud.Batch.V1Alpha.CalendarPeriod) duration_ : global::Google.Cloud.Batch.V1Alpha.CalendarPeriod.Unspecified; } + set { + duration_ = value; + durationCase_ = DurationOneofCase.CalendarPeriod; + } + } + /// Gets whether the "calendar_period" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasCalendarPeriod { + get { return durationCase_ == DurationOneofCase.CalendarPeriod; } + } + /// Clears the value of the oneof if it's currently set to "calendar_period" + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearCalendarPeriod() { + if (HasCalendarPeriod) { + ClearDuration(); + } + } + + /// Field number for the "limit" field. + public const int Limit_FieldNumber = 2; + private readonly static double Limit_DefaultValue = 0D; + + private double limit_; + /// + /// Required. Limit value of a UsageResourceAllowance within its one + /// duration. + /// + /// Limit cannot be a negative value. Default is 0. + /// For example, you can set `limit` as 10000.0 with duration of the current + /// month by setting `calendar_period` field as monthly. That means in your + /// current month, 10000.0 is the core hour limitation that your resources + /// are allowed to consume. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public double Limit_ { + get { if ((_hasBits0 & 1) != 0) { return limit_; } else { return Limit_DefaultValue; } } + set { + _hasBits0 |= 1; + limit_ = value; + } + } + /// Gets whether the "limit" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasLimit_ { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "limit" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearLimit_() { + _hasBits0 &= ~1; + } + + private object duration_; + /// Enum of possible cases for the "duration" oneof. + public enum DurationOneofCase { + None = 0, + CalendarPeriod = 1, + } + private DurationOneofCase durationCase_ = DurationOneofCase.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DurationOneofCase DurationCase { + get { return durationCase_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearDuration() { + durationCase_ = DurationOneofCase.None; + duration_ = null; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Limit); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Limit other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (CalendarPeriod != other.CalendarPeriod) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(Limit_, other.Limit_)) return false; + if (DurationCase != other.DurationCase) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (HasCalendarPeriod) hash ^= CalendarPeriod.GetHashCode(); + if (HasLimit_) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(Limit_); + hash ^= (int) durationCase_; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (HasCalendarPeriod) { + output.WriteRawTag(8); + output.WriteEnum((int) CalendarPeriod); + } + if (HasLimit_) { + output.WriteRawTag(17); + output.WriteDouble(Limit_); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (HasCalendarPeriod) { + output.WriteRawTag(8); + output.WriteEnum((int) CalendarPeriod); + } + if (HasLimit_) { + output.WriteRawTag(17); + output.WriteDouble(Limit_); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (HasCalendarPeriod) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) CalendarPeriod); + } + if (HasLimit_) { + size += 1 + 8; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Limit other) { + if (other == null) { + return; + } + if (other.HasLimit_) { + Limit_ = other.Limit_; + } + switch (other.DurationCase) { + case DurationOneofCase.CalendarPeriod: + CalendarPeriod = other.CalendarPeriod; + break; + } + + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + duration_ = input.ReadEnum(); + durationCase_ = DurationOneofCase.CalendarPeriod; + break; + } + case 17: { + Limit_ = input.ReadDouble(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + duration_ = input.ReadEnum(); + durationCase_ = DurationOneofCase.CalendarPeriod; + break; + } + case 17: { + Limit_ = input.ReadDouble(); + break; + } + } + } + } + #endif + + } + + } + #endregion + + } + + /// + /// Status of a usage ResourceAllowance. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class UsageResourceAllowanceStatus : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UsageResourceAllowanceStatus()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Batch.V1Alpha.ResourceAllowanceReflection.Descriptor.MessageTypes[3]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UsageResourceAllowanceStatus() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UsageResourceAllowanceStatus(UsageResourceAllowanceStatus other) : this() { + state_ = other.state_; + limitStatus_ = other.limitStatus_ != null ? other.limitStatus_.Clone() : null; + report_ = other.report_ != null ? other.report_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UsageResourceAllowanceStatus Clone() { + return new UsageResourceAllowanceStatus(this); + } + + /// Field number for the "state" field. + public const int StateFieldNumber = 1; + private global::Google.Cloud.Batch.V1Alpha.ResourceAllowanceState state_ = global::Google.Cloud.Batch.V1Alpha.ResourceAllowanceState.Unspecified; + /// + /// Output only. ResourceAllowance state. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Batch.V1Alpha.ResourceAllowanceState State { + get { return state_; } + set { + state_ = value; + } + } + + /// Field number for the "limit_status" field. + public const int LimitStatusFieldNumber = 2; + private global::Google.Cloud.Batch.V1Alpha.UsageResourceAllowanceStatus.Types.LimitStatus limitStatus_; + /// + /// Output only. ResourceAllowance consumption status for usage resources. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Batch.V1Alpha.UsageResourceAllowanceStatus.Types.LimitStatus LimitStatus { + get { return limitStatus_; } + set { + limitStatus_ = value; + } + } + + /// Field number for the "report" field. + public const int ReportFieldNumber = 3; + private global::Google.Cloud.Batch.V1Alpha.UsageResourceAllowanceStatus.Types.ConsumptionReport report_; + /// + /// Output only. The report of ResourceAllowance consumptions in a time period. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Batch.V1Alpha.UsageResourceAllowanceStatus.Types.ConsumptionReport Report { + get { return report_; } + set { + report_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as UsageResourceAllowanceStatus); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(UsageResourceAllowanceStatus other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (State != other.State) return false; + if (!object.Equals(LimitStatus, other.LimitStatus)) return false; + if (!object.Equals(Report, other.Report)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (State != global::Google.Cloud.Batch.V1Alpha.ResourceAllowanceState.Unspecified) hash ^= State.GetHashCode(); + if (limitStatus_ != null) hash ^= LimitStatus.GetHashCode(); + if (report_ != null) hash ^= Report.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (State != global::Google.Cloud.Batch.V1Alpha.ResourceAllowanceState.Unspecified) { + output.WriteRawTag(8); + output.WriteEnum((int) State); + } + if (limitStatus_ != null) { + output.WriteRawTag(18); + output.WriteMessage(LimitStatus); + } + if (report_ != null) { + output.WriteRawTag(26); + output.WriteMessage(Report); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (State != global::Google.Cloud.Batch.V1Alpha.ResourceAllowanceState.Unspecified) { + output.WriteRawTag(8); + output.WriteEnum((int) State); + } + if (limitStatus_ != null) { + output.WriteRawTag(18); + output.WriteMessage(LimitStatus); + } + if (report_ != null) { + output.WriteRawTag(26); + output.WriteMessage(Report); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (State != global::Google.Cloud.Batch.V1Alpha.ResourceAllowanceState.Unspecified) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) State); + } + if (limitStatus_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(LimitStatus); + } + if (report_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Report); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(UsageResourceAllowanceStatus other) { + if (other == null) { + return; + } + if (other.State != global::Google.Cloud.Batch.V1Alpha.ResourceAllowanceState.Unspecified) { + State = other.State; + } + if (other.limitStatus_ != null) { + if (limitStatus_ == null) { + LimitStatus = new global::Google.Cloud.Batch.V1Alpha.UsageResourceAllowanceStatus.Types.LimitStatus(); + } + LimitStatus.MergeFrom(other.LimitStatus); + } + if (other.report_ != null) { + if (report_ == null) { + Report = new global::Google.Cloud.Batch.V1Alpha.UsageResourceAllowanceStatus.Types.ConsumptionReport(); + } + Report.MergeFrom(other.Report); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + State = (global::Google.Cloud.Batch.V1Alpha.ResourceAllowanceState) input.ReadEnum(); + break; + } + case 18: { + if (limitStatus_ == null) { + LimitStatus = new global::Google.Cloud.Batch.V1Alpha.UsageResourceAllowanceStatus.Types.LimitStatus(); + } + input.ReadMessage(LimitStatus); + break; + } + case 26: { + if (report_ == null) { + Report = new global::Google.Cloud.Batch.V1Alpha.UsageResourceAllowanceStatus.Types.ConsumptionReport(); + } + input.ReadMessage(Report); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + State = (global::Google.Cloud.Batch.V1Alpha.ResourceAllowanceState) input.ReadEnum(); + break; + } + case 18: { + if (limitStatus_ == null) { + LimitStatus = new global::Google.Cloud.Batch.V1Alpha.UsageResourceAllowanceStatus.Types.LimitStatus(); + } + input.ReadMessage(LimitStatus); + break; + } + case 26: { + if (report_ == null) { + Report = new global::Google.Cloud.Batch.V1Alpha.UsageResourceAllowanceStatus.Types.ConsumptionReport(); + } + input.ReadMessage(Report); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the UsageResourceAllowanceStatus message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// UsageResourceAllowanceStatus detail about usage consumption. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class LimitStatus : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new LimitStatus()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Batch.V1Alpha.UsageResourceAllowanceStatus.Descriptor.NestedTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public LimitStatus() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public LimitStatus(LimitStatus other) : this() { + _hasBits0 = other._hasBits0; + consumptionInterval_ = other.consumptionInterval_ != null ? other.consumptionInterval_.Clone() : null; + limit_ = other.limit_; + consumed_ = other.consumed_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public LimitStatus Clone() { + return new LimitStatus(this); + } + + /// Field number for the "consumption_interval" field. + public const int ConsumptionIntervalFieldNumber = 1; + private global::Google.Type.Interval consumptionInterval_; + /// + /// Output only. The consumption interval. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Type.Interval ConsumptionInterval { + get { return consumptionInterval_; } + set { + consumptionInterval_ = value; + } + } + + /// Field number for the "limit" field. + public const int LimitFieldNumber = 2; + private readonly static double LimitDefaultValue = 0D; + + private double limit_; + /// + /// Output only. Limit value of a UsageResourceAllowance within its one + /// duration. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public double Limit { + get { if ((_hasBits0 & 1) != 0) { return limit_; } else { return LimitDefaultValue; } } + set { + _hasBits0 |= 1; + limit_ = value; + } + } + /// Gets whether the "limit" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasLimit { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "limit" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearLimit() { + _hasBits0 &= ~1; + } + + /// Field number for the "consumed" field. + public const int ConsumedFieldNumber = 3; + private readonly static double ConsumedDefaultValue = 0D; + + private double consumed_; + /// + /// Output only. Accumulated consumption during `consumption_interval`. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public double Consumed { + get { if ((_hasBits0 & 2) != 0) { return consumed_; } else { return ConsumedDefaultValue; } } + set { + _hasBits0 |= 2; + consumed_ = value; + } + } + /// Gets whether the "consumed" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasConsumed { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "consumed" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearConsumed() { + _hasBits0 &= ~2; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as LimitStatus); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(LimitStatus other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(ConsumptionInterval, other.ConsumptionInterval)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(Limit, other.Limit)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(Consumed, other.Consumed)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (consumptionInterval_ != null) hash ^= ConsumptionInterval.GetHashCode(); + if (HasLimit) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(Limit); + if (HasConsumed) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(Consumed); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (consumptionInterval_ != null) { + output.WriteRawTag(10); + output.WriteMessage(ConsumptionInterval); + } + if (HasLimit) { + output.WriteRawTag(17); + output.WriteDouble(Limit); + } + if (HasConsumed) { + output.WriteRawTag(25); + output.WriteDouble(Consumed); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (consumptionInterval_ != null) { + output.WriteRawTag(10); + output.WriteMessage(ConsumptionInterval); + } + if (HasLimit) { + output.WriteRawTag(17); + output.WriteDouble(Limit); + } + if (HasConsumed) { + output.WriteRawTag(25); + output.WriteDouble(Consumed); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (consumptionInterval_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ConsumptionInterval); + } + if (HasLimit) { + size += 1 + 8; + } + if (HasConsumed) { + size += 1 + 8; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(LimitStatus other) { + if (other == null) { + return; + } + if (other.consumptionInterval_ != null) { + if (consumptionInterval_ == null) { + ConsumptionInterval = new global::Google.Type.Interval(); + } + ConsumptionInterval.MergeFrom(other.ConsumptionInterval); + } + if (other.HasLimit) { + Limit = other.Limit; + } + if (other.HasConsumed) { + Consumed = other.Consumed; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + if (consumptionInterval_ == null) { + ConsumptionInterval = new global::Google.Type.Interval(); + } + input.ReadMessage(ConsumptionInterval); + break; + } + case 17: { + Limit = input.ReadDouble(); + break; + } + case 25: { + Consumed = input.ReadDouble(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + if (consumptionInterval_ == null) { + ConsumptionInterval = new global::Google.Type.Interval(); + } + input.ReadMessage(ConsumptionInterval); + break; + } + case 17: { + Limit = input.ReadDouble(); + break; + } + case 25: { + Consumed = input.ReadDouble(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class PeriodConsumption : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new PeriodConsumption()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Batch.V1Alpha.UsageResourceAllowanceStatus.Descriptor.NestedTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PeriodConsumption() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PeriodConsumption(PeriodConsumption other) : this() { + _hasBits0 = other._hasBits0; + consumptionInterval_ = other.consumptionInterval_ != null ? other.consumptionInterval_.Clone() : null; + consumed_ = other.consumed_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PeriodConsumption Clone() { + return new PeriodConsumption(this); + } + + /// Field number for the "consumption_interval" field. + public const int ConsumptionIntervalFieldNumber = 1; + private global::Google.Type.Interval consumptionInterval_; + /// + /// Output only. The consumption interval. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Type.Interval ConsumptionInterval { + get { return consumptionInterval_; } + set { + consumptionInterval_ = value; + } + } + + /// Field number for the "consumed" field. + public const int ConsumedFieldNumber = 2; + private readonly static double ConsumedDefaultValue = 0D; + + private double consumed_; + /// + /// Output only. Accumulated consumption during `consumption_interval`. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public double Consumed { + get { if ((_hasBits0 & 1) != 0) { return consumed_; } else { return ConsumedDefaultValue; } } + set { + _hasBits0 |= 1; + consumed_ = value; + } + } + /// Gets whether the "consumed" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasConsumed { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "consumed" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearConsumed() { + _hasBits0 &= ~1; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as PeriodConsumption); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(PeriodConsumption other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(ConsumptionInterval, other.ConsumptionInterval)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(Consumed, other.Consumed)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (consumptionInterval_ != null) hash ^= ConsumptionInterval.GetHashCode(); + if (HasConsumed) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(Consumed); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (consumptionInterval_ != null) { + output.WriteRawTag(10); + output.WriteMessage(ConsumptionInterval); + } + if (HasConsumed) { + output.WriteRawTag(17); + output.WriteDouble(Consumed); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (consumptionInterval_ != null) { + output.WriteRawTag(10); + output.WriteMessage(ConsumptionInterval); + } + if (HasConsumed) { + output.WriteRawTag(17); + output.WriteDouble(Consumed); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (consumptionInterval_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ConsumptionInterval); + } + if (HasConsumed) { + size += 1 + 8; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(PeriodConsumption other) { + if (other == null) { + return; + } + if (other.consumptionInterval_ != null) { + if (consumptionInterval_ == null) { + ConsumptionInterval = new global::Google.Type.Interval(); + } + ConsumptionInterval.MergeFrom(other.ConsumptionInterval); + } + if (other.HasConsumed) { + Consumed = other.Consumed; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + if (consumptionInterval_ == null) { + ConsumptionInterval = new global::Google.Type.Interval(); + } + input.ReadMessage(ConsumptionInterval); + break; + } + case 17: { + Consumed = input.ReadDouble(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + if (consumptionInterval_ == null) { + ConsumptionInterval = new global::Google.Type.Interval(); + } + input.ReadMessage(ConsumptionInterval); + break; + } + case 17: { + Consumed = input.ReadDouble(); + break; + } + } + } + } + #endif + + } + + /// + /// ConsumptionReport is the report of ResourceAllowance consumptions in a time + /// period. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ConsumptionReport : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ConsumptionReport()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Batch.V1Alpha.UsageResourceAllowanceStatus.Descriptor.NestedTypes[2]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ConsumptionReport() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ConsumptionReport(ConsumptionReport other) : this() { + latestPeriodConsumptions_ = other.latestPeriodConsumptions_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ConsumptionReport Clone() { + return new ConsumptionReport(this); + } + + /// Field number for the "latest_period_consumptions" field. + public const int LatestPeriodConsumptionsFieldNumber = 1; + private static readonly pbc::MapField.Codec _map_latestPeriodConsumptions_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForMessage(18, global::Google.Cloud.Batch.V1Alpha.UsageResourceAllowanceStatus.Types.PeriodConsumption.Parser), 10); + private readonly pbc::MapField latestPeriodConsumptions_ = new pbc::MapField(); + /// + /// Output only. ResourceAllowance consumptions in the latest calendar + /// period. Key is the calendar period in string format. Batch currently + /// supports HOUR, DAY, MONTH and YEAR. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::MapField LatestPeriodConsumptions { + get { return latestPeriodConsumptions_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ConsumptionReport); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ConsumptionReport other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!LatestPeriodConsumptions.Equals(other.LatestPeriodConsumptions)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= LatestPeriodConsumptions.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + latestPeriodConsumptions_.WriteTo(output, _map_latestPeriodConsumptions_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + latestPeriodConsumptions_.WriteTo(ref output, _map_latestPeriodConsumptions_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += latestPeriodConsumptions_.CalculateSize(_map_latestPeriodConsumptions_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ConsumptionReport other) { + if (other == null) { + return; + } + latestPeriodConsumptions_.MergeFrom(other.latestPeriodConsumptions_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + latestPeriodConsumptions_.AddEntriesFrom(input, _map_latestPeriodConsumptions_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + latestPeriodConsumptions_.AddEntriesFrom(ref input, _map_latestPeriodConsumptions_codec); + break; + } + } + } + } + #endif + + } + + } + #endregion + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha/ResourceAllowanceResourceNames.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha/ResourceAllowanceResourceNames.g.cs new file mode 100755 index 000000000000..5d02470cdee9 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha/ResourceAllowanceResourceNames.g.cs @@ -0,0 +1,298 @@ +// 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 +using gax = Google.Api.Gax; +using gcbv = Google.Cloud.Batch.V1Alpha; +using sys = System; + +namespace Google.Cloud.Batch.V1Alpha +{ + /// Resource name for the ResourceAllowance resource. + public sealed partial class ResourceAllowanceName : gax::IResourceName, sys::IEquatable + { + /// The possible contents of . + public enum ResourceNameType + { + /// An unparsed resource name. + Unparsed = 0, + + /// + /// A resource name with pattern + /// projects/{project}/locations/{location}/resourceAllowances/{resource_allowance}. + /// + ProjectLocationResourceAllowance = 1, + } + + private static gax::PathTemplate s_projectLocationResourceAllowance = new gax::PathTemplate("projects/{project}/locations/{location}/resourceAllowances/{resource_allowance}"); + + /// Creates a containing an unparsed resource name. + /// The unparsed resource name. Must not be null. + /// + /// A new instance of containing the provided + /// . + /// + public static ResourceAllowanceName FromUnparsed(gax::UnparsedResourceName unparsedResourceName) => + new ResourceAllowanceName(ResourceNameType.Unparsed, gax::GaxPreconditions.CheckNotNull(unparsedResourceName, nameof(unparsedResourceName))); + + /// + /// Creates a with the pattern + /// projects/{project}/locations/{location}/resourceAllowances/{resource_allowance}. + /// + /// The Project ID. Must not be null or empty. + /// The Location ID. Must not be null or empty. + /// The ResourceAllowance ID. Must not be null or empty. + /// A new instance of constructed from the provided ids. + public static ResourceAllowanceName FromProjectLocationResourceAllowance(string projectId, string locationId, string resourceAllowanceId) => + new ResourceAllowanceName(ResourceNameType.ProjectLocationResourceAllowance, projectId: gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), locationId: gax::GaxPreconditions.CheckNotNullOrEmpty(locationId, nameof(locationId)), resourceAllowanceId: gax::GaxPreconditions.CheckNotNullOrEmpty(resourceAllowanceId, nameof(resourceAllowanceId))); + + /// + /// Formats the IDs into the string representation of this with pattern + /// projects/{project}/locations/{location}/resourceAllowances/{resource_allowance}. + /// + /// The Project ID. Must not be null or empty. + /// The Location ID. Must not be null or empty. + /// The ResourceAllowance ID. Must not be null or empty. + /// + /// The string representation of this with pattern + /// projects/{project}/locations/{location}/resourceAllowances/{resource_allowance}. + /// + public static string Format(string projectId, string locationId, string resourceAllowanceId) => + FormatProjectLocationResourceAllowance(projectId, locationId, resourceAllowanceId); + + /// + /// Formats the IDs into the string representation of this with pattern + /// projects/{project}/locations/{location}/resourceAllowances/{resource_allowance}. + /// + /// The Project ID. Must not be null or empty. + /// The Location ID. Must not be null or empty. + /// The ResourceAllowance ID. Must not be null or empty. + /// + /// The string representation of this with pattern + /// projects/{project}/locations/{location}/resourceAllowances/{resource_allowance}. + /// + public static string FormatProjectLocationResourceAllowance(string projectId, string locationId, string resourceAllowanceId) => + s_projectLocationResourceAllowance.Expand(gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), gax::GaxPreconditions.CheckNotNullOrEmpty(locationId, nameof(locationId)), gax::GaxPreconditions.CheckNotNullOrEmpty(resourceAllowanceId, nameof(resourceAllowanceId))); + + /// + /// Parses the given resource name string into a new instance. + /// + /// + /// To parse successfully, the resource name must be formatted as one of the following: + /// + /// + /// + /// projects/{project}/locations/{location}/resourceAllowances/{resource_allowance} + /// + /// + /// + /// + /// The resource name in string form. Must not be null. + /// The parsed if successful. + public static ResourceAllowanceName Parse(string resourceAllowanceName) => Parse(resourceAllowanceName, false); + + /// + /// Parses the given resource name string into a new instance; optionally + /// allowing an unparseable resource name. + /// + /// + /// To parse successfully, the resource name must be formatted as one of the following: + /// + /// + /// + /// projects/{project}/locations/{location}/resourceAllowances/{resource_allowance} + /// + /// + /// + /// Or may be in any format if is true. + /// + /// The resource name in string form. Must not be null. + /// + /// If true will successfully store an unparseable resource name into the + /// property; otherwise will throw an if an unparseable resource name is + /// specified. + /// + /// The parsed if successful. + public static ResourceAllowanceName Parse(string resourceAllowanceName, bool allowUnparsed) => + TryParse(resourceAllowanceName, allowUnparsed, out ResourceAllowanceName result) ? result : throw new sys::ArgumentException("The given resource-name matches no pattern."); + + /// + /// Tries to parse the given resource name string into a new instance. + /// + /// + /// To parse successfully, the resource name must be formatted as one of the following: + /// + /// + /// + /// projects/{project}/locations/{location}/resourceAllowances/{resource_allowance} + /// + /// + /// + /// + /// The resource name in string form. Must not be null. + /// + /// When this method returns, the parsed , or null if parsing failed. + /// + /// true if the name was parsed successfully; false otherwise. + public static bool TryParse(string resourceAllowanceName, out ResourceAllowanceName result) => + TryParse(resourceAllowanceName, false, out result); + + /// + /// Tries to parse the given resource name string into a new instance; + /// optionally allowing an unparseable resource name. + /// + /// + /// To parse successfully, the resource name must be formatted as one of the following: + /// + /// + /// + /// projects/{project}/locations/{location}/resourceAllowances/{resource_allowance} + /// + /// + /// + /// Or may be in any format if is true. + /// + /// The resource name in string form. Must not be null. + /// + /// If true will successfully store an unparseable resource name into the + /// property; otherwise will throw an if an unparseable resource name is + /// specified. + /// + /// + /// When this method returns, the parsed , or null if parsing failed. + /// + /// true if the name was parsed successfully; false otherwise. + public static bool TryParse(string resourceAllowanceName, bool allowUnparsed, out ResourceAllowanceName result) + { + gax::GaxPreconditions.CheckNotNull(resourceAllowanceName, nameof(resourceAllowanceName)); + gax::TemplatedResourceName resourceName; + if (s_projectLocationResourceAllowance.TryParseName(resourceAllowanceName, out resourceName)) + { + result = FromProjectLocationResourceAllowance(resourceName[0], resourceName[1], resourceName[2]); + return true; + } + if (allowUnparsed) + { + if (gax::UnparsedResourceName.TryParse(resourceAllowanceName, out gax::UnparsedResourceName unparsedResourceName)) + { + result = FromUnparsed(unparsedResourceName); + return true; + } + } + result = null; + return false; + } + + private ResourceAllowanceName(ResourceNameType type, gax::UnparsedResourceName unparsedResourceName = null, string locationId = null, string projectId = null, string resourceAllowanceId = null) + { + Type = type; + UnparsedResource = unparsedResourceName; + LocationId = locationId; + ProjectId = projectId; + ResourceAllowanceId = resourceAllowanceId; + } + + /// + /// Constructs a new instance of a class from the component parts of pattern + /// projects/{project}/locations/{location}/resourceAllowances/{resource_allowance} + /// + /// The Project ID. Must not be null or empty. + /// The Location ID. Must not be null or empty. + /// The ResourceAllowance ID. Must not be null or empty. + public ResourceAllowanceName(string projectId, string locationId, string resourceAllowanceId) : this(ResourceNameType.ProjectLocationResourceAllowance, projectId: gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), locationId: gax::GaxPreconditions.CheckNotNullOrEmpty(locationId, nameof(locationId)), resourceAllowanceId: gax::GaxPreconditions.CheckNotNullOrEmpty(resourceAllowanceId, nameof(resourceAllowanceId))) + { + } + + /// The of the contained resource name. + public ResourceNameType Type { get; } + + /// + /// The contained . Only non-null if this instance contains an + /// unparsed resource name. + /// + public gax::UnparsedResourceName UnparsedResource { get; } + + /// + /// The Location ID. Will not be null, unless this instance contains an unparsed resource name. + /// + public string LocationId { get; } + + /// + /// The Project ID. Will not be null, unless this instance contains an unparsed resource name. + /// + public string ProjectId { get; } + + /// + /// The ResourceAllowance ID. Will not be null, unless this instance contains an unparsed resource + /// name. + /// + public string ResourceAllowanceId { get; } + + /// Whether this instance contains a resource name with a known pattern. + public bool IsKnownPattern => Type != ResourceNameType.Unparsed; + + /// The string representation of the resource name. + /// The string representation of the resource name. + public override string ToString() + { + switch (Type) + { + case ResourceNameType.Unparsed: return UnparsedResource.ToString(); + case ResourceNameType.ProjectLocationResourceAllowance: return s_projectLocationResourceAllowance.Expand(ProjectId, LocationId, ResourceAllowanceId); + default: throw new sys::InvalidOperationException("Unrecognized resource-type."); + } + } + + /// Returns a hash code for this resource name. + public override int GetHashCode() => ToString().GetHashCode(); + + /// + public override bool Equals(object obj) => Equals(obj as ResourceAllowanceName); + + /// + public bool Equals(ResourceAllowanceName other) => ToString() == other?.ToString(); + + /// Determines whether two specified resource names have the same value. + /// The first resource name to compare, or null. + /// The second resource name to compare, or null. + /// + /// true if the value of is the same as the value of ; otherwise, + /// false. + /// + public static bool operator ==(ResourceAllowanceName a, ResourceAllowanceName b) => ReferenceEquals(a, b) || (a?.Equals(b) ?? false); + + /// Determines whether two specified resource names have different values. + /// The first resource name to compare, or null. + /// The second resource name to compare, or null. + /// + /// true if the value of is different from the value of ; otherwise, + /// false. + /// + public static bool operator !=(ResourceAllowanceName a, ResourceAllowanceName b) => !(a == b); + } + + public partial class ResourceAllowance + { + /// + /// -typed view over the resource name property. + /// + public gcbv::ResourceAllowanceName ResourceAllowanceName + { + get => string.IsNullOrEmpty(Name) ? null : gcbv::ResourceAllowanceName.Parse(Name, allowUnparsed: true); + set => Name = value?.ToString() ?? ""; + } + } +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha/ServiceCollectionExtensions.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha/ServiceCollectionExtensions.g.cs new file mode 100755 index 000000000000..66dd76fbaf76 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha/ServiceCollectionExtensions.g.cs @@ -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 +using gaxgrpc = Google.Api.Gax.Grpc; +using gcbv = Google.Cloud.Batch.V1Alpha; +using gcl = Google.Cloud.Location; +using gpr = Google.Protobuf.Reflection; +using lro = Google.LongRunning; +using proto = Google.Protobuf; +using scg = System.Collections.Generic; +using sys = System; + +namespace Microsoft.Extensions.DependencyInjection +{ + /// Static class to provide extension methods to configure API clients. + public static partial class ServiceCollectionExtensions + { + /// Adds a singleton to . + /// + /// The service collection to add the client to. The services are used to configure the client when requested. + /// + /// + /// An optional action to invoke on the client builder. This is invoked before services from + /// are used. + /// + public static IServiceCollection AddBatchServiceClient(this IServiceCollection services, sys::Action action = null) => + services.AddSingleton(provider => + { + gcbv::BatchServiceClientBuilder builder = new gcbv::BatchServiceClientBuilder(); + action?.Invoke(builder); + return builder.Build(provider); + }); + + /// Adds a singleton to . + /// + /// The service collection to add the client to. The services are used to configure the client when requested. + /// + /// + /// An optional action to invoke on the client builder. This is invoked before services from + /// are used. + /// + public static IServiceCollection AddBatchServiceClient(this IServiceCollection services, sys::Action action) => + services.AddSingleton(provider => + { + gcbv::BatchServiceClientBuilder builder = new gcbv::BatchServiceClientBuilder(); + action?.Invoke(provider, builder); + return builder.Build(provider); + }); + } +} diff --git a/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha/Task.g.cs b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha/Task.g.cs new file mode 100755 index 000000000000..073847ad5ad1 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Batch.V1Alpha/Google.Cloud.Batch.V1Alpha/Task.g.cs @@ -0,0 +1,5076 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/batch/v1alpha/task.proto +// +#pragma warning disable 1591, 0612, 3021, 8981 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Google.Cloud.Batch.V1Alpha { + + /// Holder for reflection information generated from google/cloud/batch/v1alpha/task.proto + public static partial class TaskReflection { + + #region Descriptor + /// File descriptor for google/cloud/batch/v1alpha/task.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static TaskReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CiVnb29nbGUvY2xvdWQvYmF0Y2gvdjFhbHBoYS90YXNrLnByb3RvEhpnb29n", + "bGUuY2xvdWQuYmF0Y2gudjFhbHBoYRofZ29vZ2xlL2FwaS9maWVsZF9iZWhh", + "dmlvci5wcm90bxoZZ29vZ2xlL2FwaS9yZXNvdXJjZS5wcm90bxonZ29vZ2xl", + "L2Nsb3VkL2JhdGNoL3YxYWxwaGEvdm9sdW1lLnByb3RvGh5nb29nbGUvcHJv", + "dG9idWYvZHVyYXRpb24ucHJvdG8aH2dvb2dsZS9wcm90b2J1Zi90aW1lc3Rh", + "bXAucHJvdG8iYgoPQ29tcHV0ZVJlc291cmNlEhEKCWNwdV9taWxsaRgBIAEo", + "AxISCgptZW1vcnlfbWliGAIgASgDEhEKCWdwdV9jb3VudBgDIAEoAxIVCg1i", + "b290X2Rpc2tfbWliGAQgASgDIuUBCgtTdGF0dXNFdmVudBIMCgR0eXBlGAMg", + "ASgJEhMKC2Rlc2NyaXB0aW9uGAEgASgJEi4KCmV2ZW50X3RpbWUYAiABKAsy", + "Gi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEkEKDnRhc2tfZXhlY3V0aW9u", + "GAQgASgLMikuZ29vZ2xlLmNsb3VkLmJhdGNoLnYxYWxwaGEuVGFza0V4ZWN1", + "dGlvbhJACgp0YXNrX3N0YXRlGAUgASgOMiwuZ29vZ2xlLmNsb3VkLmJhdGNo", + "LnYxYWxwaGEuVGFza1N0YXR1cy5TdGF0ZSI/Cg1UYXNrRXhlY3V0aW9uEhEK", + "CWV4aXRfY29kZRgBIAEoBRIbCg5zdGRlcnJfc25pcHBldBgCIAEoCUID4EEB", + "IsMCCgpUYXNrU3RhdHVzEjsKBXN0YXRlGAEgASgOMiwuZ29vZ2xlLmNsb3Vk", + "LmJhdGNoLnYxYWxwaGEuVGFza1N0YXR1cy5TdGF0ZRI+Cg1zdGF0dXNfZXZl", + "bnRzGAIgAygLMicuZ29vZ2xlLmNsb3VkLmJhdGNoLnYxYWxwaGEuU3RhdHVz", + "RXZlbnQSRQoOcmVzb3VyY2VfdXNhZ2UYAyABKAsyLS5nb29nbGUuY2xvdWQu", + "YmF0Y2gudjFhbHBoYS5UYXNrUmVzb3VyY2VVc2FnZSJxCgVTdGF0ZRIVChFT", + "VEFURV9VTlNQRUNJRklFRBAAEgsKB1BFTkRJTkcQARIMCghBU1NJR05FRBAC", + "EgsKB1JVTk5JTkcQAxIKCgZGQUlMRUQQBBINCglTVUNDRUVERUQQBRIOCgpV", + "TkVYRUNVVEVEEAYiJwoRVGFza1Jlc291cmNlVXNhZ2USEgoKY29yZV9ob3Vy", + "cxgBIAEoASK3BgoIUnVubmFibGUSQwoJY29udGFpbmVyGAEgASgLMi4uZ29v", + "Z2xlLmNsb3VkLmJhdGNoLnYxYWxwaGEuUnVubmFibGUuQ29udGFpbmVySAAS", + "PQoGc2NyaXB0GAIgASgLMisuZ29vZ2xlLmNsb3VkLmJhdGNoLnYxYWxwaGEu", + "UnVubmFibGUuU2NyaXB0SAASPwoHYmFycmllchgGIAEoCzIsLmdvb2dsZS5j", + "bG91ZC5iYXRjaC52MWFscGhhLlJ1bm5hYmxlLkJhcnJpZXJIABIZCgxkaXNw", + "bGF5X25hbWUYCiABKAlCA+BBARIaChJpZ25vcmVfZXhpdF9zdGF0dXMYAyAB", + "KAgSEgoKYmFja2dyb3VuZBgEIAEoCBISCgphbHdheXNfcnVuGAUgASgIEjwK", + "C2Vudmlyb25tZW50GAcgASgLMicuZ29vZ2xlLmNsb3VkLmJhdGNoLnYxYWxw", + "aGEuRW52aXJvbm1lbnQSKgoHdGltZW91dBgIIAEoCzIZLmdvb2dsZS5wcm90", + "b2J1Zi5EdXJhdGlvbhJACgZsYWJlbHMYCSADKAsyMC5nb29nbGUuY2xvdWQu", + "YmF0Y2gudjFhbHBoYS5SdW5uYWJsZS5MYWJlbHNFbnRyeRrPAQoJQ29udGFp", + "bmVyEhEKCWltYWdlX3VyaRgBIAEoCRIQCghjb21tYW5kcxgCIAMoCRISCgpl", + "bnRyeXBvaW50GAMgASgJEg8KB3ZvbHVtZXMYByADKAkSDwoHb3B0aW9ucxgI", + "IAEoCRIeChZibG9ja19leHRlcm5hbF9uZXR3b3JrGAkgASgIEhAKCHVzZXJu", + "YW1lGAogASgJEhAKCHBhc3N3b3JkGAsgASgJEiMKFmVuYWJsZV9pbWFnZV9z", + "dHJlYW1pbmcYDCABKAhCA+BBARozCgZTY3JpcHQSDgoEcGF0aBgBIAEoCUgA", + "Eg4KBHRleHQYAiABKAlIAEIJCgdjb21tYW5kGhcKB0JhcnJpZXISDAoEbmFt", + "ZRgBIAEoCRotCgtMYWJlbHNFbnRyeRILCgNrZXkYASABKAkSDQoFdmFsdWUY", + "AiABKAk6AjgBQgwKCmV4ZWN1dGFibGUimwQKCFRhc2tTcGVjEjcKCXJ1bm5h", + "YmxlcxgIIAMoCzIkLmdvb2dsZS5jbG91ZC5iYXRjaC52MWFscGhhLlJ1bm5h", + "YmxlEkUKEGNvbXB1dGVfcmVzb3VyY2UYAyABKAsyKy5nb29nbGUuY2xvdWQu", + "YmF0Y2gudjFhbHBoYS5Db21wdXRlUmVzb3VyY2USMwoQbWF4X3J1bl9kdXJh", + "dGlvbhgEIAEoCzIZLmdvb2dsZS5wcm90b2J1Zi5EdXJhdGlvbhIXCg9tYXhf", + "cmV0cnlfY291bnQYBSABKAUSRwoSbGlmZWN5Y2xlX3BvbGljaWVzGAkgAygL", + "MisuZ29vZ2xlLmNsb3VkLmJhdGNoLnYxYWxwaGEuTGlmZWN5Y2xlUG9saWN5", + "ElAKDGVudmlyb25tZW50cxgGIAMoCzI2Lmdvb2dsZS5jbG91ZC5iYXRjaC52", + "MWFscGhhLlRhc2tTcGVjLkVudmlyb25tZW50c0VudHJ5QgIYARIzCgd2b2x1", + "bWVzGAcgAygLMiIuZ29vZ2xlLmNsb3VkLmJhdGNoLnYxYWxwaGEuVm9sdW1l", + "EjwKC2Vudmlyb25tZW50GAogASgLMicuZ29vZ2xlLmNsb3VkLmJhdGNoLnYx", + "YWxwaGEuRW52aXJvbm1lbnQaMwoRRW52aXJvbm1lbnRzRW50cnkSCwoDa2V5", + "GAEgASgJEg0KBXZhbHVlGAIgASgJOgI4ASKUAgoPTGlmZWN5Y2xlUG9saWN5", + "EkIKBmFjdGlvbhgBIAEoDjIyLmdvb2dsZS5jbG91ZC5iYXRjaC52MWFscGhh", + "LkxpZmVjeWNsZVBvbGljeS5BY3Rpb24SVQoQYWN0aW9uX2NvbmRpdGlvbhgC", + "IAEoCzI7Lmdvb2dsZS5jbG91ZC5iYXRjaC52MWFscGhhLkxpZmVjeWNsZVBv", + "bGljeS5BY3Rpb25Db25kaXRpb24aJQoPQWN0aW9uQ29uZGl0aW9uEhIKCmV4", + "aXRfY29kZXMYASADKAUiPwoGQWN0aW9uEhYKEkFDVElPTl9VTlNQRUNJRklF", + "RBAAEg4KClJFVFJZX1RBU0sQARINCglGQUlMX1RBU0sQAiLFAQoEVGFzaxIM", + "CgRuYW1lGAEgASgJEjYKBnN0YXR1cxgCIAEoCzImLmdvb2dsZS5jbG91ZC5i", + "YXRjaC52MWFscGhhLlRhc2tTdGF0dXM6d+pBdAoZYmF0Y2guZ29vZ2xlYXBp", + "cy5jb20vVGFzaxJXcHJvamVjdHMve3Byb2plY3R9L2xvY2F0aW9ucy97bG9j", + "YXRpb259L2pvYnMve2pvYn0vdGFza0dyb3Vwcy97dGFza19ncm91cH0vdGFz", + "a3Mve3Rhc2t9Ip4DCgtFbnZpcm9ubWVudBJJCgl2YXJpYWJsZXMYASADKAsy", + "Ni5nb29nbGUuY2xvdWQuYmF0Y2gudjFhbHBoYS5FbnZpcm9ubWVudC5WYXJp", + "YWJsZXNFbnRyeRJWChBzZWNyZXRfdmFyaWFibGVzGAIgAygLMjwuZ29vZ2xl", + "LmNsb3VkLmJhdGNoLnYxYWxwaGEuRW52aXJvbm1lbnQuU2VjcmV0VmFyaWFi", + "bGVzRW50cnkSTgoTZW5jcnlwdGVkX3ZhcmlhYmxlcxgDIAEoCzIxLmdvb2ds", + "ZS5jbG91ZC5iYXRjaC52MWFscGhhLkVudmlyb25tZW50LktNU0Vudk1hcBoy", + "CglLTVNFbnZNYXASEAoIa2V5X25hbWUYASABKAkSEwoLY2lwaGVyX3RleHQY", + "AiABKAkaMAoOVmFyaWFibGVzRW50cnkSCwoDa2V5GAEgASgJEg0KBXZhbHVl", + "GAIgASgJOgI4ARo2ChRTZWNyZXRWYXJpYWJsZXNFbnRyeRILCgNrZXkYASAB", + "KAkSDQoFdmFsdWUYAiABKAk6AjgBQsMBCh5jb20uZ29vZ2xlLmNsb3VkLmJh", + "dGNoLnYxYWxwaGFCCVRhc2tQcm90b1ABWjRjbG91ZC5nb29nbGUuY29tL2dv", + "L2JhdGNoL2FwaXYxYWxwaGEvYmF0Y2hwYjtiYXRjaHBiogIDR0NCqgIaR29v", + "Z2xlLkNsb3VkLkJhdGNoLlYxQWxwaGHKAhpHb29nbGVcQ2xvdWRcQmF0Y2hc", + "VjFhbHBoYeoCHUdvb2dsZTo6Q2xvdWQ6OkJhdGNoOjpWMWFscGhhYgZwcm90", + "bzM=")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { global::Google.Api.FieldBehaviorReflection.Descriptor, global::Google.Api.ResourceReflection.Descriptor, global::Google.Cloud.Batch.V1Alpha.VolumeReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.DurationReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.TimestampReflection.Descriptor, }, + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Batch.V1Alpha.ComputeResource), global::Google.Cloud.Batch.V1Alpha.ComputeResource.Parser, new[]{ "CpuMilli", "MemoryMib", "GpuCount", "BootDiskMib" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Batch.V1Alpha.StatusEvent), global::Google.Cloud.Batch.V1Alpha.StatusEvent.Parser, new[]{ "Type", "Description", "EventTime", "TaskExecution", "TaskState" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Batch.V1Alpha.TaskExecution), global::Google.Cloud.Batch.V1Alpha.TaskExecution.Parser, new[]{ "ExitCode", "StderrSnippet" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Batch.V1Alpha.TaskStatus), global::Google.Cloud.Batch.V1Alpha.TaskStatus.Parser, new[]{ "State", "StatusEvents", "ResourceUsage" }, null, new[]{ typeof(global::Google.Cloud.Batch.V1Alpha.TaskStatus.Types.State) }, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Batch.V1Alpha.TaskResourceUsage), global::Google.Cloud.Batch.V1Alpha.TaskResourceUsage.Parser, new[]{ "CoreHours" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Batch.V1Alpha.Runnable), global::Google.Cloud.Batch.V1Alpha.Runnable.Parser, new[]{ "Container", "Script", "Barrier", "DisplayName", "IgnoreExitStatus", "Background", "AlwaysRun", "Environment", "Timeout", "Labels" }, new[]{ "Executable" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Batch.V1Alpha.Runnable.Types.Container), global::Google.Cloud.Batch.V1Alpha.Runnable.Types.Container.Parser, new[]{ "ImageUri", "Commands", "Entrypoint", "Volumes", "Options", "BlockExternalNetwork", "Username", "Password", "EnableImageStreaming" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Batch.V1Alpha.Runnable.Types.Script), global::Google.Cloud.Batch.V1Alpha.Runnable.Types.Script.Parser, new[]{ "Path", "Text" }, new[]{ "Command" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Batch.V1Alpha.Runnable.Types.Barrier), global::Google.Cloud.Batch.V1Alpha.Runnable.Types.Barrier.Parser, new[]{ "Name" }, null, null, null, null), + null, }), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Batch.V1Alpha.TaskSpec), global::Google.Cloud.Batch.V1Alpha.TaskSpec.Parser, new[]{ "Runnables", "ComputeResource", "MaxRunDuration", "MaxRetryCount", "LifecyclePolicies", "Environments", "Volumes", "Environment" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, }), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Batch.V1Alpha.LifecyclePolicy), global::Google.Cloud.Batch.V1Alpha.LifecyclePolicy.Parser, new[]{ "Action", "ActionCondition" }, null, new[]{ typeof(global::Google.Cloud.Batch.V1Alpha.LifecyclePolicy.Types.Action) }, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Batch.V1Alpha.LifecyclePolicy.Types.ActionCondition), global::Google.Cloud.Batch.V1Alpha.LifecyclePolicy.Types.ActionCondition.Parser, new[]{ "ExitCodes" }, null, null, null, null)}), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Batch.V1Alpha.Task), global::Google.Cloud.Batch.V1Alpha.Task.Parser, new[]{ "Name", "Status" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Batch.V1Alpha.Environment), global::Google.Cloud.Batch.V1Alpha.Environment.Parser, new[]{ "Variables", "SecretVariables", "EncryptedVariables" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Batch.V1Alpha.Environment.Types.KMSEnvMap), global::Google.Cloud.Batch.V1Alpha.Environment.Types.KMSEnvMap.Parser, new[]{ "KeyName", "CipherText" }, null, null, null, null), + null, null, }) + })); + } + #endregion + + } + #region Messages + /// + /// Compute resource requirements. + /// + /// ComputeResource defines the amount of resources required for each task. + /// Make sure your tasks have enough resources to successfully run. + /// If you also define the types of resources for a job to use with the + /// [InstancePolicyOrTemplate](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate) + /// field, make sure both fields are compatible with each other. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ComputeResource : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ComputeResource()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Batch.V1Alpha.TaskReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ComputeResource() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ComputeResource(ComputeResource other) : this() { + cpuMilli_ = other.cpuMilli_; + memoryMib_ = other.memoryMib_; + gpuCount_ = other.gpuCount_; + bootDiskMib_ = other.bootDiskMib_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ComputeResource Clone() { + return new ComputeResource(this); + } + + /// Field number for the "cpu_milli" field. + public const int CpuMilliFieldNumber = 1; + private long cpuMilli_; + /// + /// The milliCPU count. + /// + /// `cpuMilli` defines the amount of CPU resources per task in milliCPU units. + /// For example, `1000` corresponds to 1 vCPU per task. If undefined, the + /// default value is `2000`. + /// + /// If you also define the VM's machine type using the `machineType` in + /// [InstancePolicy](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicy) + /// field or inside the `instanceTemplate` in the + /// [InstancePolicyOrTemplate](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate) + /// field, make sure the CPU resources for both fields are compatible with each + /// other and with how many tasks you want to allow to run on the same VM at + /// the same time. + /// + /// For example, if you specify the `n2-standard-2` machine type, which has 2 + /// vCPUs each, you are recommended to set `cpuMilli` no more than `2000`, or + /// you are recommended to run two tasks on the same VM if you set `cpuMilli` + /// to `1000` or less. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long CpuMilli { + get { return cpuMilli_; } + set { + cpuMilli_ = value; + } + } + + /// Field number for the "memory_mib" field. + public const int MemoryMibFieldNumber = 2; + private long memoryMib_; + /// + /// Memory in MiB. + /// + /// `memoryMib` defines the amount of memory per task in MiB units. + /// If undefined, the default value is `2000`. + /// If you also define the VM's machine type using the `machineType` in + /// [InstancePolicy](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicy) + /// field or inside the `instanceTemplate` in the + /// [InstancePolicyOrTemplate](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate) + /// field, make sure the memory resources for both fields are compatible with + /// each other and with how many tasks you want to allow to run on the same VM + /// at the same time. + /// + /// For example, if you specify the `n2-standard-2` machine type, which has 8 + /// GiB each, you are recommended to set `memoryMib` to no more than `8192`, + /// or you are recommended to run two tasks on the same VM if you set + /// `memoryMib` to `4096` or less. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long MemoryMib { + get { return memoryMib_; } + set { + memoryMib_ = value; + } + } + + /// Field number for the "gpu_count" field. + public const int GpuCountFieldNumber = 3; + private long gpuCount_; + /// + /// The GPU count. + /// + /// Not yet implemented. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long GpuCount { + get { return gpuCount_; } + set { + gpuCount_ = value; + } + } + + /// Field number for the "boot_disk_mib" field. + public const int BootDiskMibFieldNumber = 4; + private long bootDiskMib_; + /// + /// Extra boot disk size in MiB for each task. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long BootDiskMib { + get { return bootDiskMib_; } + set { + bootDiskMib_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ComputeResource); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ComputeResource other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (CpuMilli != other.CpuMilli) return false; + if (MemoryMib != other.MemoryMib) return false; + if (GpuCount != other.GpuCount) return false; + if (BootDiskMib != other.BootDiskMib) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (CpuMilli != 0L) hash ^= CpuMilli.GetHashCode(); + if (MemoryMib != 0L) hash ^= MemoryMib.GetHashCode(); + if (GpuCount != 0L) hash ^= GpuCount.GetHashCode(); + if (BootDiskMib != 0L) hash ^= BootDiskMib.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (CpuMilli != 0L) { + output.WriteRawTag(8); + output.WriteInt64(CpuMilli); + } + if (MemoryMib != 0L) { + output.WriteRawTag(16); + output.WriteInt64(MemoryMib); + } + if (GpuCount != 0L) { + output.WriteRawTag(24); + output.WriteInt64(GpuCount); + } + if (BootDiskMib != 0L) { + output.WriteRawTag(32); + output.WriteInt64(BootDiskMib); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (CpuMilli != 0L) { + output.WriteRawTag(8); + output.WriteInt64(CpuMilli); + } + if (MemoryMib != 0L) { + output.WriteRawTag(16); + output.WriteInt64(MemoryMib); + } + if (GpuCount != 0L) { + output.WriteRawTag(24); + output.WriteInt64(GpuCount); + } + if (BootDiskMib != 0L) { + output.WriteRawTag(32); + output.WriteInt64(BootDiskMib); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (CpuMilli != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(CpuMilli); + } + if (MemoryMib != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(MemoryMib); + } + if (GpuCount != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(GpuCount); + } + if (BootDiskMib != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(BootDiskMib); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ComputeResource other) { + if (other == null) { + return; + } + if (other.CpuMilli != 0L) { + CpuMilli = other.CpuMilli; + } + if (other.MemoryMib != 0L) { + MemoryMib = other.MemoryMib; + } + if (other.GpuCount != 0L) { + GpuCount = other.GpuCount; + } + if (other.BootDiskMib != 0L) { + BootDiskMib = other.BootDiskMib; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + CpuMilli = input.ReadInt64(); + break; + } + case 16: { + MemoryMib = input.ReadInt64(); + break; + } + case 24: { + GpuCount = input.ReadInt64(); + break; + } + case 32: { + BootDiskMib = input.ReadInt64(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + CpuMilli = input.ReadInt64(); + break; + } + case 16: { + MemoryMib = input.ReadInt64(); + break; + } + case 24: { + GpuCount = input.ReadInt64(); + break; + } + case 32: { + BootDiskMib = input.ReadInt64(); + break; + } + } + } + } + #endif + + } + + /// + /// Status event. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class StatusEvent : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new StatusEvent()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Batch.V1Alpha.TaskReflection.Descriptor.MessageTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public StatusEvent() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public StatusEvent(StatusEvent other) : this() { + type_ = other.type_; + description_ = other.description_; + eventTime_ = other.eventTime_ != null ? other.eventTime_.Clone() : null; + taskExecution_ = other.taskExecution_ != null ? other.taskExecution_.Clone() : null; + taskState_ = other.taskState_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public StatusEvent Clone() { + return new StatusEvent(this); + } + + /// Field number for the "type" field. + public const int TypeFieldNumber = 3; + private string type_ = ""; + /// + /// Type of the event. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Type { + get { return type_; } + set { + type_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "description" field. + public const int DescriptionFieldNumber = 1; + private string description_ = ""; + /// + /// Description of the event. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Description { + get { return description_; } + set { + description_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "event_time" field. + public const int EventTimeFieldNumber = 2; + private global::Google.Protobuf.WellKnownTypes.Timestamp eventTime_; + /// + /// The time this event occurred. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.WellKnownTypes.Timestamp EventTime { + get { return eventTime_; } + set { + eventTime_ = value; + } + } + + /// Field number for the "task_execution" field. + public const int TaskExecutionFieldNumber = 4; + private global::Google.Cloud.Batch.V1Alpha.TaskExecution taskExecution_; + /// + /// Task Execution. + /// This field is only defined for task-level status events where the task + /// fails. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Batch.V1Alpha.TaskExecution TaskExecution { + get { return taskExecution_; } + set { + taskExecution_ = value; + } + } + + /// Field number for the "task_state" field. + public const int TaskStateFieldNumber = 5; + private global::Google.Cloud.Batch.V1Alpha.TaskStatus.Types.State taskState_ = global::Google.Cloud.Batch.V1Alpha.TaskStatus.Types.State.Unspecified; + /// + /// Task State. + /// This field is only defined for task-level status events. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Batch.V1Alpha.TaskStatus.Types.State TaskState { + get { return taskState_; } + set { + taskState_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as StatusEvent); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(StatusEvent other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Type != other.Type) return false; + if (Description != other.Description) return false; + if (!object.Equals(EventTime, other.EventTime)) return false; + if (!object.Equals(TaskExecution, other.TaskExecution)) return false; + if (TaskState != other.TaskState) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Type.Length != 0) hash ^= Type.GetHashCode(); + if (Description.Length != 0) hash ^= Description.GetHashCode(); + if (eventTime_ != null) hash ^= EventTime.GetHashCode(); + if (taskExecution_ != null) hash ^= TaskExecution.GetHashCode(); + if (TaskState != global::Google.Cloud.Batch.V1Alpha.TaskStatus.Types.State.Unspecified) hash ^= TaskState.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Description.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Description); + } + if (eventTime_ != null) { + output.WriteRawTag(18); + output.WriteMessage(EventTime); + } + if (Type.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Type); + } + if (taskExecution_ != null) { + output.WriteRawTag(34); + output.WriteMessage(TaskExecution); + } + if (TaskState != global::Google.Cloud.Batch.V1Alpha.TaskStatus.Types.State.Unspecified) { + output.WriteRawTag(40); + output.WriteEnum((int) TaskState); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Description.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Description); + } + if (eventTime_ != null) { + output.WriteRawTag(18); + output.WriteMessage(EventTime); + } + if (Type.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Type); + } + if (taskExecution_ != null) { + output.WriteRawTag(34); + output.WriteMessage(TaskExecution); + } + if (TaskState != global::Google.Cloud.Batch.V1Alpha.TaskStatus.Types.State.Unspecified) { + output.WriteRawTag(40); + output.WriteEnum((int) TaskState); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Type.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Type); + } + if (Description.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Description); + } + if (eventTime_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(EventTime); + } + if (taskExecution_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(TaskExecution); + } + if (TaskState != global::Google.Cloud.Batch.V1Alpha.TaskStatus.Types.State.Unspecified) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) TaskState); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(StatusEvent other) { + if (other == null) { + return; + } + if (other.Type.Length != 0) { + Type = other.Type; + } + if (other.Description.Length != 0) { + Description = other.Description; + } + if (other.eventTime_ != null) { + if (eventTime_ == null) { + EventTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + EventTime.MergeFrom(other.EventTime); + } + if (other.taskExecution_ != null) { + if (taskExecution_ == null) { + TaskExecution = new global::Google.Cloud.Batch.V1Alpha.TaskExecution(); + } + TaskExecution.MergeFrom(other.TaskExecution); + } + if (other.TaskState != global::Google.Cloud.Batch.V1Alpha.TaskStatus.Types.State.Unspecified) { + TaskState = other.TaskState; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Description = input.ReadString(); + break; + } + case 18: { + if (eventTime_ == null) { + EventTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + input.ReadMessage(EventTime); + break; + } + case 26: { + Type = input.ReadString(); + break; + } + case 34: { + if (taskExecution_ == null) { + TaskExecution = new global::Google.Cloud.Batch.V1Alpha.TaskExecution(); + } + input.ReadMessage(TaskExecution); + break; + } + case 40: { + TaskState = (global::Google.Cloud.Batch.V1Alpha.TaskStatus.Types.State) input.ReadEnum(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Description = input.ReadString(); + break; + } + case 18: { + if (eventTime_ == null) { + EventTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + input.ReadMessage(EventTime); + break; + } + case 26: { + Type = input.ReadString(); + break; + } + case 34: { + if (taskExecution_ == null) { + TaskExecution = new global::Google.Cloud.Batch.V1Alpha.TaskExecution(); + } + input.ReadMessage(TaskExecution); + break; + } + case 40: { + TaskState = (global::Google.Cloud.Batch.V1Alpha.TaskStatus.Types.State) input.ReadEnum(); + break; + } + } + } + } + #endif + + } + + /// + /// This Task Execution field includes detail information for + /// task execution procedures, based on StatusEvent types. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class TaskExecution : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TaskExecution()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Batch.V1Alpha.TaskReflection.Descriptor.MessageTypes[2]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TaskExecution() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TaskExecution(TaskExecution other) : this() { + exitCode_ = other.exitCode_; + stderrSnippet_ = other.stderrSnippet_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TaskExecution Clone() { + return new TaskExecution(this); + } + + /// Field number for the "exit_code" field. + public const int ExitCodeFieldNumber = 1; + private int exitCode_; + /// + /// The exit code of a finished task. + /// + /// If the task succeeded, the exit code will be 0. If the task failed but not + /// due to the following reasons, the exit code will be 50000. + /// + /// Otherwise, it can be from different sources: + /// * Batch known failures: + /// https://cloud.google.com/batch/docs/troubleshooting#reserved-exit-codes. + /// * Batch runnable execution failures; you can rely on Batch logs to further + /// diagnose: https://cloud.google.com/batch/docs/analyze-job-using-logs. If + /// there are multiple runnables failures, Batch only exposes the first error. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int ExitCode { + get { return exitCode_; } + set { + exitCode_ = value; + } + } + + /// Field number for the "stderr_snippet" field. + public const int StderrSnippetFieldNumber = 2; + private string stderrSnippet_ = ""; + /// + /// Optional. The tail end of any content written to standard error by the task + /// execution. This field will be populated only when the execution failed. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string StderrSnippet { + get { return stderrSnippet_; } + set { + stderrSnippet_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as TaskExecution); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(TaskExecution other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (ExitCode != other.ExitCode) return false; + if (StderrSnippet != other.StderrSnippet) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (ExitCode != 0) hash ^= ExitCode.GetHashCode(); + if (StderrSnippet.Length != 0) hash ^= StderrSnippet.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (ExitCode != 0) { + output.WriteRawTag(8); + output.WriteInt32(ExitCode); + } + if (StderrSnippet.Length != 0) { + output.WriteRawTag(18); + output.WriteString(StderrSnippet); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (ExitCode != 0) { + output.WriteRawTag(8); + output.WriteInt32(ExitCode); + } + if (StderrSnippet.Length != 0) { + output.WriteRawTag(18); + output.WriteString(StderrSnippet); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (ExitCode != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(ExitCode); + } + if (StderrSnippet.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(StderrSnippet); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(TaskExecution other) { + if (other == null) { + return; + } + if (other.ExitCode != 0) { + ExitCode = other.ExitCode; + } + if (other.StderrSnippet.Length != 0) { + StderrSnippet = other.StderrSnippet; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + ExitCode = input.ReadInt32(); + break; + } + case 18: { + StderrSnippet = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + ExitCode = input.ReadInt32(); + break; + } + case 18: { + StderrSnippet = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// Status of a task. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class TaskStatus : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TaskStatus()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Batch.V1Alpha.TaskReflection.Descriptor.MessageTypes[3]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TaskStatus() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TaskStatus(TaskStatus other) : this() { + state_ = other.state_; + statusEvents_ = other.statusEvents_.Clone(); + resourceUsage_ = other.resourceUsage_ != null ? other.resourceUsage_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TaskStatus Clone() { + return new TaskStatus(this); + } + + /// Field number for the "state" field. + public const int StateFieldNumber = 1; + private global::Google.Cloud.Batch.V1Alpha.TaskStatus.Types.State state_ = global::Google.Cloud.Batch.V1Alpha.TaskStatus.Types.State.Unspecified; + /// + /// Task state. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Batch.V1Alpha.TaskStatus.Types.State State { + get { return state_; } + set { + state_ = value; + } + } + + /// Field number for the "status_events" field. + public const int StatusEventsFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_statusEvents_codec + = pb::FieldCodec.ForMessage(18, global::Google.Cloud.Batch.V1Alpha.StatusEvent.Parser); + private readonly pbc::RepeatedField statusEvents_ = new pbc::RepeatedField(); + /// + /// Detailed info about why the state is reached. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField StatusEvents { + get { return statusEvents_; } + } + + /// Field number for the "resource_usage" field. + public const int ResourceUsageFieldNumber = 3; + private global::Google.Cloud.Batch.V1Alpha.TaskResourceUsage resourceUsage_; + /// + /// The resource usage of the task. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Batch.V1Alpha.TaskResourceUsage ResourceUsage { + get { return resourceUsage_; } + set { + resourceUsage_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as TaskStatus); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(TaskStatus other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (State != other.State) return false; + if(!statusEvents_.Equals(other.statusEvents_)) return false; + if (!object.Equals(ResourceUsage, other.ResourceUsage)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (State != global::Google.Cloud.Batch.V1Alpha.TaskStatus.Types.State.Unspecified) hash ^= State.GetHashCode(); + hash ^= statusEvents_.GetHashCode(); + if (resourceUsage_ != null) hash ^= ResourceUsage.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (State != global::Google.Cloud.Batch.V1Alpha.TaskStatus.Types.State.Unspecified) { + output.WriteRawTag(8); + output.WriteEnum((int) State); + } + statusEvents_.WriteTo(output, _repeated_statusEvents_codec); + if (resourceUsage_ != null) { + output.WriteRawTag(26); + output.WriteMessage(ResourceUsage); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (State != global::Google.Cloud.Batch.V1Alpha.TaskStatus.Types.State.Unspecified) { + output.WriteRawTag(8); + output.WriteEnum((int) State); + } + statusEvents_.WriteTo(ref output, _repeated_statusEvents_codec); + if (resourceUsage_ != null) { + output.WriteRawTag(26); + output.WriteMessage(ResourceUsage); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (State != global::Google.Cloud.Batch.V1Alpha.TaskStatus.Types.State.Unspecified) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) State); + } + size += statusEvents_.CalculateSize(_repeated_statusEvents_codec); + if (resourceUsage_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ResourceUsage); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(TaskStatus other) { + if (other == null) { + return; + } + if (other.State != global::Google.Cloud.Batch.V1Alpha.TaskStatus.Types.State.Unspecified) { + State = other.State; + } + statusEvents_.Add(other.statusEvents_); + if (other.resourceUsage_ != null) { + if (resourceUsage_ == null) { + ResourceUsage = new global::Google.Cloud.Batch.V1Alpha.TaskResourceUsage(); + } + ResourceUsage.MergeFrom(other.ResourceUsage); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + State = (global::Google.Cloud.Batch.V1Alpha.TaskStatus.Types.State) input.ReadEnum(); + break; + } + case 18: { + statusEvents_.AddEntriesFrom(input, _repeated_statusEvents_codec); + break; + } + case 26: { + if (resourceUsage_ == null) { + ResourceUsage = new global::Google.Cloud.Batch.V1Alpha.TaskResourceUsage(); + } + input.ReadMessage(ResourceUsage); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + State = (global::Google.Cloud.Batch.V1Alpha.TaskStatus.Types.State) input.ReadEnum(); + break; + } + case 18: { + statusEvents_.AddEntriesFrom(ref input, _repeated_statusEvents_codec); + break; + } + case 26: { + if (resourceUsage_ == null) { + ResourceUsage = new global::Google.Cloud.Batch.V1Alpha.TaskResourceUsage(); + } + input.ReadMessage(ResourceUsage); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the TaskStatus message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// Task states. + /// + public enum State { + /// + /// Unknown state. + /// + [pbr::OriginalName("STATE_UNSPECIFIED")] Unspecified = 0, + /// + /// The Task is created and waiting for resources. + /// + [pbr::OriginalName("PENDING")] Pending = 1, + /// + /// The Task is assigned to at least one VM. + /// + [pbr::OriginalName("ASSIGNED")] Assigned = 2, + /// + /// The Task is running. + /// + [pbr::OriginalName("RUNNING")] Running = 3, + /// + /// The Task has failed. + /// + [pbr::OriginalName("FAILED")] Failed = 4, + /// + /// The Task has succeeded. + /// + [pbr::OriginalName("SUCCEEDED")] Succeeded = 5, + /// + /// The Task has not been executed when the Job finishes. + /// + [pbr::OriginalName("UNEXECUTED")] Unexecuted = 6, + } + + } + #endregion + + } + + /// + /// TaskResourceUsage describes the resource usage of the task. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class TaskResourceUsage : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TaskResourceUsage()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Batch.V1Alpha.TaskReflection.Descriptor.MessageTypes[4]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TaskResourceUsage() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TaskResourceUsage(TaskResourceUsage other) : this() { + coreHours_ = other.coreHours_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TaskResourceUsage Clone() { + return new TaskResourceUsage(this); + } + + /// Field number for the "core_hours" field. + public const int CoreHoursFieldNumber = 1; + private double coreHours_; + /// + /// The CPU core hours the task consumes based on task requirement and run + /// time. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public double CoreHours { + get { return coreHours_; } + set { + coreHours_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as TaskResourceUsage); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(TaskResourceUsage other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(CoreHours, other.CoreHours)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (CoreHours != 0D) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(CoreHours); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (CoreHours != 0D) { + output.WriteRawTag(9); + output.WriteDouble(CoreHours); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (CoreHours != 0D) { + output.WriteRawTag(9); + output.WriteDouble(CoreHours); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (CoreHours != 0D) { + size += 1 + 8; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(TaskResourceUsage other) { + if (other == null) { + return; + } + if (other.CoreHours != 0D) { + CoreHours = other.CoreHours; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 9: { + CoreHours = input.ReadDouble(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 9: { + CoreHours = input.ReadDouble(); + break; + } + } + } + } + #endif + + } + + /// + /// Runnable describes instructions for executing a specific script or container + /// as part of a Task. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Runnable : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Runnable()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Batch.V1Alpha.TaskReflection.Descriptor.MessageTypes[5]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Runnable() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Runnable(Runnable other) : this() { + displayName_ = other.displayName_; + ignoreExitStatus_ = other.ignoreExitStatus_; + background_ = other.background_; + alwaysRun_ = other.alwaysRun_; + environment_ = other.environment_ != null ? other.environment_.Clone() : null; + timeout_ = other.timeout_ != null ? other.timeout_.Clone() : null; + labels_ = other.labels_.Clone(); + switch (other.ExecutableCase) { + case ExecutableOneofCase.Container: + Container = other.Container.Clone(); + break; + case ExecutableOneofCase.Script: + Script = other.Script.Clone(); + break; + case ExecutableOneofCase.Barrier: + Barrier = other.Barrier.Clone(); + break; + } + + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Runnable Clone() { + return new Runnable(this); + } + + /// Field number for the "container" field. + public const int ContainerFieldNumber = 1; + /// + /// Container runnable. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Batch.V1Alpha.Runnable.Types.Container Container { + get { return executableCase_ == ExecutableOneofCase.Container ? (global::Google.Cloud.Batch.V1Alpha.Runnable.Types.Container) executable_ : null; } + set { + executable_ = value; + executableCase_ = value == null ? ExecutableOneofCase.None : ExecutableOneofCase.Container; + } + } + + /// Field number for the "script" field. + public const int ScriptFieldNumber = 2; + /// + /// Script runnable. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Batch.V1Alpha.Runnable.Types.Script Script { + get { return executableCase_ == ExecutableOneofCase.Script ? (global::Google.Cloud.Batch.V1Alpha.Runnable.Types.Script) executable_ : null; } + set { + executable_ = value; + executableCase_ = value == null ? ExecutableOneofCase.None : ExecutableOneofCase.Script; + } + } + + /// Field number for the "barrier" field. + public const int BarrierFieldNumber = 6; + /// + /// Barrier runnable. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Batch.V1Alpha.Runnable.Types.Barrier Barrier { + get { return executableCase_ == ExecutableOneofCase.Barrier ? (global::Google.Cloud.Batch.V1Alpha.Runnable.Types.Barrier) executable_ : null; } + set { + executable_ = value; + executableCase_ = value == null ? ExecutableOneofCase.None : ExecutableOneofCase.Barrier; + } + } + + /// Field number for the "display_name" field. + public const int DisplayNameFieldNumber = 10; + private string displayName_ = ""; + /// + /// Optional. DisplayName is an optional field that can be provided by the + /// caller. If provided, it will be used in logs and other outputs to identify + /// the script, making it easier for users to understand the logs. If not + /// provided the index of the runnable will be used for outputs. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string DisplayName { + get { return displayName_; } + set { + displayName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "ignore_exit_status" field. + public const int IgnoreExitStatusFieldNumber = 3; + private bool ignoreExitStatus_; + /// + /// Normally, a runnable that returns a non-zero exit status fails and causes + /// the task to fail. However, you can set this field to `true` to allow the + /// task to continue executing its other runnables even if this runnable + /// fails. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool IgnoreExitStatus { + get { return ignoreExitStatus_; } + set { + ignoreExitStatus_ = value; + } + } + + /// Field number for the "background" field. + public const int BackgroundFieldNumber = 4; + private bool background_; + /// + /// Normally, a runnable that doesn't exit causes its task to fail. However, + /// you can set this field to `true` to configure a background runnable. + /// Background runnables are allowed continue running in the background while + /// the task executes subsequent runnables. For example, background runnables + /// are useful for providing services to other runnables or providing + /// debugging-support tools like SSH servers. + /// + /// Specifically, background runnables are killed automatically (if they have + /// not already exited) a short time after all foreground runnables have + /// completed. Even though this is likely to result in a non-zero exit status + /// for the background runnable, these automatic kills are not treated as task + /// failures. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Background { + get { return background_; } + set { + background_ = value; + } + } + + /// Field number for the "always_run" field. + public const int AlwaysRunFieldNumber = 5; + private bool alwaysRun_; + /// + /// By default, after a Runnable fails, no further Runnable are executed. This + /// flag indicates that this Runnable must be run even if the Task has already + /// failed. This is useful for Runnables that copy output files off of the VM + /// or for debugging. + /// + /// The always_run flag does not override the Task's overall max_run_duration. + /// If the max_run_duration has expired then no further Runnables will execute, + /// not even always_run Runnables. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool AlwaysRun { + get { return alwaysRun_; } + set { + alwaysRun_ = value; + } + } + + /// Field number for the "environment" field. + public const int EnvironmentFieldNumber = 7; + private global::Google.Cloud.Batch.V1Alpha.Environment environment_; + /// + /// Environment variables for this Runnable (overrides variables set for the + /// whole Task or TaskGroup). + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Batch.V1Alpha.Environment Environment { + get { return environment_; } + set { + environment_ = value; + } + } + + /// Field number for the "timeout" field. + public const int TimeoutFieldNumber = 8; + private global::Google.Protobuf.WellKnownTypes.Duration timeout_; + /// + /// Timeout for this Runnable. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.WellKnownTypes.Duration Timeout { + get { return timeout_; } + set { + timeout_ = value; + } + } + + /// Field number for the "labels" field. + public const int LabelsFieldNumber = 9; + private static readonly pbc::MapField.Codec _map_labels_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForString(18, ""), 74); + private readonly pbc::MapField labels_ = new pbc::MapField(); + /// + /// Labels for this Runnable. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::MapField Labels { + get { return labels_; } + } + + private object executable_; + /// Enum of possible cases for the "executable" oneof. + public enum ExecutableOneofCase { + None = 0, + Container = 1, + Script = 2, + Barrier = 6, + } + private ExecutableOneofCase executableCase_ = ExecutableOneofCase.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ExecutableOneofCase ExecutableCase { + get { return executableCase_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearExecutable() { + executableCase_ = ExecutableOneofCase.None; + executable_ = null; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Runnable); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Runnable other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(Container, other.Container)) return false; + if (!object.Equals(Script, other.Script)) return false; + if (!object.Equals(Barrier, other.Barrier)) return false; + if (DisplayName != other.DisplayName) return false; + if (IgnoreExitStatus != other.IgnoreExitStatus) return false; + if (Background != other.Background) return false; + if (AlwaysRun != other.AlwaysRun) return false; + if (!object.Equals(Environment, other.Environment)) return false; + if (!object.Equals(Timeout, other.Timeout)) return false; + if (!Labels.Equals(other.Labels)) return false; + if (ExecutableCase != other.ExecutableCase) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (executableCase_ == ExecutableOneofCase.Container) hash ^= Container.GetHashCode(); + if (executableCase_ == ExecutableOneofCase.Script) hash ^= Script.GetHashCode(); + if (executableCase_ == ExecutableOneofCase.Barrier) hash ^= Barrier.GetHashCode(); + if (DisplayName.Length != 0) hash ^= DisplayName.GetHashCode(); + if (IgnoreExitStatus != false) hash ^= IgnoreExitStatus.GetHashCode(); + if (Background != false) hash ^= Background.GetHashCode(); + if (AlwaysRun != false) hash ^= AlwaysRun.GetHashCode(); + if (environment_ != null) hash ^= Environment.GetHashCode(); + if (timeout_ != null) hash ^= Timeout.GetHashCode(); + hash ^= Labels.GetHashCode(); + hash ^= (int) executableCase_; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (executableCase_ == ExecutableOneofCase.Container) { + output.WriteRawTag(10); + output.WriteMessage(Container); + } + if (executableCase_ == ExecutableOneofCase.Script) { + output.WriteRawTag(18); + output.WriteMessage(Script); + } + if (IgnoreExitStatus != false) { + output.WriteRawTag(24); + output.WriteBool(IgnoreExitStatus); + } + if (Background != false) { + output.WriteRawTag(32); + output.WriteBool(Background); + } + if (AlwaysRun != false) { + output.WriteRawTag(40); + output.WriteBool(AlwaysRun); + } + if (executableCase_ == ExecutableOneofCase.Barrier) { + output.WriteRawTag(50); + output.WriteMessage(Barrier); + } + if (environment_ != null) { + output.WriteRawTag(58); + output.WriteMessage(Environment); + } + if (timeout_ != null) { + output.WriteRawTag(66); + output.WriteMessage(Timeout); + } + labels_.WriteTo(output, _map_labels_codec); + if (DisplayName.Length != 0) { + output.WriteRawTag(82); + output.WriteString(DisplayName); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (executableCase_ == ExecutableOneofCase.Container) { + output.WriteRawTag(10); + output.WriteMessage(Container); + } + if (executableCase_ == ExecutableOneofCase.Script) { + output.WriteRawTag(18); + output.WriteMessage(Script); + } + if (IgnoreExitStatus != false) { + output.WriteRawTag(24); + output.WriteBool(IgnoreExitStatus); + } + if (Background != false) { + output.WriteRawTag(32); + output.WriteBool(Background); + } + if (AlwaysRun != false) { + output.WriteRawTag(40); + output.WriteBool(AlwaysRun); + } + if (executableCase_ == ExecutableOneofCase.Barrier) { + output.WriteRawTag(50); + output.WriteMessage(Barrier); + } + if (environment_ != null) { + output.WriteRawTag(58); + output.WriteMessage(Environment); + } + if (timeout_ != null) { + output.WriteRawTag(66); + output.WriteMessage(Timeout); + } + labels_.WriteTo(ref output, _map_labels_codec); + if (DisplayName.Length != 0) { + output.WriteRawTag(82); + output.WriteString(DisplayName); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (executableCase_ == ExecutableOneofCase.Container) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Container); + } + if (executableCase_ == ExecutableOneofCase.Script) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Script); + } + if (executableCase_ == ExecutableOneofCase.Barrier) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Barrier); + } + if (DisplayName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(DisplayName); + } + if (IgnoreExitStatus != false) { + size += 1 + 1; + } + if (Background != false) { + size += 1 + 1; + } + if (AlwaysRun != false) { + size += 1 + 1; + } + if (environment_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Environment); + } + if (timeout_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Timeout); + } + size += labels_.CalculateSize(_map_labels_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Runnable other) { + if (other == null) { + return; + } + if (other.DisplayName.Length != 0) { + DisplayName = other.DisplayName; + } + if (other.IgnoreExitStatus != false) { + IgnoreExitStatus = other.IgnoreExitStatus; + } + if (other.Background != false) { + Background = other.Background; + } + if (other.AlwaysRun != false) { + AlwaysRun = other.AlwaysRun; + } + if (other.environment_ != null) { + if (environment_ == null) { + Environment = new global::Google.Cloud.Batch.V1Alpha.Environment(); + } + Environment.MergeFrom(other.Environment); + } + if (other.timeout_ != null) { + if (timeout_ == null) { + Timeout = new global::Google.Protobuf.WellKnownTypes.Duration(); + } + Timeout.MergeFrom(other.Timeout); + } + labels_.MergeFrom(other.labels_); + switch (other.ExecutableCase) { + case ExecutableOneofCase.Container: + if (Container == null) { + Container = new global::Google.Cloud.Batch.V1Alpha.Runnable.Types.Container(); + } + Container.MergeFrom(other.Container); + break; + case ExecutableOneofCase.Script: + if (Script == null) { + Script = new global::Google.Cloud.Batch.V1Alpha.Runnable.Types.Script(); + } + Script.MergeFrom(other.Script); + break; + case ExecutableOneofCase.Barrier: + if (Barrier == null) { + Barrier = new global::Google.Cloud.Batch.V1Alpha.Runnable.Types.Barrier(); + } + Barrier.MergeFrom(other.Barrier); + break; + } + + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + global::Google.Cloud.Batch.V1Alpha.Runnable.Types.Container subBuilder = new global::Google.Cloud.Batch.V1Alpha.Runnable.Types.Container(); + if (executableCase_ == ExecutableOneofCase.Container) { + subBuilder.MergeFrom(Container); + } + input.ReadMessage(subBuilder); + Container = subBuilder; + break; + } + case 18: { + global::Google.Cloud.Batch.V1Alpha.Runnable.Types.Script subBuilder = new global::Google.Cloud.Batch.V1Alpha.Runnable.Types.Script(); + if (executableCase_ == ExecutableOneofCase.Script) { + subBuilder.MergeFrom(Script); + } + input.ReadMessage(subBuilder); + Script = subBuilder; + break; + } + case 24: { + IgnoreExitStatus = input.ReadBool(); + break; + } + case 32: { + Background = input.ReadBool(); + break; + } + case 40: { + AlwaysRun = input.ReadBool(); + break; + } + case 50: { + global::Google.Cloud.Batch.V1Alpha.Runnable.Types.Barrier subBuilder = new global::Google.Cloud.Batch.V1Alpha.Runnable.Types.Barrier(); + if (executableCase_ == ExecutableOneofCase.Barrier) { + subBuilder.MergeFrom(Barrier); + } + input.ReadMessage(subBuilder); + Barrier = subBuilder; + break; + } + case 58: { + if (environment_ == null) { + Environment = new global::Google.Cloud.Batch.V1Alpha.Environment(); + } + input.ReadMessage(Environment); + break; + } + case 66: { + if (timeout_ == null) { + Timeout = new global::Google.Protobuf.WellKnownTypes.Duration(); + } + input.ReadMessage(Timeout); + break; + } + case 74: { + labels_.AddEntriesFrom(input, _map_labels_codec); + break; + } + case 82: { + DisplayName = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + global::Google.Cloud.Batch.V1Alpha.Runnable.Types.Container subBuilder = new global::Google.Cloud.Batch.V1Alpha.Runnable.Types.Container(); + if (executableCase_ == ExecutableOneofCase.Container) { + subBuilder.MergeFrom(Container); + } + input.ReadMessage(subBuilder); + Container = subBuilder; + break; + } + case 18: { + global::Google.Cloud.Batch.V1Alpha.Runnable.Types.Script subBuilder = new global::Google.Cloud.Batch.V1Alpha.Runnable.Types.Script(); + if (executableCase_ == ExecutableOneofCase.Script) { + subBuilder.MergeFrom(Script); + } + input.ReadMessage(subBuilder); + Script = subBuilder; + break; + } + case 24: { + IgnoreExitStatus = input.ReadBool(); + break; + } + case 32: { + Background = input.ReadBool(); + break; + } + case 40: { + AlwaysRun = input.ReadBool(); + break; + } + case 50: { + global::Google.Cloud.Batch.V1Alpha.Runnable.Types.Barrier subBuilder = new global::Google.Cloud.Batch.V1Alpha.Runnable.Types.Barrier(); + if (executableCase_ == ExecutableOneofCase.Barrier) { + subBuilder.MergeFrom(Barrier); + } + input.ReadMessage(subBuilder); + Barrier = subBuilder; + break; + } + case 58: { + if (environment_ == null) { + Environment = new global::Google.Cloud.Batch.V1Alpha.Environment(); + } + input.ReadMessage(Environment); + break; + } + case 66: { + if (timeout_ == null) { + Timeout = new global::Google.Protobuf.WellKnownTypes.Duration(); + } + input.ReadMessage(Timeout); + break; + } + case 74: { + labels_.AddEntriesFrom(ref input, _map_labels_codec); + break; + } + case 82: { + DisplayName = input.ReadString(); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the Runnable message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// Container runnable. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Container : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Container()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Batch.V1Alpha.Runnable.Descriptor.NestedTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Container() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Container(Container other) : this() { + imageUri_ = other.imageUri_; + commands_ = other.commands_.Clone(); + entrypoint_ = other.entrypoint_; + volumes_ = other.volumes_.Clone(); + options_ = other.options_; + blockExternalNetwork_ = other.blockExternalNetwork_; + username_ = other.username_; + password_ = other.password_; + enableImageStreaming_ = other.enableImageStreaming_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Container Clone() { + return new Container(this); + } + + /// Field number for the "image_uri" field. + public const int ImageUriFieldNumber = 1; + private string imageUri_ = ""; + /// + /// Required. The URI to pull the container image from. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string ImageUri { + get { return imageUri_; } + set { + imageUri_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "commands" field. + public const int CommandsFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_commands_codec + = pb::FieldCodec.ForString(18); + private readonly pbc::RepeatedField commands_ = new pbc::RepeatedField(); + /// + /// Required for some container images. Overrides the `CMD` specified in the + /// container. If there is an `ENTRYPOINT` (either in the container image or + /// with the `entrypoint` field below) then these commands are appended as + /// arguments to the `ENTRYPOINT`. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Commands { + get { return commands_; } + } + + /// Field number for the "entrypoint" field. + public const int EntrypointFieldNumber = 3; + private string entrypoint_ = ""; + /// + /// Required for some container images. Overrides the `ENTRYPOINT` specified + /// in the container. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Entrypoint { + get { return entrypoint_; } + set { + entrypoint_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "volumes" field. + public const int VolumesFieldNumber = 7; + private static readonly pb::FieldCodec _repeated_volumes_codec + = pb::FieldCodec.ForString(58); + private readonly pbc::RepeatedField volumes_ = new pbc::RepeatedField(); + /// + /// Volumes to mount (bind mount) from the host machine files or directories + /// into the container, formatted to match `--volume` option for the + /// `docker run` command&mdash;for example, `/foo:/bar` or `/foo:/bar:ro`. + /// + /// If the `TaskSpec.Volumes` field is specified but this field is not, Batch + /// will mount each volume from the host machine to the container with the + /// same mount path by default. In this case, the default mount option for + /// containers will be read-only (`ro`) for existing persistent disks and + /// read-write (`rw`) for other volume types, regardless of the original + /// mount options specified in `TaskSpec.Volumes`. If you need different + /// mount settings, you can explicitly configure them in this field. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Volumes { + get { return volumes_; } + } + + /// Field number for the "options" field. + public const int OptionsFieldNumber = 8; + private string options_ = ""; + /// + /// Required for some container images. Arbitrary additional options to + /// include in the `docker run` command when running this container&mdash;for + /// example, `--network host`. For the `--volume` option, use the `volumes` + /// field for the container. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Options { + get { return options_; } + set { + options_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "block_external_network" field. + public const int BlockExternalNetworkFieldNumber = 9; + private bool blockExternalNetwork_; + /// + /// If set to true, external network access to and from container will be + /// blocked, containers that are with block_external_network as true can + /// still communicate with each other, network cannot be specified in the + /// `container.options` field. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool BlockExternalNetwork { + get { return blockExternalNetwork_; } + set { + blockExternalNetwork_ = value; + } + } + + /// Field number for the "username" field. + public const int UsernameFieldNumber = 10; + private string username_ = ""; + /// + /// Required if the container image is from a private Docker registry. The + /// username to login to the Docker registry that contains the image. + /// + /// You can either specify the username directly by using plain text or + /// specify an encrypted username by using a Secret Manager secret: + /// `projects/*/secrets/*/versions/*`. However, using a secret is + /// recommended for enhanced security. + /// + /// Caution: If you specify the username using plain text, you risk the + /// username being exposed to any users who can view the job or its logs. + /// To avoid this risk, specify a secret that contains the username instead. + /// + /// Learn more about [Secret + /// Manager](https://cloud.google.com/secret-manager/docs/) and [using + /// Secret Manager with + /// Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager). + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Username { + get { return username_; } + set { + username_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "password" field. + public const int PasswordFieldNumber = 11; + private string password_ = ""; + /// + /// Required if the container image is from a private Docker registry. The + /// password to login to the Docker registry that contains the image. + /// + /// For security, it is strongly recommended to specify an + /// encrypted password by using a Secret Manager secret: + /// `projects/*/secrets/*/versions/*`. + /// + /// Warning: If you specify the password using plain text, you risk the + /// password being exposed to any users who can view the job or its logs. + /// To avoid this risk, specify a secret that contains the password instead. + /// + /// Learn more about [Secret + /// Manager](https://cloud.google.com/secret-manager/docs/) and [using + /// Secret Manager with + /// Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager). + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Password { + get { return password_; } + set { + password_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "enable_image_streaming" field. + public const int EnableImageStreamingFieldNumber = 12; + private bool enableImageStreaming_; + /// + /// Optional. If set to true, this container runnable uses Image streaming. + /// + /// Use Image streaming to allow the runnable to initialize without + /// waiting for the entire container image to download, which can + /// significantly reduce startup time for large container images. + /// + /// When `enableImageStreaming` is set to true, the container + /// runtime is [containerd](https://containerd.io/) instead of Docker. + /// Additionally, this container runnable only supports the following + /// `container` subfields: `imageUri`, + /// `commands[]`, `entrypoint`, and + /// `volumes[]`; any other `container` subfields are ignored. + /// + /// For more information about the requirements and limitations for using + /// Image streaming with Batch, see the [`image-streaming` + /// sample on + /// GitHub](https://github.com/GoogleCloudPlatform/batch-samples/tree/main/api-samples/image-streaming). + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool EnableImageStreaming { + get { return enableImageStreaming_; } + set { + enableImageStreaming_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Container); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Container other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (ImageUri != other.ImageUri) return false; + if(!commands_.Equals(other.commands_)) return false; + if (Entrypoint != other.Entrypoint) return false; + if(!volumes_.Equals(other.volumes_)) return false; + if (Options != other.Options) return false; + if (BlockExternalNetwork != other.BlockExternalNetwork) return false; + if (Username != other.Username) return false; + if (Password != other.Password) return false; + if (EnableImageStreaming != other.EnableImageStreaming) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (ImageUri.Length != 0) hash ^= ImageUri.GetHashCode(); + hash ^= commands_.GetHashCode(); + if (Entrypoint.Length != 0) hash ^= Entrypoint.GetHashCode(); + hash ^= volumes_.GetHashCode(); + if (Options.Length != 0) hash ^= Options.GetHashCode(); + if (BlockExternalNetwork != false) hash ^= BlockExternalNetwork.GetHashCode(); + if (Username.Length != 0) hash ^= Username.GetHashCode(); + if (Password.Length != 0) hash ^= Password.GetHashCode(); + if (EnableImageStreaming != false) hash ^= EnableImageStreaming.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (ImageUri.Length != 0) { + output.WriteRawTag(10); + output.WriteString(ImageUri); + } + commands_.WriteTo(output, _repeated_commands_codec); + if (Entrypoint.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Entrypoint); + } + volumes_.WriteTo(output, _repeated_volumes_codec); + if (Options.Length != 0) { + output.WriteRawTag(66); + output.WriteString(Options); + } + if (BlockExternalNetwork != false) { + output.WriteRawTag(72); + output.WriteBool(BlockExternalNetwork); + } + if (Username.Length != 0) { + output.WriteRawTag(82); + output.WriteString(Username); + } + if (Password.Length != 0) { + output.WriteRawTag(90); + output.WriteString(Password); + } + if (EnableImageStreaming != false) { + output.WriteRawTag(96); + output.WriteBool(EnableImageStreaming); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (ImageUri.Length != 0) { + output.WriteRawTag(10); + output.WriteString(ImageUri); + } + commands_.WriteTo(ref output, _repeated_commands_codec); + if (Entrypoint.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Entrypoint); + } + volumes_.WriteTo(ref output, _repeated_volumes_codec); + if (Options.Length != 0) { + output.WriteRawTag(66); + output.WriteString(Options); + } + if (BlockExternalNetwork != false) { + output.WriteRawTag(72); + output.WriteBool(BlockExternalNetwork); + } + if (Username.Length != 0) { + output.WriteRawTag(82); + output.WriteString(Username); + } + if (Password.Length != 0) { + output.WriteRawTag(90); + output.WriteString(Password); + } + if (EnableImageStreaming != false) { + output.WriteRawTag(96); + output.WriteBool(EnableImageStreaming); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (ImageUri.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ImageUri); + } + size += commands_.CalculateSize(_repeated_commands_codec); + if (Entrypoint.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Entrypoint); + } + size += volumes_.CalculateSize(_repeated_volumes_codec); + if (Options.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Options); + } + if (BlockExternalNetwork != false) { + size += 1 + 1; + } + if (Username.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Username); + } + if (Password.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Password); + } + if (EnableImageStreaming != false) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Container other) { + if (other == null) { + return; + } + if (other.ImageUri.Length != 0) { + ImageUri = other.ImageUri; + } + commands_.Add(other.commands_); + if (other.Entrypoint.Length != 0) { + Entrypoint = other.Entrypoint; + } + volumes_.Add(other.volumes_); + if (other.Options.Length != 0) { + Options = other.Options; + } + if (other.BlockExternalNetwork != false) { + BlockExternalNetwork = other.BlockExternalNetwork; + } + if (other.Username.Length != 0) { + Username = other.Username; + } + if (other.Password.Length != 0) { + Password = other.Password; + } + if (other.EnableImageStreaming != false) { + EnableImageStreaming = other.EnableImageStreaming; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + ImageUri = input.ReadString(); + break; + } + case 18: { + commands_.AddEntriesFrom(input, _repeated_commands_codec); + break; + } + case 26: { + Entrypoint = input.ReadString(); + break; + } + case 58: { + volumes_.AddEntriesFrom(input, _repeated_volumes_codec); + break; + } + case 66: { + Options = input.ReadString(); + break; + } + case 72: { + BlockExternalNetwork = input.ReadBool(); + break; + } + case 82: { + Username = input.ReadString(); + break; + } + case 90: { + Password = input.ReadString(); + break; + } + case 96: { + EnableImageStreaming = input.ReadBool(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + ImageUri = input.ReadString(); + break; + } + case 18: { + commands_.AddEntriesFrom(ref input, _repeated_commands_codec); + break; + } + case 26: { + Entrypoint = input.ReadString(); + break; + } + case 58: { + volumes_.AddEntriesFrom(ref input, _repeated_volumes_codec); + break; + } + case 66: { + Options = input.ReadString(); + break; + } + case 72: { + BlockExternalNetwork = input.ReadBool(); + break; + } + case 82: { + Username = input.ReadString(); + break; + } + case 90: { + Password = input.ReadString(); + break; + } + case 96: { + EnableImageStreaming = input.ReadBool(); + break; + } + } + } + } + #endif + + } + + /// + /// Script runnable. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Script : pb::IMessage