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

Commit

Permalink
feat: Updated v1beta1 analyzeWorkloadMove documentation (#473)
Browse files Browse the repository at this point in the history
- [ ] Regenerate this pull request now.

Committer: @ketanbshah
PiperOrigin-RevId: 469606602

Source-Link: googleapis/googleapis@32d2f9b

Source-Link: https://github.com/googleapis/googleapis-gen/commit/f87e8520136640f768cc2e42d9c56ca4def229f4
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjg3ZTg1MjAxMzY2NDBmNzY4Y2MyZTQyZDljNTZjYTRkZWYyMjlmNCJ9
  • Loading branch information
gcf-owl-bot[bot] authored Aug 24, 2022
1 parent d4824c9 commit ad0ba84
Show file tree
Hide file tree
Showing 27 changed files with 533 additions and 2,828 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -438,63 +438,6 @@ public final UnaryCallable<UpdateWorkloadRequest, Workload> updateWorkloadCallab
return stub.updateWorkloadCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Restrict the list of services allowed in the Workload environment. The current list of allowed
* services can be found at https://cloud.google.com/assured-workloads/docs/supported-products In
* addition to assuredworkloads.workload.update permission, the user should also have
* orgpolicy.policy.set permission on the folder resource to use this functionality.
*
* <p>Sample code:
*
* <pre>{@code
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (AssuredWorkloadsServiceClient assuredWorkloadsServiceClient =
* AssuredWorkloadsServiceClient.create()) {
* RestrictAllowedServicesRequest request =
* RestrictAllowedServicesRequest.newBuilder().setName("name3373707").build();
* RestrictAllowedServicesResponse response =
* assuredWorkloadsServiceClient.restrictAllowedServices(request);
* }
* }</pre>
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final RestrictAllowedServicesResponse restrictAllowedServices(
RestrictAllowedServicesRequest request) {
return restrictAllowedServicesCallable().call(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Restrict the list of services allowed in the Workload environment. The current list of allowed
* services can be found at https://cloud.google.com/assured-workloads/docs/supported-products In
* addition to assuredworkloads.workload.update permission, the user should also have
* orgpolicy.policy.set permission on the folder resource to use this functionality.
*
* <p>Sample code:
*
* <pre>{@code
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (AssuredWorkloadsServiceClient assuredWorkloadsServiceClient =
* AssuredWorkloadsServiceClient.create()) {
* RestrictAllowedServicesRequest request =
* RestrictAllowedServicesRequest.newBuilder().setName("name3373707").build();
* ApiFuture<RestrictAllowedServicesResponse> future =
* assuredWorkloadsServiceClient.restrictAllowedServicesCallable().futureCall(request);
* // Do something.
* RestrictAllowedServicesResponse response = future.get();
* }
* }</pre>
*/
public final UnaryCallable<RestrictAllowedServicesRequest, RestrictAllowedServicesResponse>
restrictAllowedServicesCallable() {
return stub.restrictAllowedServicesCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Restrict the list of resources allowed in the Workload environment. The current list of allowed
Expand Down Expand Up @@ -778,7 +721,8 @@ public final UnaryCallable<GetWorkloadRequest, Workload> getWorkloadCallable() {

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Analyze if the source Assured Workloads can be moved to the target Assured Workload
* A request to analyze a hypothetical move of a source project or project-based workload to a
* target (destination) folder-based workload.
*
* <p>Sample code:
*
Expand All @@ -794,15 +738,15 @@ public final UnaryCallable<GetWorkloadRequest, Workload> getWorkloadCallable() {
* }
* }</pre>
*
* @param project The Source is a project based to be moved. This is the project's relative path
* in the API, formatted as "cloudresourcemanager.googleapis.com/projects/{project_number}"
* "projects/{project_number}" "cloudresourcemanager.googleapis.com/projects/{project_id}"
* "projects/{project_id}" For example,
* "organizations/123/locations/us-east1/workloads/assured-workload-1".
* @param target Required. The resource name of the Workload to fetch. This is the workloads's
* relative path in the API, formatted as
* "organizations/{organization_id}/locations/{location_id}/workloads/{workload_id}". For
* example, "organizations/123/locations/us-east1/workloads/assured-workload-2".
* @param project The source type is a project. Specify the project's relative resource name,
* formatted as either a project number or a project ID: "projects/{PROJECT_NUMBER}" or
* "projects/{PROJECT_ID}" For example: "projects/951040570662" when specifying a project
* number, or "projects/my-project-123" when specifying a project ID.
* @param target Required. The resource ID of the folder-based destination workload. This workload
* is where the source project will hypothetically be moved to. Specify the workload's
* relative resource name, formatted as:
* "organizations/{ORGANIZATION_ID}/locations/{LOCATION_ID}/workloads/{WORKLOAD_ID}" For
* example: "organizations/123/locations/us-east1/workloads/assured-workload-2"
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final AnalyzeWorkloadMoveResponse analyzeWorkloadMove(String project, String target) {
Expand All @@ -813,7 +757,8 @@ public final AnalyzeWorkloadMoveResponse analyzeWorkloadMove(String project, Str

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Analyze if the source Assured Workloads can be moved to the target Assured Workload
* A request to analyze a hypothetical move of a source project or project-based workload to a
* target (destination) folder-based workload.
*
* <p>Sample code:
*
Expand All @@ -838,7 +783,8 @@ public final AnalyzeWorkloadMoveResponse analyzeWorkloadMove(AnalyzeWorkloadMove

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Analyze if the source Assured Workloads can be moved to the target Assured Workload
* A request to analyze a hypothetical move of a source project or project-based workload to a
* target (destination) folder-based workload.
*
* <p>Sample code:
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,6 @@ public UnaryCallSettings<UpdateWorkloadRequest, Workload> updateWorkloadSettings
return ((AssuredWorkloadsServiceStubSettings) getStubSettings()).updateWorkloadSettings();
}

/** Returns the object with the settings used for calls to restrictAllowedServices. */
public UnaryCallSettings<RestrictAllowedServicesRequest, RestrictAllowedServicesResponse>
restrictAllowedServicesSettings() {
return ((AssuredWorkloadsServiceStubSettings) getStubSettings())
.restrictAllowedServicesSettings();
}

/** Returns the object with the settings used for calls to restrictAllowedResources. */
public UnaryCallSettings<RestrictAllowedResourcesRequest, RestrictAllowedResourcesResponse>
restrictAllowedResourcesSettings() {
Expand Down Expand Up @@ -265,13 +258,6 @@ public UnaryCallSettings.Builder<UpdateWorkloadRequest, Workload> updateWorkload
return getStubSettingsBuilder().updateWorkloadSettings();
}

/** Returns the builder for the settings used for calls to restrictAllowedServices. */
public UnaryCallSettings.Builder<
RestrictAllowedServicesRequest, RestrictAllowedServicesResponse>
restrictAllowedServicesSettings() {
return getStubSettingsBuilder().restrictAllowedServicesSettings();
}

/** Returns the builder for the settings used for calls to restrictAllowedResources. */
public UnaryCallSettings.Builder<
RestrictAllowedResourcesRequest, RestrictAllowedResourcesResponse>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@
"RestrictAllowedResources": {
"methods": ["restrictAllowedResources", "restrictAllowedResourcesCallable"]
},
"RestrictAllowedServices": {
"methods": ["restrictAllowedServices", "restrictAllowedServicesCallable"]
},
"UpdateWorkload": {
"methods": ["updateWorkload", "updateWorkload", "updateWorkloadCallable"]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
import com.google.cloud.assuredworkloads.v1beta1.ListWorkloadsResponse;
import com.google.cloud.assuredworkloads.v1beta1.RestrictAllowedResourcesRequest;
import com.google.cloud.assuredworkloads.v1beta1.RestrictAllowedResourcesResponse;
import com.google.cloud.assuredworkloads.v1beta1.RestrictAllowedServicesRequest;
import com.google.cloud.assuredworkloads.v1beta1.RestrictAllowedServicesResponse;
import com.google.cloud.assuredworkloads.v1beta1.UpdateWorkloadRequest;
import com.google.cloud.assuredworkloads.v1beta1.Workload;
import com.google.longrunning.Operation;
Expand Down Expand Up @@ -72,11 +70,6 @@ public UnaryCallable<UpdateWorkloadRequest, Workload> updateWorkloadCallable() {
throw new UnsupportedOperationException("Not implemented: updateWorkloadCallable()");
}

public UnaryCallable<RestrictAllowedServicesRequest, RestrictAllowedServicesResponse>
restrictAllowedServicesCallable() {
throw new UnsupportedOperationException("Not implemented: restrictAllowedServicesCallable()");
}

public UnaryCallable<RestrictAllowedResourcesRequest, RestrictAllowedResourcesResponse>
restrictAllowedResourcesCallable() {
throw new UnsupportedOperationException("Not implemented: restrictAllowedResourcesCallable()");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@
import com.google.cloud.assuredworkloads.v1beta1.ListWorkloadsResponse;
import com.google.cloud.assuredworkloads.v1beta1.RestrictAllowedResourcesRequest;
import com.google.cloud.assuredworkloads.v1beta1.RestrictAllowedResourcesResponse;
import com.google.cloud.assuredworkloads.v1beta1.RestrictAllowedServicesRequest;
import com.google.cloud.assuredworkloads.v1beta1.RestrictAllowedServicesResponse;
import com.google.cloud.assuredworkloads.v1beta1.UpdateWorkloadRequest;
import com.google.cloud.assuredworkloads.v1beta1.Workload;
import com.google.common.collect.ImmutableList;
Expand Down Expand Up @@ -121,8 +119,6 @@ public class AssuredWorkloadsServiceStubSettings
CreateWorkloadRequest, Workload, CreateWorkloadOperationMetadata>
createWorkloadOperationSettings;
private final UnaryCallSettings<UpdateWorkloadRequest, Workload> updateWorkloadSettings;
private final UnaryCallSettings<RestrictAllowedServicesRequest, RestrictAllowedServicesResponse>
restrictAllowedServicesSettings;
private final UnaryCallSettings<RestrictAllowedResourcesRequest, RestrictAllowedResourcesResponse>
restrictAllowedResourcesSettings;
private final UnaryCallSettings<DeleteWorkloadRequest, Empty> deleteWorkloadSettings;
Expand Down Expand Up @@ -202,12 +198,6 @@ public UnaryCallSettings<UpdateWorkloadRequest, Workload> updateWorkloadSettings
return updateWorkloadSettings;
}

/** Returns the object with the settings used for calls to restrictAllowedServices. */
public UnaryCallSettings<RestrictAllowedServicesRequest, RestrictAllowedServicesResponse>
restrictAllowedServicesSettings() {
return restrictAllowedServicesSettings;
}

/** Returns the object with the settings used for calls to restrictAllowedResources. */
public UnaryCallSettings<RestrictAllowedResourcesRequest, RestrictAllowedResourcesResponse>
restrictAllowedResourcesSettings() {
Expand Down Expand Up @@ -345,7 +335,6 @@ protected AssuredWorkloadsServiceStubSettings(Builder settingsBuilder) throws IO
createWorkloadSettings = settingsBuilder.createWorkloadSettings().build();
createWorkloadOperationSettings = settingsBuilder.createWorkloadOperationSettings().build();
updateWorkloadSettings = settingsBuilder.updateWorkloadSettings().build();
restrictAllowedServicesSettings = settingsBuilder.restrictAllowedServicesSettings().build();
restrictAllowedResourcesSettings = settingsBuilder.restrictAllowedResourcesSettings().build();
deleteWorkloadSettings = settingsBuilder.deleteWorkloadSettings().build();
getWorkloadSettings = settingsBuilder.getWorkloadSettings().build();
Expand All @@ -363,9 +352,6 @@ public static class Builder
CreateWorkloadRequest, Workload, CreateWorkloadOperationMetadata>
createWorkloadOperationSettings;
private final UnaryCallSettings.Builder<UpdateWorkloadRequest, Workload> updateWorkloadSettings;
private final UnaryCallSettings.Builder<
RestrictAllowedServicesRequest, RestrictAllowedServicesResponse>
restrictAllowedServicesSettings;
private final UnaryCallSettings.Builder<
RestrictAllowedResourcesRequest, RestrictAllowedResourcesResponse>
restrictAllowedResourcesSettings;
Expand Down Expand Up @@ -430,7 +416,6 @@ protected Builder(ClientContext clientContext) {
createWorkloadSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
createWorkloadOperationSettings = OperationCallSettings.newBuilder();
updateWorkloadSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
restrictAllowedServicesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
restrictAllowedResourcesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
deleteWorkloadSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
getWorkloadSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
Expand All @@ -441,7 +426,6 @@ protected Builder(ClientContext clientContext) {
ImmutableList.<UnaryCallSettings.Builder<?, ?>>of(
createWorkloadSettings,
updateWorkloadSettings,
restrictAllowedServicesSettings,
restrictAllowedResourcesSettings,
deleteWorkloadSettings,
getWorkloadSettings,
Expand All @@ -456,7 +440,6 @@ protected Builder(AssuredWorkloadsServiceStubSettings settings) {
createWorkloadSettings = settings.createWorkloadSettings.toBuilder();
createWorkloadOperationSettings = settings.createWorkloadOperationSettings.toBuilder();
updateWorkloadSettings = settings.updateWorkloadSettings.toBuilder();
restrictAllowedServicesSettings = settings.restrictAllowedServicesSettings.toBuilder();
restrictAllowedResourcesSettings = settings.restrictAllowedResourcesSettings.toBuilder();
deleteWorkloadSettings = settings.deleteWorkloadSettings.toBuilder();
getWorkloadSettings = settings.getWorkloadSettings.toBuilder();
Expand All @@ -467,7 +450,6 @@ protected Builder(AssuredWorkloadsServiceStubSettings settings) {
ImmutableList.<UnaryCallSettings.Builder<?, ?>>of(
createWorkloadSettings,
updateWorkloadSettings,
restrictAllowedServicesSettings,
restrictAllowedResourcesSettings,
deleteWorkloadSettings,
getWorkloadSettings,
Expand Down Expand Up @@ -512,11 +494,6 @@ private static Builder initDefaults(Builder builder) {
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"));

builder
.restrictAllowedServicesSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));

builder
.restrictAllowedResourcesSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
Expand Down Expand Up @@ -604,13 +581,6 @@ public UnaryCallSettings.Builder<UpdateWorkloadRequest, Workload> updateWorkload
return updateWorkloadSettings;
}

/** Returns the builder for the settings used for calls to restrictAllowedServices. */
public UnaryCallSettings.Builder<
RestrictAllowedServicesRequest, RestrictAllowedServicesResponse>
restrictAllowedServicesSettings() {
return restrictAllowedServicesSettings;
}

/** Returns the builder for the settings used for calls to restrictAllowedResources. */
public UnaryCallSettings.Builder<
RestrictAllowedResourcesRequest, RestrictAllowedResourcesResponse>
Expand Down
Loading

0 comments on commit ad0ba84

Please sign in to comment.