Skip to content

Commit fe0d149

Browse files
committed
chore: demo of showcase with json_name
1 parent d690333 commit fe0d149

24 files changed

Lines changed: 3582 additions & 146 deletions

File tree

java-showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/ComplianceClient.java

Lines changed: 237 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,48 @@
229229
* </td>
230230
* </tr>
231231
* <tr>
232+
* <td><p> RepeatDataCustomPath</td>
233+
* <td><p> This method echoes the ComplianceData request. This method exercises sending some parameters as path variables with custom json_name.</td>
234+
* <td>
235+
* <p>Request object method variants only take one parameter, a request object, which must be constructed before the call.</p>
236+
* <ul>
237+
* <li><p> repeatDataCustomPath(CustomBindingRequest request)
238+
* </ul>
239+
* <p>Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.</p>
240+
* <ul>
241+
* <li><p> repeatDataCustomPathCallable()
242+
* </ul>
243+
* </td>
244+
* </tr>
245+
* <tr>
246+
* <td><p> RepeatDataBodyCustomMessage</td>
247+
* <td><p> Testing custom json_name option in custom message bodies</td>
248+
* <td>
249+
* <p>Request object method variants only take one parameter, a request object, which must be constructed before the call.</p>
250+
* <ul>
251+
* <li><p> repeatDataBodyCustomMessage(CustomBindingRequest request)
252+
* </ul>
253+
* <p>Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.</p>
254+
* <ul>
255+
* <li><p> repeatDataBodyCustomMessageCallable()
256+
* </ul>
257+
* </td>
258+
* </tr>
259+
* <tr>
260+
* <td><p> RepeatDataCustomQuery</td>
261+
* <td><p> Testing custom query parameter mapping with dashes</td>
262+
* <td>
263+
* <p>Request object method variants only take one parameter, a request object, which must be constructed before the call.</p>
264+
* <ul>
265+
* <li><p> repeatDataCustomQuery(CustomBindingRequest request)
266+
* </ul>
267+
* <p>Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.</p>
268+
* <ul>
269+
* <li><p> repeatDataCustomQueryCallable()
270+
* </ul>
271+
* </td>
272+
* </tr>
273+
* <tr>
232274
* <td><p> ListLocations</td>
233275
* <td><p> Lists information about the supported locations for this service.</td>
234276
* <td>
@@ -1141,6 +1183,201 @@ public final UnaryCallable<EnumResponse, EnumResponse> verifyEnumCallable() {
11411183
return stub.verifyEnumCallable();
11421184
}
11431185

1186+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
1187+
/**
1188+
* This method echoes the ComplianceData request. This method exercises sending some parameters as
1189+
* path variables with custom json_name.
1190+
*
1191+
* <p>Sample code:
1192+
*
1193+
* <pre>{@code
1194+
* // This snippet has been automatically generated and should be regarded as a code template only.
1195+
* // It will require modifications to work:
1196+
* // - It may require correct/in-range values for request initialization.
1197+
* // - It may require specifying regional endpoints when creating the service client as shown in
1198+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1199+
* try (ComplianceClient complianceClient = ComplianceClient.create()) {
1200+
* CustomBindingRequest request =
1201+
* CustomBindingRequest.newBuilder()
1202+
* .setName("name3373707")
1203+
* .setInfo(ComplianceData.newBuilder().build())
1204+
* .setServerVerify(true)
1205+
* .setCustomKebabName("customKebabName-2062111197")
1206+
* .setCustomBodyMessage(ComplianceData.newBuilder().build())
1207+
* .build();
1208+
* RepeatResponse response = complianceClient.repeatDataCustomPath(request);
1209+
* }
1210+
* }</pre>
1211+
*
1212+
* @param request The request object containing all of the parameters for the API call.
1213+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
1214+
*/
1215+
public final RepeatResponse repeatDataCustomPath(CustomBindingRequest request) {
1216+
return repeatDataCustomPathCallable().call(request);
1217+
}
1218+
1219+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
1220+
/**
1221+
* This method echoes the ComplianceData request. This method exercises sending some parameters as
1222+
* path variables with custom json_name.
1223+
*
1224+
* <p>Sample code:
1225+
*
1226+
* <pre>{@code
1227+
* // This snippet has been automatically generated and should be regarded as a code template only.
1228+
* // It will require modifications to work:
1229+
* // - It may require correct/in-range values for request initialization.
1230+
* // - It may require specifying regional endpoints when creating the service client as shown in
1231+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1232+
* try (ComplianceClient complianceClient = ComplianceClient.create()) {
1233+
* CustomBindingRequest request =
1234+
* CustomBindingRequest.newBuilder()
1235+
* .setName("name3373707")
1236+
* .setInfo(ComplianceData.newBuilder().build())
1237+
* .setServerVerify(true)
1238+
* .setCustomKebabName("customKebabName-2062111197")
1239+
* .setCustomBodyMessage(ComplianceData.newBuilder().build())
1240+
* .build();
1241+
* ApiFuture<RepeatResponse> future =
1242+
* complianceClient.repeatDataCustomPathCallable().futureCall(request);
1243+
* // Do something.
1244+
* RepeatResponse response = future.get();
1245+
* }
1246+
* }</pre>
1247+
*/
1248+
public final UnaryCallable<CustomBindingRequest, RepeatResponse> repeatDataCustomPathCallable() {
1249+
return stub.repeatDataCustomPathCallable();
1250+
}
1251+
1252+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
1253+
/**
1254+
* Testing custom json_name option in custom message bodies
1255+
*
1256+
* <p>Sample code:
1257+
*
1258+
* <pre>{@code
1259+
* // This snippet has been automatically generated and should be regarded as a code template only.
1260+
* // It will require modifications to work:
1261+
* // - It may require correct/in-range values for request initialization.
1262+
* // - It may require specifying regional endpoints when creating the service client as shown in
1263+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1264+
* try (ComplianceClient complianceClient = ComplianceClient.create()) {
1265+
* CustomBindingRequest request =
1266+
* CustomBindingRequest.newBuilder()
1267+
* .setName("name3373707")
1268+
* .setInfo(ComplianceData.newBuilder().build())
1269+
* .setServerVerify(true)
1270+
* .setCustomKebabName("customKebabName-2062111197")
1271+
* .setCustomBodyMessage(ComplianceData.newBuilder().build())
1272+
* .build();
1273+
* RepeatResponse response = complianceClient.repeatDataBodyCustomMessage(request);
1274+
* }
1275+
* }</pre>
1276+
*
1277+
* @param request The request object containing all of the parameters for the API call.
1278+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
1279+
*/
1280+
public final RepeatResponse repeatDataBodyCustomMessage(CustomBindingRequest request) {
1281+
return repeatDataBodyCustomMessageCallable().call(request);
1282+
}
1283+
1284+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
1285+
/**
1286+
* Testing custom json_name option in custom message bodies
1287+
*
1288+
* <p>Sample code:
1289+
*
1290+
* <pre>{@code
1291+
* // This snippet has been automatically generated and should be regarded as a code template only.
1292+
* // It will require modifications to work:
1293+
* // - It may require correct/in-range values for request initialization.
1294+
* // - It may require specifying regional endpoints when creating the service client as shown in
1295+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1296+
* try (ComplianceClient complianceClient = ComplianceClient.create()) {
1297+
* CustomBindingRequest request =
1298+
* CustomBindingRequest.newBuilder()
1299+
* .setName("name3373707")
1300+
* .setInfo(ComplianceData.newBuilder().build())
1301+
* .setServerVerify(true)
1302+
* .setCustomKebabName("customKebabName-2062111197")
1303+
* .setCustomBodyMessage(ComplianceData.newBuilder().build())
1304+
* .build();
1305+
* ApiFuture<RepeatResponse> future =
1306+
* complianceClient.repeatDataBodyCustomMessageCallable().futureCall(request);
1307+
* // Do something.
1308+
* RepeatResponse response = future.get();
1309+
* }
1310+
* }</pre>
1311+
*/
1312+
public final UnaryCallable<CustomBindingRequest, RepeatResponse>
1313+
repeatDataBodyCustomMessageCallable() {
1314+
return stub.repeatDataBodyCustomMessageCallable();
1315+
}
1316+
1317+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
1318+
/**
1319+
* Testing custom query parameter mapping with dashes
1320+
*
1321+
* <p>Sample code:
1322+
*
1323+
* <pre>{@code
1324+
* // This snippet has been automatically generated and should be regarded as a code template only.
1325+
* // It will require modifications to work:
1326+
* // - It may require correct/in-range values for request initialization.
1327+
* // - It may require specifying regional endpoints when creating the service client as shown in
1328+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1329+
* try (ComplianceClient complianceClient = ComplianceClient.create()) {
1330+
* CustomBindingRequest request =
1331+
* CustomBindingRequest.newBuilder()
1332+
* .setName("name3373707")
1333+
* .setInfo(ComplianceData.newBuilder().build())
1334+
* .setServerVerify(true)
1335+
* .setCustomKebabName("customKebabName-2062111197")
1336+
* .setCustomBodyMessage(ComplianceData.newBuilder().build())
1337+
* .build();
1338+
* RepeatResponse response = complianceClient.repeatDataCustomQuery(request);
1339+
* }
1340+
* }</pre>
1341+
*
1342+
* @param request The request object containing all of the parameters for the API call.
1343+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
1344+
*/
1345+
public final RepeatResponse repeatDataCustomQuery(CustomBindingRequest request) {
1346+
return repeatDataCustomQueryCallable().call(request);
1347+
}
1348+
1349+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
1350+
/**
1351+
* Testing custom query parameter mapping with dashes
1352+
*
1353+
* <p>Sample code:
1354+
*
1355+
* <pre>{@code
1356+
* // This snippet has been automatically generated and should be regarded as a code template only.
1357+
* // It will require modifications to work:
1358+
* // - It may require correct/in-range values for request initialization.
1359+
* // - It may require specifying regional endpoints when creating the service client as shown in
1360+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1361+
* try (ComplianceClient complianceClient = ComplianceClient.create()) {
1362+
* CustomBindingRequest request =
1363+
* CustomBindingRequest.newBuilder()
1364+
* .setName("name3373707")
1365+
* .setInfo(ComplianceData.newBuilder().build())
1366+
* .setServerVerify(true)
1367+
* .setCustomKebabName("customKebabName-2062111197")
1368+
* .setCustomBodyMessage(ComplianceData.newBuilder().build())
1369+
* .build();
1370+
* ApiFuture<RepeatResponse> future =
1371+
* complianceClient.repeatDataCustomQueryCallable().futureCall(request);
1372+
* // Do something.
1373+
* RepeatResponse response = future.get();
1374+
* }
1375+
* }</pre>
1376+
*/
1377+
public final UnaryCallable<CustomBindingRequest, RepeatResponse> repeatDataCustomQueryCallable() {
1378+
return stub.repeatDataCustomQueryCallable();
1379+
}
1380+
11441381
// AUTO-GENERATED DOCUMENTATION AND METHOD.
11451382
/**
11461383
* Lists information about the supported locations for this service.

java-showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/ComplianceSettings.java

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,22 @@ public UnaryCallSettings<EnumResponse, EnumResponse> verifyEnumSettings() {
147147
return ((ComplianceStubSettings) getStubSettings()).verifyEnumSettings();
148148
}
149149

150+
/** Returns the object with the settings used for calls to repeatDataCustomPath. */
151+
public UnaryCallSettings<CustomBindingRequest, RepeatResponse> repeatDataCustomPathSettings() {
152+
return ((ComplianceStubSettings) getStubSettings()).repeatDataCustomPathSettings();
153+
}
154+
155+
/** Returns the object with the settings used for calls to repeatDataBodyCustomMessage. */
156+
public UnaryCallSettings<CustomBindingRequest, RepeatResponse>
157+
repeatDataBodyCustomMessageSettings() {
158+
return ((ComplianceStubSettings) getStubSettings()).repeatDataBodyCustomMessageSettings();
159+
}
160+
161+
/** Returns the object with the settings used for calls to repeatDataCustomQuery. */
162+
public UnaryCallSettings<CustomBindingRequest, RepeatResponse> repeatDataCustomQuerySettings() {
163+
return ((ComplianceStubSettings) getStubSettings()).repeatDataCustomQuerySettings();
164+
}
165+
150166
/** Returns the object with the settings used for calls to listLocations. */
151167
public PagedCallSettings<ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
152168
listLocationsSettings() {
@@ -337,6 +353,24 @@ public UnaryCallSettings.Builder<EnumResponse, EnumResponse> verifyEnumSettings(
337353
return getStubSettingsBuilder().verifyEnumSettings();
338354
}
339355

356+
/** Returns the builder for the settings used for calls to repeatDataCustomPath. */
357+
public UnaryCallSettings.Builder<CustomBindingRequest, RepeatResponse>
358+
repeatDataCustomPathSettings() {
359+
return getStubSettingsBuilder().repeatDataCustomPathSettings();
360+
}
361+
362+
/** Returns the builder for the settings used for calls to repeatDataBodyCustomMessage. */
363+
public UnaryCallSettings.Builder<CustomBindingRequest, RepeatResponse>
364+
repeatDataBodyCustomMessageSettings() {
365+
return getStubSettingsBuilder().repeatDataBodyCustomMessageSettings();
366+
}
367+
368+
/** Returns the builder for the settings used for calls to repeatDataCustomQuery. */
369+
public UnaryCallSettings.Builder<CustomBindingRequest, RepeatResponse>
370+
repeatDataCustomQuerySettings() {
371+
return getStubSettingsBuilder().repeatDataCustomQuerySettings();
372+
}
373+
340374
/** Returns the builder for the settings used for calls to listLocations. */
341375
public PagedCallSettings.Builder<
342376
ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>

java-showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/gapic_metadata.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@
2525
"RepeatDataBody": {
2626
"methods": ["repeatDataBody", "repeatDataBodyCallable"]
2727
},
28+
"RepeatDataBodyCustomMessage": {
29+
"methods": ["repeatDataBodyCustomMessage", "repeatDataBodyCustomMessageCallable"]
30+
},
2831
"RepeatDataBodyInfo": {
2932
"methods": ["repeatDataBodyInfo", "repeatDataBodyInfoCallable"]
3033
},
@@ -34,6 +37,12 @@
3437
"RepeatDataBodyPut": {
3538
"methods": ["repeatDataBodyPut", "repeatDataBodyPutCallable"]
3639
},
40+
"RepeatDataCustomPath": {
41+
"methods": ["repeatDataCustomPath", "repeatDataCustomPathCallable"]
42+
},
43+
"RepeatDataCustomQuery": {
44+
"methods": ["repeatDataCustomQuery", "repeatDataCustomQueryCallable"]
45+
},
3746
"RepeatDataPathResource": {
3847
"methods": ["repeatDataPathResource", "repeatDataPathResourceCallable"]
3948
},

java-showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/ComplianceStub.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
import com.google.iam.v1.SetIamPolicyRequest;
3131
import com.google.iam.v1.TestIamPermissionsRequest;
3232
import com.google.iam.v1.TestIamPermissionsResponse;
33+
import com.google.showcase.v1beta1.CustomBindingRequest;
3334
import com.google.showcase.v1beta1.EnumRequest;
3435
import com.google.showcase.v1beta1.EnumResponse;
3536
import com.google.showcase.v1beta1.RepeatRequest;
@@ -87,6 +88,19 @@ public UnaryCallable<EnumResponse, EnumResponse> verifyEnumCallable() {
8788
throw new UnsupportedOperationException("Not implemented: verifyEnumCallable()");
8889
}
8990

91+
public UnaryCallable<CustomBindingRequest, RepeatResponse> repeatDataCustomPathCallable() {
92+
throw new UnsupportedOperationException("Not implemented: repeatDataCustomPathCallable()");
93+
}
94+
95+
public UnaryCallable<CustomBindingRequest, RepeatResponse> repeatDataBodyCustomMessageCallable() {
96+
throw new UnsupportedOperationException(
97+
"Not implemented: repeatDataBodyCustomMessageCallable()");
98+
}
99+
100+
public UnaryCallable<CustomBindingRequest, RepeatResponse> repeatDataCustomQueryCallable() {
101+
throw new UnsupportedOperationException("Not implemented: repeatDataCustomQueryCallable()");
102+
}
103+
90104
public UnaryCallable<ListLocationsRequest, ListLocationsPagedResponse>
91105
listLocationsPagedCallable() {
92106
throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()");

0 commit comments

Comments
 (0)