Skip to content
This repository was archived by the owner on Jul 15, 2024. It is now read-only.

Commit 5345e39

Browse files
feat: update compute API to revision 20220112 (#641)
* feat: update compute API to revision 20220112 (#700) Source-Link: googleapis/googleapis@249e9a1 Source-Link: https://github.com/googleapis/googleapis-gen/commit/1f2c41bbfe097616ceb1e9fb67872a6bb1dc59d4 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMWYyYzQxYmJmZTA5NzYxNmNlYjFlOWZiNjc4NzJhNmJiMWRjNTlkNCJ9 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fix: fix breaking changes in Compute API (#701) Source-Link: googleapis/googleapis@272c110 Source-Link: https://github.com/googleapis/googleapis-gen/commit/4c674ff6fdb2ba58efcc4e79cdd8224b6e04da94 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNGM2NzRmZjZmZGIyYmE1OGVmY2M0ZTc5Y2RkODIyNGI2ZTA0ZGE5NCJ9 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent b2479fa commit 5345e39

File tree

591 files changed

+105962
-19122
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

591 files changed

+105962
-19122
lines changed

Diff for: google-cloud-compute/src/main/java/com/google/cloud/compute/v1/BackendBucketsClient.java

+121
Original file line numberDiff line numberDiff line change
@@ -912,6 +912,127 @@ public final UnaryCallable<PatchBackendBucketRequest, Operation> patchCallable()
912912
return stub.patchCallable();
913913
}
914914

915+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
916+
/**
917+
* Sets the edge security policy for the specified backend bucket.
918+
*
919+
* <p>Sample code:
920+
*
921+
* <pre>{@code
922+
* try (BackendBucketsClient backendBucketsClient = BackendBucketsClient.create()) {
923+
* String project = "project-309310695";
924+
* String backendBucket = "backendBucket713751966";
925+
* SecurityPolicyReference securityPolicyReferenceResource =
926+
* SecurityPolicyReference.newBuilder().build();
927+
* Operation response =
928+
* backendBucketsClient
929+
* .setEdgeSecurityPolicyAsync(project, backendBucket, securityPolicyReferenceResource)
930+
* .get();
931+
* }
932+
* }</pre>
933+
*
934+
* @param project Project ID for this request.
935+
* @param backendBucket Name of the BackendService resource to which the security policy should be
936+
* set. The name should conform to RFC1035.
937+
* @param securityPolicyReferenceResource The body resource for this request
938+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
939+
*/
940+
public final OperationFuture<Operation, Operation> setEdgeSecurityPolicyAsync(
941+
String project,
942+
String backendBucket,
943+
SecurityPolicyReference securityPolicyReferenceResource) {
944+
SetEdgeSecurityPolicyBackendBucketRequest request =
945+
SetEdgeSecurityPolicyBackendBucketRequest.newBuilder()
946+
.setProject(project)
947+
.setBackendBucket(backendBucket)
948+
.setSecurityPolicyReferenceResource(securityPolicyReferenceResource)
949+
.build();
950+
return setEdgeSecurityPolicyAsync(request);
951+
}
952+
953+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
954+
/**
955+
* Sets the edge security policy for the specified backend bucket.
956+
*
957+
* <p>Sample code:
958+
*
959+
* <pre>{@code
960+
* try (BackendBucketsClient backendBucketsClient = BackendBucketsClient.create()) {
961+
* SetEdgeSecurityPolicyBackendBucketRequest request =
962+
* SetEdgeSecurityPolicyBackendBucketRequest.newBuilder()
963+
* .setBackendBucket("backendBucket713751966")
964+
* .setProject("project-309310695")
965+
* .setRequestId("requestId693933066")
966+
* .setSecurityPolicyReferenceResource(SecurityPolicyReference.newBuilder().build())
967+
* .build();
968+
* Operation response = backendBucketsClient.setEdgeSecurityPolicyAsync(request).get();
969+
* }
970+
* }</pre>
971+
*
972+
* @param request The request object containing all of the parameters for the API call.
973+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
974+
*/
975+
@BetaApi(
976+
"The surface for long-running operations is not stable yet and may change in the future.")
977+
public final OperationFuture<Operation, Operation> setEdgeSecurityPolicyAsync(
978+
SetEdgeSecurityPolicyBackendBucketRequest request) {
979+
return setEdgeSecurityPolicyOperationCallable().futureCall(request);
980+
}
981+
982+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
983+
/**
984+
* Sets the edge security policy for the specified backend bucket.
985+
*
986+
* <p>Sample code:
987+
*
988+
* <pre>{@code
989+
* try (BackendBucketsClient backendBucketsClient = BackendBucketsClient.create()) {
990+
* SetEdgeSecurityPolicyBackendBucketRequest request =
991+
* SetEdgeSecurityPolicyBackendBucketRequest.newBuilder()
992+
* .setBackendBucket("backendBucket713751966")
993+
* .setProject("project-309310695")
994+
* .setRequestId("requestId693933066")
995+
* .setSecurityPolicyReferenceResource(SecurityPolicyReference.newBuilder().build())
996+
* .build();
997+
* OperationFuture<Operation, Operation> future =
998+
* backendBucketsClient.setEdgeSecurityPolicyOperationCallable().futureCall(request);
999+
* // Do something.
1000+
* Operation response = future.get();
1001+
* }
1002+
* }</pre>
1003+
*/
1004+
public final OperationCallable<SetEdgeSecurityPolicyBackendBucketRequest, Operation, Operation>
1005+
setEdgeSecurityPolicyOperationCallable() {
1006+
return stub.setEdgeSecurityPolicyOperationCallable();
1007+
}
1008+
1009+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
1010+
/**
1011+
* Sets the edge security policy for the specified backend bucket.
1012+
*
1013+
* <p>Sample code:
1014+
*
1015+
* <pre>{@code
1016+
* try (BackendBucketsClient backendBucketsClient = BackendBucketsClient.create()) {
1017+
* SetEdgeSecurityPolicyBackendBucketRequest request =
1018+
* SetEdgeSecurityPolicyBackendBucketRequest.newBuilder()
1019+
* .setBackendBucket("backendBucket713751966")
1020+
* .setProject("project-309310695")
1021+
* .setRequestId("requestId693933066")
1022+
* .setSecurityPolicyReferenceResource(SecurityPolicyReference.newBuilder().build())
1023+
* .build();
1024+
* ApiFuture<Operation> future =
1025+
* backendBucketsClient.setEdgeSecurityPolicyCallable().futureCall(request);
1026+
* // Do something.
1027+
* Operation response = future.get();
1028+
* }
1029+
* }</pre>
1030+
*/
1031+
public final UnaryCallable<SetEdgeSecurityPolicyBackendBucketRequest, Operation>
1032+
setEdgeSecurityPolicyCallable() {
1033+
return stub.setEdgeSecurityPolicyCallable();
1034+
}
1035+
9151036
// AUTO-GENERATED DOCUMENTATION AND METHOD.
9161037
/**
9171038
* Updates the specified BackendBucket resource with the data included in the request.

Diff for: google-cloud-compute/src/main/java/com/google/cloud/compute/v1/BackendBucketsSettings.java

+26
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,19 @@ public UnaryCallSettings<PatchBackendBucketRequest, Operation> patchSettings() {
138138
return ((BackendBucketsStubSettings) getStubSettings()).patchOperationSettings();
139139
}
140140

141+
/** Returns the object with the settings used for calls to setEdgeSecurityPolicy. */
142+
public UnaryCallSettings<SetEdgeSecurityPolicyBackendBucketRequest, Operation>
143+
setEdgeSecurityPolicySettings() {
144+
return ((BackendBucketsStubSettings) getStubSettings()).setEdgeSecurityPolicySettings();
145+
}
146+
147+
/** Returns the object with the settings used for calls to setEdgeSecurityPolicy. */
148+
public OperationCallSettings<SetEdgeSecurityPolicyBackendBucketRequest, Operation, Operation>
149+
setEdgeSecurityPolicyOperationSettings() {
150+
return ((BackendBucketsStubSettings) getStubSettings())
151+
.setEdgeSecurityPolicyOperationSettings();
152+
}
153+
141154
/** Returns the object with the settings used for calls to update. */
142155
public UnaryCallSettings<UpdateBackendBucketRequest, Operation> updateSettings() {
143156
return ((BackendBucketsStubSettings) getStubSettings()).updateSettings();
@@ -317,6 +330,19 @@ public UnaryCallSettings.Builder<PatchBackendBucketRequest, Operation> patchSett
317330
return getStubSettingsBuilder().patchOperationSettings();
318331
}
319332

333+
/** Returns the builder for the settings used for calls to setEdgeSecurityPolicy. */
334+
public UnaryCallSettings.Builder<SetEdgeSecurityPolicyBackendBucketRequest, Operation>
335+
setEdgeSecurityPolicySettings() {
336+
return getStubSettingsBuilder().setEdgeSecurityPolicySettings();
337+
}
338+
339+
/** Returns the builder for the settings used for calls to setEdgeSecurityPolicy. */
340+
public OperationCallSettings.Builder<
341+
SetEdgeSecurityPolicyBackendBucketRequest, Operation, Operation>
342+
setEdgeSecurityPolicyOperationSettings() {
343+
return getStubSettingsBuilder().setEdgeSecurityPolicyOperationSettings();
344+
}
345+
320346
/** Returns the builder for the settings used for calls to update. */
321347
public UnaryCallSettings.Builder<UpdateBackendBucketRequest, Operation> updateSettings() {
322348
return getStubSettingsBuilder().updateSettings();

Diff for: google-cloud-compute/src/main/java/com/google/cloud/compute/v1/BackendServicesClient.java

+121
Original file line numberDiff line numberDiff line change
@@ -1141,6 +1141,127 @@ public final UnaryCallable<PatchBackendServiceRequest, Operation> patchCallable(
11411141
return stub.patchCallable();
11421142
}
11431143

1144+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
1145+
/**
1146+
* Sets the edge security policy for the specified backend service.
1147+
*
1148+
* <p>Sample code:
1149+
*
1150+
* <pre>{@code
1151+
* try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
1152+
* String project = "project-309310695";
1153+
* String backendService = "backendService-1884714623";
1154+
* SecurityPolicyReference securityPolicyReferenceResource =
1155+
* SecurityPolicyReference.newBuilder().build();
1156+
* Operation response =
1157+
* backendServicesClient
1158+
* .setEdgeSecurityPolicyAsync(project, backendService, securityPolicyReferenceResource)
1159+
* .get();
1160+
* }
1161+
* }</pre>
1162+
*
1163+
* @param project Project ID for this request.
1164+
* @param backendService Name of the BackendService resource to which the edge security policy
1165+
* should be set. The name should conform to RFC1035.
1166+
* @param securityPolicyReferenceResource The body resource for this request
1167+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
1168+
*/
1169+
public final OperationFuture<Operation, Operation> setEdgeSecurityPolicyAsync(
1170+
String project,
1171+
String backendService,
1172+
SecurityPolicyReference securityPolicyReferenceResource) {
1173+
SetEdgeSecurityPolicyBackendServiceRequest request =
1174+
SetEdgeSecurityPolicyBackendServiceRequest.newBuilder()
1175+
.setProject(project)
1176+
.setBackendService(backendService)
1177+
.setSecurityPolicyReferenceResource(securityPolicyReferenceResource)
1178+
.build();
1179+
return setEdgeSecurityPolicyAsync(request);
1180+
}
1181+
1182+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
1183+
/**
1184+
* Sets the edge security policy for the specified backend service.
1185+
*
1186+
* <p>Sample code:
1187+
*
1188+
* <pre>{@code
1189+
* try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
1190+
* SetEdgeSecurityPolicyBackendServiceRequest request =
1191+
* SetEdgeSecurityPolicyBackendServiceRequest.newBuilder()
1192+
* .setBackendService("backendService-1884714623")
1193+
* .setProject("project-309310695")
1194+
* .setRequestId("requestId693933066")
1195+
* .setSecurityPolicyReferenceResource(SecurityPolicyReference.newBuilder().build())
1196+
* .build();
1197+
* Operation response = backendServicesClient.setEdgeSecurityPolicyAsync(request).get();
1198+
* }
1199+
* }</pre>
1200+
*
1201+
* @param request The request object containing all of the parameters for the API call.
1202+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
1203+
*/
1204+
@BetaApi(
1205+
"The surface for long-running operations is not stable yet and may change in the future.")
1206+
public final OperationFuture<Operation, Operation> setEdgeSecurityPolicyAsync(
1207+
SetEdgeSecurityPolicyBackendServiceRequest request) {
1208+
return setEdgeSecurityPolicyOperationCallable().futureCall(request);
1209+
}
1210+
1211+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
1212+
/**
1213+
* Sets the edge security policy for the specified backend service.
1214+
*
1215+
* <p>Sample code:
1216+
*
1217+
* <pre>{@code
1218+
* try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
1219+
* SetEdgeSecurityPolicyBackendServiceRequest request =
1220+
* SetEdgeSecurityPolicyBackendServiceRequest.newBuilder()
1221+
* .setBackendService("backendService-1884714623")
1222+
* .setProject("project-309310695")
1223+
* .setRequestId("requestId693933066")
1224+
* .setSecurityPolicyReferenceResource(SecurityPolicyReference.newBuilder().build())
1225+
* .build();
1226+
* OperationFuture<Operation, Operation> future =
1227+
* backendServicesClient.setEdgeSecurityPolicyOperationCallable().futureCall(request);
1228+
* // Do something.
1229+
* Operation response = future.get();
1230+
* }
1231+
* }</pre>
1232+
*/
1233+
public final OperationCallable<SetEdgeSecurityPolicyBackendServiceRequest, Operation, Operation>
1234+
setEdgeSecurityPolicyOperationCallable() {
1235+
return stub.setEdgeSecurityPolicyOperationCallable();
1236+
}
1237+
1238+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
1239+
/**
1240+
* Sets the edge security policy for the specified backend service.
1241+
*
1242+
* <p>Sample code:
1243+
*
1244+
* <pre>{@code
1245+
* try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
1246+
* SetEdgeSecurityPolicyBackendServiceRequest request =
1247+
* SetEdgeSecurityPolicyBackendServiceRequest.newBuilder()
1248+
* .setBackendService("backendService-1884714623")
1249+
* .setProject("project-309310695")
1250+
* .setRequestId("requestId693933066")
1251+
* .setSecurityPolicyReferenceResource(SecurityPolicyReference.newBuilder().build())
1252+
* .build();
1253+
* ApiFuture<Operation> future =
1254+
* backendServicesClient.setEdgeSecurityPolicyCallable().futureCall(request);
1255+
* // Do something.
1256+
* Operation response = future.get();
1257+
* }
1258+
* }</pre>
1259+
*/
1260+
public final UnaryCallable<SetEdgeSecurityPolicyBackendServiceRequest, Operation>
1261+
setEdgeSecurityPolicyCallable() {
1262+
return stub.setEdgeSecurityPolicyCallable();
1263+
}
1264+
11441265
// AUTO-GENERATED DOCUMENTATION AND METHOD.
11451266
/**
11461267
* Sets the Google Cloud Armor security policy for the specified backend service. For more

Diff for: google-cloud-compute/src/main/java/com/google/cloud/compute/v1/BackendServicesSettings.java

+26
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,19 @@ public UnaryCallSettings<PatchBackendServiceRequest, Operation> patchSettings()
154154
return ((BackendServicesStubSettings) getStubSettings()).patchOperationSettings();
155155
}
156156

157+
/** Returns the object with the settings used for calls to setEdgeSecurityPolicy. */
158+
public UnaryCallSettings<SetEdgeSecurityPolicyBackendServiceRequest, Operation>
159+
setEdgeSecurityPolicySettings() {
160+
return ((BackendServicesStubSettings) getStubSettings()).setEdgeSecurityPolicySettings();
161+
}
162+
163+
/** Returns the object with the settings used for calls to setEdgeSecurityPolicy. */
164+
public OperationCallSettings<SetEdgeSecurityPolicyBackendServiceRequest, Operation, Operation>
165+
setEdgeSecurityPolicyOperationSettings() {
166+
return ((BackendServicesStubSettings) getStubSettings())
167+
.setEdgeSecurityPolicyOperationSettings();
168+
}
169+
157170
/** Returns the object with the settings used for calls to setSecurityPolicy. */
158171
public UnaryCallSettings<SetSecurityPolicyBackendServiceRequest, Operation>
159172
setSecurityPolicySettings() {
@@ -360,6 +373,19 @@ public UnaryCallSettings.Builder<PatchBackendServiceRequest, Operation> patchSet
360373
return getStubSettingsBuilder().patchOperationSettings();
361374
}
362375

376+
/** Returns the builder for the settings used for calls to setEdgeSecurityPolicy. */
377+
public UnaryCallSettings.Builder<SetEdgeSecurityPolicyBackendServiceRequest, Operation>
378+
setEdgeSecurityPolicySettings() {
379+
return getStubSettingsBuilder().setEdgeSecurityPolicySettings();
380+
}
381+
382+
/** Returns the builder for the settings used for calls to setEdgeSecurityPolicy. */
383+
public OperationCallSettings.Builder<
384+
SetEdgeSecurityPolicyBackendServiceRequest, Operation, Operation>
385+
setEdgeSecurityPolicyOperationSettings() {
386+
return getStubSettingsBuilder().setEdgeSecurityPolicyOperationSettings();
387+
}
388+
363389
/** Returns the builder for the settings used for calls to setSecurityPolicy. */
364390
public UnaryCallSettings.Builder<SetSecurityPolicyBackendServiceRequest, Operation>
365391
setSecurityPolicySettings() {

Diff for: google-cloud-compute/src/main/java/com/google/cloud/compute/v1/DisksClient.java

+12-4
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,9 @@ public final AggregatedListPagedResponse aggregatedList(AggregatedListDisksReque
411411

412412
// AUTO-GENERATED DOCUMENTATION AND METHOD.
413413
/**
414-
* Creates a snapshot of a specified persistent disk.
414+
* Creates a snapshot of a specified persistent disk. For regular snapshot creation, consider
415+
* using snapshots.insert instead, as that method supports more features, such as creating
416+
* snapshots in a project different from the source disk project.
415417
*
416418
* <p>Sample code:
417419
*
@@ -446,7 +448,9 @@ public final OperationFuture<Operation, Operation> createSnapshotAsync(
446448

447449
// AUTO-GENERATED DOCUMENTATION AND METHOD.
448450
/**
449-
* Creates a snapshot of a specified persistent disk.
451+
* Creates a snapshot of a specified persistent disk. For regular snapshot creation, consider
452+
* using snapshots.insert instead, as that method supports more features, such as creating
453+
* snapshots in a project different from the source disk project.
450454
*
451455
* <p>Sample code:
452456
*
@@ -477,7 +481,9 @@ public final OperationFuture<Operation, Operation> createSnapshotAsync(
477481

478482
// AUTO-GENERATED DOCUMENTATION AND METHOD.
479483
/**
480-
* Creates a snapshot of a specified persistent disk.
484+
* Creates a snapshot of a specified persistent disk. For regular snapshot creation, consider
485+
* using snapshots.insert instead, as that method supports more features, such as creating
486+
* snapshots in a project different from the source disk project.
481487
*
482488
* <p>Sample code:
483489
*
@@ -506,7 +512,9 @@ public final OperationFuture<Operation, Operation> createSnapshotAsync(
506512

507513
// AUTO-GENERATED DOCUMENTATION AND METHOD.
508514
/**
509-
* Creates a snapshot of a specified persistent disk.
515+
* Creates a snapshot of a specified persistent disk. For regular snapshot creation, consider
516+
* using snapshots.insert instead, as that method supports more features, such as creating
517+
* snapshots in a project different from the source disk project.
510518
*
511519
* <p>Sample code:
512520
*

0 commit comments

Comments
 (0)