diff --git a/grpc-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/BatchServiceGrpc.java b/grpc-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/BatchServiceGrpc.java deleted file mode 100644 index f5183c6..0000000 --- a/grpc-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/BatchServiceGrpc.java +++ /dev/null @@ -1,893 +0,0 @@ -/* - * Copyright 2020 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. - */ -package com.google.cloud.batch.v1; - -import static io.grpc.MethodDescriptor.generateFullMethodName; - -/** - * - * - *
- * Google Batch Service. - * The service manages user submitted batch jobs and allocates Google Compute - * Engine VM instances to run the jobs. - *- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/cloud/batch/v1/batch.proto") -@io.grpc.stub.annotations.GrpcGenerated -public final class BatchServiceGrpc { - - private BatchServiceGrpc() {} - - public static final String SERVICE_NAME = "google.cloud.batch.v1.BatchService"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.batch.v1.CreateJobRequest, com.google.cloud.batch.v1.Job> - getCreateJobMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateJob", - requestType = com.google.cloud.batch.v1.CreateJobRequest.class, - responseType = com.google.cloud.batch.v1.Job.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.batch.v1.CreateJobRequest, com.google.cloud.batch.v1.Job> - getCreateJobMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.batch.v1.CreateJobRequest, com.google.cloud.batch.v1.Job> - getCreateJobMethod; - if ((getCreateJobMethod = BatchServiceGrpc.getCreateJobMethod) == null) { - synchronized (BatchServiceGrpc.class) { - if ((getCreateJobMethod = BatchServiceGrpc.getCreateJobMethod) == null) { - BatchServiceGrpc.getCreateJobMethod = - getCreateJobMethod = - io.grpc.MethodDescriptor - .
- * Google Batch Service. - * The service manages user submitted batch jobs and allocates Google Compute - * Engine VM instances to run the jobs. - *- */ - public abstract static class BatchServiceImplBase implements io.grpc.BindableService { - - /** - * - * - *
- * Create a Job. - *- */ - public void createJob( - com.google.cloud.batch.v1.CreateJobRequest request, - io.grpc.stub.StreamObserver
- * Get a Job specified by its resource name. - *- */ - public void getJob( - com.google.cloud.batch.v1.GetJobRequest request, - io.grpc.stub.StreamObserver
- * Delete a Job. - *- */ - public void deleteJob( - com.google.cloud.batch.v1.DeleteJobRequest request, - io.grpc.stub.StreamObserver
- * List all Jobs for a project within a region. - *- */ - public void listJobs( - com.google.cloud.batch.v1.ListJobsRequest request, - io.grpc.stub.StreamObserver
- * Return a single Task. - *- */ - public void getTask( - com.google.cloud.batch.v1.GetTaskRequest request, - io.grpc.stub.StreamObserver
- * List Tasks associated with a job. - *- */ - public void listTasks( - com.google.cloud.batch.v1.ListTasksRequest request, - io.grpc.stub.StreamObserver
- * Google Batch Service. - * The service manages user submitted batch jobs and allocates Google Compute - * Engine VM instances to run the jobs. - *- */ - public static final class BatchServiceStub - extends io.grpc.stub.AbstractAsyncStub
- * Create a Job. - *- */ - public void createJob( - com.google.cloud.batch.v1.CreateJobRequest request, - io.grpc.stub.StreamObserver
- * Get a Job specified by its resource name. - *- */ - public void getJob( - com.google.cloud.batch.v1.GetJobRequest request, - io.grpc.stub.StreamObserver
- * Delete a Job. - *- */ - public void deleteJob( - com.google.cloud.batch.v1.DeleteJobRequest request, - io.grpc.stub.StreamObserver
- * List all Jobs for a project within a region. - *- */ - public void listJobs( - com.google.cloud.batch.v1.ListJobsRequest request, - io.grpc.stub.StreamObserver
- * Return a single Task. - *- */ - public void getTask( - com.google.cloud.batch.v1.GetTaskRequest request, - io.grpc.stub.StreamObserver
- * List Tasks associated with a job. - *- */ - public void listTasks( - com.google.cloud.batch.v1.ListTasksRequest request, - io.grpc.stub.StreamObserver
- * Google Batch Service. - * The service manages user submitted batch jobs and allocates Google Compute - * Engine VM instances to run the jobs. - *- */ - public static final class BatchServiceBlockingStub - extends io.grpc.stub.AbstractBlockingStub
- * Create a Job. - *- */ - public com.google.cloud.batch.v1.Job createJob( - com.google.cloud.batch.v1.CreateJobRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateJobMethod(), getCallOptions(), request); - } - - /** - * - * - *
- * Get a Job specified by its resource name. - *- */ - public com.google.cloud.batch.v1.Job getJob(com.google.cloud.batch.v1.GetJobRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetJobMethod(), getCallOptions(), request); - } - - /** - * - * - *
- * Delete a Job. - *- */ - public com.google.longrunning.Operation deleteJob( - com.google.cloud.batch.v1.DeleteJobRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteJobMethod(), getCallOptions(), request); - } - - /** - * - * - *
- * List all Jobs for a project within a region. - *- */ - public com.google.cloud.batch.v1.ListJobsResponse listJobs( - com.google.cloud.batch.v1.ListJobsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListJobsMethod(), getCallOptions(), request); - } - - /** - * - * - *
- * Return a single Task. - *- */ - public com.google.cloud.batch.v1.Task getTask( - com.google.cloud.batch.v1.GetTaskRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetTaskMethod(), getCallOptions(), request); - } - - /** - * - * - *
- * List Tasks associated with a job. - *- */ - public com.google.cloud.batch.v1.ListTasksResponse listTasks( - com.google.cloud.batch.v1.ListTasksRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListTasksMethod(), getCallOptions(), request); - } - } - - /** - * - * - *
- * Google Batch Service. - * The service manages user submitted batch jobs and allocates Google Compute - * Engine VM instances to run the jobs. - *- */ - public static final class BatchServiceFutureStub - extends io.grpc.stub.AbstractFutureStub
- * Create a Job. - *- */ - public com.google.common.util.concurrent.ListenableFuture
- * Get a Job specified by its resource name. - *- */ - public com.google.common.util.concurrent.ListenableFuture
- * Delete a Job. - *- */ - public com.google.common.util.concurrent.ListenableFuture
- * List all Jobs for a project within a region. - *- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.batch.v1.ListJobsResponse> - listJobs(com.google.cloud.batch.v1.ListJobsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListJobsMethod(), getCallOptions()), request); - } - - /** - * - * - *
- * Return a single Task. - *- */ - public com.google.common.util.concurrent.ListenableFuture
- * List Tasks associated with a job. - *- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.batch.v1.ListTasksResponse> - listTasks(com.google.cloud.batch.v1.ListTasksRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListTasksMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_CREATE_JOB = 0; - private static final int METHODID_GET_JOB = 1; - private static final int METHODID_DELETE_JOB = 2; - private static final int METHODID_LIST_JOBS = 3; - private static final int METHODID_GET_TASK = 4; - private static final int METHODID_LIST_TASKS = 5; - - private static final class MethodHandlers
- * Google Batch Service. - * The service manages user submitted batch jobs and allocates Google Compute - * Engine VM instances to run the jobs. - *- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/cloud/batch/v1alpha/batch.proto") -@io.grpc.stub.annotations.GrpcGenerated -public final class BatchServiceGrpc { - - private BatchServiceGrpc() {} - - public static final String SERVICE_NAME = "google.cloud.batch.v1alpha.BatchService"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.batch.v1alpha.CreateJobRequest, com.google.cloud.batch.v1alpha.Job> - getCreateJobMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateJob", - requestType = com.google.cloud.batch.v1alpha.CreateJobRequest.class, - responseType = com.google.cloud.batch.v1alpha.Job.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.batch.v1alpha.CreateJobRequest, com.google.cloud.batch.v1alpha.Job> - getCreateJobMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.batch.v1alpha.CreateJobRequest, com.google.cloud.batch.v1alpha.Job> - getCreateJobMethod; - if ((getCreateJobMethod = BatchServiceGrpc.getCreateJobMethod) == null) { - synchronized (BatchServiceGrpc.class) { - if ((getCreateJobMethod = BatchServiceGrpc.getCreateJobMethod) == null) { - BatchServiceGrpc.getCreateJobMethod = - getCreateJobMethod = - io.grpc.MethodDescriptor - .
- * Google Batch Service. - * The service manages user submitted batch jobs and allocates Google Compute - * Engine VM instances to run the jobs. - *- */ - public abstract static class BatchServiceImplBase implements io.grpc.BindableService { - - /** - * - * - *
- * Create a Job. - *- */ - public void createJob( - com.google.cloud.batch.v1alpha.CreateJobRequest request, - io.grpc.stub.StreamObserver
- * Get a Job specified by its resource name. - *- */ - public void getJob( - com.google.cloud.batch.v1alpha.GetJobRequest request, - io.grpc.stub.StreamObserver
- * Delete a Job. - *- */ - public void deleteJob( - com.google.cloud.batch.v1alpha.DeleteJobRequest request, - io.grpc.stub.StreamObserver
- * List all Jobs for a project within a region. - *- */ - public void listJobs( - com.google.cloud.batch.v1alpha.ListJobsRequest request, - io.grpc.stub.StreamObserver
- * Return a single Task. - *- */ - public void getTask( - com.google.cloud.batch.v1alpha.GetTaskRequest request, - io.grpc.stub.StreamObserver
- * List Tasks associated with a job. - *- */ - public void listTasks( - com.google.cloud.batch.v1alpha.ListTasksRequest request, - io.grpc.stub.StreamObserver
- * Google Batch Service. - * The service manages user submitted batch jobs and allocates Google Compute - * Engine VM instances to run the jobs. - *- */ - public static final class BatchServiceStub - extends io.grpc.stub.AbstractAsyncStub
- * Create a Job. - *- */ - public void createJob( - com.google.cloud.batch.v1alpha.CreateJobRequest request, - io.grpc.stub.StreamObserver
- * Get a Job specified by its resource name. - *- */ - public void getJob( - com.google.cloud.batch.v1alpha.GetJobRequest request, - io.grpc.stub.StreamObserver
- * Delete a Job. - *- */ - public void deleteJob( - com.google.cloud.batch.v1alpha.DeleteJobRequest request, - io.grpc.stub.StreamObserver
- * List all Jobs for a project within a region. - *- */ - public void listJobs( - com.google.cloud.batch.v1alpha.ListJobsRequest request, - io.grpc.stub.StreamObserver
- * Return a single Task. - *- */ - public void getTask( - com.google.cloud.batch.v1alpha.GetTaskRequest request, - io.grpc.stub.StreamObserver
- * List Tasks associated with a job. - *- */ - public void listTasks( - com.google.cloud.batch.v1alpha.ListTasksRequest request, - io.grpc.stub.StreamObserver
- * Google Batch Service. - * The service manages user submitted batch jobs and allocates Google Compute - * Engine VM instances to run the jobs. - *- */ - public static final class BatchServiceBlockingStub - extends io.grpc.stub.AbstractBlockingStub
- * Create a Job. - *- */ - public com.google.cloud.batch.v1alpha.Job createJob( - com.google.cloud.batch.v1alpha.CreateJobRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateJobMethod(), getCallOptions(), request); - } - - /** - * - * - *
- * Get a Job specified by its resource name. - *- */ - public com.google.cloud.batch.v1alpha.Job getJob( - com.google.cloud.batch.v1alpha.GetJobRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetJobMethod(), getCallOptions(), request); - } - - /** - * - * - *
- * Delete a Job. - *- */ - public com.google.longrunning.Operation deleteJob( - com.google.cloud.batch.v1alpha.DeleteJobRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteJobMethod(), getCallOptions(), request); - } - - /** - * - * - *
- * List all Jobs for a project within a region. - *- */ - public com.google.cloud.batch.v1alpha.ListJobsResponse listJobs( - com.google.cloud.batch.v1alpha.ListJobsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListJobsMethod(), getCallOptions(), request); - } - - /** - * - * - *
- * Return a single Task. - *- */ - public com.google.cloud.batch.v1alpha.Task getTask( - com.google.cloud.batch.v1alpha.GetTaskRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetTaskMethod(), getCallOptions(), request); - } - - /** - * - * - *
- * List Tasks associated with a job. - *- */ - public com.google.cloud.batch.v1alpha.ListTasksResponse listTasks( - com.google.cloud.batch.v1alpha.ListTasksRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListTasksMethod(), getCallOptions(), request); - } - } - - /** - * - * - *
- * Google Batch Service. - * The service manages user submitted batch jobs and allocates Google Compute - * Engine VM instances to run the jobs. - *- */ - public static final class BatchServiceFutureStub - extends io.grpc.stub.AbstractFutureStub
- * Create a Job. - *- */ - public com.google.common.util.concurrent.ListenableFuture
- * Get a Job specified by its resource name. - *- */ - public com.google.common.util.concurrent.ListenableFuture
- * Delete a Job. - *- */ - public com.google.common.util.concurrent.ListenableFuture
- * List all Jobs for a project within a region. - *- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.batch.v1alpha.ListJobsResponse> - listJobs(com.google.cloud.batch.v1alpha.ListJobsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListJobsMethod(), getCallOptions()), request); - } - - /** - * - * - *
- * Return a single Task. - *- */ - public com.google.common.util.concurrent.ListenableFuture
- * List Tasks associated with a job. - *- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.batch.v1alpha.ListTasksResponse> - listTasks(com.google.cloud.batch.v1alpha.ListTasksRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListTasksMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_CREATE_JOB = 0; - private static final int METHODID_GET_JOB = 1; - private static final int METHODID_DELETE_JOB = 2; - private static final int METHODID_LIST_JOBS = 3; - private static final int METHODID_GET_TASK = 4; - private static final int METHODID_LIST_TASKS = 5; - - private static final class MethodHandlers
{@code - * // This snippet has been automatically generated for illustrative purposes only. - * // It may require modifications to work in your environment. + * // 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/java/docs/setup#configure_endpoints_for_the_client_library * try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) { * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); * Job job = Job.newBuilder().build(); @@ -95,8 +98,11 @@ *To customize credentials: * *
{@code - * // This snippet has been automatically generated for illustrative purposes only. - * // It may require modifications to work in your environment. + * // 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/java/docs/setup#configure_endpoints_for_the_client_library * BatchServiceSettings batchServiceSettings = * BatchServiceSettings.newBuilder() * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) @@ -107,8 +113,11 @@ *To customize the endpoint: * *
{@code - * // This snippet has been automatically generated for illustrative purposes only. - * // It may require modifications to work in your environment. + * // 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/java/docs/setup#configure_endpoints_for_the_client_library * BatchServiceSettings batchServiceSettings = * BatchServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); * BatchServiceClient batchServiceClient = BatchServiceClient.create(batchServiceSettings); @@ -118,8 +127,11 @@ * the wire: * *{@code - * // This snippet has been automatically generated for illustrative purposes only. - * // It may require modifications to work in your environment. + * // 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/java/docs/setup#configure_endpoints_for_the_client_library * BatchServiceSettings batchServiceSettings = * BatchServiceSettings.newBuilder() * .setTransportChannelProvider( @@ -211,8 +223,11 @@ public final OperationsClient getHttpJsonOperationsClient() { *Sample code: * *
{@code - * // This snippet has been automatically generated for illustrative purposes only. - * // It may require modifications to work in your environment. + * // 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/java/docs/setup#configure_endpoints_for_the_client_library * try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) { * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); * Job job = Job.newBuilder().build(); @@ -249,8 +264,11 @@ public final Job createJob(LocationName parent, Job job, String jobId) { *Sample code: * *
{@code - * // This snippet has been automatically generated for illustrative purposes only. - * // It may require modifications to work in your environment. + * // 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/java/docs/setup#configure_endpoints_for_the_client_library * try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) { * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); * Job job = Job.newBuilder().build(); @@ -283,8 +301,11 @@ public final Job createJob(String parent, Job job, String jobId) { *Sample code: * *
{@code - * // This snippet has been automatically generated for illustrative purposes only. - * // It may require modifications to work in your environment. + * // 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/java/docs/setup#configure_endpoints_for_the_client_library * try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) { * CreateJobRequest request = * CreateJobRequest.newBuilder() @@ -311,8 +332,11 @@ public final Job createJob(CreateJobRequest request) { *Sample code: * *
{@code - * // This snippet has been automatically generated for illustrative purposes only. - * // It may require modifications to work in your environment. + * // 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/java/docs/setup#configure_endpoints_for_the_client_library * try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) { * CreateJobRequest request = * CreateJobRequest.newBuilder() @@ -338,8 +362,11 @@ public final UnaryCallablecreateJobCallable() { * Sample code: * *
{@code - * // This snippet has been automatically generated for illustrative purposes only. - * // It may require modifications to work in your environment. + * // 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/java/docs/setup#configure_endpoints_for_the_client_library * try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) { * JobName name = JobName.of("[PROJECT]", "[LOCATION]", "[JOB]"); * Job response = batchServiceClient.getJob(name); @@ -362,8 +389,11 @@ public final Job getJob(JobName name) { *Sample code: * *
{@code - * // This snippet has been automatically generated for illustrative purposes only. - * // It may require modifications to work in your environment. + * // 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/java/docs/setup#configure_endpoints_for_the_client_library * try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) { * String name = JobName.of("[PROJECT]", "[LOCATION]", "[JOB]").toString(); * Job response = batchServiceClient.getJob(name); @@ -385,8 +415,11 @@ public final Job getJob(String name) { *Sample code: * *
{@code - * // This snippet has been automatically generated for illustrative purposes only. - * // It may require modifications to work in your environment. + * // 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/java/docs/setup#configure_endpoints_for_the_client_library * try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) { * GetJobRequest request = * GetJobRequest.newBuilder() @@ -410,8 +443,11 @@ public final Job getJob(GetJobRequest request) { *Sample code: * *
{@code - * // This snippet has been automatically generated for illustrative purposes only. - * // It may require modifications to work in your environment. + * // 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/java/docs/setup#configure_endpoints_for_the_client_library * try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) { * GetJobRequest request = * GetJobRequest.newBuilder() @@ -434,8 +470,11 @@ public final UnaryCallablegetJobCallable() { * Sample code: * *
{@code - * // This snippet has been automatically generated for illustrative purposes only. - * // It may require modifications to work in your environment. + * // 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/java/docs/setup#configure_endpoints_for_the_client_library * try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) { * String name = "name3373707"; * batchServiceClient.deleteJobAsync(name).get(); @@ -457,8 +496,11 @@ public final OperationFuturedeleteJobAsync(String nam * Sample code: * *
{@code - * // This snippet has been automatically generated for illustrative purposes only. - * // It may require modifications to work in your environment. + * // 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/java/docs/setup#configure_endpoints_for_the_client_library * try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) { * DeleteJobRequest request = * DeleteJobRequest.newBuilder() @@ -484,8 +526,11 @@ public final OperationFuturedeleteJobAsync(DeleteJobR * Sample code: * *
{@code - * // This snippet has been automatically generated for illustrative purposes only. - * // It may require modifications to work in your environment. + * // 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/java/docs/setup#configure_endpoints_for_the_client_library * try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) { * DeleteJobRequest request = * DeleteJobRequest.newBuilder() @@ -512,8 +557,11 @@ public final OperationFuturedeleteJobAsync(DeleteJobR * Sample code: * *
{@code - * // This snippet has been automatically generated for illustrative purposes only. - * // It may require modifications to work in your environment. + * // 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/java/docs/setup#configure_endpoints_for_the_client_library * try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) { * DeleteJobRequest request = * DeleteJobRequest.newBuilder() @@ -538,8 +586,11 @@ public final UnaryCallabledeleteJobCallable() { * Sample code: * *
{@code - * // This snippet has been automatically generated for illustrative purposes only. - * // It may require modifications to work in your environment. + * // 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/java/docs/setup#configure_endpoints_for_the_client_library * try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) { * String parent = "parent-995424086"; * for (Job element : batchServiceClient.listJobs(parent).iterateAll()) { @@ -563,8 +614,11 @@ public final ListJobsPagedResponse listJobs(String parent) { *Sample code: * *
{@code - * // This snippet has been automatically generated for illustrative purposes only. - * // It may require modifications to work in your environment. + * // 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/java/docs/setup#configure_endpoints_for_the_client_library * try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) { * ListJobsRequest request = * ListJobsRequest.newBuilder() @@ -593,8 +647,11 @@ public final ListJobsPagedResponse listJobs(ListJobsRequest request) { *Sample code: * *
{@code - * // This snippet has been automatically generated for illustrative purposes only. - * // It may require modifications to work in your environment. + * // 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/java/docs/setup#configure_endpoints_for_the_client_library * try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) { * ListJobsRequest request = * ListJobsRequest.newBuilder() @@ -622,8 +679,11 @@ public final UnaryCallablelistJobsPaged * Sample code: * *
{@code - * // This snippet has been automatically generated for illustrative purposes only. - * // It may require modifications to work in your environment. + * // 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/java/docs/setup#configure_endpoints_for_the_client_library * try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) { * ListJobsRequest request = * ListJobsRequest.newBuilder() @@ -658,8 +718,11 @@ public final UnaryCallablelistJobsCallable() * Sample code: * *
{@code - * // This snippet has been automatically generated for illustrative purposes only. - * // It may require modifications to work in your environment. + * // 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/java/docs/setup#configure_endpoints_for_the_client_library * try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) { * TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[JOB]", "[TASK_GROUP]", "[TASK]"); * Task response = batchServiceClient.getTask(name); @@ -682,8 +745,11 @@ public final Task getTask(TaskName name) { *Sample code: * *
{@code - * // This snippet has been automatically generated for illustrative purposes only. - * // It may require modifications to work in your environment. + * // 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/java/docs/setup#configure_endpoints_for_the_client_library * try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) { * String name = * TaskName.of("[PROJECT]", "[LOCATION]", "[JOB]", "[TASK_GROUP]", "[TASK]").toString(); @@ -706,8 +772,11 @@ public final Task getTask(String name) { *Sample code: * *
{@code - * // This snippet has been automatically generated for illustrative purposes only. - * // It may require modifications to work in your environment. + * // 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/java/docs/setup#configure_endpoints_for_the_client_library * try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) { * GetTaskRequest request = * GetTaskRequest.newBuilder() @@ -733,8 +802,11 @@ public final Task getTask(GetTaskRequest request) { *Sample code: * *
{@code - * // This snippet has been automatically generated for illustrative purposes only. - * // It may require modifications to work in your environment. + * // 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/java/docs/setup#configure_endpoints_for_the_client_library * try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) { * GetTaskRequest request = * GetTaskRequest.newBuilder() @@ -759,8 +831,11 @@ public final UnaryCallablegetTaskCallable() { * Sample code: * *
{@code - * // This snippet has been automatically generated for illustrative purposes only. - * // It may require modifications to work in your environment. + * // 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/java/docs/setup#configure_endpoints_for_the_client_library * try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) { * TaskGroupName parent = TaskGroupName.of("[PROJECT]", "[LOCATION]", "[JOB]", "[TASK_GROUP]"); * for (Task element : batchServiceClient.listTasks(parent).iterateAll()) { @@ -786,8 +861,11 @@ public final ListTasksPagedResponse listTasks(TaskGroupName parent) { *Sample code: * *
{@code - * // This snippet has been automatically generated for illustrative purposes only. - * // It may require modifications to work in your environment. + * // 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/java/docs/setup#configure_endpoints_for_the_client_library * try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) { * String parent = * TaskGroupName.of("[PROJECT]", "[LOCATION]", "[JOB]", "[TASK_GROUP]").toString(); @@ -813,8 +891,11 @@ public final ListTasksPagedResponse listTasks(String parent) { *Sample code: * *
{@code - * // This snippet has been automatically generated for illustrative purposes only. - * // It may require modifications to work in your environment. + * // 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/java/docs/setup#configure_endpoints_for_the_client_library * try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) { * ListTasksRequest request = * ListTasksRequest.newBuilder() @@ -844,8 +925,11 @@ public final ListTasksPagedResponse listTasks(ListTasksRequest request) { *Sample code: * *
{@code - * // This snippet has been automatically generated for illustrative purposes only. - * // It may require modifications to work in your environment. + * // 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/java/docs/setup#configure_endpoints_for_the_client_library * try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) { * ListTasksRequest request = * ListTasksRequest.newBuilder() @@ -874,8 +958,11 @@ public final UnaryCallablelistTasksPa * Sample code: * *
{@code - * // This snippet has been automatically generated for illustrative purposes only. - * // It may require modifications to work in your environment. + * // 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/java/docs/setup#configure_endpoints_for_the_client_library * try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) { * ListTasksRequest request = * ListTasksRequest.newBuilder() @@ -911,8 +998,11 @@ public final UnaryCallablelistTasksCallabl * Sample code: * *
{@code - * // This snippet has been automatically generated for illustrative purposes only. - * // It may require modifications to work in your environment. + * // 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/java/docs/setup#configure_endpoints_for_the_client_library * try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) { * ListLocationsRequest request = * ListLocationsRequest.newBuilder() @@ -941,8 +1031,11 @@ public final ListLocationsPagedResponse listLocations(ListLocationsRequest reque *Sample code: * *
{@code - * // This snippet has been automatically generated for illustrative purposes only. - * // It may require modifications to work in your environment. + * // 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/java/docs/setup#configure_endpoints_for_the_client_library * try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) { * ListLocationsRequest request = * ListLocationsRequest.newBuilder() @@ -972,8 +1065,11 @@ public final ListLocationsPagedResponse listLocations(ListLocationsRequest reque *Sample code: * *
{@code - * // This snippet has been automatically generated for illustrative purposes only. - * // It may require modifications to work in your environment. + * // 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/java/docs/setup#configure_endpoints_for_the_client_library * try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) { * ListLocationsRequest request = * ListLocationsRequest.newBuilder() @@ -1008,8 +1104,11 @@ public final UnaryCallablelistLoca * Sample code: * *
{@code - * // This snippet has been automatically generated for illustrative purposes only. - * // It may require modifications to work in your environment. + * // 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/java/docs/setup#configure_endpoints_for_the_client_library * try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) { * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); * Location response = batchServiceClient.getLocation(request); @@ -1030,8 +1129,11 @@ public final Location getLocation(GetLocationRequest request) { *Sample code: * *
{@code - * // This snippet has been automatically generated for illustrative purposes only. - * // It may require modifications to work in your environment. + * // 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/java/docs/setup#configure_endpoints_for_the_client_library * try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) { * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); * ApiFuturefuture = batchServiceClient.getLocationCallable().futureCall(request); @@ -1053,8 +1155,11 @@ public final UnaryCallable getLocationCallable() { * Sample code: * *
{@code - * // This snippet has been automatically generated for illustrative purposes only. - * // It may require modifications to work in your environment. + * // 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/java/docs/setup#configure_endpoints_for_the_client_library * try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) { * SetIamPolicyRequest request = * SetIamPolicyRequest.newBuilder() @@ -1082,8 +1187,11 @@ public final Policy setIamPolicy(SetIamPolicyRequest request) { *Sample code: * *
{@code - * // This snippet has been automatically generated for illustrative purposes only. - * // It may require modifications to work in your environment. + * // 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/java/docs/setup#configure_endpoints_for_the_client_library * try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) { * SetIamPolicyRequest request = * SetIamPolicyRequest.newBuilder() @@ -1109,8 +1217,11 @@ public final UnaryCallablesetIamPolicyCallable() { * Sample code: * *
{@code - * // This snippet has been automatically generated for illustrative purposes only. - * // It may require modifications to work in your environment. + * // 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/java/docs/setup#configure_endpoints_for_the_client_library * try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) { * GetIamPolicyRequest request = * GetIamPolicyRequest.newBuilder() @@ -1136,8 +1247,11 @@ public final Policy getIamPolicy(GetIamPolicyRequest request) { *Sample code: * *
{@code - * // This snippet has been automatically generated for illustrative purposes only. - * // It may require modifications to work in your environment. + * // 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/java/docs/setup#configure_endpoints_for_the_client_library * try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) { * GetIamPolicyRequest request = * GetIamPolicyRequest.newBuilder() @@ -1166,8 +1280,11 @@ public final UnaryCallablegetIamPolicyCallable() { * Sample code: * *
{@code - * // This snippet has been automatically generated for illustrative purposes only. - * // It may require modifications to work in your environment. + * // 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/java/docs/setup#configure_endpoints_for_the_client_library * try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) { * TestIamPermissionsRequest request = * TestIamPermissionsRequest.newBuilder() @@ -1197,8 +1314,11 @@ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsReq *Sample code: * *
{@code - * // This snippet has been automatically generated for illustrative purposes only. - * // It may require modifications to work in your environment. + * // 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/java/docs/setup#configure_endpoints_for_the_client_library * try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) { * TestIamPermissionsRequest request = * TestIamPermissionsRequest.newBuilder() diff --git a/google-cloud-batch/src/main/java/com/google/cloud/batch/v1/BatchServiceSettings.java b/owl-bot-staging/v1/google-cloud-batch/src/main/java/com/google/cloud/batch/v1/BatchServiceSettings.java similarity index 96% rename from google-cloud-batch/src/main/java/com/google/cloud/batch/v1/BatchServiceSettings.java rename to owl-bot-staging/v1/google-cloud-batch/src/main/java/com/google/cloud/batch/v1/BatchServiceSettings.java index 596d09a..41a53ea 100644 --- a/google-cloud-batch/src/main/java/com/google/cloud/batch/v1/BatchServiceSettings.java +++ b/owl-bot-staging/v1/google-cloud-batch/src/main/java/com/google/cloud/batch/v1/BatchServiceSettings.java @@ -31,6 +31,7 @@ import com.google.api.gax.rpc.ClientSettings; import com.google.api.gax.rpc.OperationCallSettings; import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.StubSettings; import com.google.api.gax.rpc.TransportChannelProvider; import com.google.api.gax.rpc.UnaryCallSettings; import com.google.cloud.batch.v1.stub.BatchServiceStubSettings; @@ -67,16 +68,16 @@ *For example, to set the total timeout of createJob to 30 seconds: * *
{@code - * // This snippet has been automatically generated for illustrative purposes only. - * // It may require modifications to work in your environment. + * // 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/java/docs/setup#configure_endpoints_for_the_client_library * BatchServiceSettings.Builder batchServiceSettingsBuilder = BatchServiceSettings.newBuilder(); * batchServiceSettingsBuilder * .createJobSettings() * .setRetrySettings( - * batchServiceSettingsBuilder - * .createJobSettings() - * .getRetrySettings() - * .toBuilder() + * batchServiceSettingsBuilder.createJobSettings().getRetrySettings().toBuilder() * .setTotalTimeout(Duration.ofSeconds(30)) * .build()); * BatchServiceSettings batchServiceSettings = batchServiceSettingsBuilder.build(); diff --git a/google-cloud-batch/src/main/java/com/google/cloud/batch/v1/gapic_metadata.json b/owl-bot-staging/v1/google-cloud-batch/src/main/java/com/google/cloud/batch/v1/gapic_metadata.json similarity index 100% rename from google-cloud-batch/src/main/java/com/google/cloud/batch/v1/gapic_metadata.json rename to owl-bot-staging/v1/google-cloud-batch/src/main/java/com/google/cloud/batch/v1/gapic_metadata.json diff --git a/google-cloud-batch/src/main/java/com/google/cloud/batch/v1/package-info.java b/owl-bot-staging/v1/google-cloud-batch/src/main/java/com/google/cloud/batch/v1/package-info.java similarity index 77% rename from google-cloud-batch/src/main/java/com/google/cloud/batch/v1/package-info.java rename to owl-bot-staging/v1/google-cloud-batch/src/main/java/com/google/cloud/batch/v1/package-info.java index e675510..4662f0d 100644 --- a/google-cloud-batch/src/main/java/com/google/cloud/batch/v1/package-info.java +++ b/owl-bot-staging/v1/google-cloud-batch/src/main/java/com/google/cloud/batch/v1/package-info.java @@ -27,8 +27,11 @@ *Sample for BatchServiceClient: * *
{@code - * // This snippet has been automatically generated for illustrative purposes only. - * // It may require modifications to work in your environment. + * // 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/java/docs/setup#configure_endpoints_for_the_client_library * try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) { * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); * Job job = Job.newBuilder().build(); diff --git a/google-cloud-batch/src/main/java/com/google/cloud/batch/v1/stub/BatchServiceStub.java b/owl-bot-staging/v1/google-cloud-batch/src/main/java/com/google/cloud/batch/v1/stub/BatchServiceStub.java similarity index 100% rename from google-cloud-batch/src/main/java/com/google/cloud/batch/v1/stub/BatchServiceStub.java rename to owl-bot-staging/v1/google-cloud-batch/src/main/java/com/google/cloud/batch/v1/stub/BatchServiceStub.java diff --git a/google-cloud-batch/src/main/java/com/google/cloud/batch/v1/stub/BatchServiceStubSettings.java b/owl-bot-staging/v1/google-cloud-batch/src/main/java/com/google/cloud/batch/v1/stub/BatchServiceStubSettings.java similarity index 98% rename from google-cloud-batch/src/main/java/com/google/cloud/batch/v1/stub/BatchServiceStubSettings.java rename to owl-bot-staging/v1/google-cloud-batch/src/main/java/com/google/cloud/batch/v1/stub/BatchServiceStubSettings.java index d05a7a3..cf7136c 100644 --- a/google-cloud-batch/src/main/java/com/google/cloud/batch/v1/stub/BatchServiceStubSettings.java +++ b/owl-bot-staging/v1/google-cloud-batch/src/main/java/com/google/cloud/batch/v1/stub/BatchServiceStubSettings.java @@ -98,17 +98,17 @@ *For example, to set the total timeout of createJob to 30 seconds: * *
{@code - * // This snippet has been automatically generated for illustrative purposes only. - * // It may require modifications to work in your environment. + * // 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/java/docs/setup#configure_endpoints_for_the_client_library * BatchServiceStubSettings.Builder batchServiceSettingsBuilder = * BatchServiceStubSettings.newBuilder(); * batchServiceSettingsBuilder * .createJobSettings() * .setRetrySettings( - * batchServiceSettingsBuilder - * .createJobSettings() - * .getRetrySettings() - * .toBuilder() + * batchServiceSettingsBuilder.createJobSettings().getRetrySettings().toBuilder() * .setTotalTimeout(Duration.ofSeconds(30)) * .build()); * BatchServiceStubSettings batchServiceSettings = batchServiceSettingsBuilder.build(); diff --git a/google-cloud-batch/src/main/java/com/google/cloud/batch/v1/stub/GrpcBatchServiceCallableFactory.java b/owl-bot-staging/v1/google-cloud-batch/src/main/java/com/google/cloud/batch/v1/stub/GrpcBatchServiceCallableFactory.java similarity index 100% rename from google-cloud-batch/src/main/java/com/google/cloud/batch/v1/stub/GrpcBatchServiceCallableFactory.java rename to owl-bot-staging/v1/google-cloud-batch/src/main/java/com/google/cloud/batch/v1/stub/GrpcBatchServiceCallableFactory.java diff --git a/google-cloud-batch/src/main/java/com/google/cloud/batch/v1/stub/GrpcBatchServiceStub.java b/owl-bot-staging/v1/google-cloud-batch/src/main/java/com/google/cloud/batch/v1/stub/GrpcBatchServiceStub.java similarity index 99% rename from google-cloud-batch/src/main/java/com/google/cloud/batch/v1/stub/GrpcBatchServiceStub.java rename to owl-bot-staging/v1/google-cloud-batch/src/main/java/com/google/cloud/batch/v1/stub/GrpcBatchServiceStub.java index e463b04..2cfefa8 100644 --- a/google-cloud-batch/src/main/java/com/google/cloud/batch/v1/stub/GrpcBatchServiceStub.java +++ b/owl-bot-staging/v1/google-cloud-batch/src/main/java/com/google/cloud/batch/v1/stub/GrpcBatchServiceStub.java @@ -54,6 +54,7 @@ import io.grpc.MethodDescriptor; import io.grpc.protobuf.ProtoUtils; import java.io.IOException; +import java.util.Map; import java.util.concurrent.TimeUnit; import javax.annotation.Generated; diff --git a/google-cloud-batch/src/main/java/com/google/cloud/batch/v1/stub/HttpJsonBatchServiceCallableFactory.java b/owl-bot-staging/v1/google-cloud-batch/src/main/java/com/google/cloud/batch/v1/stub/HttpJsonBatchServiceCallableFactory.java similarity index 100% rename from google-cloud-batch/src/main/java/com/google/cloud/batch/v1/stub/HttpJsonBatchServiceCallableFactory.java rename to owl-bot-staging/v1/google-cloud-batch/src/main/java/com/google/cloud/batch/v1/stub/HttpJsonBatchServiceCallableFactory.java diff --git a/google-cloud-batch/src/main/java/com/google/cloud/batch/v1/stub/HttpJsonBatchServiceStub.java b/owl-bot-staging/v1/google-cloud-batch/src/main/java/com/google/cloud/batch/v1/stub/HttpJsonBatchServiceStub.java similarity index 99% rename from google-cloud-batch/src/main/java/com/google/cloud/batch/v1/stub/HttpJsonBatchServiceStub.java rename to owl-bot-staging/v1/google-cloud-batch/src/main/java/com/google/cloud/batch/v1/stub/HttpJsonBatchServiceStub.java index 76e9229..49734cf 100644 --- a/google-cloud-batch/src/main/java/com/google/cloud/batch/v1/stub/HttpJsonBatchServiceStub.java +++ b/owl-bot-staging/v1/google-cloud-batch/src/main/java/com/google/cloud/batch/v1/stub/HttpJsonBatchServiceStub.java @@ -32,6 +32,7 @@ import com.google.api.gax.httpjson.ProtoMessageResponseParser; import com.google.api.gax.httpjson.ProtoRestSerializer; import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; +import com.google.api.gax.longrunning.OperationSnapshot; import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.OperationCallable; import com.google.api.gax.rpc.UnaryCallable; @@ -107,7 +108,8 @@ public class HttpJsonBatchServiceStub extends BatchServiceStub { return fields; }) .setRequestBodyExtractor( - request -> ProtoRestSerializer.create().toBody("job", request.getJob())) + request -> + ProtoRestSerializer.create().toBody("job", request.getJob(), false)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() @@ -385,7 +387,7 @@ public class HttpJsonBatchServiceStub extends BatchServiceStub { .setRequestBodyExtractor( request -> ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearResource().build())) + .toBody("*", request.toBuilder().clearResource().build(), false)) .build()) .setResponseParser( ProtoMessageResponseParser. newBuilder() @@ -460,7 +462,7 @@ public class HttpJsonBatchServiceStub extends BatchServiceStub { .setRequestBodyExtractor( request -> ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearResource().build())) + .toBody("*", request.toBuilder().clearResource().build(), false)) .build()) .setResponseParser( ProtoMessageResponseParser. newBuilder() diff --git a/google-cloud-batch/src/test/java/com/google/cloud/batch/v1/BatchServiceClientHttpJsonTest.java b/owl-bot-staging/v1/google-cloud-batch/src/test/java/com/google/cloud/batch/v1/BatchServiceClientHttpJsonTest.java similarity index 100% rename from google-cloud-batch/src/test/java/com/google/cloud/batch/v1/BatchServiceClientHttpJsonTest.java rename to owl-bot-staging/v1/google-cloud-batch/src/test/java/com/google/cloud/batch/v1/BatchServiceClientHttpJsonTest.java diff --git a/google-cloud-batch/src/test/java/com/google/cloud/batch/v1/BatchServiceClientTest.java b/owl-bot-staging/v1/google-cloud-batch/src/test/java/com/google/cloud/batch/v1/BatchServiceClientTest.java similarity index 100% rename from google-cloud-batch/src/test/java/com/google/cloud/batch/v1/BatchServiceClientTest.java rename to owl-bot-staging/v1/google-cloud-batch/src/test/java/com/google/cloud/batch/v1/BatchServiceClientTest.java diff --git a/google-cloud-batch/src/test/java/com/google/cloud/batch/v1/MockBatchService.java b/owl-bot-staging/v1/google-cloud-batch/src/test/java/com/google/cloud/batch/v1/MockBatchService.java similarity index 100% rename from google-cloud-batch/src/test/java/com/google/cloud/batch/v1/MockBatchService.java rename to owl-bot-staging/v1/google-cloud-batch/src/test/java/com/google/cloud/batch/v1/MockBatchService.java diff --git a/google-cloud-batch/src/test/java/com/google/cloud/batch/v1/MockBatchServiceImpl.java b/owl-bot-staging/v1/google-cloud-batch/src/test/java/com/google/cloud/batch/v1/MockBatchServiceImpl.java similarity index 100% rename from google-cloud-batch/src/test/java/com/google/cloud/batch/v1/MockBatchServiceImpl.java rename to owl-bot-staging/v1/google-cloud-batch/src/test/java/com/google/cloud/batch/v1/MockBatchServiceImpl.java diff --git a/google-cloud-batch/src/test/java/com/google/cloud/batch/v1/MockIAMPolicy.java b/owl-bot-staging/v1/google-cloud-batch/src/test/java/com/google/cloud/batch/v1/MockIAMPolicy.java similarity index 100% rename from google-cloud-batch/src/test/java/com/google/cloud/batch/v1/MockIAMPolicy.java rename to owl-bot-staging/v1/google-cloud-batch/src/test/java/com/google/cloud/batch/v1/MockIAMPolicy.java diff --git a/google-cloud-batch/src/test/java/com/google/cloud/batch/v1/MockIAMPolicyImpl.java b/owl-bot-staging/v1/google-cloud-batch/src/test/java/com/google/cloud/batch/v1/MockIAMPolicyImpl.java similarity index 100% rename from google-cloud-batch/src/test/java/com/google/cloud/batch/v1/MockIAMPolicyImpl.java rename to owl-bot-staging/v1/google-cloud-batch/src/test/java/com/google/cloud/batch/v1/MockIAMPolicyImpl.java diff --git a/google-cloud-batch/src/test/java/com/google/cloud/batch/v1/MockLocations.java b/owl-bot-staging/v1/google-cloud-batch/src/test/java/com/google/cloud/batch/v1/MockLocations.java similarity index 100% rename from google-cloud-batch/src/test/java/com/google/cloud/batch/v1/MockLocations.java rename to owl-bot-staging/v1/google-cloud-batch/src/test/java/com/google/cloud/batch/v1/MockLocations.java diff --git a/google-cloud-batch/src/test/java/com/google/cloud/batch/v1/MockLocationsImpl.java b/owl-bot-staging/v1/google-cloud-batch/src/test/java/com/google/cloud/batch/v1/MockLocationsImpl.java similarity index 100% rename from google-cloud-batch/src/test/java/com/google/cloud/batch/v1/MockLocationsImpl.java rename to owl-bot-staging/v1/google-cloud-batch/src/test/java/com/google/cloud/batch/v1/MockLocationsImpl.java diff --git a/owl-bot-staging/v1/grpc-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/BatchServiceGrpc.java b/owl-bot-staging/v1/grpc-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/BatchServiceGrpc.java new file mode 100644 index 0000000..de09a28 --- /dev/null +++ b/owl-bot-staging/v1/grpc-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/BatchServiceGrpc.java @@ -0,0 +1,743 @@ +package com.google.cloud.batch.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * Google Batch Service. + * The service manages user submitted batch jobs and allocates Google Compute + * Engine VM instances to run the jobs. + *+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/batch/v1/batch.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class BatchServiceGrpc { + + private BatchServiceGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.batch.v1.BatchService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptorgetCreateJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateJob", + requestType = com.google.cloud.batch.v1.CreateJobRequest.class, + responseType = com.google.cloud.batch.v1.Job.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getCreateJobMethod() { + io.grpc.MethodDescriptor getCreateJobMethod; + if ((getCreateJobMethod = BatchServiceGrpc.getCreateJobMethod) == null) { + synchronized (BatchServiceGrpc.class) { + if ((getCreateJobMethod = BatchServiceGrpc.getCreateJobMethod) == null) { + BatchServiceGrpc.getCreateJobMethod = getCreateJobMethod = + io.grpc.MethodDescriptor. newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.batch.v1.CreateJobRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.batch.v1.Job.getDefaultInstance())) + .setSchemaDescriptor(new BatchServiceMethodDescriptorSupplier("CreateJob")) + .build(); + } + } + } + return getCreateJobMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetJob", + requestType = com.google.cloud.batch.v1.GetJobRequest.class, + responseType = com.google.cloud.batch.v1.Job.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetJobMethod() { + io.grpc.MethodDescriptor getGetJobMethod; + if ((getGetJobMethod = BatchServiceGrpc.getGetJobMethod) == null) { + synchronized (BatchServiceGrpc.class) { + if ((getGetJobMethod = BatchServiceGrpc.getGetJobMethod) == null) { + BatchServiceGrpc.getGetJobMethod = getGetJobMethod = + io.grpc.MethodDescriptor. newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.batch.v1.GetJobRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.batch.v1.Job.getDefaultInstance())) + .setSchemaDescriptor(new BatchServiceMethodDescriptorSupplier("GetJob")) + .build(); + } + } + } + return getGetJobMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeleteJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteJob", + requestType = com.google.cloud.batch.v1.DeleteJobRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteJobMethod() { + io.grpc.MethodDescriptor getDeleteJobMethod; + if ((getDeleteJobMethod = BatchServiceGrpc.getDeleteJobMethod) == null) { + synchronized (BatchServiceGrpc.class) { + if ((getDeleteJobMethod = BatchServiceGrpc.getDeleteJobMethod) == null) { + BatchServiceGrpc.getDeleteJobMethod = getDeleteJobMethod = + io.grpc.MethodDescriptor. newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.batch.v1.DeleteJobRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new BatchServiceMethodDescriptorSupplier("DeleteJob")) + .build(); + } + } + } + return getDeleteJobMethod; + } + + private static volatile io.grpc.MethodDescriptor getListJobsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListJobs", + requestType = com.google.cloud.batch.v1.ListJobsRequest.class, + responseType = com.google.cloud.batch.v1.ListJobsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListJobsMethod() { + io.grpc.MethodDescriptor getListJobsMethod; + if ((getListJobsMethod = BatchServiceGrpc.getListJobsMethod) == null) { + synchronized (BatchServiceGrpc.class) { + if ((getListJobsMethod = BatchServiceGrpc.getListJobsMethod) == null) { + BatchServiceGrpc.getListJobsMethod = getListJobsMethod = + io.grpc.MethodDescriptor. newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListJobs")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.batch.v1.ListJobsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.batch.v1.ListJobsResponse.getDefaultInstance())) + .setSchemaDescriptor(new BatchServiceMethodDescriptorSupplier("ListJobs")) + .build(); + } + } + } + return getListJobsMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetTaskMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetTask", + requestType = com.google.cloud.batch.v1.GetTaskRequest.class, + responseType = com.google.cloud.batch.v1.Task.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetTaskMethod() { + io.grpc.MethodDescriptor getGetTaskMethod; + if ((getGetTaskMethod = BatchServiceGrpc.getGetTaskMethod) == null) { + synchronized (BatchServiceGrpc.class) { + if ((getGetTaskMethod = BatchServiceGrpc.getGetTaskMethod) == null) { + BatchServiceGrpc.getGetTaskMethod = getGetTaskMethod = + io.grpc.MethodDescriptor. newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetTask")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.batch.v1.GetTaskRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.batch.v1.Task.getDefaultInstance())) + .setSchemaDescriptor(new BatchServiceMethodDescriptorSupplier("GetTask")) + .build(); + } + } + } + return getGetTaskMethod; + } + + private static volatile io.grpc.MethodDescriptor getListTasksMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListTasks", + requestType = com.google.cloud.batch.v1.ListTasksRequest.class, + responseType = com.google.cloud.batch.v1.ListTasksResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListTasksMethod() { + io.grpc.MethodDescriptor getListTasksMethod; + if ((getListTasksMethod = BatchServiceGrpc.getListTasksMethod) == null) { + synchronized (BatchServiceGrpc.class) { + if ((getListTasksMethod = BatchServiceGrpc.getListTasksMethod) == null) { + BatchServiceGrpc.getListTasksMethod = getListTasksMethod = + io.grpc.MethodDescriptor. newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListTasks")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.batch.v1.ListTasksRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.batch.v1.ListTasksResponse.getDefaultInstance())) + .setSchemaDescriptor(new BatchServiceMethodDescriptorSupplier("ListTasks")) + .build(); + } + } + } + return getListTasksMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static BatchServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory () { + @java.lang.Override + public BatchServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new BatchServiceStub(channel, callOptions); + } + }; + return BatchServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static BatchServiceBlockingStub newBlockingStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory () { + @java.lang.Override + public BatchServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new BatchServiceBlockingStub(channel, callOptions); + } + }; + return BatchServiceBlockingStub.newStub(factory, channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static BatchServiceFutureStub newFutureStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory () { + @java.lang.Override + public BatchServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new BatchServiceFutureStub(channel, callOptions); + } + }; + return BatchServiceFutureStub.newStub(factory, channel); + } + + /** + * + * Google Batch Service. + * The service manages user submitted batch jobs and allocates Google Compute + * Engine VM instances to run the jobs. + *+ */ + public static abstract class BatchServiceImplBase implements io.grpc.BindableService { + + /** + *+ * Create a Job. + *+ */ + public void createJob(com.google.cloud.batch.v1.CreateJobRequest request, + io.grpc.stub.StreamObserverresponseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateJobMethod(), responseObserver); + } + + /** + * + * Get a Job specified by its resource name. + *+ */ + public void getJob(com.google.cloud.batch.v1.GetJobRequest request, + io.grpc.stub.StreamObserverresponseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetJobMethod(), responseObserver); + } + + /** + * + * Delete a Job. + *+ */ + public void deleteJob(com.google.cloud.batch.v1.DeleteJobRequest request, + io.grpc.stub.StreamObserverresponseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteJobMethod(), responseObserver); + } + + /** + * + * List all Jobs for a project within a region. + *+ */ + public void listJobs(com.google.cloud.batch.v1.ListJobsRequest request, + io.grpc.stub.StreamObserverresponseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListJobsMethod(), responseObserver); + } + + /** + * + * Return a single Task. + *+ */ + public void getTask(com.google.cloud.batch.v1.GetTaskRequest request, + io.grpc.stub.StreamObserverresponseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetTaskMethod(), responseObserver); + } + + /** + * + * List Tasks associated with a job. + *+ */ + public void listTasks(com.google.cloud.batch.v1.ListTasksRequest request, + io.grpc.stub.StreamObserverresponseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListTasksMethod(), responseObserver); + } + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getCreateJobMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.batch.v1.CreateJobRequest, + com.google.cloud.batch.v1.Job>( + this, METHODID_CREATE_JOB))) + .addMethod( + getGetJobMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.batch.v1.GetJobRequest, + com.google.cloud.batch.v1.Job>( + this, METHODID_GET_JOB))) + .addMethod( + getDeleteJobMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.batch.v1.DeleteJobRequest, + com.google.longrunning.Operation>( + this, METHODID_DELETE_JOB))) + .addMethod( + getListJobsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.batch.v1.ListJobsRequest, + com.google.cloud.batch.v1.ListJobsResponse>( + this, METHODID_LIST_JOBS))) + .addMethod( + getGetTaskMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.batch.v1.GetTaskRequest, + com.google.cloud.batch.v1.Task>( + this, METHODID_GET_TASK))) + .addMethod( + getListTasksMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.batch.v1.ListTasksRequest, + com.google.cloud.batch.v1.ListTasksResponse>( + this, METHODID_LIST_TASKS))) + .build(); + } + } + + /** + * + * Google Batch Service. + * The service manages user submitted batch jobs and allocates Google Compute + * Engine VM instances to run the jobs. + *+ */ + public static final class BatchServiceStub extends io.grpc.stub.AbstractAsyncStub{ + private BatchServiceStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected BatchServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new BatchServiceStub(channel, callOptions); + } + + /** + * + * Create a Job. + *+ */ + public void createJob(com.google.cloud.batch.v1.CreateJobRequest request, + io.grpc.stub.StreamObserverresponseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateJobMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * Get a Job specified by its resource name. + *+ */ + public void getJob(com.google.cloud.batch.v1.GetJobRequest request, + io.grpc.stub.StreamObserverresponseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetJobMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * Delete a Job. + *+ */ + public void deleteJob(com.google.cloud.batch.v1.DeleteJobRequest request, + io.grpc.stub.StreamObserverresponseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteJobMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * List all Jobs for a project within a region. + *+ */ + public void listJobs(com.google.cloud.batch.v1.ListJobsRequest request, + io.grpc.stub.StreamObserverresponseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListJobsMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * Return a single Task. + *+ */ + public void getTask(com.google.cloud.batch.v1.GetTaskRequest request, + io.grpc.stub.StreamObserverresponseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetTaskMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * List Tasks associated with a job. + *+ */ + public void listTasks(com.google.cloud.batch.v1.ListTasksRequest request, + io.grpc.stub.StreamObserverresponseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListTasksMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + * + * Google Batch Service. + * The service manages user submitted batch jobs and allocates Google Compute + * Engine VM instances to run the jobs. + *+ */ + public static final class BatchServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub{ + private BatchServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected BatchServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new BatchServiceBlockingStub(channel, callOptions); + } + + /** + * + * Create a Job. + *+ */ + public com.google.cloud.batch.v1.Job createJob(com.google.cloud.batch.v1.CreateJobRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateJobMethod(), getCallOptions(), request); + } + + /** + *+ * Get a Job specified by its resource name. + *+ */ + public com.google.cloud.batch.v1.Job getJob(com.google.cloud.batch.v1.GetJobRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetJobMethod(), getCallOptions(), request); + } + + /** + *+ * Delete a Job. + *+ */ + public com.google.longrunning.Operation deleteJob(com.google.cloud.batch.v1.DeleteJobRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteJobMethod(), getCallOptions(), request); + } + + /** + *+ * List all Jobs for a project within a region. + *+ */ + public com.google.cloud.batch.v1.ListJobsResponse listJobs(com.google.cloud.batch.v1.ListJobsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListJobsMethod(), getCallOptions(), request); + } + + /** + *+ * Return a single Task. + *+ */ + public com.google.cloud.batch.v1.Task getTask(com.google.cloud.batch.v1.GetTaskRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetTaskMethod(), getCallOptions(), request); + } + + /** + *+ * List Tasks associated with a job. + *+ */ + public com.google.cloud.batch.v1.ListTasksResponse listTasks(com.google.cloud.batch.v1.ListTasksRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListTasksMethod(), getCallOptions(), request); + } + } + + /** + *+ * Google Batch Service. + * The service manages user submitted batch jobs and allocates Google Compute + * Engine VM instances to run the jobs. + *+ */ + public static final class BatchServiceFutureStub extends io.grpc.stub.AbstractFutureStub{ + private BatchServiceFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected BatchServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new BatchServiceFutureStub(channel, callOptions); + } + + /** + * + * Create a Job. + *+ */ + public com.google.common.util.concurrent.ListenableFuturecreateJob( + com.google.cloud.batch.v1.CreateJobRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateJobMethod(), getCallOptions()), request); + } + + /** + * + * Get a Job specified by its resource name. + *+ */ + public com.google.common.util.concurrent.ListenableFuturegetJob( + com.google.cloud.batch.v1.GetJobRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetJobMethod(), getCallOptions()), request); + } + + /** + * + * Delete a Job. + *+ */ + public com.google.common.util.concurrent.ListenableFuturedeleteJob( + com.google.cloud.batch.v1.DeleteJobRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteJobMethod(), getCallOptions()), request); + } + + /** + * + * List all Jobs for a project within a region. + *+ */ + public com.google.common.util.concurrent.ListenableFuturelistJobs( + com.google.cloud.batch.v1.ListJobsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListJobsMethod(), getCallOptions()), request); + } + + /** + * + * Return a single Task. + *+ */ + public com.google.common.util.concurrent.ListenableFuturegetTask( + com.google.cloud.batch.v1.GetTaskRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetTaskMethod(), getCallOptions()), request); + } + + /** + * + * List Tasks associated with a job. + *+ */ + public com.google.common.util.concurrent.ListenableFuturelistTasks( + com.google.cloud.batch.v1.ListTasksRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListTasksMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_CREATE_JOB = 0; + private static final int METHODID_GET_JOB = 1; + private static final int METHODID_DELETE_JOB = 2; + private static final int METHODID_LIST_JOBS = 3; + private static final int METHODID_GET_TASK = 4; + private static final int METHODID_LIST_TASKS = 5; + + private static final class MethodHandlers implements + io.grpc.stub.ServerCalls.UnaryMethod , + io.grpc.stub.ServerCalls.ServerStreamingMethod , + io.grpc.stub.ServerCalls.ClientStreamingMethod , + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final BatchServiceImplBase serviceImpl; + private final int methodId; + + MethodHandlers(BatchServiceImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_CREATE_JOB: + serviceImpl.createJob((com.google.cloud.batch.v1.CreateJobRequest) request, + (io.grpc.stub.StreamObserver ) responseObserver); + break; + case METHODID_GET_JOB: + serviceImpl.getJob((com.google.cloud.batch.v1.GetJobRequest) request, + (io.grpc.stub.StreamObserver ) responseObserver); + break; + case METHODID_DELETE_JOB: + serviceImpl.deleteJob((com.google.cloud.batch.v1.DeleteJobRequest) request, + (io.grpc.stub.StreamObserver ) responseObserver); + break; + case METHODID_LIST_JOBS: + serviceImpl.listJobs((com.google.cloud.batch.v1.ListJobsRequest) request, + (io.grpc.stub.StreamObserver ) responseObserver); + break; + case METHODID_GET_TASK: + serviceImpl.getTask((com.google.cloud.batch.v1.GetTaskRequest) request, + (io.grpc.stub.StreamObserver ) responseObserver); + break; + case METHODID_LIST_TASKS: + serviceImpl.listTasks((com.google.cloud.batch.v1.ListTasksRequest) request, + (io.grpc.stub.StreamObserver ) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private static abstract class BatchServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + BatchServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.batch.v1.BatchProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("BatchService"); + } + } + + private static final class BatchServiceFileDescriptorSupplier + extends BatchServiceBaseDescriptorSupplier { + BatchServiceFileDescriptorSupplier() {} + } + + private static final class BatchServiceMethodDescriptorSupplier + extends BatchServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + BatchServiceMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (BatchServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new BatchServiceFileDescriptorSupplier()) + .addMethod(getCreateJobMethod()) + .addMethod(getGetJobMethod()) + .addMethod(getDeleteJobMethod()) + .addMethod(getListJobsMethod()) + .addMethod(getGetTaskMethod()) + .addMethod(getListTasksMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/AllocationPolicy.java b/owl-bot-staging/v1/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/AllocationPolicy.java similarity index 73% rename from proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/AllocationPolicy.java rename to owl-bot-staging/v1/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/AllocationPolicy.java index 6192276..2b362df 100644 --- a/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/AllocationPolicy.java +++ b/owl-bot-staging/v1/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/AllocationPolicy.java @@ -1,26 +1,9 @@ -/* - * Copyright 2020 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 by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/batch/v1/job.proto package com.google.cloud.batch.v1; /** - * - * * * A Job's resource allocation policy describes when, where, and how compute * resources should be allocated for the Job. @@ -28,31 +11,31 @@ * * Protobuf type {@code google.cloud.batch.v1.AllocationPolicy} */ -public final class AllocationPolicy extends com.google.protobuf.GeneratedMessageV3 - implements +public final class AllocationPolicy extends + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.batch.v1.AllocationPolicy) AllocationPolicyOrBuilder { - private static final long serialVersionUID = 0L; +private static final long serialVersionUID = 0L; // Use AllocationPolicy.newBuilder() to construct. private AllocationPolicy(com.google.protobuf.GeneratedMessageV3.Builder> builder) { super(builder); } - private AllocationPolicy() { instances_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { return new AllocationPolicy(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { return this.unknownFields; } - private AllocationPolicy( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -72,74 +55,61 @@ private AllocationPolicy( case 0: done = true; break; - case 10: - { - com.google.cloud.batch.v1.AllocationPolicy.LocationPolicy.Builder subBuilder = null; - if (location_ != null) { - subBuilder = location_.toBuilder(); - } - location_ = - input.readMessage( - com.google.cloud.batch.v1.AllocationPolicy.LocationPolicy.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(location_); - location_ = subBuilder.buildPartial(); - } - - break; + case 10: { + com.google.cloud.batch.v1.AllocationPolicy.LocationPolicy.Builder subBuilder = null; + if (location_ != null) { + subBuilder = location_.toBuilder(); } - case 50: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - labels_ = - com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntrylabels__ = - input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); - break; + location_ = input.readMessage(com.google.cloud.batch.v1.AllocationPolicy.LocationPolicy.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(location_); + location_ = subBuilder.buildPartial(); } - case 58: - { - com.google.cloud.batch.v1.AllocationPolicy.NetworkPolicy.Builder subBuilder = null; - if (network_ != null) { - subBuilder = network_.toBuilder(); - } - network_ = - input.readMessage( - com.google.cloud.batch.v1.AllocationPolicy.NetworkPolicy.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(network_); - network_ = subBuilder.buildPartial(); - } - break; + break; + } + case 50: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + labels_ = com.google.protobuf.MapField.newMapField( + LabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000002; } - case 66: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - instances_ = - new java.util.ArrayList< - com.google.cloud.batch.v1.AllocationPolicy.InstancePolicyOrTemplate>(); - mutable_bitField0_ |= 0x00000001; - } - instances_.add( - input.readMessage( - com.google.cloud.batch.v1.AllocationPolicy.InstancePolicyOrTemplate.parser(), - extensionRegistry)); - break; + com.google.protobuf.MapEntry + labels__ = input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + labels_.getMutableMap().put( + labels__.getKey(), labels__.getValue()); + break; + } + case 58: { + com.google.cloud.batch.v1.AllocationPolicy.NetworkPolicy.Builder subBuilder = null; + if (network_ != null) { + subBuilder = network_.toBuilder(); } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; + network_ = input.readMessage(com.google.cloud.batch.v1.AllocationPolicy.NetworkPolicy.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(network_); + network_ = subBuilder.buildPartial(); + } + + break; + } + case 66: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + instances_ = new java.util.ArrayList (); + mutable_bitField0_ |= 0x00000001; + } + instances_.add( + input.readMessage(com.google.cloud.batch.v1.AllocationPolicy.InstancePolicyOrTemplate.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; } + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -147,7 +117,8 @@ private AllocationPolicy( } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000001) != 0)) { instances_ = java.util.Collections.unmodifiableList(instances_); @@ -156,46 +127,41 @@ private AllocationPolicy( makeExtensionsImmutable(); } } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.batch.v1.JobProto - .internal_static_google_cloud_batch_v1_AllocationPolicy_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.batch.v1.JobProto.internal_static_google_cloud_batch_v1_AllocationPolicy_descriptor; } @SuppressWarnings({"rawtypes"}) @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { + protected com.google.protobuf.MapField internalGetMapField( + int number) { switch (number) { case 6: return internalGetLabels(); default: - throw new RuntimeException("Invalid map field number: " + number); + throw new RuntimeException( + "Invalid map field number: " + number); } } - @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.batch.v1.JobProto - .internal_static_google_cloud_batch_v1_AllocationPolicy_fieldAccessorTable + return com.google.cloud.batch.v1.JobProto.internal_static_google_cloud_batch_v1_AllocationPolicy_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.batch.v1.AllocationPolicy.class, - com.google.cloud.batch.v1.AllocationPolicy.Builder.class); + com.google.cloud.batch.v1.AllocationPolicy.class, com.google.cloud.batch.v1.AllocationPolicy.Builder.class); } /** - * - * * * Compute Engine VM instance provisioning model. ** * Protobuf enum {@code google.cloud.batch.v1.AllocationPolicy.ProvisioningModel} */ - public enum ProvisioningModel implements com.google.protobuf.ProtocolMessageEnum { + public enum ProvisioningModel + implements com.google.protobuf.ProtocolMessageEnum { /** - * - * ** Unspecified. *@@ -204,8 +170,6 @@ public enum ProvisioningModel implements com.google.protobuf.ProtocolMessageEnum */ PROVISIONING_MODEL_UNSPECIFIED(0), /** - * - * ** Standard VM. *@@ -214,8 +178,6 @@ public enum ProvisioningModel implements com.google.protobuf.ProtocolMessageEnum */ STANDARD(1), /** - * - * ** SPOT VM. *@@ -224,8 +186,6 @@ public enum ProvisioningModel implements com.google.protobuf.ProtocolMessageEnum */ SPOT(2), /** - * - * ** Preemptible VM (PVM). * Above SPOT VM is the preferable model for preemptible VM instances: the @@ -241,8 +201,6 @@ public enum ProvisioningModel implements com.google.protobuf.ProtocolMessageEnum ; /** - * - * ** Unspecified. *@@ -251,8 +209,6 @@ public enum ProvisioningModel implements com.google.protobuf.ProtocolMessageEnum */ public static final int PROVISIONING_MODEL_UNSPECIFIED_VALUE = 0; /** - * - * ** Standard VM. *@@ -261,8 +217,6 @@ public enum ProvisioningModel implements com.google.protobuf.ProtocolMessageEnum */ public static final int STANDARD_VALUE = 1; /** - * - * ** SPOT VM. *@@ -271,8 +225,6 @@ public enum ProvisioningModel implements com.google.protobuf.ProtocolMessageEnum */ public static final int SPOT_VALUE = 2; /** - * - * ** Preemptible VM (PVM). * Above SPOT VM is the preferable model for preemptible VM instances: the @@ -285,6 +237,7 @@ public enum ProvisioningModel implements com.google.protobuf.ProtocolMessageEnum */ public static final int PREEMPTIBLE_VALUE = 3; + public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( @@ -309,16 +262,11 @@ public static ProvisioningModel valueOf(int value) { */ public static ProvisioningModel forNumber(int value) { switch (value) { - case 0: - return PROVISIONING_MODEL_UNSPECIFIED; - case 1: - return STANDARD; - case 2: - return SPOT; - case 3: - return PREEMPTIBLE; - default: - return null; + case 0: return PROVISIONING_MODEL_UNSPECIFIED; + case 1: return STANDARD; + case 2: return SPOT; + case 3: return PREEMPTIBLE; + default: return null; } } @@ -326,28 +274,28 @@ public static ProvisioningModel forNumber(int value) { internalGetValueMap() { return internalValueMap; } + private static final com.google.protobuf.Internal.EnumLiteMap< + ProvisioningModel> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ProvisioningModel findValueByNumber(int number) { + return ProvisioningModel.forNumber(number); + } + }; - private static final com.google.protobuf.Internal.EnumLiteMap - internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap () { - public ProvisioningModel findValueByNumber(int number) { - return ProvisioningModel.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalStateException( "Can't get the descriptor of an unrecognized enum value."); } return getDescriptor().getValues().get(ordinal()); } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { return getDescriptor(); } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { return com.google.cloud.batch.v1.AllocationPolicy.getDescriptor().getEnumTypes().get(0); } @@ -356,7 +304,8 @@ public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor public static ProvisioningModel valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); } if (desc.getIndex() == -1) { return UNRECOGNIZED; @@ -373,14 +322,11 @@ private ProvisioningModel(int value) { // @@protoc_insertion_point(enum_scope:google.cloud.batch.v1.AllocationPolicy.ProvisioningModel) } - public interface LocationPolicyOrBuilder - extends + public interface LocationPolicyOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.batch.v1.AllocationPolicy.LocationPolicy) com.google.protobuf.MessageOrBuilder { /** - * - * * * A list of allowed location names represented by internal URLs. * Each location can be a region or a zone. @@ -397,13 +343,11 @@ public interface LocationPolicyOrBuilder ** *repeated string allowed_locations = 1;
- * * @return A list containing the allowedLocations. */ - java.util.ListgetAllowedLocationsList(); + java.util.List + getAllowedLocationsList(); /** - * - * * * A list of allowed location names represented by internal URLs. * Each location can be a region or a zone. @@ -420,13 +364,10 @@ public interface LocationPolicyOrBuilder ** *repeated string allowed_locations = 1;
- * * @return The count of allowedLocations. */ int getAllowedLocationsCount(); /** - * - * ** A list of allowed location names represented by internal URLs. * Each location can be a region or a zone. @@ -443,14 +384,11 @@ public interface LocationPolicyOrBuilder ** *repeated string allowed_locations = 1;
- * * @param index The index of the element to return. * @return The allowedLocations at the given index. */ java.lang.String getAllowedLocations(int index); /** - * - * ** A list of allowed location names represented by internal URLs. * Each location can be a region or a zone. @@ -467,38 +405,40 @@ public interface LocationPolicyOrBuilder ** *repeated string allowed_locations = 1;
- * * @param index The index of the value to return. * @return The bytes of the allowedLocations at the given index. */ - com.google.protobuf.ByteString getAllowedLocationsBytes(int index); + com.google.protobuf.ByteString + getAllowedLocationsBytes(int index); } - /** Protobuf type {@code google.cloud.batch.v1.AllocationPolicy.LocationPolicy} */ - public static final class LocationPolicy extends com.google.protobuf.GeneratedMessageV3 - implements + /** + * Protobuf type {@code google.cloud.batch.v1.AllocationPolicy.LocationPolicy} + */ + public static final class LocationPolicy extends + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.batch.v1.AllocationPolicy.LocationPolicy) LocationPolicyOrBuilder { - private static final long serialVersionUID = 0L; + private static final long serialVersionUID = 0L; // Use LocationPolicy.newBuilder() to construct. private LocationPolicy(com.google.protobuf.GeneratedMessageV3.Builder> builder) { super(builder); } - private LocationPolicy() { allowedLocations_ = com.google.protobuf.LazyStringArrayList.EMPTY; } @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { return new LocationPolicy(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { return this.unknownFields; } - private LocationPolicy( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -518,23 +458,22 @@ private LocationPolicy( case 0: done = true; break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - allowedLocations_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - allowedLocations_.add(s); - break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + allowedLocations_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; + allowedLocations_.add(s); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; } + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -542,7 +481,8 @@ private LocationPolicy( } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000001) != 0)) { allowedLocations_ = allowedLocations_.getUnmodifiableView(); @@ -551,27 +491,22 @@ private LocationPolicy( makeExtensionsImmutable(); } } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.batch.v1.JobProto - .internal_static_google_cloud_batch_v1_AllocationPolicy_LocationPolicy_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.batch.v1.JobProto.internal_static_google_cloud_batch_v1_AllocationPolicy_LocationPolicy_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.batch.v1.JobProto - .internal_static_google_cloud_batch_v1_AllocationPolicy_LocationPolicy_fieldAccessorTable + return com.google.cloud.batch.v1.JobProto.internal_static_google_cloud_batch_v1_AllocationPolicy_LocationPolicy_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.batch.v1.AllocationPolicy.LocationPolicy.class, - com.google.cloud.batch.v1.AllocationPolicy.LocationPolicy.Builder.class); + com.google.cloud.batch.v1.AllocationPolicy.LocationPolicy.class, com.google.cloud.batch.v1.AllocationPolicy.LocationPolicy.Builder.class); } public static final int ALLOWED_LOCATIONS_FIELD_NUMBER = 1; private com.google.protobuf.LazyStringList allowedLocations_; /** - * - * ** A list of allowed location names represented by internal URLs. * Each location can be a region or a zone. @@ -588,15 +523,13 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { ** *repeated string allowed_locations = 1;
- * * @return A list containing the allowedLocations. */ - public com.google.protobuf.ProtocolStringList getAllowedLocationsList() { + public com.google.protobuf.ProtocolStringList + getAllowedLocationsList() { return allowedLocations_; } /** - * - * ** A list of allowed location names represented by internal URLs. * Each location can be a region or a zone. @@ -613,15 +546,12 @@ public com.google.protobuf.ProtocolStringList getAllowedLocationsList() { ** *repeated string allowed_locations = 1;
- * * @return The count of allowedLocations. */ public int getAllowedLocationsCount() { return allowedLocations_.size(); } /** - * - * ** A list of allowed location names represented by internal URLs. * Each location can be a region or a zone. @@ -638,7 +568,6 @@ public int getAllowedLocationsCount() { ** *repeated string allowed_locations = 1;
- * * @param index The index of the element to return. * @return The allowedLocations at the given index. */ @@ -646,8 +575,6 @@ public java.lang.String getAllowedLocations(int index) { return allowedLocations_.get(index); } /** - * - * ** A list of allowed location names represented by internal URLs. * Each location can be a region or a zone. @@ -664,16 +591,15 @@ public java.lang.String getAllowedLocations(int index) { ** *repeated string allowed_locations = 1;
- * * @param index The index of the value to return. * @return The bytes of the allowedLocations at the given index. */ - public com.google.protobuf.ByteString getAllowedLocationsBytes(int index) { + public com.google.protobuf.ByteString + getAllowedLocationsBytes(int index) { return allowedLocations_.getByteString(index); } private byte memoizedIsInitialized = -1; - @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -685,7 +611,8 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { for (int i = 0; i < allowedLocations_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, allowedLocations_.getRaw(i)); } @@ -714,15 +641,15 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.cloud.batch.v1.AllocationPolicy.LocationPolicy)) { return super.equals(obj); } - com.google.cloud.batch.v1.AllocationPolicy.LocationPolicy other = - (com.google.cloud.batch.v1.AllocationPolicy.LocationPolicy) obj; + com.google.cloud.batch.v1.AllocationPolicy.LocationPolicy other = (com.google.cloud.batch.v1.AllocationPolicy.LocationPolicy) obj; - if (!getAllowedLocationsList().equals(other.getAllowedLocationsList())) return false; + if (!getAllowedLocationsList() + .equals(other.getAllowedLocationsList())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -744,94 +671,87 @@ public int hashCode() { } public static com.google.cloud.batch.v1.AllocationPolicy.LocationPolicy parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.batch.v1.AllocationPolicy.LocationPolicy parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.batch.v1.AllocationPolicy.LocationPolicy parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.batch.v1.AllocationPolicy.LocationPolicy parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.batch.v1.AllocationPolicy.LocationPolicy parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.batch.v1.AllocationPolicy.LocationPolicy parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - - public static com.google.cloud.batch.v1.AllocationPolicy.LocationPolicy parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + public static com.google.cloud.batch.v1.AllocationPolicy.LocationPolicy parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.batch.v1.AllocationPolicy.LocationPolicy parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } - - public static com.google.cloud.batch.v1.AllocationPolicy.LocationPolicy parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + public static com.google.cloud.batch.v1.AllocationPolicy.LocationPolicy parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.batch.v1.AllocationPolicy.LocationPolicy parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static com.google.cloud.batch.v1.AllocationPolicy.LocationPolicy parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.batch.v1.AllocationPolicy.LocationPolicy parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - - public static Builder newBuilder( - com.google.cloud.batch.v1.AllocationPolicy.LocationPolicy prototype) { + public static Builder newBuilder(com.google.cloud.batch.v1.AllocationPolicy.LocationPolicy prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override @@ -840,25 +760,24 @@ protected Builder newBuilderForType( Builder builder = new Builder(parent); return builder; } - /** Protobuf type {@code google.cloud.batch.v1.AllocationPolicy.LocationPolicy} */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder- implements + /** + * Protobuf type {@code google.cloud.batch.v1.AllocationPolicy.LocationPolicy} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.batch.v1.AllocationPolicy.LocationPolicy) com.google.cloud.batch.v1.AllocationPolicy.LocationPolicyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.batch.v1.JobProto - .internal_static_google_cloud_batch_v1_AllocationPolicy_LocationPolicy_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.batch.v1.JobProto.internal_static_google_cloud_batch_v1_AllocationPolicy_LocationPolicy_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.batch.v1.JobProto - .internal_static_google_cloud_batch_v1_AllocationPolicy_LocationPolicy_fieldAccessorTable + return com.google.cloud.batch.v1.JobProto.internal_static_google_cloud_batch_v1_AllocationPolicy_LocationPolicy_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.batch.v1.AllocationPolicy.LocationPolicy.class, - com.google.cloud.batch.v1.AllocationPolicy.LocationPolicy.Builder.class); + com.google.cloud.batch.v1.AllocationPolicy.LocationPolicy.class, com.google.cloud.batch.v1.AllocationPolicy.LocationPolicy.Builder.class); } // Construct using com.google.cloud.batch.v1.AllocationPolicy.LocationPolicy.newBuilder() @@ -866,15 +785,16 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } } - @java.lang.Override public Builder clear() { super.clear(); @@ -884,9 +804,9 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.batch.v1.JobProto - .internal_static_google_cloud_batch_v1_AllocationPolicy_LocationPolicy_descriptor; + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.batch.v1.JobProto.internal_static_google_cloud_batch_v1_AllocationPolicy_LocationPolicy_descriptor; } @java.lang.Override @@ -905,8 +825,7 @@ public com.google.cloud.batch.v1.AllocationPolicy.LocationPolicy build() { @java.lang.Override public com.google.cloud.batch.v1.AllocationPolicy.LocationPolicy buildPartial() { - com.google.cloud.batch.v1.AllocationPolicy.LocationPolicy result = - new com.google.cloud.batch.v1.AllocationPolicy.LocationPolicy(this); + com.google.cloud.batch.v1.AllocationPolicy.LocationPolicy result = new com.google.cloud.batch.v1.AllocationPolicy.LocationPolicy(this); int from_bitField0_ = bitField0_; if (((bitField0_ & 0x00000001) != 0)) { allowedLocations_ = allowedLocations_.getUnmodifiableView(); @@ -921,41 +840,38 @@ public com.google.cloud.batch.v1.AllocationPolicy.LocationPolicy buildPartial() public Builder clone() { return super.clone(); } - @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.setField(field, value); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { + int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.batch.v1.AllocationPolicy.LocationPolicy) { - return mergeFrom((com.google.cloud.batch.v1.AllocationPolicy.LocationPolicy) other); + return mergeFrom((com.google.cloud.batch.v1.AllocationPolicy.LocationPolicy)other); } else { super.mergeFrom(other); return this; @@ -963,8 +879,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { } public Builder mergeFrom(com.google.cloud.batch.v1.AllocationPolicy.LocationPolicy other) { - if (other == com.google.cloud.batch.v1.AllocationPolicy.LocationPolicy.getDefaultInstance()) - return this; + if (other == com.google.cloud.batch.v1.AllocationPolicy.LocationPolicy.getDefaultInstance()) return this; if (!other.allowedLocations_.isEmpty()) { if (allowedLocations_.isEmpty()) { allowedLocations_ = other.allowedLocations_; @@ -994,8 +909,7 @@ public Builder mergeFrom( try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.batch.v1.AllocationPolicy.LocationPolicy) e.getUnfinishedMessage(); + parsedMessage = (com.google.cloud.batch.v1.AllocationPolicy.LocationPolicy) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -1004,21 +918,16 @@ public Builder mergeFrom( } return this; } - private int bitField0_; - private com.google.protobuf.LazyStringList allowedLocations_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - + private com.google.protobuf.LazyStringList allowedLocations_ = com.google.protobuf.LazyStringArrayList.EMPTY; private void ensureAllowedLocationsIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { allowedLocations_ = new com.google.protobuf.LazyStringArrayList(allowedLocations_); bitField0_ |= 0x00000001; - } + } } /** - * - * * * A list of allowed location names represented by internal URLs. * Each location can be a region or a zone. @@ -1035,15 +944,13 @@ private void ensureAllowedLocationsIsMutable() { ** *repeated string allowed_locations = 1;
- * * @return A list containing the allowedLocations. */ - public com.google.protobuf.ProtocolStringList getAllowedLocationsList() { + public com.google.protobuf.ProtocolStringList + getAllowedLocationsList() { return allowedLocations_.getUnmodifiableView(); } /** - * - * ** A list of allowed location names represented by internal URLs. * Each location can be a region or a zone. @@ -1060,15 +967,12 @@ public com.google.protobuf.ProtocolStringList getAllowedLocationsList() { ** *repeated string allowed_locations = 1;
- * * @return The count of allowedLocations. */ public int getAllowedLocationsCount() { return allowedLocations_.size(); } /** - * - * ** A list of allowed location names represented by internal URLs. * Each location can be a region or a zone. @@ -1085,7 +989,6 @@ public int getAllowedLocationsCount() { ** *repeated string allowed_locations = 1;
- * * @param index The index of the element to return. * @return The allowedLocations at the given index. */ @@ -1093,8 +996,6 @@ public java.lang.String getAllowedLocations(int index) { return allowedLocations_.get(index); } /** - * - * ** A list of allowed location names represented by internal URLs. * Each location can be a region or a zone. @@ -1111,16 +1012,14 @@ public java.lang.String getAllowedLocations(int index) { ** *repeated string allowed_locations = 1;
- * * @param index The index of the value to return. * @return The bytes of the allowedLocations at the given index. */ - public com.google.protobuf.ByteString getAllowedLocationsBytes(int index) { + public com.google.protobuf.ByteString + getAllowedLocationsBytes(int index) { return allowedLocations_.getByteString(index); } /** - * - * ** A list of allowed location names represented by internal URLs. * Each location can be a region or a zone. @@ -1137,23 +1036,21 @@ public com.google.protobuf.ByteString getAllowedLocationsBytes(int index) { ** *repeated string allowed_locations = 1;
- * * @param index The index to set the value at. * @param value The allowedLocations to set. * @return This builder for chaining. */ - public Builder setAllowedLocations(int index, java.lang.String value) { + public Builder setAllowedLocations( + int index, java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - ensureAllowedLocationsIsMutable(); + throw new NullPointerException(); + } + ensureAllowedLocationsIsMutable(); allowedLocations_.set(index, value); onChanged(); return this; } /** - * - * ** A list of allowed location names represented by internal URLs. * Each location can be a region or a zone. @@ -1170,22 +1067,20 @@ public Builder setAllowedLocations(int index, java.lang.String value) { ** *repeated string allowed_locations = 1;
- * * @param value The allowedLocations to add. * @return This builder for chaining. */ - public Builder addAllowedLocations(java.lang.String value) { + public Builder addAllowedLocations( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - ensureAllowedLocationsIsMutable(); + throw new NullPointerException(); + } + ensureAllowedLocationsIsMutable(); allowedLocations_.add(value); onChanged(); return this; } /** - * - * ** A list of allowed location names represented by internal URLs. * Each location can be a region or a zone. @@ -1202,19 +1097,18 @@ public Builder addAllowedLocations(java.lang.String value) { ** *repeated string allowed_locations = 1;
- * * @param values The allowedLocations to add. * @return This builder for chaining. */ - public Builder addAllAllowedLocations(java.lang.Iterablevalues) { + public Builder addAllAllowedLocations( + java.lang.Iterable values) { ensureAllowedLocationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, allowedLocations_); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, allowedLocations_); onChanged(); return this; } /** - * - * * * A list of allowed location names represented by internal URLs. * Each location can be a region or a zone. @@ -1231,7 +1125,6 @@ public Builder addAllAllowedLocations(java.lang.Iterable* *value * repeated string allowed_locations = 1;
- * * @return This builder for chaining. */ public Builder clearAllowedLocations() { @@ -1241,8 +1134,6 @@ public Builder clearAllowedLocations() { return this; } /** - * - * ** A list of allowed location names represented by internal URLs. * Each location can be a region or a zone. @@ -1259,21 +1150,20 @@ public Builder clearAllowedLocations() { ** *repeated string allowed_locations = 1;
- * * @param value The bytes of the allowedLocations to add. * @return This builder for chaining. */ - public Builder addAllowedLocationsBytes(com.google.protobuf.ByteString value) { + public Builder addAllowedLocationsBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); ensureAllowedLocationsIsMutable(); allowedLocations_.add(value); onChanged(); return this; } - @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -1286,12 +1176,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } + // @@protoc_insertion_point(builder_scope:google.cloud.batch.v1.AllocationPolicy.LocationPolicy) } // @@protoc_insertion_point(class_scope:google.cloud.batch.v1.AllocationPolicy.LocationPolicy) private static final com.google.cloud.batch.v1.AllocationPolicy.LocationPolicy DEFAULT_INSTANCE; - static { DEFAULT_INSTANCE = new com.google.cloud.batch.v1.AllocationPolicy.LocationPolicy(); } @@ -1300,16 +1190,16 @@ public static com.google.cloud.batch.v1.AllocationPolicy.LocationPolicy getDefau return DEFAULT_INSTANCE; } - private static final com.google.protobuf.ParserPARSER = - new com.google.protobuf.AbstractParser () { - @java.lang.Override - public LocationPolicy parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new LocationPolicy(input, extensionRegistry); - } - }; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser () { + @java.lang.Override + public LocationPolicy parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LocationPolicy(input, extensionRegistry); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -1324,117 +1214,94 @@ public com.google.protobuf.Parser getParserForType() { public com.google.cloud.batch.v1.AllocationPolicy.LocationPolicy getDefaultInstanceForType() { return DEFAULT_INSTANCE; } + } - public interface DiskOrBuilder - extends + public interface DiskOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.batch.v1.AllocationPolicy.Disk) com.google.protobuf.MessageOrBuilder { /** - * - * * * Name of a public or custom image used as the data source. ** *string image = 4;
- * * @return Whether the image field is set. */ boolean hasImage(); /** - * - * ** Name of a public or custom image used as the data source. ** *string image = 4;
- * * @return The image. */ java.lang.String getImage(); /** - * - * ** Name of a public or custom image used as the data source. ** *string image = 4;
- * * @return The bytes for image. */ - com.google.protobuf.ByteString getImageBytes(); + com.google.protobuf.ByteString + getImageBytes(); /** - * - * ** Name of a snapshot used as the data source. ** *string snapshot = 5;
- * * @return Whether the snapshot field is set. */ boolean hasSnapshot(); /** - * - * ** Name of a snapshot used as the data source. ** *string snapshot = 5;
- * * @return The snapshot. */ java.lang.String getSnapshot(); /** - * - * ** Name of a snapshot used as the data source. ** *string snapshot = 5;
- * * @return The bytes for snapshot. */ - com.google.protobuf.ByteString getSnapshotBytes(); + com.google.protobuf.ByteString + getSnapshotBytes(); /** - * - * ** Disk type as shown in `gcloud compute disk-types list` * For example, "pd-ssd", "pd-standard", "pd-balanced", "local-ssd". ** *string type = 1;
- * * @return The type. */ java.lang.String getType(); /** - * - * ** Disk type as shown in `gcloud compute disk-types list` * For example, "pd-ssd", "pd-standard", "pd-balanced", "local-ssd". ** *string type = 1;
- * * @return The bytes for type. */ - com.google.protobuf.ByteString getTypeBytes(); + com.google.protobuf.ByteString + getTypeBytes(); /** - * - * ** Disk size in GB. * This field is ignored if `data_source` is `disk` or `image`. @@ -1443,14 +1310,11 @@ public interface DiskOrBuilder ** *int64 size_gb = 2;
- * * @return The sizeGb. */ long getSizeGb(); /** - * - * ** Local SSDs are available through both "SCSI" and "NVMe" interfaces. * If not indicated, "NVMe" will be the default one for local ssds. @@ -1458,13 +1322,10 @@ public interface DiskOrBuilder ** *string disk_interface = 6;
- * * @return The diskInterface. */ java.lang.String getDiskInterface(); /** - * - * ** Local SSDs are available through both "SCSI" and "NVMe" interfaces. * If not indicated, "NVMe" will be the default one for local ssds. @@ -1472,16 +1333,14 @@ public interface DiskOrBuilder ** *string disk_interface = 6;
- * * @return The bytes for diskInterface. */ - com.google.protobuf.ByteString getDiskInterfaceBytes(); + com.google.protobuf.ByteString + getDiskInterfaceBytes(); public com.google.cloud.batch.v1.AllocationPolicy.Disk.DataSourceCase getDataSourceCase(); } /** - * - * ** A new persistent disk or a local ssd. * A VM can only have one local SSD setting but multiple local SSD partitions. @@ -1491,16 +1350,15 @@ public interface DiskOrBuilder * * Protobuf type {@code google.cloud.batch.v1.AllocationPolicy.Disk} */ - public static final class Disk extends com.google.protobuf.GeneratedMessageV3 - implements + public static final class Disk extends + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.batch.v1.AllocationPolicy.Disk) DiskOrBuilder { - private static final long serialVersionUID = 0L; + private static final long serialVersionUID = 0L; // Use Disk.newBuilder() to construct. private Disk(com.google.protobuf.GeneratedMessageV3.Builder> builder) { super(builder); } - private Disk() { type_ = ""; diskInterface_ = ""; @@ -1508,15 +1366,16 @@ private Disk() { @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { return new Disk(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { return this.unknownFields; } - private Disk( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -1535,87 +1394,78 @@ private Disk( case 0: done = true; break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); + case 10: { + java.lang.String s = input.readStringRequireUtf8(); - type_ = s; - break; - } - case 16: - { - sizeGb_ = input.readInt64(); - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - dataSourceCase_ = 4; - dataSource_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - dataSourceCase_ = 5; - dataSource_ = s; - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); + type_ = s; + break; + } + case 16: { - diskInterface_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); + sizeGb_ = input.readInt64(); + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + dataSourceCase_ = 4; + dataSource_ = s; + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + dataSourceCase_ = 5; + dataSource_ = s; + break; + } + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + + diskInterface_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.batch.v1.JobProto - .internal_static_google_cloud_batch_v1_AllocationPolicy_Disk_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.batch.v1.JobProto.internal_static_google_cloud_batch_v1_AllocationPolicy_Disk_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.batch.v1.JobProto - .internal_static_google_cloud_batch_v1_AllocationPolicy_Disk_fieldAccessorTable + return com.google.cloud.batch.v1.JobProto.internal_static_google_cloud_batch_v1_AllocationPolicy_Disk_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.batch.v1.AllocationPolicy.Disk.class, - com.google.cloud.batch.v1.AllocationPolicy.Disk.Builder.class); + com.google.cloud.batch.v1.AllocationPolicy.Disk.class, com.google.cloud.batch.v1.AllocationPolicy.Disk.Builder.class); } private int dataSourceCase_ = 0; private java.lang.Object dataSource_; - public enum DataSourceCase - implements - com.google.protobuf.Internal.EnumLite, + implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { IMAGE(4), SNAPSHOT(5), DATASOURCE_NOT_SET(0); private final int value; - private DataSourceCase(int value) { this.value = value; } @@ -1631,50 +1481,41 @@ public static DataSourceCase valueOf(int value) { public static DataSourceCase forNumber(int value) { switch (value) { - case 4: - return IMAGE; - case 5: - return SNAPSHOT; - case 0: - return DATASOURCE_NOT_SET; - default: - return null; + case 4: return IMAGE; + case 5: return SNAPSHOT; + case 0: return DATASOURCE_NOT_SET; + default: return null; } } - public int getNumber() { return this.value; } }; - public DataSourceCase getDataSourceCase() { - return DataSourceCase.forNumber(dataSourceCase_); + public DataSourceCase + getDataSourceCase() { + return DataSourceCase.forNumber( + dataSourceCase_); } public static final int IMAGE_FIELD_NUMBER = 4; /** - * - * ** Name of a public or custom image used as the data source. ** *string image = 4;
- * * @return Whether the image field is set. */ public boolean hasImage() { return dataSourceCase_ == 4; } /** - * - * ** Name of a public or custom image used as the data source. ** *string image = 4;
- * * @return The image. */ public java.lang.String getImage() { @@ -1685,7 +1526,8 @@ public java.lang.String getImage() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (dataSourceCase_ == 4) { dataSource_ = s; @@ -1694,24 +1536,23 @@ public java.lang.String getImage() { } } /** - * - * ** Name of a public or custom image used as the data source. ** *string image = 4;
- * * @return The bytes for image. */ - public com.google.protobuf.ByteString getImageBytes() { + public com.google.protobuf.ByteString + getImageBytes() { java.lang.Object ref = ""; if (dataSourceCase_ == 4) { ref = dataSource_; } if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); if (dataSourceCase_ == 4) { dataSource_ = b; } @@ -1723,28 +1564,22 @@ public com.google.protobuf.ByteString getImageBytes() { public static final int SNAPSHOT_FIELD_NUMBER = 5; /** - * - * ** Name of a snapshot used as the data source. ** *string snapshot = 5;
- * * @return Whether the snapshot field is set. */ public boolean hasSnapshot() { return dataSourceCase_ == 5; } /** - * - * ** Name of a snapshot used as the data source. ** *string snapshot = 5;
- * * @return The snapshot. */ public java.lang.String getSnapshot() { @@ -1755,7 +1590,8 @@ public java.lang.String getSnapshot() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (dataSourceCase_ == 5) { dataSource_ = s; @@ -1764,24 +1600,23 @@ public java.lang.String getSnapshot() { } } /** - * - * ** Name of a snapshot used as the data source. ** *string snapshot = 5;
- * * @return The bytes for snapshot. */ - public com.google.protobuf.ByteString getSnapshotBytes() { + public com.google.protobuf.ByteString + getSnapshotBytes() { java.lang.Object ref = ""; if (dataSourceCase_ == 5) { ref = dataSource_; } if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); if (dataSourceCase_ == 5) { dataSource_ = b; } @@ -1794,15 +1629,12 @@ public com.google.protobuf.ByteString getSnapshotBytes() { public static final int TYPE_FIELD_NUMBER = 1; private volatile java.lang.Object type_; /** - * - * ** Disk type as shown in `gcloud compute disk-types list` * For example, "pd-ssd", "pd-standard", "pd-balanced", "local-ssd". ** *string type = 1;
- * * @return The type. */ @java.lang.Override @@ -1811,30 +1643,30 @@ public java.lang.String getType() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); type_ = s; return s; } } /** - * - * ** Disk type as shown in `gcloud compute disk-types list` * For example, "pd-ssd", "pd-standard", "pd-balanced", "local-ssd". ** *string type = 1;
- * * @return The bytes for type. */ @java.lang.Override - public com.google.protobuf.ByteString getTypeBytes() { + public com.google.protobuf.ByteString + getTypeBytes() { java.lang.Object ref = type_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); type_ = b; return b; } else { @@ -1845,8 +1677,6 @@ public com.google.protobuf.ByteString getTypeBytes() { public static final int SIZE_GB_FIELD_NUMBER = 2; private long sizeGb_; /** - * - * ** Disk size in GB. * This field is ignored if `data_source` is `disk` or `image`. @@ -1855,7 +1685,6 @@ public com.google.protobuf.ByteString getTypeBytes() { ** *int64 size_gb = 2;
- * * @return The sizeGb. */ @java.lang.Override @@ -1866,8 +1695,6 @@ public long getSizeGb() { public static final int DISK_INTERFACE_FIELD_NUMBER = 6; private volatile java.lang.Object diskInterface_; /** - * - * ** Local SSDs are available through both "SCSI" and "NVMe" interfaces. * If not indicated, "NVMe" will be the default one for local ssds. @@ -1875,7 +1702,6 @@ public long getSizeGb() { ** *string disk_interface = 6;
- * * @return The diskInterface. */ @java.lang.Override @@ -1884,15 +1710,14 @@ public java.lang.String getDiskInterface() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); diskInterface_ = s; return s; } } /** - * - * ** Local SSDs are available through both "SCSI" and "NVMe" interfaces. * If not indicated, "NVMe" will be the default one for local ssds. @@ -1900,15 +1725,16 @@ public java.lang.String getDiskInterface() { ** *string disk_interface = 6;
- * * @return The bytes for diskInterface. */ @java.lang.Override - public com.google.protobuf.ByteString getDiskInterfaceBytes() { + public com.google.protobuf.ByteString + getDiskInterfaceBytes() { java.lang.Object ref = diskInterface_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); diskInterface_ = b; return b; } else { @@ -1917,7 +1743,6 @@ public com.google.protobuf.ByteString getDiskInterfaceBytes() { } private byte memoizedIsInitialized = -1; - @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -1929,7 +1754,8 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, type_); } @@ -1958,7 +1784,8 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, type_); } if (sizeGb_ != 0L) { - size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, sizeGb_); + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, sizeGb_); } if (dataSourceCase_ == 4) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, dataSource_); @@ -1977,24 +1804,28 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.cloud.batch.v1.AllocationPolicy.Disk)) { return super.equals(obj); } - com.google.cloud.batch.v1.AllocationPolicy.Disk other = - (com.google.cloud.batch.v1.AllocationPolicy.Disk) obj; + com.google.cloud.batch.v1.AllocationPolicy.Disk other = (com.google.cloud.batch.v1.AllocationPolicy.Disk) obj; - if (!getType().equals(other.getType())) return false; - if (getSizeGb() != other.getSizeGb()) return false; - if (!getDiskInterface().equals(other.getDiskInterface())) return false; + if (!getType() + .equals(other.getType())) return false; + if (getSizeGb() + != other.getSizeGb()) return false; + if (!getDiskInterface() + .equals(other.getDiskInterface())) return false; if (!getDataSourceCase().equals(other.getDataSourceCase())) return false; switch (dataSourceCase_) { case 4: - if (!getImage().equals(other.getImage())) return false; + if (!getImage() + .equals(other.getImage())) return false; break; case 5: - if (!getSnapshot().equals(other.getSnapshot())) return false; + if (!getSnapshot() + .equals(other.getSnapshot())) return false; break; case 0: default: @@ -2013,7 +1844,8 @@ public int hashCode() { hash = (37 * hash) + TYPE_FIELD_NUMBER; hash = (53 * hash) + getType().hashCode(); hash = (37 * hash) + SIZE_GB_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getSizeGb()); + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getSizeGb()); hash = (37 * hash) + DISK_INTERFACE_FIELD_NUMBER; hash = (53 * hash) + getDiskInterface().hashCode(); switch (dataSourceCase_) { @@ -2034,93 +1866,87 @@ public int hashCode() { } public static com.google.cloud.batch.v1.AllocationPolicy.Disk parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.batch.v1.AllocationPolicy.Disk parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.batch.v1.AllocationPolicy.Disk parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.batch.v1.AllocationPolicy.Disk parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.batch.v1.AllocationPolicy.Disk parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.batch.v1.AllocationPolicy.Disk parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - - public static com.google.cloud.batch.v1.AllocationPolicy.Disk parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + public static com.google.cloud.batch.v1.AllocationPolicy.Disk parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.batch.v1.AllocationPolicy.Disk parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } - - public static com.google.cloud.batch.v1.AllocationPolicy.Disk parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + public static com.google.cloud.batch.v1.AllocationPolicy.Disk parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.batch.v1.AllocationPolicy.Disk parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static com.google.cloud.batch.v1.AllocationPolicy.Disk parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.batch.v1.AllocationPolicy.Disk parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.cloud.batch.v1.AllocationPolicy.Disk prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override @@ -2130,8 +1956,6 @@ protected Builder newBuilderForType( return builder; } /** - * - * ** A new persistent disk or a local ssd. * A VM can only have one local SSD setting but multiple local SSD partitions. @@ -2141,24 +1965,21 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.cloud.batch.v1.AllocationPolicy.Disk} */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder- implements + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.batch.v1.AllocationPolicy.Disk) com.google.cloud.batch.v1.AllocationPolicy.DiskOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.batch.v1.JobProto - .internal_static_google_cloud_batch_v1_AllocationPolicy_Disk_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.batch.v1.JobProto.internal_static_google_cloud_batch_v1_AllocationPolicy_Disk_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.batch.v1.JobProto - .internal_static_google_cloud_batch_v1_AllocationPolicy_Disk_fieldAccessorTable + return com.google.cloud.batch.v1.JobProto.internal_static_google_cloud_batch_v1_AllocationPolicy_Disk_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.batch.v1.AllocationPolicy.Disk.class, - com.google.cloud.batch.v1.AllocationPolicy.Disk.Builder.class); + com.google.cloud.batch.v1.AllocationPolicy.Disk.class, com.google.cloud.batch.v1.AllocationPolicy.Disk.Builder.class); } // Construct using com.google.cloud.batch.v1.AllocationPolicy.Disk.newBuilder() @@ -2166,15 +1987,16 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } } - @java.lang.Override public Builder clear() { super.clear(); @@ -2190,9 +2012,9 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.batch.v1.JobProto - .internal_static_google_cloud_batch_v1_AllocationPolicy_Disk_descriptor; + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.batch.v1.JobProto.internal_static_google_cloud_batch_v1_AllocationPolicy_Disk_descriptor; } @java.lang.Override @@ -2211,8 +2033,7 @@ public com.google.cloud.batch.v1.AllocationPolicy.Disk build() { @java.lang.Override public com.google.cloud.batch.v1.AllocationPolicy.Disk buildPartial() { - com.google.cloud.batch.v1.AllocationPolicy.Disk result = - new com.google.cloud.batch.v1.AllocationPolicy.Disk(this); + com.google.cloud.batch.v1.AllocationPolicy.Disk result = new com.google.cloud.batch.v1.AllocationPolicy.Disk(this); if (dataSourceCase_ == 4) { result.dataSource_ = dataSource_; } @@ -2231,41 +2052,38 @@ public com.google.cloud.batch.v1.AllocationPolicy.Disk buildPartial() { public Builder clone() { return super.clone(); } - @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.setField(field, value); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { + int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.batch.v1.AllocationPolicy.Disk) { - return mergeFrom((com.google.cloud.batch.v1.AllocationPolicy.Disk) other); + return mergeFrom((com.google.cloud.batch.v1.AllocationPolicy.Disk)other); } else { super.mergeFrom(other); return this; @@ -2273,8 +2091,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { } public Builder mergeFrom(com.google.cloud.batch.v1.AllocationPolicy.Disk other) { - if (other == com.google.cloud.batch.v1.AllocationPolicy.Disk.getDefaultInstance()) - return this; + if (other == com.google.cloud.batch.v1.AllocationPolicy.Disk.getDefaultInstance()) return this; if (!other.getType().isEmpty()) { type_ = other.type_; onChanged(); @@ -2287,24 +2104,21 @@ public Builder mergeFrom(com.google.cloud.batch.v1.AllocationPolicy.Disk other) onChanged(); } switch (other.getDataSourceCase()) { - case IMAGE: - { - dataSourceCase_ = 4; - dataSource_ = other.dataSource_; - onChanged(); - break; - } - case SNAPSHOT: - { - dataSourceCase_ = 5; - dataSource_ = other.dataSource_; - onChanged(); - break; - } - case DATASOURCE_NOT_SET: - { - break; - } + case IMAGE: { + dataSourceCase_ = 4; + dataSource_ = other.dataSource_; + onChanged(); + break; + } + case SNAPSHOT: { + dataSourceCase_ = 5; + dataSource_ = other.dataSource_; + onChanged(); + break; + } + case DATASOURCE_NOT_SET: { + break; + } } this.mergeUnknownFields(other.unknownFields); onChanged(); @@ -2325,8 +2139,7 @@ public Builder mergeFrom( try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.batch.v1.AllocationPolicy.Disk) e.getUnfinishedMessage(); + parsedMessage = (com.google.cloud.batch.v1.AllocationPolicy.Disk) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -2335,12 +2148,12 @@ public Builder mergeFrom( } return this; } - private int dataSourceCase_ = 0; private java.lang.Object dataSource_; - - public DataSourceCase getDataSourceCase() { - return DataSourceCase.forNumber(dataSourceCase_); + public DataSourceCase + getDataSourceCase() { + return DataSourceCase.forNumber( + dataSourceCase_); } public Builder clearDataSource() { @@ -2350,15 +2163,13 @@ public Builder clearDataSource() { return this; } + /** - * - * * * Name of a public or custom image used as the data source. ** *string image = 4;
- * * @return Whether the image field is set. */ @java.lang.Override @@ -2366,14 +2177,11 @@ public boolean hasImage() { return dataSourceCase_ == 4; } /** - * - * ** Name of a public or custom image used as the data source. ** *string image = 4;
- * * @return The image. */ @java.lang.Override @@ -2383,7 +2191,8 @@ public java.lang.String getImage() { ref = dataSource_; } if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (dataSourceCase_ == 4) { dataSource_ = s; @@ -2394,25 +2203,24 @@ public java.lang.String getImage() { } } /** - * - * ** Name of a public or custom image used as the data source. ** *string image = 4;
- * * @return The bytes for image. */ @java.lang.Override - public com.google.protobuf.ByteString getImageBytes() { + public com.google.protobuf.ByteString + getImageBytes() { java.lang.Object ref = ""; if (dataSourceCase_ == 4) { ref = dataSource_; } if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); if (dataSourceCase_ == 4) { dataSource_ = b; } @@ -2422,35 +2230,30 @@ public com.google.protobuf.ByteString getImageBytes() { } } /** - * - * ** Name of a public or custom image used as the data source. ** *string image = 4;
- * * @param value The image to set. * @return This builder for chaining. */ - public Builder setImage(java.lang.String value) { + public Builder setImage( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - dataSourceCase_ = 4; + throw new NullPointerException(); + } + dataSourceCase_ = 4; dataSource_ = value; onChanged(); return this; } /** - * - * ** Name of a public or custom image used as the data source. ** *string image = 4;
- * * @return This builder for chaining. */ public Builder clearImage() { @@ -2462,22 +2265,20 @@ public Builder clearImage() { return this; } /** - * - * ** Name of a public or custom image used as the data source. ** *string image = 4;
- * * @param value The bytes for image to set. * @return This builder for chaining. */ - public Builder setImageBytes(com.google.protobuf.ByteString value) { + public Builder setImageBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); dataSourceCase_ = 4; dataSource_ = value; onChanged(); @@ -2485,14 +2286,11 @@ public Builder setImageBytes(com.google.protobuf.ByteString value) { } /** - * - * ** Name of a snapshot used as the data source. ** *string snapshot = 5;
- * * @return Whether the snapshot field is set. */ @java.lang.Override @@ -2500,14 +2298,11 @@ public boolean hasSnapshot() { return dataSourceCase_ == 5; } /** - * - * ** Name of a snapshot used as the data source. ** *string snapshot = 5;
- * * @return The snapshot. */ @java.lang.Override @@ -2517,7 +2312,8 @@ public java.lang.String getSnapshot() { ref = dataSource_; } if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (dataSourceCase_ == 5) { dataSource_ = s; @@ -2528,25 +2324,24 @@ public java.lang.String getSnapshot() { } } /** - * - * ** Name of a snapshot used as the data source. ** *string snapshot = 5;
- * * @return The bytes for snapshot. */ @java.lang.Override - public com.google.protobuf.ByteString getSnapshotBytes() { + public com.google.protobuf.ByteString + getSnapshotBytes() { java.lang.Object ref = ""; if (dataSourceCase_ == 5) { ref = dataSource_; } if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); if (dataSourceCase_ == 5) { dataSource_ = b; } @@ -2556,35 +2351,30 @@ public com.google.protobuf.ByteString getSnapshotBytes() { } } /** - * - * ** Name of a snapshot used as the data source. ** *string snapshot = 5;
- * * @param value The snapshot to set. * @return This builder for chaining. */ - public Builder setSnapshot(java.lang.String value) { + public Builder setSnapshot( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - dataSourceCase_ = 5; + throw new NullPointerException(); + } + dataSourceCase_ = 5; dataSource_ = value; onChanged(); return this; } /** - * - * ** Name of a snapshot used as the data source. ** *string snapshot = 5;
- * * @return This builder for chaining. */ public Builder clearSnapshot() { @@ -2596,22 +2386,20 @@ public Builder clearSnapshot() { return this; } /** - * - * ** Name of a snapshot used as the data source. ** *string snapshot = 5;
- * * @param value The bytes for snapshot to set. * @return This builder for chaining. */ - public Builder setSnapshotBytes(com.google.protobuf.ByteString value) { + public Builder setSnapshotBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); dataSourceCase_ = 5; dataSource_ = value; onChanged(); @@ -2620,21 +2408,19 @@ public Builder setSnapshotBytes(com.google.protobuf.ByteString value) { private java.lang.Object type_ = ""; /** - * - * ** Disk type as shown in `gcloud compute disk-types list` * For example, "pd-ssd", "pd-standard", "pd-balanced", "local-ssd". ** *string type = 1;
- * * @return The type. */ public java.lang.String getType() { java.lang.Object ref = type_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); type_ = s; return s; @@ -2643,22 +2429,21 @@ public java.lang.String getType() { } } /** - * - * ** Disk type as shown in `gcloud compute disk-types list` * For example, "pd-ssd", "pd-standard", "pd-balanced", "local-ssd". ** *string type = 1;
- * * @return The bytes for type. */ - public com.google.protobuf.ByteString getTypeBytes() { + public com.google.protobuf.ByteString + getTypeBytes() { java.lang.Object ref = type_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); type_ = b; return b; } else { @@ -2666,73 +2451,64 @@ public com.google.protobuf.ByteString getTypeBytes() { } } /** - * - * ** Disk type as shown in `gcloud compute disk-types list` * For example, "pd-ssd", "pd-standard", "pd-balanced", "local-ssd". ** *string type = 1;
- * * @param value The type to set. * @return This builder for chaining. */ - public Builder setType(java.lang.String value) { + public Builder setType( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + type_ = value; onChanged(); return this; } /** - * - * ** Disk type as shown in `gcloud compute disk-types list` * For example, "pd-ssd", "pd-standard", "pd-balanced", "local-ssd". ** *string type = 1;
- * * @return This builder for chaining. */ public Builder clearType() { - + type_ = getDefaultInstance().getType(); onChanged(); return this; } /** - * - * ** Disk type as shown in `gcloud compute disk-types list` * For example, "pd-ssd", "pd-standard", "pd-balanced", "local-ssd". ** *string type = 1;
- * * @param value The bytes for type to set. * @return This builder for chaining. */ - public Builder setTypeBytes(com.google.protobuf.ByteString value) { + public Builder setTypeBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + type_ = value; onChanged(); return this; } - private long sizeGb_; + private long sizeGb_ ; /** - * - * ** Disk size in GB. * This field is ignored if `data_source` is `disk` or `image`. @@ -2741,7 +2517,6 @@ public Builder setTypeBytes(com.google.protobuf.ByteString value) { ** *int64 size_gb = 2;
- * * @return The sizeGb. */ @java.lang.Override @@ -2749,8 +2524,6 @@ public long getSizeGb() { return sizeGb_; } /** - * - * ** Disk size in GB. * This field is ignored if `data_source` is `disk` or `image`. @@ -2759,19 +2532,16 @@ public long getSizeGb() { ** *int64 size_gb = 2;
- * * @param value The sizeGb to set. * @return This builder for chaining. */ public Builder setSizeGb(long value) { - + sizeGb_ = value; onChanged(); return this; } /** - * - * ** Disk size in GB. * This field is ignored if `data_source` is `disk` or `image`. @@ -2780,11 +2550,10 @@ public Builder setSizeGb(long value) { ** *int64 size_gb = 2;
- * * @return This builder for chaining. */ public Builder clearSizeGb() { - + sizeGb_ = 0L; onChanged(); return this; @@ -2792,8 +2561,6 @@ public Builder clearSizeGb() { private java.lang.Object diskInterface_ = ""; /** - * - * ** Local SSDs are available through both "SCSI" and "NVMe" interfaces. * If not indicated, "NVMe" will be the default one for local ssds. @@ -2801,13 +2568,13 @@ public Builder clearSizeGb() { ** *string disk_interface = 6;
- * * @return The diskInterface. */ public java.lang.String getDiskInterface() { java.lang.Object ref = diskInterface_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); diskInterface_ = s; return s; @@ -2816,8 +2583,6 @@ public java.lang.String getDiskInterface() { } } /** - * - * ** Local SSDs are available through both "SCSI" and "NVMe" interfaces. * If not indicated, "NVMe" will be the default one for local ssds. @@ -2825,14 +2590,15 @@ public java.lang.String getDiskInterface() { ** *string disk_interface = 6;
- * * @return The bytes for diskInterface. */ - public com.google.protobuf.ByteString getDiskInterfaceBytes() { + public com.google.protobuf.ByteString + getDiskInterfaceBytes() { java.lang.Object ref = diskInterface_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); diskInterface_ = b; return b; } else { @@ -2840,8 +2606,6 @@ public com.google.protobuf.ByteString getDiskInterfaceBytes() { } } /** - * - * ** Local SSDs are available through both "SCSI" and "NVMe" interfaces. * If not indicated, "NVMe" will be the default one for local ssds. @@ -2849,22 +2613,20 @@ public com.google.protobuf.ByteString getDiskInterfaceBytes() { ** *string disk_interface = 6;
- * * @param value The diskInterface to set. * @return This builder for chaining. */ - public Builder setDiskInterface(java.lang.String value) { + public Builder setDiskInterface( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + diskInterface_ = value; onChanged(); return this; } /** - * - * ** Local SSDs are available through both "SCSI" and "NVMe" interfaces. * If not indicated, "NVMe" will be the default one for local ssds. @@ -2872,18 +2634,15 @@ public Builder setDiskInterface(java.lang.String value) { ** *string disk_interface = 6;
- * * @return This builder for chaining. */ public Builder clearDiskInterface() { - + diskInterface_ = getDefaultInstance().getDiskInterface(); onChanged(); return this; } /** - * - * ** Local SSDs are available through both "SCSI" and "NVMe" interfaces. * If not indicated, "NVMe" will be the default one for local ssds. @@ -2891,21 +2650,20 @@ public Builder clearDiskInterface() { ** *string disk_interface = 6;
- * * @param value The bytes for diskInterface to set. * @return This builder for chaining. */ - public Builder setDiskInterfaceBytes(com.google.protobuf.ByteString value) { + public Builder setDiskInterfaceBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + diskInterface_ = value; onChanged(); return this; } - @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -2918,12 +2676,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } + // @@protoc_insertion_point(builder_scope:google.cloud.batch.v1.AllocationPolicy.Disk) } // @@protoc_insertion_point(class_scope:google.cloud.batch.v1.AllocationPolicy.Disk) private static final com.google.cloud.batch.v1.AllocationPolicy.Disk DEFAULT_INSTANCE; - static { DEFAULT_INSTANCE = new com.google.cloud.batch.v1.AllocationPolicy.Disk(); } @@ -2932,16 +2690,16 @@ public static com.google.cloud.batch.v1.AllocationPolicy.Disk getDefaultInstance return DEFAULT_INSTANCE; } - private static final com.google.protobuf.ParserPARSER = - new com.google.protobuf.AbstractParser () { - @java.lang.Override - public Disk parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Disk(input, extensionRegistry); - } - }; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser () { + @java.lang.Override + public Disk parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Disk(input, extensionRegistry); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -2956,97 +2714,82 @@ public com.google.protobuf.Parser getParserForType() { public com.google.cloud.batch.v1.AllocationPolicy.Disk getDefaultInstanceForType() { return DEFAULT_INSTANCE; } + } - public interface AttachedDiskOrBuilder - extends + public interface AttachedDiskOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.batch.v1.AllocationPolicy.AttachedDisk) com.google.protobuf.MessageOrBuilder { /** * .google.cloud.batch.v1.AllocationPolicy.Disk new_disk = 1;
- * * @return Whether the newDisk field is set. */ boolean hasNewDisk(); /** *.google.cloud.batch.v1.AllocationPolicy.Disk new_disk = 1;
- * * @return The newDisk. */ com.google.cloud.batch.v1.AllocationPolicy.Disk getNewDisk(); - /**.google.cloud.batch.v1.AllocationPolicy.Disk new_disk = 1;
*/ + /** + *.google.cloud.batch.v1.AllocationPolicy.Disk new_disk = 1;
+ */ com.google.cloud.batch.v1.AllocationPolicy.DiskOrBuilder getNewDiskOrBuilder(); /** - * - * ** Name of an existing PD. ** *string existing_disk = 2;
- * * @return Whether the existingDisk field is set. */ boolean hasExistingDisk(); /** - * - * ** Name of an existing PD. ** *string existing_disk = 2;
- * * @return The existingDisk. */ java.lang.String getExistingDisk(); /** - * - * ** Name of an existing PD. ** *string existing_disk = 2;
- * * @return The bytes for existingDisk. */ - com.google.protobuf.ByteString getExistingDiskBytes(); + com.google.protobuf.ByteString + getExistingDiskBytes(); /** - * - * ** Device name that the guest operating system will see. * If not specified, this is default to the disk name. ** *string device_name = 3;
- * * @return The deviceName. */ java.lang.String getDeviceName(); /** - * - * ** Device name that the guest operating system will see. * If not specified, this is default to the disk name. ** *string device_name = 3;
- * * @return The bytes for deviceName. */ - com.google.protobuf.ByteString getDeviceNameBytes(); + com.google.protobuf.ByteString + getDeviceNameBytes(); public com.google.cloud.batch.v1.AllocationPolicy.AttachedDisk.AttachedCase getAttachedCase(); } /** - * - * ** A new or an existing persistent disk or a local ssd attached to a VM * instance. @@ -3054,31 +2797,31 @@ public interface AttachedDiskOrBuilder * * Protobuf type {@code google.cloud.batch.v1.AllocationPolicy.AttachedDisk} */ - public static final class AttachedDisk extends com.google.protobuf.GeneratedMessageV3 - implements + public static final class AttachedDisk extends + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.batch.v1.AllocationPolicy.AttachedDisk) AttachedDiskOrBuilder { - private static final long serialVersionUID = 0L; + private static final long serialVersionUID = 0L; // Use AttachedDisk.newBuilder() to construct. private AttachedDisk(com.google.protobuf.GeneratedMessageV3.Builder> builder) { super(builder); } - private AttachedDisk() { deviceName_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { return new AttachedDisk(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { return this.unknownFields; } - private AttachedDisk( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -3097,45 +2840,39 @@ private AttachedDisk( case 0: done = true; break; - case 10: - { - com.google.cloud.batch.v1.AllocationPolicy.Disk.Builder subBuilder = null; - if (attachedCase_ == 1) { - subBuilder = - ((com.google.cloud.batch.v1.AllocationPolicy.Disk) attached_).toBuilder(); - } - attached_ = - input.readMessage( - com.google.cloud.batch.v1.AllocationPolicy.Disk.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.batch.v1.AllocationPolicy.Disk) attached_); - attached_ = subBuilder.buildPartial(); - } - attachedCase_ = 1; - break; + case 10: { + com.google.cloud.batch.v1.AllocationPolicy.Disk.Builder subBuilder = null; + if (attachedCase_ == 1) { + subBuilder = ((com.google.cloud.batch.v1.AllocationPolicy.Disk) attached_).toBuilder(); } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - attachedCase_ = 2; - attached_ = s; - break; + attached_ = + input.readMessage(com.google.cloud.batch.v1.AllocationPolicy.Disk.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.batch.v1.AllocationPolicy.Disk) attached_); + attached_ = subBuilder.buildPartial(); } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); + attachedCase_ = 1; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + attachedCase_ = 2; + attached_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); - deviceName_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; + deviceName_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; } + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -3143,40 +2880,35 @@ private AttachedDisk( } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.batch.v1.JobProto - .internal_static_google_cloud_batch_v1_AllocationPolicy_AttachedDisk_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.batch.v1.JobProto.internal_static_google_cloud_batch_v1_AllocationPolicy_AttachedDisk_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.batch.v1.JobProto - .internal_static_google_cloud_batch_v1_AllocationPolicy_AttachedDisk_fieldAccessorTable + return com.google.cloud.batch.v1.JobProto.internal_static_google_cloud_batch_v1_AllocationPolicy_AttachedDisk_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.batch.v1.AllocationPolicy.AttachedDisk.class, - com.google.cloud.batch.v1.AllocationPolicy.AttachedDisk.Builder.class); + com.google.cloud.batch.v1.AllocationPolicy.AttachedDisk.class, com.google.cloud.batch.v1.AllocationPolicy.AttachedDisk.Builder.class); } private int attachedCase_ = 0; private java.lang.Object attached_; - public enum AttachedCase - implements - com.google.protobuf.Internal.EnumLite, + implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { NEW_DISK(1), EXISTING_DISK(2), ATTACHED_NOT_SET(0); private final int value; - private AttachedCase(int value) { this.value = value; } @@ -3192,30 +2924,26 @@ public static AttachedCase valueOf(int value) { public static AttachedCase forNumber(int value) { switch (value) { - case 1: - return NEW_DISK; - case 2: - return EXISTING_DISK; - case 0: - return ATTACHED_NOT_SET; - default: - return null; + case 1: return NEW_DISK; + case 2: return EXISTING_DISK; + case 0: return ATTACHED_NOT_SET; + default: return null; } } - public int getNumber() { return this.value; } }; - public AttachedCase getAttachedCase() { - return AttachedCase.forNumber(attachedCase_); + public AttachedCase + getAttachedCase() { + return AttachedCase.forNumber( + attachedCase_); } public static final int NEW_DISK_FIELD_NUMBER = 1; /** *.google.cloud.batch.v1.AllocationPolicy.Disk new_disk = 1;
- * * @return Whether the newDisk field is set. */ @java.lang.Override @@ -3224,49 +2952,44 @@ public boolean hasNewDisk() { } /** *.google.cloud.batch.v1.AllocationPolicy.Disk new_disk = 1;
- * * @return The newDisk. */ @java.lang.Override public com.google.cloud.batch.v1.AllocationPolicy.Disk getNewDisk() { if (attachedCase_ == 1) { - return (com.google.cloud.batch.v1.AllocationPolicy.Disk) attached_; + return (com.google.cloud.batch.v1.AllocationPolicy.Disk) attached_; } return com.google.cloud.batch.v1.AllocationPolicy.Disk.getDefaultInstance(); } - /**.google.cloud.batch.v1.AllocationPolicy.Disk new_disk = 1;
*/ + /** + *.google.cloud.batch.v1.AllocationPolicy.Disk new_disk = 1;
+ */ @java.lang.Override public com.google.cloud.batch.v1.AllocationPolicy.DiskOrBuilder getNewDiskOrBuilder() { if (attachedCase_ == 1) { - return (com.google.cloud.batch.v1.AllocationPolicy.Disk) attached_; + return (com.google.cloud.batch.v1.AllocationPolicy.Disk) attached_; } return com.google.cloud.batch.v1.AllocationPolicy.Disk.getDefaultInstance(); } public static final int EXISTING_DISK_FIELD_NUMBER = 2; /** - * - * ** Name of an existing PD. ** *string existing_disk = 2;
- * * @return Whether the existingDisk field is set. */ public boolean hasExistingDisk() { return attachedCase_ == 2; } /** - * - * ** Name of an existing PD. ** *string existing_disk = 2;
- * * @return The existingDisk. */ public java.lang.String getExistingDisk() { @@ -3277,7 +3000,8 @@ public java.lang.String getExistingDisk() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (attachedCase_ == 2) { attached_ = s; @@ -3286,24 +3010,23 @@ public java.lang.String getExistingDisk() { } } /** - * - * ** Name of an existing PD. ** *string existing_disk = 2;
- * * @return The bytes for existingDisk. */ - public com.google.protobuf.ByteString getExistingDiskBytes() { + public com.google.protobuf.ByteString + getExistingDiskBytes() { java.lang.Object ref = ""; if (attachedCase_ == 2) { ref = attached_; } if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); if (attachedCase_ == 2) { attached_ = b; } @@ -3316,15 +3039,12 @@ public com.google.protobuf.ByteString getExistingDiskBytes() { public static final int DEVICE_NAME_FIELD_NUMBER = 3; private volatile java.lang.Object deviceName_; /** - * - * ** Device name that the guest operating system will see. * If not specified, this is default to the disk name. ** *string device_name = 3;
- * * @return The deviceName. */ @java.lang.Override @@ -3333,30 +3053,30 @@ public java.lang.String getDeviceName() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); deviceName_ = s; return s; } } /** - * - * ** Device name that the guest operating system will see. * If not specified, this is default to the disk name. ** *string device_name = 3;
- * * @return The bytes for deviceName. */ @java.lang.Override - public com.google.protobuf.ByteString getDeviceNameBytes() { + public com.google.protobuf.ByteString + getDeviceNameBytes() { java.lang.Object ref = deviceName_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); deviceName_ = b; return b; } else { @@ -3365,7 +3085,6 @@ public com.google.protobuf.ByteString getDeviceNameBytes() { } private byte memoizedIsInitialized = -1; - @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -3377,7 +3096,8 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { if (attachedCase_ == 1) { output.writeMessage(1, (com.google.cloud.batch.v1.AllocationPolicy.Disk) attached_); } @@ -3397,9 +3117,8 @@ public int getSerializedSize() { size = 0; if (attachedCase_ == 1) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 1, (com.google.cloud.batch.v1.AllocationPolicy.Disk) attached_); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, (com.google.cloud.batch.v1.AllocationPolicy.Disk) attached_); } if (attachedCase_ == 2) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, attached_); @@ -3415,22 +3134,24 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.cloud.batch.v1.AllocationPolicy.AttachedDisk)) { return super.equals(obj); } - com.google.cloud.batch.v1.AllocationPolicy.AttachedDisk other = - (com.google.cloud.batch.v1.AllocationPolicy.AttachedDisk) obj; + com.google.cloud.batch.v1.AllocationPolicy.AttachedDisk other = (com.google.cloud.batch.v1.AllocationPolicy.AttachedDisk) obj; - if (!getDeviceName().equals(other.getDeviceName())) return false; + if (!getDeviceName() + .equals(other.getDeviceName())) return false; if (!getAttachedCase().equals(other.getAttachedCase())) return false; switch (attachedCase_) { case 1: - if (!getNewDisk().equals(other.getNewDisk())) return false; + if (!getNewDisk() + .equals(other.getNewDisk())) return false; break; case 2: - if (!getExistingDisk().equals(other.getExistingDisk())) return false; + if (!getExistingDisk() + .equals(other.getExistingDisk())) return false; break; case 0: default: @@ -3466,94 +3187,87 @@ public int hashCode() { } public static com.google.cloud.batch.v1.AllocationPolicy.AttachedDisk parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.batch.v1.AllocationPolicy.AttachedDisk parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.batch.v1.AllocationPolicy.AttachedDisk parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.batch.v1.AllocationPolicy.AttachedDisk parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.batch.v1.AllocationPolicy.AttachedDisk parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.batch.v1.AllocationPolicy.AttachedDisk parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - - public static com.google.cloud.batch.v1.AllocationPolicy.AttachedDisk parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + public static com.google.cloud.batch.v1.AllocationPolicy.AttachedDisk parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.batch.v1.AllocationPolicy.AttachedDisk parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } - - public static com.google.cloud.batch.v1.AllocationPolicy.AttachedDisk parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + public static com.google.cloud.batch.v1.AllocationPolicy.AttachedDisk parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.batch.v1.AllocationPolicy.AttachedDisk parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static com.google.cloud.batch.v1.AllocationPolicy.AttachedDisk parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.batch.v1.AllocationPolicy.AttachedDisk parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - - public static Builder newBuilder( - com.google.cloud.batch.v1.AllocationPolicy.AttachedDisk prototype) { + public static Builder newBuilder(com.google.cloud.batch.v1.AllocationPolicy.AttachedDisk prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override @@ -3563,8 +3277,6 @@ protected Builder newBuilderForType( return builder; } /** - * - * ** A new or an existing persistent disk or a local ssd attached to a VM * instance. @@ -3572,24 +3284,21 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.cloud.batch.v1.AllocationPolicy.AttachedDisk} */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder- implements + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.batch.v1.AllocationPolicy.AttachedDisk) com.google.cloud.batch.v1.AllocationPolicy.AttachedDiskOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.batch.v1.JobProto - .internal_static_google_cloud_batch_v1_AllocationPolicy_AttachedDisk_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.batch.v1.JobProto.internal_static_google_cloud_batch_v1_AllocationPolicy_AttachedDisk_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.batch.v1.JobProto - .internal_static_google_cloud_batch_v1_AllocationPolicy_AttachedDisk_fieldAccessorTable + return com.google.cloud.batch.v1.JobProto.internal_static_google_cloud_batch_v1_AllocationPolicy_AttachedDisk_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.batch.v1.AllocationPolicy.AttachedDisk.class, - com.google.cloud.batch.v1.AllocationPolicy.AttachedDisk.Builder.class); + com.google.cloud.batch.v1.AllocationPolicy.AttachedDisk.class, com.google.cloud.batch.v1.AllocationPolicy.AttachedDisk.Builder.class); } // Construct using com.google.cloud.batch.v1.AllocationPolicy.AttachedDisk.newBuilder() @@ -3597,15 +3306,16 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } } - @java.lang.Override public Builder clear() { super.clear(); @@ -3617,9 +3327,9 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.batch.v1.JobProto - .internal_static_google_cloud_batch_v1_AllocationPolicy_AttachedDisk_descriptor; + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.batch.v1.JobProto.internal_static_google_cloud_batch_v1_AllocationPolicy_AttachedDisk_descriptor; } @java.lang.Override @@ -3638,8 +3348,7 @@ public com.google.cloud.batch.v1.AllocationPolicy.AttachedDisk build() { @java.lang.Override public com.google.cloud.batch.v1.AllocationPolicy.AttachedDisk buildPartial() { - com.google.cloud.batch.v1.AllocationPolicy.AttachedDisk result = - new com.google.cloud.batch.v1.AllocationPolicy.AttachedDisk(this); + com.google.cloud.batch.v1.AllocationPolicy.AttachedDisk result = new com.google.cloud.batch.v1.AllocationPolicy.AttachedDisk(this); if (attachedCase_ == 1) { if (newDiskBuilder_ == null) { result.attached_ = attached_; @@ -3660,41 +3369,38 @@ public com.google.cloud.batch.v1.AllocationPolicy.AttachedDisk buildPartial() { public Builder clone() { return super.clone(); } - @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.setField(field, value); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { + int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.batch.v1.AllocationPolicy.AttachedDisk) { - return mergeFrom((com.google.cloud.batch.v1.AllocationPolicy.AttachedDisk) other); + return mergeFrom((com.google.cloud.batch.v1.AllocationPolicy.AttachedDisk)other); } else { super.mergeFrom(other); return this; @@ -3702,29 +3408,25 @@ public Builder mergeFrom(com.google.protobuf.Message other) { } public Builder mergeFrom(com.google.cloud.batch.v1.AllocationPolicy.AttachedDisk other) { - if (other == com.google.cloud.batch.v1.AllocationPolicy.AttachedDisk.getDefaultInstance()) - return this; + if (other == com.google.cloud.batch.v1.AllocationPolicy.AttachedDisk.getDefaultInstance()) return this; if (!other.getDeviceName().isEmpty()) { deviceName_ = other.deviceName_; onChanged(); } switch (other.getAttachedCase()) { - case NEW_DISK: - { - mergeNewDisk(other.getNewDisk()); - break; - } - case EXISTING_DISK: - { - attachedCase_ = 2; - attached_ = other.attached_; - onChanged(); - break; - } - case ATTACHED_NOT_SET: - { - break; - } + case NEW_DISK: { + mergeNewDisk(other.getNewDisk()); + break; + } + case EXISTING_DISK: { + attachedCase_ = 2; + attached_ = other.attached_; + onChanged(); + break; + } + case ATTACHED_NOT_SET: { + break; + } } this.mergeUnknownFields(other.unknownFields); onChanged(); @@ -3745,8 +3447,7 @@ public Builder mergeFrom( try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.batch.v1.AllocationPolicy.AttachedDisk) e.getUnfinishedMessage(); + parsedMessage = (com.google.cloud.batch.v1.AllocationPolicy.AttachedDisk) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -3755,12 +3456,12 @@ public Builder mergeFrom( } return this; } - private int attachedCase_ = 0; private java.lang.Object attached_; - - public AttachedCase getAttachedCase() { - return AttachedCase.forNumber(attachedCase_); + public AttachedCase + getAttachedCase() { + return AttachedCase.forNumber( + attachedCase_); } public Builder clearAttached() { @@ -3770,14 +3471,11 @@ public Builder clearAttached() { return this; } + private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.batch.v1.AllocationPolicy.Disk, - com.google.cloud.batch.v1.AllocationPolicy.Disk.Builder, - com.google.cloud.batch.v1.AllocationPolicy.DiskOrBuilder> - newDiskBuilder_; + com.google.cloud.batch.v1.AllocationPolicy.Disk, com.google.cloud.batch.v1.AllocationPolicy.Disk.Builder, com.google.cloud.batch.v1.AllocationPolicy.DiskOrBuilder> newDiskBuilder_; /** * .google.cloud.batch.v1.AllocationPolicy.Disk new_disk = 1;
- * * @return Whether the newDisk field is set. */ @java.lang.Override @@ -3786,7 +3484,6 @@ public boolean hasNewDisk() { } /** *.google.cloud.batch.v1.AllocationPolicy.Disk new_disk = 1;
- * * @return The newDisk. */ @java.lang.Override @@ -3803,7 +3500,9 @@ public com.google.cloud.batch.v1.AllocationPolicy.Disk getNewDisk() { return com.google.cloud.batch.v1.AllocationPolicy.Disk.getDefaultInstance(); } } - /**.google.cloud.batch.v1.AllocationPolicy.Disk new_disk = 1;
*/ + /** + *.google.cloud.batch.v1.AllocationPolicy.Disk new_disk = 1;
+ */ public Builder setNewDisk(com.google.cloud.batch.v1.AllocationPolicy.Disk value) { if (newDiskBuilder_ == null) { if (value == null) { @@ -3817,7 +3516,9 @@ public Builder setNewDisk(com.google.cloud.batch.v1.AllocationPolicy.Disk value) attachedCase_ = 1; return this; } - /**.google.cloud.batch.v1.AllocationPolicy.Disk new_disk = 1;
*/ + /** + *.google.cloud.batch.v1.AllocationPolicy.Disk new_disk = 1;
+ */ public Builder setNewDisk( com.google.cloud.batch.v1.AllocationPolicy.Disk.Builder builderForValue) { if (newDiskBuilder_ == null) { @@ -3829,17 +3530,15 @@ public Builder setNewDisk( attachedCase_ = 1; return this; } - /**.google.cloud.batch.v1.AllocationPolicy.Disk new_disk = 1;
*/ + /** + *.google.cloud.batch.v1.AllocationPolicy.Disk new_disk = 1;
+ */ public Builder mergeNewDisk(com.google.cloud.batch.v1.AllocationPolicy.Disk value) { if (newDiskBuilder_ == null) { - if (attachedCase_ == 1 - && attached_ - != com.google.cloud.batch.v1.AllocationPolicy.Disk.getDefaultInstance()) { - attached_ = - com.google.cloud.batch.v1.AllocationPolicy.Disk.newBuilder( - (com.google.cloud.batch.v1.AllocationPolicy.Disk) attached_) - .mergeFrom(value) - .buildPartial(); + if (attachedCase_ == 1 && + attached_ != com.google.cloud.batch.v1.AllocationPolicy.Disk.getDefaultInstance()) { + attached_ = com.google.cloud.batch.v1.AllocationPolicy.Disk.newBuilder((com.google.cloud.batch.v1.AllocationPolicy.Disk) attached_) + .mergeFrom(value).buildPartial(); } else { attached_ = value; } @@ -3854,7 +3553,9 @@ public Builder mergeNewDisk(com.google.cloud.batch.v1.AllocationPolicy.Disk valu attachedCase_ = 1; return this; } - /**.google.cloud.batch.v1.AllocationPolicy.Disk new_disk = 1;
*/ + /** + *.google.cloud.batch.v1.AllocationPolicy.Disk new_disk = 1;
+ */ public Builder clearNewDisk() { if (newDiskBuilder_ == null) { if (attachedCase_ == 1) { @@ -3871,11 +3572,15 @@ public Builder clearNewDisk() { } return this; } - /**.google.cloud.batch.v1.AllocationPolicy.Disk new_disk = 1;
*/ + /** + *.google.cloud.batch.v1.AllocationPolicy.Disk new_disk = 1;
+ */ public com.google.cloud.batch.v1.AllocationPolicy.Disk.Builder getNewDiskBuilder() { return getNewDiskFieldBuilder().getBuilder(); } - /**.google.cloud.batch.v1.AllocationPolicy.Disk new_disk = 1;
*/ + /** + *.google.cloud.batch.v1.AllocationPolicy.Disk new_disk = 1;
+ */ @java.lang.Override public com.google.cloud.batch.v1.AllocationPolicy.DiskOrBuilder getNewDiskOrBuilder() { if ((attachedCase_ == 1) && (newDiskBuilder_ != null)) { @@ -3887,41 +3592,34 @@ public com.google.cloud.batch.v1.AllocationPolicy.DiskOrBuilder getNewDiskOrBuil return com.google.cloud.batch.v1.AllocationPolicy.Disk.getDefaultInstance(); } } - /**.google.cloud.batch.v1.AllocationPolicy.Disk new_disk = 1;
*/ + /** + *.google.cloud.batch.v1.AllocationPolicy.Disk new_disk = 1;
+ */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.batch.v1.AllocationPolicy.Disk, - com.google.cloud.batch.v1.AllocationPolicy.Disk.Builder, - com.google.cloud.batch.v1.AllocationPolicy.DiskOrBuilder> + com.google.cloud.batch.v1.AllocationPolicy.Disk, com.google.cloud.batch.v1.AllocationPolicy.Disk.Builder, com.google.cloud.batch.v1.AllocationPolicy.DiskOrBuilder> getNewDiskFieldBuilder() { if (newDiskBuilder_ == null) { if (!(attachedCase_ == 1)) { attached_ = com.google.cloud.batch.v1.AllocationPolicy.Disk.getDefaultInstance(); } - newDiskBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.batch.v1.AllocationPolicy.Disk, - com.google.cloud.batch.v1.AllocationPolicy.Disk.Builder, - com.google.cloud.batch.v1.AllocationPolicy.DiskOrBuilder>( + newDiskBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.batch.v1.AllocationPolicy.Disk, com.google.cloud.batch.v1.AllocationPolicy.Disk.Builder, com.google.cloud.batch.v1.AllocationPolicy.DiskOrBuilder>( (com.google.cloud.batch.v1.AllocationPolicy.Disk) attached_, getParentForChildren(), isClean()); attached_ = null; } attachedCase_ = 1; - onChanged(); - ; + onChanged();; return newDiskBuilder_; } /** - * - * ** Name of an existing PD. ** *string existing_disk = 2;
- * * @return Whether the existingDisk field is set. */ @java.lang.Override @@ -3929,14 +3627,11 @@ public boolean hasExistingDisk() { return attachedCase_ == 2; } /** - * - * ** Name of an existing PD. ** *string existing_disk = 2;
- * * @return The existingDisk. */ @java.lang.Override @@ -3946,7 +3641,8 @@ public java.lang.String getExistingDisk() { ref = attached_; } if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (attachedCase_ == 2) { attached_ = s; @@ -3957,25 +3653,24 @@ public java.lang.String getExistingDisk() { } } /** - * - * ** Name of an existing PD. ** *string existing_disk = 2;
- * * @return The bytes for existingDisk. */ @java.lang.Override - public com.google.protobuf.ByteString getExistingDiskBytes() { + public com.google.protobuf.ByteString + getExistingDiskBytes() { java.lang.Object ref = ""; if (attachedCase_ == 2) { ref = attached_; } if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); if (attachedCase_ == 2) { attached_ = b; } @@ -3985,35 +3680,30 @@ public com.google.protobuf.ByteString getExistingDiskBytes() { } } /** - * - * ** Name of an existing PD. ** *string existing_disk = 2;
- * * @param value The existingDisk to set. * @return This builder for chaining. */ - public Builder setExistingDisk(java.lang.String value) { + public Builder setExistingDisk( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - attachedCase_ = 2; + throw new NullPointerException(); + } + attachedCase_ = 2; attached_ = value; onChanged(); return this; } /** - * - * ** Name of an existing PD. ** *string existing_disk = 2;
- * * @return This builder for chaining. */ public Builder clearExistingDisk() { @@ -4025,22 +3715,20 @@ public Builder clearExistingDisk() { return this; } /** - * - * ** Name of an existing PD. ** *string existing_disk = 2;
- * * @param value The bytes for existingDisk to set. * @return This builder for chaining. */ - public Builder setExistingDiskBytes(com.google.protobuf.ByteString value) { + public Builder setExistingDiskBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); attachedCase_ = 2; attached_ = value; onChanged(); @@ -4049,21 +3737,19 @@ public Builder setExistingDiskBytes(com.google.protobuf.ByteString value) { private java.lang.Object deviceName_ = ""; /** - * - * ** Device name that the guest operating system will see. * If not specified, this is default to the disk name. ** *string device_name = 3;
- * * @return The deviceName. */ public java.lang.String getDeviceName() { java.lang.Object ref = deviceName_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); deviceName_ = s; return s; @@ -4072,22 +3758,21 @@ public java.lang.String getDeviceName() { } } /** - * - * ** Device name that the guest operating system will see. * If not specified, this is default to the disk name. ** *string device_name = 3;
- * * @return The bytes for deviceName. */ - public com.google.protobuf.ByteString getDeviceNameBytes() { + public com.google.protobuf.ByteString + getDeviceNameBytes() { java.lang.Object ref = deviceName_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); deviceName_ = b; return b; } else { @@ -4095,69 +3780,61 @@ public com.google.protobuf.ByteString getDeviceNameBytes() { } } /** - * - * ** Device name that the guest operating system will see. * If not specified, this is default to the disk name. ** *string device_name = 3;
- * * @param value The deviceName to set. * @return This builder for chaining. */ - public Builder setDeviceName(java.lang.String value) { + public Builder setDeviceName( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + deviceName_ = value; onChanged(); return this; } /** - * - * ** Device name that the guest operating system will see. * If not specified, this is default to the disk name. ** *string device_name = 3;
- * * @return This builder for chaining. */ public Builder clearDeviceName() { - + deviceName_ = getDefaultInstance().getDeviceName(); onChanged(); return this; } /** - * - * ** Device name that the guest operating system will see. * If not specified, this is default to the disk name. ** *string device_name = 3;
- * * @param value The bytes for deviceName to set. * @return This builder for chaining. */ - public Builder setDeviceNameBytes(com.google.protobuf.ByteString value) { + public Builder setDeviceNameBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + deviceName_ = value; onChanged(); return this; } - @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -4170,12 +3847,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } + // @@protoc_insertion_point(builder_scope:google.cloud.batch.v1.AllocationPolicy.AttachedDisk) } // @@protoc_insertion_point(class_scope:google.cloud.batch.v1.AllocationPolicy.AttachedDisk) private static final com.google.cloud.batch.v1.AllocationPolicy.AttachedDisk DEFAULT_INSTANCE; - static { DEFAULT_INSTANCE = new com.google.cloud.batch.v1.AllocationPolicy.AttachedDisk(); } @@ -4184,16 +3861,16 @@ public static com.google.cloud.batch.v1.AllocationPolicy.AttachedDisk getDefault return DEFAULT_INSTANCE; } - private static final com.google.protobuf.ParserPARSER = - new com.google.protobuf.AbstractParser () { - @java.lang.Override - public AttachedDisk parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AttachedDisk(input, extensionRegistry); - } - }; + private static final com.google.protobuf.Parser