@java.lang.Override public Builder newBuilderForType() { return newBuilder(); }
/** * Resume a job. * * <p>This method reenables a job after it has been * [Job.State.PAUSED][google.cloud.scheduler.v1beta1.Job.State.PAUSED]. The state of a job is * stored in [Job.state][google.cloud.scheduler.v1beta1.Job.state]; after calling this method it * will be set to [Job.State.ENABLED][google.cloud.scheduler.v1beta1.Job.State.ENABLED]. A job * must be in [Job.State.PAUSED][google.cloud.scheduler.v1beta1.Job.State.PAUSED] to be resumed. * * <p>Sample code: * * <pre><code> * try (CloudSchedulerClient cloudSchedulerClient = CloudSchedulerClient.create()) { * JobName name = JobName.of("[PROJECT]", "[LOCATION]", "[JOB]"); * Job response = cloudSchedulerClient.resumeJob(name.toString()); * } * </code></pre> * * @param name Required. * <p>The job name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Job resumeJob(String name) { ResumeJobRequest request = ResumeJobRequest.newBuilder().setName(name).build(); return resumeJob(request); }
/** * Resume a job. * * <p>This method reenables a job after it has been * [Job.State.PAUSED][google.cloud.scheduler.v1beta1.Job.State.PAUSED]. The state of a job is * stored in [Job.state][google.cloud.scheduler.v1beta1.Job.state]; after calling this method it * will be set to [Job.State.ENABLED][google.cloud.scheduler.v1beta1.Job.State.ENABLED]. A job * must be in [Job.State.PAUSED][google.cloud.scheduler.v1beta1.Job.State.PAUSED] to be resumed. * * <p>Sample code: * * <pre><code> * try (CloudSchedulerClient cloudSchedulerClient = CloudSchedulerClient.create()) { * JobName name = JobName.of("[PROJECT]", "[LOCATION]", "[JOB]"); * Job response = cloudSchedulerClient.resumeJob(name); * } * </code></pre> * * @param name Required. * <p>The job name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Job resumeJob(JobName name) { ResumeJobRequest request = ResumeJobRequest.newBuilder().setName(name == null ? null : name.toString()).build(); return resumeJob(request); }