@@ -368,7 +368,7 @@ public final UnaryCallable<CreateWorkloadRequest, Operation> createWorkloadCalla
368368 * }
369369 * }</pre>
370370 *
371- * @param workload Required. The workload to update. The workload’ s `name` field is used to
371+ * @param workload Required. The workload to update. The workload' s `name` field is used to
372372 * identify the workload to be updated. Format:
373373 * organizations/{org_id}/locations/{location_id}/workloads/{workload_id}
374374 * @param updateMask Required. The list of fields to be updated.
@@ -438,10 +438,126 @@ public final UnaryCallable<UpdateWorkloadRequest, Workload> updateWorkloadCallab
438438 return stub .updateWorkloadCallable ();
439439 }
440440
441+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
442+ /**
443+ * Restrict the list of services allowed in the Workload environment. The current list of allowed
444+ * services can be found at https://cloud.google.com/assured-workloads/docs/supported-products In
445+ * addition to assuredworkloads.workload.update permission, the user should also have
446+ * orgpolicy.policy.set permission on the folder resource to use this functionality.
447+ *
448+ * <p>Sample code:
449+ *
450+ * <pre>{@code
451+ * // This snippet has been automatically generated for illustrative purposes only.
452+ * // It may require modifications to work in your environment.
453+ * try (AssuredWorkloadsServiceClient assuredWorkloadsServiceClient =
454+ * AssuredWorkloadsServiceClient.create()) {
455+ * RestrictAllowedServicesRequest request =
456+ * RestrictAllowedServicesRequest.newBuilder().setName("name3373707").build();
457+ * RestrictAllowedServicesResponse response =
458+ * assuredWorkloadsServiceClient.restrictAllowedServices(request);
459+ * }
460+ * }</pre>
461+ *
462+ * @param request The request object containing all of the parameters for the API call.
463+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
464+ */
465+ public final RestrictAllowedServicesResponse restrictAllowedServices (
466+ RestrictAllowedServicesRequest request ) {
467+ return restrictAllowedServicesCallable ().call (request );
468+ }
469+
470+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
471+ /**
472+ * Restrict the list of services allowed in the Workload environment. The current list of allowed
473+ * services can be found at https://cloud.google.com/assured-workloads/docs/supported-products In
474+ * addition to assuredworkloads.workload.update permission, the user should also have
475+ * orgpolicy.policy.set permission on the folder resource to use this functionality.
476+ *
477+ * <p>Sample code:
478+ *
479+ * <pre>{@code
480+ * // This snippet has been automatically generated for illustrative purposes only.
481+ * // It may require modifications to work in your environment.
482+ * try (AssuredWorkloadsServiceClient assuredWorkloadsServiceClient =
483+ * AssuredWorkloadsServiceClient.create()) {
484+ * RestrictAllowedServicesRequest request =
485+ * RestrictAllowedServicesRequest.newBuilder().setName("name3373707").build();
486+ * ApiFuture<RestrictAllowedServicesResponse> future =
487+ * assuredWorkloadsServiceClient.restrictAllowedServicesCallable().futureCall(request);
488+ * // Do something.
489+ * RestrictAllowedServicesResponse response = future.get();
490+ * }
491+ * }</pre>
492+ */
493+ public final UnaryCallable <RestrictAllowedServicesRequest , RestrictAllowedServicesResponse >
494+ restrictAllowedServicesCallable () {
495+ return stub .restrictAllowedServicesCallable ();
496+ }
497+
498+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
499+ /**
500+ * Restrict the list of resources allowed in the Workload environment. The current list of allowed
501+ * products can be found at https://cloud.google.com/assured-workloads/docs/supported-products In
502+ * addition to assuredworkloads.workload.update permission, the user should also have
503+ * orgpolicy.policy.set permission on the folder resource to use this functionality.
504+ *
505+ * <p>Sample code:
506+ *
507+ * <pre>{@code
508+ * // This snippet has been automatically generated for illustrative purposes only.
509+ * // It may require modifications to work in your environment.
510+ * try (AssuredWorkloadsServiceClient assuredWorkloadsServiceClient =
511+ * AssuredWorkloadsServiceClient.create()) {
512+ * RestrictAllowedResourcesRequest request =
513+ * RestrictAllowedResourcesRequest.newBuilder().setName("name3373707").build();
514+ * RestrictAllowedResourcesResponse response =
515+ * assuredWorkloadsServiceClient.restrictAllowedResources(request);
516+ * }
517+ * }</pre>
518+ *
519+ * @param request The request object containing all of the parameters for the API call.
520+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
521+ */
522+ public final RestrictAllowedResourcesResponse restrictAllowedResources (
523+ RestrictAllowedResourcesRequest request ) {
524+ return restrictAllowedResourcesCallable ().call (request );
525+ }
526+
527+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
528+ /**
529+ * Restrict the list of resources allowed in the Workload environment. The current list of allowed
530+ * products can be found at https://cloud.google.com/assured-workloads/docs/supported-products In
531+ * addition to assuredworkloads.workload.update permission, the user should also have
532+ * orgpolicy.policy.set permission on the folder resource to use this functionality.
533+ *
534+ * <p>Sample code:
535+ *
536+ * <pre>{@code
537+ * // This snippet has been automatically generated for illustrative purposes only.
538+ * // It may require modifications to work in your environment.
539+ * try (AssuredWorkloadsServiceClient assuredWorkloadsServiceClient =
540+ * AssuredWorkloadsServiceClient.create()) {
541+ * RestrictAllowedResourcesRequest request =
542+ * RestrictAllowedResourcesRequest.newBuilder().setName("name3373707").build();
543+ * ApiFuture<RestrictAllowedResourcesResponse> future =
544+ * assuredWorkloadsServiceClient.restrictAllowedResourcesCallable().futureCall(request);
545+ * // Do something.
546+ * RestrictAllowedResourcesResponse response = future.get();
547+ * }
548+ * }</pre>
549+ */
550+ public final UnaryCallable <RestrictAllowedResourcesRequest , RestrictAllowedResourcesResponse >
551+ restrictAllowedResourcesCallable () {
552+ return stub .restrictAllowedResourcesCallable ();
553+ }
554+
441555 // AUTO-GENERATED DOCUMENTATION AND METHOD.
442556 /**
443557 * Deletes the workload. Make sure that workload's direct children are already in a deleted state,
444- * otherwise the request will fail with a FAILED_PRECONDITION error.
558+ * otherwise the request will fail with a FAILED_PRECONDITION error. In addition to
559+ * assuredworkloads.workload.delete permission, the user should also have orgpolicy.policy.set
560+ * permission on the deleted folder to remove Assured Workloads OrgPolicies.
445561 *
446562 * <p>Sample code:
447563 *
@@ -468,7 +584,9 @@ public final void deleteWorkload(WorkloadName name) {
468584 // AUTO-GENERATED DOCUMENTATION AND METHOD.
469585 /**
470586 * Deletes the workload. Make sure that workload's direct children are already in a deleted state,
471- * otherwise the request will fail with a FAILED_PRECONDITION error.
587+ * otherwise the request will fail with a FAILED_PRECONDITION error. In addition to
588+ * assuredworkloads.workload.delete permission, the user should also have orgpolicy.policy.set
589+ * permission on the deleted folder to remove Assured Workloads OrgPolicies.
472590 *
473591 * <p>Sample code:
474592 *
@@ -494,7 +612,9 @@ public final void deleteWorkload(String name) {
494612 // AUTO-GENERATED DOCUMENTATION AND METHOD.
495613 /**
496614 * Deletes the workload. Make sure that workload's direct children are already in a deleted state,
497- * otherwise the request will fail with a FAILED_PRECONDITION error.
615+ * otherwise the request will fail with a FAILED_PRECONDITION error. In addition to
616+ * assuredworkloads.workload.delete permission, the user should also have orgpolicy.policy.set
617+ * permission on the deleted folder to remove Assured Workloads OrgPolicies.
498618 *
499619 * <p>Sample code:
500620 *
@@ -522,7 +642,9 @@ public final void deleteWorkload(DeleteWorkloadRequest request) {
522642 // AUTO-GENERATED DOCUMENTATION AND METHOD.
523643 /**
524644 * Deletes the workload. Make sure that workload's direct children are already in a deleted state,
525- * otherwise the request will fail with a FAILED_PRECONDITION error.
645+ * otherwise the request will fail with a FAILED_PRECONDITION error. In addition to
646+ * assuredworkloads.workload.delete permission, the user should also have orgpolicy.policy.set
647+ * permission on the deleted folder to remove Assured Workloads OrgPolicies.
526648 *
527649 * <p>Sample code:
528650 *
@@ -654,6 +776,91 @@ public final UnaryCallable<GetWorkloadRequest, Workload> getWorkloadCallable() {
654776 return stub .getWorkloadCallable ();
655777 }
656778
779+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
780+ /**
781+ * Analyze if the source Assured Workloads can be moved to the target Assured Workload
782+ *
783+ * <p>Sample code:
784+ *
785+ * <pre>{@code
786+ * // This snippet has been automatically generated for illustrative purposes only.
787+ * // It may require modifications to work in your environment.
788+ * try (AssuredWorkloadsServiceClient assuredWorkloadsServiceClient =
789+ * AssuredWorkloadsServiceClient.create()) {
790+ * String project = "project-309310695";
791+ * String target = "target-880905839";
792+ * AnalyzeWorkloadMoveResponse response =
793+ * assuredWorkloadsServiceClient.analyzeWorkloadMove(project, target);
794+ * }
795+ * }</pre>
796+ *
797+ * @param project The Source is a project based to be moved. This is the project's relative path
798+ * in the API, formatted as "cloudresourcemanager.googleapis.com/projects/{project_number}"
799+ * "projects/{project_number}" "cloudresourcemanager.googleapis.com/projects/{project_id}"
800+ * "projects/{project_id}" For example,
801+ * "organizations/123/locations/us-east1/workloads/assured-workload-1".
802+ * @param target Required. The resource name of the Workload to fetch. This is the workloads's
803+ * relative path in the API, formatted as
804+ * "organizations/{organization_id}/locations/{location_id}/workloads/{workload_id}". For
805+ * example, "organizations/123/locations/us-east1/workloads/assured-workload-2".
806+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
807+ */
808+ public final AnalyzeWorkloadMoveResponse analyzeWorkloadMove (String project , String target ) {
809+ AnalyzeWorkloadMoveRequest request =
810+ AnalyzeWorkloadMoveRequest .newBuilder ().setProject (project ).setTarget (target ).build ();
811+ return analyzeWorkloadMove (request );
812+ }
813+
814+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
815+ /**
816+ * Analyze if the source Assured Workloads can be moved to the target Assured Workload
817+ *
818+ * <p>Sample code:
819+ *
820+ * <pre>{@code
821+ * // This snippet has been automatically generated for illustrative purposes only.
822+ * // It may require modifications to work in your environment.
823+ * try (AssuredWorkloadsServiceClient assuredWorkloadsServiceClient =
824+ * AssuredWorkloadsServiceClient.create()) {
825+ * AnalyzeWorkloadMoveRequest request =
826+ * AnalyzeWorkloadMoveRequest.newBuilder().setTarget("target-880905839").build();
827+ * AnalyzeWorkloadMoveResponse response =
828+ * assuredWorkloadsServiceClient.analyzeWorkloadMove(request);
829+ * }
830+ * }</pre>
831+ *
832+ * @param request The request object containing all of the parameters for the API call.
833+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
834+ */
835+ public final AnalyzeWorkloadMoveResponse analyzeWorkloadMove (AnalyzeWorkloadMoveRequest request ) {
836+ return analyzeWorkloadMoveCallable ().call (request );
837+ }
838+
839+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
840+ /**
841+ * Analyze if the source Assured Workloads can be moved to the target Assured Workload
842+ *
843+ * <p>Sample code:
844+ *
845+ * <pre>{@code
846+ * // This snippet has been automatically generated for illustrative purposes only.
847+ * // It may require modifications to work in your environment.
848+ * try (AssuredWorkloadsServiceClient assuredWorkloadsServiceClient =
849+ * AssuredWorkloadsServiceClient.create()) {
850+ * AnalyzeWorkloadMoveRequest request =
851+ * AnalyzeWorkloadMoveRequest.newBuilder().setTarget("target-880905839").build();
852+ * ApiFuture<AnalyzeWorkloadMoveResponse> future =
853+ * assuredWorkloadsServiceClient.analyzeWorkloadMoveCallable().futureCall(request);
854+ * // Do something.
855+ * AnalyzeWorkloadMoveResponse response = future.get();
856+ * }
857+ * }</pre>
858+ */
859+ public final UnaryCallable <AnalyzeWorkloadMoveRequest , AnalyzeWorkloadMoveResponse >
860+ analyzeWorkloadMoveCallable () {
861+ return stub .analyzeWorkloadMoveCallable ();
862+ }
863+
657864 // AUTO-GENERATED DOCUMENTATION AND METHOD.
658865 /**
659866 * Lists Assured Workloads under a CRM Node.
0 commit comments