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

Commit 23bfd36

Browse files
feat: Update Compute Engine API to revision 20220831 (#729) (#726)
- [ ] Regenerate this pull request now. Source-Link: googleapis/googleapis@63c3007 Source-Link: https://github.com/googleapis/googleapis-gen/commit/b6582231ae7b7f5cd18f7d142c65421773cca5de Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjY1ODIyMzFhZTdiN2Y1Y2QxOGY3ZDE0MmM2NTQyMTc3M2NjYTVkZSJ9
1 parent a80b35a commit 23bfd36

File tree

193 files changed

+74282
-15733
lines changed

Some content is hidden

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

193 files changed

+74282
-15733
lines changed

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

+149
Original file line numberDiff line numberDiff line change
@@ -808,6 +808,155 @@ public final UnaryCallable<ListAddressesRequest, AddressList> listCallable() {
808808
return stub.listCallable();
809809
}
810810

811+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
812+
/**
813+
* Sets the labels on an Address. To learn more about labels, read the Labeling Resources
814+
* documentation.
815+
*
816+
* <p>Sample code:
817+
*
818+
* <pre>{@code
819+
* // This snippet has been automatically generated and should be regarded as a code template only.
820+
* // It will require modifications to work:
821+
* // - It may require correct/in-range values for request initialization.
822+
* // - It may require specifying regional endpoints when creating the service client as shown in
823+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
824+
* try (AddressesClient addressesClient = AddressesClient.create()) {
825+
* String project = "project-309310695";
826+
* String region = "region-934795532";
827+
* String resource = "resource-341064690";
828+
* RegionSetLabelsRequest regionSetLabelsRequestResource =
829+
* RegionSetLabelsRequest.newBuilder().build();
830+
* Operation response =
831+
* addressesClient
832+
* .setLabelsAsync(project, region, resource, regionSetLabelsRequestResource)
833+
* .get();
834+
* }
835+
* }</pre>
836+
*
837+
* @param project Project ID for this request.
838+
* @param region The region for this request.
839+
* @param resource Name or id of the resource for this request.
840+
* @param regionSetLabelsRequestResource The body resource for this request
841+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
842+
*/
843+
public final OperationFuture<Operation, Operation> setLabelsAsync(
844+
String project,
845+
String region,
846+
String resource,
847+
RegionSetLabelsRequest regionSetLabelsRequestResource) {
848+
SetLabelsAddressRequest request =
849+
SetLabelsAddressRequest.newBuilder()
850+
.setProject(project)
851+
.setRegion(region)
852+
.setResource(resource)
853+
.setRegionSetLabelsRequestResource(regionSetLabelsRequestResource)
854+
.build();
855+
return setLabelsAsync(request);
856+
}
857+
858+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
859+
/**
860+
* Sets the labels on an Address. To learn more about labels, read the Labeling Resources
861+
* documentation.
862+
*
863+
* <p>Sample code:
864+
*
865+
* <pre>{@code
866+
* // This snippet has been automatically generated and should be regarded as a code template only.
867+
* // It will require modifications to work:
868+
* // - It may require correct/in-range values for request initialization.
869+
* // - It may require specifying regional endpoints when creating the service client as shown in
870+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
871+
* try (AddressesClient addressesClient = AddressesClient.create()) {
872+
* SetLabelsAddressRequest request =
873+
* SetLabelsAddressRequest.newBuilder()
874+
* .setProject("project-309310695")
875+
* .setRegion("region-934795532")
876+
* .setRegionSetLabelsRequestResource(RegionSetLabelsRequest.newBuilder().build())
877+
* .setRequestId("requestId693933066")
878+
* .setResource("resource-341064690")
879+
* .build();
880+
* Operation response = addressesClient.setLabelsAsync(request).get();
881+
* }
882+
* }</pre>
883+
*
884+
* @param request The request object containing all of the parameters for the API call.
885+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
886+
*/
887+
@BetaApi(
888+
"The surface for long-running operations is not stable yet and may change in the future.")
889+
public final OperationFuture<Operation, Operation> setLabelsAsync(
890+
SetLabelsAddressRequest request) {
891+
return setLabelsOperationCallable().futureCall(request);
892+
}
893+
894+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
895+
/**
896+
* Sets the labels on an Address. To learn more about labels, read the Labeling Resources
897+
* documentation.
898+
*
899+
* <p>Sample code:
900+
*
901+
* <pre>{@code
902+
* // This snippet has been automatically generated and should be regarded as a code template only.
903+
* // It will require modifications to work:
904+
* // - It may require correct/in-range values for request initialization.
905+
* // - It may require specifying regional endpoints when creating the service client as shown in
906+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
907+
* try (AddressesClient addressesClient = AddressesClient.create()) {
908+
* SetLabelsAddressRequest request =
909+
* SetLabelsAddressRequest.newBuilder()
910+
* .setProject("project-309310695")
911+
* .setRegion("region-934795532")
912+
* .setRegionSetLabelsRequestResource(RegionSetLabelsRequest.newBuilder().build())
913+
* .setRequestId("requestId693933066")
914+
* .setResource("resource-341064690")
915+
* .build();
916+
* OperationFuture<Operation, Operation> future =
917+
* addressesClient.setLabelsOperationCallable().futureCall(request);
918+
* // Do something.
919+
* Operation response = future.get();
920+
* }
921+
* }</pre>
922+
*/
923+
public final OperationCallable<SetLabelsAddressRequest, Operation, Operation>
924+
setLabelsOperationCallable() {
925+
return stub.setLabelsOperationCallable();
926+
}
927+
928+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
929+
/**
930+
* Sets the labels on an Address. To learn more about labels, read the Labeling Resources
931+
* documentation.
932+
*
933+
* <p>Sample code:
934+
*
935+
* <pre>{@code
936+
* // This snippet has been automatically generated and should be regarded as a code template only.
937+
* // It will require modifications to work:
938+
* // - It may require correct/in-range values for request initialization.
939+
* // - It may require specifying regional endpoints when creating the service client as shown in
940+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
941+
* try (AddressesClient addressesClient = AddressesClient.create()) {
942+
* SetLabelsAddressRequest request =
943+
* SetLabelsAddressRequest.newBuilder()
944+
* .setProject("project-309310695")
945+
* .setRegion("region-934795532")
946+
* .setRegionSetLabelsRequestResource(RegionSetLabelsRequest.newBuilder().build())
947+
* .setRequestId("requestId693933066")
948+
* .setResource("resource-341064690")
949+
* .build();
950+
* ApiFuture<Operation> future = addressesClient.setLabelsCallable().futureCall(request);
951+
* // Do something.
952+
* Operation response = future.get();
953+
* }
954+
* }</pre>
955+
*/
956+
public final UnaryCallable<SetLabelsAddressRequest, Operation> setLabelsCallable() {
957+
return stub.setLabelsCallable();
958+
}
959+
811960
@Override
812961
public final void close() {
813962
stub.close();

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

+22
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,17 @@ public PagedCallSettings<ListAddressesRequest, AddressList, ListPagedResponse> l
111111
return ((AddressesStubSettings) getStubSettings()).listSettings();
112112
}
113113

114+
/** Returns the object with the settings used for calls to setLabels. */
115+
public UnaryCallSettings<SetLabelsAddressRequest, Operation> setLabelsSettings() {
116+
return ((AddressesStubSettings) getStubSettings()).setLabelsSettings();
117+
}
118+
119+
/** Returns the object with the settings used for calls to setLabels. */
120+
public OperationCallSettings<SetLabelsAddressRequest, Operation, Operation>
121+
setLabelsOperationSettings() {
122+
return ((AddressesStubSettings) getStubSettings()).setLabelsOperationSettings();
123+
}
124+
114125
public static final AddressesSettings create(AddressesStubSettings stub) throws IOException {
115126
return new AddressesSettings.Builder(stub.toBuilder()).build();
116127
}
@@ -248,6 +259,17 @@ public UnaryCallSettings.Builder<InsertAddressRequest, Operation> insertSettings
248259
return getStubSettingsBuilder().listSettings();
249260
}
250261

262+
/** Returns the builder for the settings used for calls to setLabels. */
263+
public UnaryCallSettings.Builder<SetLabelsAddressRequest, Operation> setLabelsSettings() {
264+
return getStubSettingsBuilder().setLabelsSettings();
265+
}
266+
267+
/** Returns the builder for the settings used for calls to setLabels. */
268+
public OperationCallSettings.Builder<SetLabelsAddressRequest, Operation, Operation>
269+
setLabelsOperationSettings() {
270+
return getStubSettingsBuilder().setLabelsOperationSettings();
271+
}
272+
251273
@Override
252274
public AddressesSettings build() throws IOException {
253275
return new AddressesSettings(this);

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

+191
Original file line numberDiff line numberDiff line change
@@ -912,6 +912,100 @@ public final BackendServiceGroupHealth getHealth(GetHealthBackendServiceRequest
912912
return stub.getHealthCallable();
913913
}
914914

915+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
916+
/**
917+
* Gets the access control policy for a resource. May be empty if no such policy or resource
918+
* exists.
919+
*
920+
* <p>Sample code:
921+
*
922+
* <pre>{@code
923+
* // This snippet has been automatically generated and should be regarded as a code template only.
924+
* // It will require modifications to work:
925+
* // - It may require correct/in-range values for request initialization.
926+
* // - It may require specifying regional endpoints when creating the service client as shown in
927+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
928+
* try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
929+
* String project = "project-309310695";
930+
* String resource = "resource-341064690";
931+
* Policy response = backendServicesClient.getIamPolicy(project, resource);
932+
* }
933+
* }</pre>
934+
*
935+
* @param project Project ID for this request.
936+
* @param resource Name or id of the resource for this request.
937+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
938+
*/
939+
public final Policy getIamPolicy(String project, String resource) {
940+
GetIamPolicyBackendServiceRequest request =
941+
GetIamPolicyBackendServiceRequest.newBuilder()
942+
.setProject(project)
943+
.setResource(resource)
944+
.build();
945+
return getIamPolicy(request);
946+
}
947+
948+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
949+
/**
950+
* Gets the access control policy for a resource. May be empty if no such policy or resource
951+
* exists.
952+
*
953+
* <p>Sample code:
954+
*
955+
* <pre>{@code
956+
* // This snippet has been automatically generated and should be regarded as a code template only.
957+
* // It will require modifications to work:
958+
* // - It may require correct/in-range values for request initialization.
959+
* // - It may require specifying regional endpoints when creating the service client as shown in
960+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
961+
* try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
962+
* GetIamPolicyBackendServiceRequest request =
963+
* GetIamPolicyBackendServiceRequest.newBuilder()
964+
* .setOptionsRequestedPolicyVersion(-574521795)
965+
* .setProject("project-309310695")
966+
* .setResource("resource-341064690")
967+
* .build();
968+
* Policy response = backendServicesClient.getIamPolicy(request);
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+
public final Policy getIamPolicy(GetIamPolicyBackendServiceRequest request) {
976+
return getIamPolicyCallable().call(request);
977+
}
978+
979+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
980+
/**
981+
* Gets the access control policy for a resource. May be empty if no such policy or resource
982+
* exists.
983+
*
984+
* <p>Sample code:
985+
*
986+
* <pre>{@code
987+
* // This snippet has been automatically generated and should be regarded as a code template only.
988+
* // It will require modifications to work:
989+
* // - It may require correct/in-range values for request initialization.
990+
* // - It may require specifying regional endpoints when creating the service client as shown in
991+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
992+
* try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
993+
* GetIamPolicyBackendServiceRequest request =
994+
* GetIamPolicyBackendServiceRequest.newBuilder()
995+
* .setOptionsRequestedPolicyVersion(-574521795)
996+
* .setProject("project-309310695")
997+
* .setResource("resource-341064690")
998+
* .build();
999+
* ApiFuture<Policy> future = backendServicesClient.getIamPolicyCallable().futureCall(request);
1000+
* // Do something.
1001+
* Policy response = future.get();
1002+
* }
1003+
* }</pre>
1004+
*/
1005+
public final UnaryCallable<GetIamPolicyBackendServiceRequest, Policy> getIamPolicyCallable() {
1006+
return stub.getIamPolicyCallable();
1007+
}
1008+
9151009
// AUTO-GENERATED DOCUMENTATION AND METHOD.
9161010
/**
9171011
* Creates a BackendService resource in the specified project using the data included in the
@@ -1464,6 +1558,103 @@ public final OperationFuture<Operation, Operation> setEdgeSecurityPolicyAsync(
14641558
return stub.setEdgeSecurityPolicyCallable();
14651559
}
14661560

1561+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
1562+
/**
1563+
* Sets the access control policy on the specified resource. Replaces any existing policy.
1564+
*
1565+
* <p>Sample code:
1566+
*
1567+
* <pre>{@code
1568+
* // This snippet has been automatically generated and should be regarded as a code template only.
1569+
* // It will require modifications to work:
1570+
* // - It may require correct/in-range values for request initialization.
1571+
* // - It may require specifying regional endpoints when creating the service client as shown in
1572+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1573+
* try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
1574+
* String project = "project-309310695";
1575+
* String resource = "resource-341064690";
1576+
* GlobalSetPolicyRequest globalSetPolicyRequestResource =
1577+
* GlobalSetPolicyRequest.newBuilder().build();
1578+
* Policy response =
1579+
* backendServicesClient.setIamPolicy(project, resource, globalSetPolicyRequestResource);
1580+
* }
1581+
* }</pre>
1582+
*
1583+
* @param project Project ID for this request.
1584+
* @param resource Name or id of the resource for this request.
1585+
* @param globalSetPolicyRequestResource The body resource for this request
1586+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
1587+
*/
1588+
public final Policy setIamPolicy(
1589+
String project, String resource, GlobalSetPolicyRequest globalSetPolicyRequestResource) {
1590+
SetIamPolicyBackendServiceRequest request =
1591+
SetIamPolicyBackendServiceRequest.newBuilder()
1592+
.setProject(project)
1593+
.setResource(resource)
1594+
.setGlobalSetPolicyRequestResource(globalSetPolicyRequestResource)
1595+
.build();
1596+
return setIamPolicy(request);
1597+
}
1598+
1599+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
1600+
/**
1601+
* Sets the access control policy on the specified resource. Replaces any existing policy.
1602+
*
1603+
* <p>Sample code:
1604+
*
1605+
* <pre>{@code
1606+
* // This snippet has been automatically generated and should be regarded as a code template only.
1607+
* // It will require modifications to work:
1608+
* // - It may require correct/in-range values for request initialization.
1609+
* // - It may require specifying regional endpoints when creating the service client as shown in
1610+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1611+
* try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
1612+
* SetIamPolicyBackendServiceRequest request =
1613+
* SetIamPolicyBackendServiceRequest.newBuilder()
1614+
* .setGlobalSetPolicyRequestResource(GlobalSetPolicyRequest.newBuilder().build())
1615+
* .setProject("project-309310695")
1616+
* .setResource("resource-341064690")
1617+
* .build();
1618+
* Policy response = backendServicesClient.setIamPolicy(request);
1619+
* }
1620+
* }</pre>
1621+
*
1622+
* @param request The request object containing all of the parameters for the API call.
1623+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
1624+
*/
1625+
public final Policy setIamPolicy(SetIamPolicyBackendServiceRequest request) {
1626+
return setIamPolicyCallable().call(request);
1627+
}
1628+
1629+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
1630+
/**
1631+
* Sets the access control policy on the specified resource. Replaces any existing policy.
1632+
*
1633+
* <p>Sample code:
1634+
*
1635+
* <pre>{@code
1636+
* // This snippet has been automatically generated and should be regarded as a code template only.
1637+
* // It will require modifications to work:
1638+
* // - It may require correct/in-range values for request initialization.
1639+
* // - It may require specifying regional endpoints when creating the service client as shown in
1640+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1641+
* try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
1642+
* SetIamPolicyBackendServiceRequest request =
1643+
* SetIamPolicyBackendServiceRequest.newBuilder()
1644+
* .setGlobalSetPolicyRequestResource(GlobalSetPolicyRequest.newBuilder().build())
1645+
* .setProject("project-309310695")
1646+
* .setResource("resource-341064690")
1647+
* .build();
1648+
* ApiFuture<Policy> future = backendServicesClient.setIamPolicyCallable().futureCall(request);
1649+
* // Do something.
1650+
* Policy response = future.get();
1651+
* }
1652+
* }</pre>
1653+
*/
1654+
public final UnaryCallable<SetIamPolicyBackendServiceRequest, Policy> setIamPolicyCallable() {
1655+
return stub.setIamPolicyCallable();
1656+
}
1657+
14671658
// AUTO-GENERATED DOCUMENTATION AND METHOD.
14681659
/**
14691660
* Sets the Google Cloud Armor security policy for the specified backend service. For more

0 commit comments

Comments
 (0)