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

Commit f8ae7ba

Browse files
fix: restore GAPIC v2 retry configs (#144)
This PR was generated using Autosynth. 🌈 Synth log will be available here: https://source.cloud.google.com/results/invocations/b94bacd6-05ee-45c2-be4d-b0f667030fab/targets PiperOrigin-RevId: 312088359 Source-Link: googleapis/googleapis@5a90d46
1 parent bd79f7b commit f8ae7ba

File tree

8 files changed

+1106
-1090
lines changed

8 files changed

+1106
-1090
lines changed

google-cloud-iot/src/main/java/com/google/cloud/iot/v1/DeviceManagerClient.java

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

google-cloud-iot/src/main/java/com/google/cloud/iot/v1/DeviceManagerSettings.java

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -55,16 +55,16 @@
5555
* <p>The builder of this class is recursive, so contained classes are themselves builders. When
5656
* build() is called, the tree of builders is called to create the complete settings object.
5757
*
58-
* <p>For example, to set the total timeout of createDeviceRegistry to 30 seconds:
58+
* <p>For example, to set the total timeout of deleteDeviceRegistry to 30 seconds:
5959
*
6060
* <pre>
6161
* <code>
6262
* DeviceManagerSettings.Builder deviceManagerSettingsBuilder =
6363
* DeviceManagerSettings.newBuilder();
6464
* deviceManagerSettingsBuilder
65-
* .createDeviceRegistrySettings()
65+
* .deleteDeviceRegistrySettings()
6666
* .setRetrySettings(
67-
* deviceManagerSettingsBuilder.createDeviceRegistrySettings().getRetrySettings().toBuilder()
67+
* deviceManagerSettingsBuilder.deleteDeviceRegistrySettings().getRetrySettings().toBuilder()
6868
* .setTotalTimeout(Duration.ofSeconds(30))
6969
* .build());
7070
* DeviceManagerSettings deviceManagerSettings = deviceManagerSettingsBuilder.build();
@@ -74,6 +74,28 @@
7474
@Generated("by gapic-generator")
7575
@BetaApi
7676
public class DeviceManagerSettings extends ClientSettings<DeviceManagerSettings> {
77+
/** Returns the object with the settings used for calls to deleteDeviceRegistry. */
78+
public UnaryCallSettings<DeleteDeviceRegistryRequest, Empty> deleteDeviceRegistrySettings() {
79+
return ((DeviceManagerStubSettings) getStubSettings()).deleteDeviceRegistrySettings();
80+
}
81+
82+
/** Returns the object with the settings used for calls to deleteDevice. */
83+
public UnaryCallSettings<DeleteDeviceRequest, Empty> deleteDeviceSettings() {
84+
return ((DeviceManagerStubSettings) getStubSettings()).deleteDeviceSettings();
85+
}
86+
87+
/** Returns the object with the settings used for calls to modifyCloudToDeviceConfig. */
88+
public UnaryCallSettings<ModifyCloudToDeviceConfigRequest, DeviceConfig>
89+
modifyCloudToDeviceConfigSettings() {
90+
return ((DeviceManagerStubSettings) getStubSettings()).modifyCloudToDeviceConfigSettings();
91+
}
92+
93+
/** Returns the object with the settings used for calls to sendCommandToDevice. */
94+
public UnaryCallSettings<SendCommandToDeviceRequest, SendCommandToDeviceResponse>
95+
sendCommandToDeviceSettings() {
96+
return ((DeviceManagerStubSettings) getStubSettings()).sendCommandToDeviceSettings();
97+
}
98+
7799
/** Returns the object with the settings used for calls to createDeviceRegistry. */
78100
public UnaryCallSettings<CreateDeviceRegistryRequest, DeviceRegistry>
79101
createDeviceRegistrySettings() {
@@ -91,11 +113,6 @@ public UnaryCallSettings<GetDeviceRegistryRequest, DeviceRegistry> getDeviceRegi
91113
return ((DeviceManagerStubSettings) getStubSettings()).updateDeviceRegistrySettings();
92114
}
93115

94-
/** Returns the object with the settings used for calls to deleteDeviceRegistry. */
95-
public UnaryCallSettings<DeleteDeviceRegistryRequest, Empty> deleteDeviceRegistrySettings() {
96-
return ((DeviceManagerStubSettings) getStubSettings()).deleteDeviceRegistrySettings();
97-
}
98-
99116
/** Returns the object with the settings used for calls to listDeviceRegistries. */
100117
public PagedCallSettings<
101118
ListDeviceRegistriesRequest,
@@ -120,23 +137,12 @@ public UnaryCallSettings<UpdateDeviceRequest, Device> updateDeviceSettings() {
120137
return ((DeviceManagerStubSettings) getStubSettings()).updateDeviceSettings();
121138
}
122139

123-
/** Returns the object with the settings used for calls to deleteDevice. */
124-
public UnaryCallSettings<DeleteDeviceRequest, Empty> deleteDeviceSettings() {
125-
return ((DeviceManagerStubSettings) getStubSettings()).deleteDeviceSettings();
126-
}
127-
128140
/** Returns the object with the settings used for calls to listDevices. */
129141
public PagedCallSettings<ListDevicesRequest, ListDevicesResponse, ListDevicesPagedResponse>
130142
listDevicesSettings() {
131143
return ((DeviceManagerStubSettings) getStubSettings()).listDevicesSettings();
132144
}
133145

134-
/** Returns the object with the settings used for calls to modifyCloudToDeviceConfig. */
135-
public UnaryCallSettings<ModifyCloudToDeviceConfigRequest, DeviceConfig>
136-
modifyCloudToDeviceConfigSettings() {
137-
return ((DeviceManagerStubSettings) getStubSettings()).modifyCloudToDeviceConfigSettings();
138-
}
139-
140146
/** Returns the object with the settings used for calls to listDeviceConfigVersions. */
141147
public UnaryCallSettings<ListDeviceConfigVersionsRequest, ListDeviceConfigVersionsResponse>
142148
listDeviceConfigVersionsSettings() {
@@ -165,12 +171,6 @@ public UnaryCallSettings<GetIamPolicyRequest, Policy> getIamPolicySettings() {
165171
return ((DeviceManagerStubSettings) getStubSettings()).testIamPermissionsSettings();
166172
}
167173

168-
/** Returns the object with the settings used for calls to sendCommandToDevice. */
169-
public UnaryCallSettings<SendCommandToDeviceRequest, SendCommandToDeviceResponse>
170-
sendCommandToDeviceSettings() {
171-
return ((DeviceManagerStubSettings) getStubSettings()).sendCommandToDeviceSettings();
172-
}
173-
174174
/** Returns the object with the settings used for calls to bindDeviceToGateway. */
175175
public UnaryCallSettings<BindDeviceToGatewayRequest, BindDeviceToGatewayResponse>
176176
bindDeviceToGatewaySettings() {
@@ -280,6 +280,29 @@ public Builder applyToAllUnaryMethods(
280280
return this;
281281
}
282282

283+
/** Returns the builder for the settings used for calls to deleteDeviceRegistry. */
284+
public UnaryCallSettings.Builder<DeleteDeviceRegistryRequest, Empty>
285+
deleteDeviceRegistrySettings() {
286+
return getStubSettingsBuilder().deleteDeviceRegistrySettings();
287+
}
288+
289+
/** Returns the builder for the settings used for calls to deleteDevice. */
290+
public UnaryCallSettings.Builder<DeleteDeviceRequest, Empty> deleteDeviceSettings() {
291+
return getStubSettingsBuilder().deleteDeviceSettings();
292+
}
293+
294+
/** Returns the builder for the settings used for calls to modifyCloudToDeviceConfig. */
295+
public UnaryCallSettings.Builder<ModifyCloudToDeviceConfigRequest, DeviceConfig>
296+
modifyCloudToDeviceConfigSettings() {
297+
return getStubSettingsBuilder().modifyCloudToDeviceConfigSettings();
298+
}
299+
300+
/** Returns the builder for the settings used for calls to sendCommandToDevice. */
301+
public UnaryCallSettings.Builder<SendCommandToDeviceRequest, SendCommandToDeviceResponse>
302+
sendCommandToDeviceSettings() {
303+
return getStubSettingsBuilder().sendCommandToDeviceSettings();
304+
}
305+
283306
/** Returns the builder for the settings used for calls to createDeviceRegistry. */
284307
public UnaryCallSettings.Builder<CreateDeviceRegistryRequest, DeviceRegistry>
285308
createDeviceRegistrySettings() {
@@ -298,12 +321,6 @@ public Builder applyToAllUnaryMethods(
298321
return getStubSettingsBuilder().updateDeviceRegistrySettings();
299322
}
300323

301-
/** Returns the builder for the settings used for calls to deleteDeviceRegistry. */
302-
public UnaryCallSettings.Builder<DeleteDeviceRegistryRequest, Empty>
303-
deleteDeviceRegistrySettings() {
304-
return getStubSettingsBuilder().deleteDeviceRegistrySettings();
305-
}
306-
307324
/** Returns the builder for the settings used for calls to listDeviceRegistries. */
308325
public PagedCallSettings.Builder<
309326
ListDeviceRegistriesRequest,
@@ -328,24 +345,13 @@ public UnaryCallSettings.Builder<UpdateDeviceRequest, Device> updateDeviceSettin
328345
return getStubSettingsBuilder().updateDeviceSettings();
329346
}
330347

331-
/** Returns the builder for the settings used for calls to deleteDevice. */
332-
public UnaryCallSettings.Builder<DeleteDeviceRequest, Empty> deleteDeviceSettings() {
333-
return getStubSettingsBuilder().deleteDeviceSettings();
334-
}
335-
336348
/** Returns the builder for the settings used for calls to listDevices. */
337349
public PagedCallSettings.Builder<
338350
ListDevicesRequest, ListDevicesResponse, ListDevicesPagedResponse>
339351
listDevicesSettings() {
340352
return getStubSettingsBuilder().listDevicesSettings();
341353
}
342354

343-
/** Returns the builder for the settings used for calls to modifyCloudToDeviceConfig. */
344-
public UnaryCallSettings.Builder<ModifyCloudToDeviceConfigRequest, DeviceConfig>
345-
modifyCloudToDeviceConfigSettings() {
346-
return getStubSettingsBuilder().modifyCloudToDeviceConfigSettings();
347-
}
348-
349355
/** Returns the builder for the settings used for calls to listDeviceConfigVersions. */
350356
public UnaryCallSettings.Builder<
351357
ListDeviceConfigVersionsRequest, ListDeviceConfigVersionsResponse>
@@ -375,12 +381,6 @@ public UnaryCallSettings.Builder<GetIamPolicyRequest, Policy> getIamPolicySettin
375381
return getStubSettingsBuilder().testIamPermissionsSettings();
376382
}
377383

378-
/** Returns the builder for the settings used for calls to sendCommandToDevice. */
379-
public UnaryCallSettings.Builder<SendCommandToDeviceRequest, SendCommandToDeviceResponse>
380-
sendCommandToDeviceSettings() {
381-
return getStubSettingsBuilder().sendCommandToDeviceSettings();
382-
}
383-
384384
/** Returns the builder for the settings used for calls to bindDeviceToGateway. */
385385
public UnaryCallSettings.Builder<BindDeviceToGatewayRequest, BindDeviceToGatewayResponse>
386386
bindDeviceToGatewaySettings() {

google-cloud-iot/src/main/java/com/google/cloud/iot/v1/package-info.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,8 @@
2929
* <pre>
3030
* <code>
3131
* try (DeviceManagerClient deviceManagerClient = DeviceManagerClient.create()) {
32-
* LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
33-
* DeviceRegistry deviceRegistry = DeviceRegistry.newBuilder().build();
34-
* DeviceRegistry response = deviceManagerClient.createDeviceRegistry(parent, deviceRegistry);
32+
* RegistryName name = RegistryName.of("[PROJECT]", "[LOCATION]", "[REGISTRY]");
33+
* deviceManagerClient.deleteDeviceRegistry(name);
3534
* }
3635
* </code>
3736
* </pre>

google-cloud-iot/src/main/java/com/google/cloud/iot/v1/stub/DeviceManagerStub.java

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,24 @@
6565
@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
6666
public abstract class DeviceManagerStub implements BackgroundResource {
6767

68+
public UnaryCallable<DeleteDeviceRegistryRequest, Empty> deleteDeviceRegistryCallable() {
69+
throw new UnsupportedOperationException("Not implemented: deleteDeviceRegistryCallable()");
70+
}
71+
72+
public UnaryCallable<DeleteDeviceRequest, Empty> deleteDeviceCallable() {
73+
throw new UnsupportedOperationException("Not implemented: deleteDeviceCallable()");
74+
}
75+
76+
public UnaryCallable<ModifyCloudToDeviceConfigRequest, DeviceConfig>
77+
modifyCloudToDeviceConfigCallable() {
78+
throw new UnsupportedOperationException("Not implemented: modifyCloudToDeviceConfigCallable()");
79+
}
80+
81+
public UnaryCallable<SendCommandToDeviceRequest, SendCommandToDeviceResponse>
82+
sendCommandToDeviceCallable() {
83+
throw new UnsupportedOperationException("Not implemented: sendCommandToDeviceCallable()");
84+
}
85+
6886
public UnaryCallable<CreateDeviceRegistryRequest, DeviceRegistry> createDeviceRegistryCallable() {
6987
throw new UnsupportedOperationException("Not implemented: createDeviceRegistryCallable()");
7088
}
@@ -77,10 +95,6 @@ public UnaryCallable<UpdateDeviceRegistryRequest, DeviceRegistry> updateDeviceRe
7795
throw new UnsupportedOperationException("Not implemented: updateDeviceRegistryCallable()");
7896
}
7997

80-
public UnaryCallable<DeleteDeviceRegistryRequest, Empty> deleteDeviceRegistryCallable() {
81-
throw new UnsupportedOperationException("Not implemented: deleteDeviceRegistryCallable()");
82-
}
83-
8498
public UnaryCallable<ListDeviceRegistriesRequest, ListDeviceRegistriesPagedResponse>
8599
listDeviceRegistriesPagedCallable() {
86100
throw new UnsupportedOperationException("Not implemented: listDeviceRegistriesPagedCallable()");
@@ -103,10 +117,6 @@ public UnaryCallable<UpdateDeviceRequest, Device> updateDeviceCallable() {
103117
throw new UnsupportedOperationException("Not implemented: updateDeviceCallable()");
104118
}
105119

106-
public UnaryCallable<DeleteDeviceRequest, Empty> deleteDeviceCallable() {
107-
throw new UnsupportedOperationException("Not implemented: deleteDeviceCallable()");
108-
}
109-
110120
public UnaryCallable<ListDevicesRequest, ListDevicesPagedResponse> listDevicesPagedCallable() {
111121
throw new UnsupportedOperationException("Not implemented: listDevicesPagedCallable()");
112122
}
@@ -115,11 +125,6 @@ public UnaryCallable<ListDevicesRequest, ListDevicesResponse> listDevicesCallabl
115125
throw new UnsupportedOperationException("Not implemented: listDevicesCallable()");
116126
}
117127

118-
public UnaryCallable<ModifyCloudToDeviceConfigRequest, DeviceConfig>
119-
modifyCloudToDeviceConfigCallable() {
120-
throw new UnsupportedOperationException("Not implemented: modifyCloudToDeviceConfigCallable()");
121-
}
122-
123128
public UnaryCallable<ListDeviceConfigVersionsRequest, ListDeviceConfigVersionsResponse>
124129
listDeviceConfigVersionsCallable() {
125130
throw new UnsupportedOperationException("Not implemented: listDeviceConfigVersionsCallable()");
@@ -143,11 +148,6 @@ public UnaryCallable<GetIamPolicyRequest, Policy> getIamPolicyCallable() {
143148
throw new UnsupportedOperationException("Not implemented: testIamPermissionsCallable()");
144149
}
145150

146-
public UnaryCallable<SendCommandToDeviceRequest, SendCommandToDeviceResponse>
147-
sendCommandToDeviceCallable() {
148-
throw new UnsupportedOperationException("Not implemented: sendCommandToDeviceCallable()");
149-
}
150-
151151
public UnaryCallable<BindDeviceToGatewayRequest, BindDeviceToGatewayResponse>
152152
bindDeviceToGatewayCallable() {
153153
throw new UnsupportedOperationException("Not implemented: bindDeviceToGatewayCallable()");

0 commit comments

Comments
 (0)