Skip to content
This repository was archived by the owner on Sep 16, 2023. It is now read-only.

Commit 666c094

Browse files
fix: migrate scheduler/v1beta1 to grpc_service_config (#167)
This PR was generated using Autosynth. 🌈 Synth log will be available here: https://source.cloud.google.com/results/invocations/2c593734-539a-435d-8a04-27f04c90082f/targets - [ ] To automatically regenerate this PR, check this box. PiperOrigin-RevId: 316713534 Source-Link: googleapis/googleapis@88ee692
1 parent c0cc92c commit 666c094

File tree

8 files changed

+647
-635
lines changed

8 files changed

+647
-635
lines changed

google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1beta1/CloudSchedulerClient.java

Lines changed: 333 additions & 333 deletions
Large diffs are not rendered by default.

google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1beta1/CloudSchedulerSettings.java

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,16 @@
5050
* <p>The builder of this class is recursive, so contained classes are themselves builders. When
5151
* build() is called, the tree of builders is called to create the complete settings object.
5252
*
53-
* <p>For example, to set the total timeout of deleteJob to 30 seconds:
53+
* <p>For example, to set the total timeout of getJob to 30 seconds:
5454
*
5555
* <pre>
5656
* <code>
5757
* CloudSchedulerSettings.Builder cloudSchedulerSettingsBuilder =
5858
* CloudSchedulerSettings.newBuilder();
5959
* cloudSchedulerSettingsBuilder
60-
* .deleteJobSettings()
60+
* .getJobSettings()
6161
* .setRetrySettings(
62-
* cloudSchedulerSettingsBuilder.deleteJobSettings().getRetrySettings().toBuilder()
62+
* cloudSchedulerSettingsBuilder.getJobSettings().getRetrySettings().toBuilder()
6363
* .setTotalTimeout(Duration.ofSeconds(30))
6464
* .build());
6565
* CloudSchedulerSettings cloudSchedulerSettings = cloudSchedulerSettingsBuilder.build();
@@ -69,21 +69,6 @@
6969
@Generated("by gapic-generator")
7070
@BetaApi
7171
public class CloudSchedulerSettings extends ClientSettings<CloudSchedulerSettings> {
72-
/** Returns the object with the settings used for calls to deleteJob. */
73-
public UnaryCallSettings<DeleteJobRequest, Empty> deleteJobSettings() {
74-
return ((CloudSchedulerStubSettings) getStubSettings()).deleteJobSettings();
75-
}
76-
77-
/** Returns the object with the settings used for calls to pauseJob. */
78-
public UnaryCallSettings<PauseJobRequest, Job> pauseJobSettings() {
79-
return ((CloudSchedulerStubSettings) getStubSettings()).pauseJobSettings();
80-
}
81-
82-
/** Returns the object with the settings used for calls to resumeJob. */
83-
public UnaryCallSettings<ResumeJobRequest, Job> resumeJobSettings() {
84-
return ((CloudSchedulerStubSettings) getStubSettings()).resumeJobSettings();
85-
}
86-
8772
/** Returns the object with the settings used for calls to listJobs. */
8873
public PagedCallSettings<ListJobsRequest, ListJobsResponse, ListJobsPagedResponse>
8974
listJobsSettings() {
@@ -105,6 +90,21 @@ public UnaryCallSettings<UpdateJobRequest, Job> updateJobSettings() {
10590
return ((CloudSchedulerStubSettings) getStubSettings()).updateJobSettings();
10691
}
10792

93+
/** Returns the object with the settings used for calls to deleteJob. */
94+
public UnaryCallSettings<DeleteJobRequest, Empty> deleteJobSettings() {
95+
return ((CloudSchedulerStubSettings) getStubSettings()).deleteJobSettings();
96+
}
97+
98+
/** Returns the object with the settings used for calls to pauseJob. */
99+
public UnaryCallSettings<PauseJobRequest, Job> pauseJobSettings() {
100+
return ((CloudSchedulerStubSettings) getStubSettings()).pauseJobSettings();
101+
}
102+
103+
/** Returns the object with the settings used for calls to resumeJob. */
104+
public UnaryCallSettings<ResumeJobRequest, Job> resumeJobSettings() {
105+
return ((CloudSchedulerStubSettings) getStubSettings()).resumeJobSettings();
106+
}
107+
108108
/** Returns the object with the settings used for calls to runJob. */
109109
public UnaryCallSettings<RunJobRequest, Job> runJobSettings() {
110110
return ((CloudSchedulerStubSettings) getStubSettings()).runJobSettings();
@@ -207,21 +207,6 @@ public Builder applyToAllUnaryMethods(
207207
return this;
208208
}
209209

210-
/** Returns the builder for the settings used for calls to deleteJob. */
211-
public UnaryCallSettings.Builder<DeleteJobRequest, Empty> deleteJobSettings() {
212-
return getStubSettingsBuilder().deleteJobSettings();
213-
}
214-
215-
/** Returns the builder for the settings used for calls to pauseJob. */
216-
public UnaryCallSettings.Builder<PauseJobRequest, Job> pauseJobSettings() {
217-
return getStubSettingsBuilder().pauseJobSettings();
218-
}
219-
220-
/** Returns the builder for the settings used for calls to resumeJob. */
221-
public UnaryCallSettings.Builder<ResumeJobRequest, Job> resumeJobSettings() {
222-
return getStubSettingsBuilder().resumeJobSettings();
223-
}
224-
225210
/** Returns the builder for the settings used for calls to listJobs. */
226211
public PagedCallSettings.Builder<ListJobsRequest, ListJobsResponse, ListJobsPagedResponse>
227212
listJobsSettings() {
@@ -243,6 +228,21 @@ public UnaryCallSettings.Builder<UpdateJobRequest, Job> updateJobSettings() {
243228
return getStubSettingsBuilder().updateJobSettings();
244229
}
245230

231+
/** Returns the builder for the settings used for calls to deleteJob. */
232+
public UnaryCallSettings.Builder<DeleteJobRequest, Empty> deleteJobSettings() {
233+
return getStubSettingsBuilder().deleteJobSettings();
234+
}
235+
236+
/** Returns the builder for the settings used for calls to pauseJob. */
237+
public UnaryCallSettings.Builder<PauseJobRequest, Job> pauseJobSettings() {
238+
return getStubSettingsBuilder().pauseJobSettings();
239+
}
240+
241+
/** Returns the builder for the settings used for calls to resumeJob. */
242+
public UnaryCallSettings.Builder<ResumeJobRequest, Job> resumeJobSettings() {
243+
return getStubSettingsBuilder().resumeJobSettings();
244+
}
245+
246246
/** Returns the builder for the settings used for calls to runJob. */
247247
public UnaryCallSettings.Builder<RunJobRequest, Job> runJobSettings() {
248248
return getStubSettingsBuilder().runJobSettings();

google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1beta1/package-info.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
* <code>
3131
* try (CloudSchedulerClient cloudSchedulerClient = CloudSchedulerClient.create()) {
3232
* JobName name = JobName.of("[PROJECT]", "[LOCATION]", "[JOB]");
33-
* cloudSchedulerClient.deleteJob(name);
33+
* Job response = cloudSchedulerClient.getJob(name);
3434
* }
3535
* </code>
3636
* </pre>

google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1beta1/stub/CloudSchedulerStub.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -43,18 +43,6 @@
4343
@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
4444
public abstract class CloudSchedulerStub implements BackgroundResource {
4545

46-
public UnaryCallable<DeleteJobRequest, Empty> deleteJobCallable() {
47-
throw new UnsupportedOperationException("Not implemented: deleteJobCallable()");
48-
}
49-
50-
public UnaryCallable<PauseJobRequest, Job> pauseJobCallable() {
51-
throw new UnsupportedOperationException("Not implemented: pauseJobCallable()");
52-
}
53-
54-
public UnaryCallable<ResumeJobRequest, Job> resumeJobCallable() {
55-
throw new UnsupportedOperationException("Not implemented: resumeJobCallable()");
56-
}
57-
5846
public UnaryCallable<ListJobsRequest, ListJobsPagedResponse> listJobsPagedCallable() {
5947
throw new UnsupportedOperationException("Not implemented: listJobsPagedCallable()");
6048
}
@@ -75,6 +63,18 @@ public UnaryCallable<UpdateJobRequest, Job> updateJobCallable() {
7563
throw new UnsupportedOperationException("Not implemented: updateJobCallable()");
7664
}
7765

66+
public UnaryCallable<DeleteJobRequest, Empty> deleteJobCallable() {
67+
throw new UnsupportedOperationException("Not implemented: deleteJobCallable()");
68+
}
69+
70+
public UnaryCallable<PauseJobRequest, Job> pauseJobCallable() {
71+
throw new UnsupportedOperationException("Not implemented: pauseJobCallable()");
72+
}
73+
74+
public UnaryCallable<ResumeJobRequest, Job> resumeJobCallable() {
75+
throw new UnsupportedOperationException("Not implemented: resumeJobCallable()");
76+
}
77+
7878
public UnaryCallable<RunJobRequest, Job> runJobCallable() {
7979
throw new UnsupportedOperationException("Not implemented: runJobCallable()");
8080
}

0 commit comments

Comments
 (0)