Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AssuredWorkloadsServiceClient assuredWorkloadsServiceClient = + * AssuredWorkloadsServiceClient.create()) { + * RestrictAllowedResourcesRequest request = + * RestrictAllowedResourcesRequest.newBuilder().setName("name3373707").build(); + * RestrictAllowedResourcesResponse response = + * assuredWorkloadsServiceClient.restrictAllowedResources(request); + * } + * }+ * + * @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 RestrictAllowedResourcesResponse restrictAllowedResources( + RestrictAllowedResourcesRequest request) { + return restrictAllowedResourcesCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Restrict the list of resources allowed in the Workload environment. The current list of allowed + * products 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. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AssuredWorkloadsServiceClient assuredWorkloadsServiceClient = + * AssuredWorkloadsServiceClient.create()) { + * RestrictAllowedResourcesRequest request = + * RestrictAllowedResourcesRequest.newBuilder().setName("name3373707").build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * assuredWorkloadsServiceClient.restrictAllowedResourcesCallable().futureCall(request); + * // Do something. + * RestrictAllowedResourcesResponse response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AssuredWorkloadsServiceClient assuredWorkloadsServiceClient = + * AssuredWorkloadsServiceClient.create()) { + * WorkloadName parent = WorkloadName.of("[ORGANIZATION]", "[LOCATION]", "[WORKLOAD]"); + * for (Violation element : assuredWorkloadsServiceClient.listViolations(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param parent Required. The Workload name. Format + * `organizations/{org_id}/locations/{location}/workloads/{workload}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListViolationsPagedResponse listViolations(WorkloadName parent) { + ListViolationsRequest request = + ListViolationsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listViolations(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the Violations in the AssuredWorkload Environment. Callers may also choose to read across + * multiple Workloads as per [AIP-159](https://google.aip.dev/159) by using '-' (the hyphen or + * dash character) as a wildcard character instead of workload-id in the parent. Format + * `organizations/{org_id}/locations/{location}/workloads/-` + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AssuredWorkloadsServiceClient assuredWorkloadsServiceClient = + * AssuredWorkloadsServiceClient.create()) { + * String parent = WorkloadName.of("[ORGANIZATION]", "[LOCATION]", "[WORKLOAD]").toString(); + * for (Violation element : assuredWorkloadsServiceClient.listViolations(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param parent Required. The Workload name. Format + * `organizations/{org_id}/locations/{location}/workloads/{workload}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListViolationsPagedResponse listViolations(String parent) { + ListViolationsRequest request = ListViolationsRequest.newBuilder().setParent(parent).build(); + return listViolations(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the Violations in the AssuredWorkload Environment. Callers may also choose to read across + * multiple Workloads as per [AIP-159](https://google.aip.dev/159) by using '-' (the hyphen or + * dash character) as a wildcard character instead of workload-id in the parent. Format + * `organizations/{org_id}/locations/{location}/workloads/-` + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AssuredWorkloadsServiceClient assuredWorkloadsServiceClient = + * AssuredWorkloadsServiceClient.create()) { + * ListViolationsRequest request = + * ListViolationsRequest.newBuilder() + * .setParent(WorkloadName.of("[ORGANIZATION]", "[LOCATION]", "[WORKLOAD]").toString()) + * .setInterval(TimeWindow.newBuilder().build()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .build(); + * for (Violation element : assuredWorkloadsServiceClient.listViolations(request).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @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 ListViolationsPagedResponse listViolations(ListViolationsRequest request) { + return listViolationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the Violations in the AssuredWorkload Environment. Callers may also choose to read across + * multiple Workloads as per [AIP-159](https://google.aip.dev/159) by using '-' (the hyphen or + * dash character) as a wildcard character instead of workload-id in the parent. Format + * `organizations/{org_id}/locations/{location}/workloads/-` + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AssuredWorkloadsServiceClient assuredWorkloadsServiceClient = + * AssuredWorkloadsServiceClient.create()) { + * ListViolationsRequest request = + * ListViolationsRequest.newBuilder() + * .setParent(WorkloadName.of("[ORGANIZATION]", "[LOCATION]", "[WORKLOAD]").toString()) + * .setInterval(TimeWindow.newBuilder().build()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * assuredWorkloadsServiceClient.listViolationsPagedCallable().futureCall(request); + * // Do something. + * for (Violation element : future.get().iterateAll()) { + * // doThingsWith(element); + * } + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AssuredWorkloadsServiceClient assuredWorkloadsServiceClient = + * AssuredWorkloadsServiceClient.create()) { + * ListViolationsRequest request = + * ListViolationsRequest.newBuilder() + * .setParent(WorkloadName.of("[ORGANIZATION]", "[LOCATION]", "[WORKLOAD]").toString()) + * .setInterval(TimeWindow.newBuilder().build()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .build(); + * while (true) { + * ListViolationsResponse response = + * assuredWorkloadsServiceClient.listViolationsCallable().call(request); + * for (Violation element : response.getViolationsList()) { + * // doThingsWith(element); + * } + * String nextPageToken = response.getNextPageToken(); + * if (!Strings.isNullOrEmpty(nextPageToken)) { + * request = request.toBuilder().setPageToken(nextPageToken).build(); + * } else { + * break; + * } + * } + * } + * }+ */ + public final UnaryCallable
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AssuredWorkloadsServiceClient assuredWorkloadsServiceClient = + * AssuredWorkloadsServiceClient.create()) { + * ViolationName name = + * ViolationName.of("[ORGANIZATION]", "[LOCATION]", "[WORKLOAD]", "[VIOLATION]"); + * Violation response = assuredWorkloadsServiceClient.getViolation(name); + * } + * }+ * + * @param name Required. The resource name of the Violation to fetch (ie. Violation.name). Format: + * organizations/{organization}/locations/{location}/workloads/{workload}/violations/{violation} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Violation getViolation(ViolationName name) { + GetViolationRequest request = + GetViolationRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getViolation(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves Assured Workload Violation based on ID. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AssuredWorkloadsServiceClient assuredWorkloadsServiceClient = + * AssuredWorkloadsServiceClient.create()) { + * String name = + * ViolationName.of("[ORGANIZATION]", "[LOCATION]", "[WORKLOAD]", "[VIOLATION]").toString(); + * Violation response = assuredWorkloadsServiceClient.getViolation(name); + * } + * }+ * + * @param name Required. The resource name of the Violation to fetch (ie. Violation.name). Format: + * organizations/{organization}/locations/{location}/workloads/{workload}/violations/{violation} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Violation getViolation(String name) { + GetViolationRequest request = GetViolationRequest.newBuilder().setName(name).build(); + return getViolation(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves Assured Workload Violation based on ID. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AssuredWorkloadsServiceClient assuredWorkloadsServiceClient = + * AssuredWorkloadsServiceClient.create()) { + * GetViolationRequest request = + * GetViolationRequest.newBuilder() + * .setName( + * ViolationName.of("[ORGANIZATION]", "[LOCATION]", "[WORKLOAD]", "[VIOLATION]") + * .toString()) + * .build(); + * Violation response = assuredWorkloadsServiceClient.getViolation(request); + * } + * }+ * + * @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 Violation getViolation(GetViolationRequest request) { + return getViolationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves Assured Workload Violation based on ID. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AssuredWorkloadsServiceClient assuredWorkloadsServiceClient = + * AssuredWorkloadsServiceClient.create()) { + * GetViolationRequest request = + * GetViolationRequest.newBuilder() + * .setName( + * ViolationName.of("[ORGANIZATION]", "[LOCATION]", "[WORKLOAD]", "[VIOLATION]") + * .toString()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * assuredWorkloadsServiceClient.getViolationCallable().futureCall(request); + * // Do something. + * Violation response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AssuredWorkloadsServiceClient assuredWorkloadsServiceClient = + * AssuredWorkloadsServiceClient.create()) { + * AcknowledgeViolationRequest request = + * AcknowledgeViolationRequest.newBuilder() + * .setName("name3373707") + * .setComment("comment950398559") + * .setNonCompliantOrgPolicy("nonCompliantOrgPolicy-1928466552") + * .build(); + * AcknowledgeViolationResponse response = + * assuredWorkloadsServiceClient.acknowledgeViolation(request); + * } + * }+ * + * @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 AcknowledgeViolationResponse acknowledgeViolation( + AcknowledgeViolationRequest request) { + return acknowledgeViolationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Acknowledges an existing violation. By acknowledging a violation, users acknowledge the + * existence of a compliance violation in their workload and decide to ignore it due to a valid + * business justification. Acknowledgement is a permanent operation and it cannot be reverted. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AssuredWorkloadsServiceClient assuredWorkloadsServiceClient = + * AssuredWorkloadsServiceClient.create()) { + * AcknowledgeViolationRequest request = + * AcknowledgeViolationRequest.newBuilder() + * .setName("name3373707") + * .setComment("comment950398559") + * .setNonCompliantOrgPolicy("nonCompliantOrgPolicy-1928466552") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * assuredWorkloadsServiceClient.acknowledgeViolationCallable().futureCall(request); + * // Do something. + * AcknowledgeViolationResponse response = future.get(); + * } + * }
+ * Restrict the list of resources allowed in the Workload environment. + * The current list of allowed products 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. + *+ */ + public void restrictAllowedResources( + com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getRestrictAllowedResourcesMethod(), responseObserver); + } + /** * * @@ -395,6 +615,59 @@ public void listWorkloads( getListWorkloadsMethod(), responseObserver); } + /** + * + * + *
+ * Lists the Violations in the AssuredWorkload Environment. + * Callers may also choose to read across multiple Workloads as per + * [AIP-159](https://google.aip.dev/159) by using '-' (the hyphen or dash + * character) as a wildcard character instead of workload-id in the parent. + * Format `organizations/{org_id}/locations/{location}/workloads/-` + *+ */ + public void listViolations( + com.google.cloud.assuredworkloads.v1.ListViolationsRequest request, + io.grpc.stub.StreamObserver
+ * Retrieves Assured Workload Violation based on ID. + *+ */ + public void getViolation( + com.google.cloud.assuredworkloads.v1.GetViolationRequest request, + io.grpc.stub.StreamObserver
+ * Acknowledges an existing violation. By acknowledging a violation, users + * acknowledge the existence of a compliance violation in their workload and + * decide to ignore it due to a valid business justification. Acknowledgement + * is a permanent operation and it cannot be reverted. + *+ */ + public void acknowledgeViolation( + com.google.cloud.assuredworkloads.v1.AcknowledgeViolationRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.assuredworkloads.v1.AcknowledgeViolationResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getAcknowledgeViolationMethod(), responseObserver); + } + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) @@ -411,6 +684,13 @@ public final io.grpc.ServerServiceDefinition bindService() { com.google.cloud.assuredworkloads.v1.UpdateWorkloadRequest, com.google.cloud.assuredworkloads.v1.Workload>( this, METHODID_UPDATE_WORKLOAD))) + .addMethod( + getRestrictAllowedResourcesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest, + com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesResponse>( + this, METHODID_RESTRICT_ALLOWED_RESOURCES))) .addMethod( getDeleteWorkloadMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -430,6 +710,27 @@ public final io.grpc.ServerServiceDefinition bindService() { com.google.cloud.assuredworkloads.v1.ListWorkloadsRequest, com.google.cloud.assuredworkloads.v1.ListWorkloadsResponse>( this, METHODID_LIST_WORKLOADS))) + .addMethod( + getListViolationsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.assuredworkloads.v1.ListViolationsRequest, + com.google.cloud.assuredworkloads.v1.ListViolationsResponse>( + this, METHODID_LIST_VIOLATIONS))) + .addMethod( + getGetViolationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.assuredworkloads.v1.GetViolationRequest, + com.google.cloud.assuredworkloads.v1.Violation>( + this, METHODID_GET_VIOLATION))) + .addMethod( + getAcknowledgeViolationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.assuredworkloads.v1.AcknowledgeViolationRequest, + com.google.cloud.assuredworkloads.v1.AcknowledgeViolationResponse>( + this, METHODID_ACKNOWLEDGE_VIOLATION))) .build(); } } @@ -489,6 +790,29 @@ public void updateWorkload( responseObserver); } + /** + * + * + *
+ * Restrict the list of resources allowed in the Workload environment. + * The current list of allowed products 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. + *+ */ + public void restrictAllowedResources( + com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getRestrictAllowedResourcesMethod(), getCallOptions()), + request, + responseObserver); + } + /** * * @@ -540,6 +864,65 @@ public void listWorkloads( request, responseObserver); } + + /** + * + * + *
+ * Lists the Violations in the AssuredWorkload Environment. + * Callers may also choose to read across multiple Workloads as per + * [AIP-159](https://google.aip.dev/159) by using '-' (the hyphen or dash + * character) as a wildcard character instead of workload-id in the parent. + * Format `organizations/{org_id}/locations/{location}/workloads/-` + *+ */ + public void listViolations( + com.google.cloud.assuredworkloads.v1.ListViolationsRequest request, + io.grpc.stub.StreamObserver
+ * Retrieves Assured Workload Violation based on ID. + *+ */ + public void getViolation( + com.google.cloud.assuredworkloads.v1.GetViolationRequest request, + io.grpc.stub.StreamObserver
+ * Acknowledges an existing violation. By acknowledging a violation, users + * acknowledge the existence of a compliance violation in their workload and + * decide to ignore it due to a valid business justification. Acknowledgement + * is a permanent operation and it cannot be reverted. + *+ */ + public void acknowledgeViolation( + com.google.cloud.assuredworkloads.v1.AcknowledgeViolationRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.assuredworkloads.v1.AcknowledgeViolationResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getAcknowledgeViolationMethod(), getCallOptions()), + request, + responseObserver); + } } /** @@ -591,6 +974,25 @@ public com.google.cloud.assuredworkloads.v1.Workload updateWorkload( getChannel(), getUpdateWorkloadMethod(), getCallOptions(), request); } + /** + * + * + *
+ * Restrict the list of resources allowed in the Workload environment. + * The current list of allowed products 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. + *+ */ + public com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesResponse + restrictAllowedResources( + com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getRestrictAllowedResourcesMethod(), getCallOptions(), request); + } + /** * * @@ -631,6 +1033,52 @@ public com.google.cloud.assuredworkloads.v1.ListWorkloadsResponse listWorkloads( return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getListWorkloadsMethod(), getCallOptions(), request); } + + /** + * + * + *
+ * Lists the Violations in the AssuredWorkload Environment. + * Callers may also choose to read across multiple Workloads as per + * [AIP-159](https://google.aip.dev/159) by using '-' (the hyphen or dash + * character) as a wildcard character instead of workload-id in the parent. + * Format `organizations/{org_id}/locations/{location}/workloads/-` + *+ */ + public com.google.cloud.assuredworkloads.v1.ListViolationsResponse listViolations( + com.google.cloud.assuredworkloads.v1.ListViolationsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListViolationsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+ * Retrieves Assured Workload Violation based on ID. + *+ */ + public com.google.cloud.assuredworkloads.v1.Violation getViolation( + com.google.cloud.assuredworkloads.v1.GetViolationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetViolationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+ * Acknowledges an existing violation. By acknowledging a violation, users + * acknowledge the existence of a compliance violation in their workload and + * decide to ignore it due to a valid business justification. Acknowledgement + * is a permanent operation and it cannot be reverted. + *+ */ + public com.google.cloud.assuredworkloads.v1.AcknowledgeViolationResponse acknowledgeViolation( + com.google.cloud.assuredworkloads.v1.AcknowledgeViolationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getAcknowledgeViolationMethod(), getCallOptions(), request); + } } /** @@ -683,6 +1131,26 @@ protected AssuredWorkloadsServiceFutureStub build( getChannel().newCall(getUpdateWorkloadMethod(), getCallOptions()), request); } + /** + * + * + *
+ * Restrict the list of resources allowed in the Workload environment. + * The current list of allowed products 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. + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesResponse> + restrictAllowedResources( + com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getRestrictAllowedResourcesMethod(), getCallOptions()), request); + } + /** * * @@ -725,13 +1193,67 @@ protected AssuredWorkloadsServiceFutureStub build( return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getListWorkloadsMethod(), getCallOptions()), request); } + + /** + * + * + *
+ * Lists the Violations in the AssuredWorkload Environment. + * Callers may also choose to read across multiple Workloads as per + * [AIP-159](https://google.aip.dev/159) by using '-' (the hyphen or dash + * character) as a wildcard character instead of workload-id in the parent. + * Format `organizations/{org_id}/locations/{location}/workloads/-` + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.assuredworkloads.v1.ListViolationsResponse> + listViolations(com.google.cloud.assuredworkloads.v1.ListViolationsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListViolationsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+ * Retrieves Assured Workload Violation based on ID. + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.assuredworkloads.v1.Violation> + getViolation(com.google.cloud.assuredworkloads.v1.GetViolationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetViolationMethod(), getCallOptions()), request); + } + + /** + * + * + *
+ * Acknowledges an existing violation. By acknowledging a violation, users + * acknowledge the existence of a compliance violation in their workload and + * decide to ignore it due to a valid business justification. Acknowledgement + * is a permanent operation and it cannot be reverted. + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.assuredworkloads.v1.AcknowledgeViolationResponse> + acknowledgeViolation( + com.google.cloud.assuredworkloads.v1.AcknowledgeViolationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getAcknowledgeViolationMethod(), getCallOptions()), request); + } } private static final int METHODID_CREATE_WORKLOAD = 0; private static final int METHODID_UPDATE_WORKLOAD = 1; - private static final int METHODID_DELETE_WORKLOAD = 2; - private static final int METHODID_GET_WORKLOAD = 3; - private static final int METHODID_LIST_WORKLOADS = 4; + private static final int METHODID_RESTRICT_ALLOWED_RESOURCES = 2; + private static final int METHODID_DELETE_WORKLOAD = 3; + private static final int METHODID_GET_WORKLOAD = 4; + private static final int METHODID_LIST_WORKLOADS = 5; + private static final int METHODID_LIST_VIOLATIONS = 6; + private static final int METHODID_GET_VIOLATION = 7; + private static final int METHODID_ACKNOWLEDGE_VIOLATION = 8; private static final class MethodHandlers
+ * Request for acknowledging the violation + * Next Id: 4 + *+ * + * Protobuf type {@code google.cloud.assuredworkloads.v1.AcknowledgeViolationRequest} + */ +public final class AcknowledgeViolationRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.assuredworkloads.v1.AcknowledgeViolationRequest) + AcknowledgeViolationRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use AcknowledgeViolationRequest.newBuilder() to construct. + private AcknowledgeViolationRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private AcknowledgeViolationRequest() { + name_ = ""; + comment_ = ""; + nonCompliantOrgPolicy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AcknowledgeViolationRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto + .internal_static_google_cloud_assuredworkloads_v1_AcknowledgeViolationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto + .internal_static_google_cloud_assuredworkloads_v1_AcknowledgeViolationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.assuredworkloads.v1.AcknowledgeViolationRequest.class, + com.google.cloud.assuredworkloads.v1.AcknowledgeViolationRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+ * Required. The resource name of the Violation to acknowledge. + * Format: + * organizations/{organization}/locations/{location}/workloads/{workload}/violations/{violation} + *+ * + *
string name = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The name.
+ */
+ @java.lang.Override
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ name_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. The resource name of the Violation to acknowledge. + * Format: + * organizations/{organization}/locations/{location}/workloads/{workload}/violations/{violation} + *+ * + *
string name = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The bytes for name.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int COMMENT_FIELD_NUMBER = 2;
+ private volatile java.lang.Object comment_;
+ /**
+ *
+ *
+ * + * Required. Business justification explaining the need for violation acknowledgement + *+ * + *
string comment = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The comment.
+ */
+ @java.lang.Override
+ public java.lang.String getComment() {
+ java.lang.Object ref = comment_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ comment_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. Business justification explaining the need for violation acknowledgement + *+ * + *
string comment = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The bytes for comment.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getCommentBytes() {
+ java.lang.Object ref = comment_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ comment_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int NON_COMPLIANT_ORG_POLICY_FIELD_NUMBER = 3;
+ private volatile java.lang.Object nonCompliantOrgPolicy_;
+ /**
+ *
+ *
+ * + * Optional. Name of the OrgPolicy which was modified with non-compliant change and + * resulted in this violation. + * Format: + * projects/{project_number}/policies/{constraint_name} + * folders/{folder_id}/policies/{constraint_name} + * organizations/{organization_id}/policies/{constraint_name} + *+ * + *
string non_compliant_org_policy = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The nonCompliantOrgPolicy.
+ */
+ @java.lang.Override
+ public java.lang.String getNonCompliantOrgPolicy() {
+ java.lang.Object ref = nonCompliantOrgPolicy_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ nonCompliantOrgPolicy_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. Name of the OrgPolicy which was modified with non-compliant change and + * resulted in this violation. + * Format: + * projects/{project_number}/policies/{constraint_name} + * folders/{folder_id}/policies/{constraint_name} + * organizations/{organization_id}/policies/{constraint_name} + *+ * + *
string non_compliant_org_policy = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The bytes for nonCompliantOrgPolicy.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getNonCompliantOrgPolicyBytes() {
+ java.lang.Object ref = nonCompliantOrgPolicy_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ nonCompliantOrgPolicy_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(comment_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, comment_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nonCompliantOrgPolicy_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, nonCompliantOrgPolicy_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(comment_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, comment_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nonCompliantOrgPolicy_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, nonCompliantOrgPolicy_);
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.assuredworkloads.v1.AcknowledgeViolationRequest)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.assuredworkloads.v1.AcknowledgeViolationRequest other =
+ (com.google.cloud.assuredworkloads.v1.AcknowledgeViolationRequest) obj;
+
+ if (!getName().equals(other.getName())) return false;
+ if (!getComment().equals(other.getComment())) return false;
+ if (!getNonCompliantOrgPolicy().equals(other.getNonCompliantOrgPolicy())) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + NAME_FIELD_NUMBER;
+ hash = (53 * hash) + getName().hashCode();
+ hash = (37 * hash) + COMMENT_FIELD_NUMBER;
+ hash = (53 * hash) + getComment().hashCode();
+ hash = (37 * hash) + NON_COMPLIANT_ORG_POLICY_FIELD_NUMBER;
+ hash = (53 * hash) + getNonCompliantOrgPolicy().hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.AcknowledgeViolationRequest parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.AcknowledgeViolationRequest parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.AcknowledgeViolationRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.AcknowledgeViolationRequest parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.AcknowledgeViolationRequest parseFrom(
+ byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.AcknowledgeViolationRequest parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.AcknowledgeViolationRequest parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.AcknowledgeViolationRequest parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.AcknowledgeViolationRequest parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.AcknowledgeViolationRequest parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.AcknowledgeViolationRequest parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.AcknowledgeViolationRequest parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(
+ com.google.cloud.assuredworkloads.v1.AcknowledgeViolationRequest prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ * + * Request for acknowledging the violation + * Next Id: 4 + *+ * + * Protobuf type {@code google.cloud.assuredworkloads.v1.AcknowledgeViolationRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Required. The resource name of the Violation to acknowledge. + * Format: + * organizations/{organization}/locations/{location}/workloads/{workload}/violations/{violation} + *+ * + *
string name = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The name.
+ */
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ name_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. The resource name of the Violation to acknowledge. + * Format: + * organizations/{organization}/locations/{location}/workloads/{workload}/violations/{violation} + *+ * + *
string name = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The bytes for name.
+ */
+ public com.google.protobuf.ByteString getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. The resource name of the Violation to acknowledge. + * Format: + * organizations/{organization}/locations/{location}/workloads/{workload}/violations/{violation} + *+ * + *
string name = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @param value The name to set.
+ * @return This builder for chaining.
+ */
+ public Builder setName(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The resource name of the Violation to acknowledge. + * Format: + * organizations/{organization}/locations/{location}/workloads/{workload}/violations/{violation} + *+ * + *
string name = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearName() {
+
+ name_ = getDefaultInstance().getName();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The resource name of the Violation to acknowledge. + * Format: + * organizations/{organization}/locations/{location}/workloads/{workload}/violations/{violation} + *+ * + *
string name = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @param value The bytes for name to set.
+ * @return This builder for chaining.
+ */
+ public Builder setNameBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object comment_ = "";
+ /**
+ *
+ *
+ * + * Required. Business justification explaining the need for violation acknowledgement + *+ * + *
string comment = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The comment.
+ */
+ public java.lang.String getComment() {
+ java.lang.Object ref = comment_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ comment_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. Business justification explaining the need for violation acknowledgement + *+ * + *
string comment = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The bytes for comment.
+ */
+ public com.google.protobuf.ByteString getCommentBytes() {
+ java.lang.Object ref = comment_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ comment_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. Business justification explaining the need for violation acknowledgement + *+ * + *
string comment = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @param value The comment to set.
+ * @return This builder for chaining.
+ */
+ public Builder setComment(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ comment_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Business justification explaining the need for violation acknowledgement + *+ * + *
string comment = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearComment() {
+
+ comment_ = getDefaultInstance().getComment();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Business justification explaining the need for violation acknowledgement + *+ * + *
string comment = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @param value The bytes for comment to set.
+ * @return This builder for chaining.
+ */
+ public Builder setCommentBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ comment_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object nonCompliantOrgPolicy_ = "";
+ /**
+ *
+ *
+ * + * Optional. Name of the OrgPolicy which was modified with non-compliant change and + * resulted in this violation. + * Format: + * projects/{project_number}/policies/{constraint_name} + * folders/{folder_id}/policies/{constraint_name} + * organizations/{organization_id}/policies/{constraint_name} + *+ * + *
string non_compliant_org_policy = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The nonCompliantOrgPolicy.
+ */
+ public java.lang.String getNonCompliantOrgPolicy() {
+ java.lang.Object ref = nonCompliantOrgPolicy_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ nonCompliantOrgPolicy_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. Name of the OrgPolicy which was modified with non-compliant change and + * resulted in this violation. + * Format: + * projects/{project_number}/policies/{constraint_name} + * folders/{folder_id}/policies/{constraint_name} + * organizations/{organization_id}/policies/{constraint_name} + *+ * + *
string non_compliant_org_policy = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The bytes for nonCompliantOrgPolicy.
+ */
+ public com.google.protobuf.ByteString getNonCompliantOrgPolicyBytes() {
+ java.lang.Object ref = nonCompliantOrgPolicy_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ nonCompliantOrgPolicy_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. Name of the OrgPolicy which was modified with non-compliant change and + * resulted in this violation. + * Format: + * projects/{project_number}/policies/{constraint_name} + * folders/{folder_id}/policies/{constraint_name} + * organizations/{organization_id}/policies/{constraint_name} + *+ * + *
string non_compliant_org_policy = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param value The nonCompliantOrgPolicy to set.
+ * @return This builder for chaining.
+ */
+ public Builder setNonCompliantOrgPolicy(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ nonCompliantOrgPolicy_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. Name of the OrgPolicy which was modified with non-compliant change and + * resulted in this violation. + * Format: + * projects/{project_number}/policies/{constraint_name} + * folders/{folder_id}/policies/{constraint_name} + * organizations/{organization_id}/policies/{constraint_name} + *+ * + *
string non_compliant_org_policy = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearNonCompliantOrgPolicy() {
+
+ nonCompliantOrgPolicy_ = getDefaultInstance().getNonCompliantOrgPolicy();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. Name of the OrgPolicy which was modified with non-compliant change and + * resulted in this violation. + * Format: + * projects/{project_number}/policies/{constraint_name} + * folders/{folder_id}/policies/{constraint_name} + * organizations/{organization_id}/policies/{constraint_name} + *+ * + *
string non_compliant_org_policy = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param value The bytes for nonCompliantOrgPolicy to set.
+ * @return This builder for chaining.
+ */
+ public Builder setNonCompliantOrgPolicyBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ nonCompliantOrgPolicy_ = value;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.assuredworkloads.v1.AcknowledgeViolationRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.assuredworkloads.v1.AcknowledgeViolationRequest)
+ private static final com.google.cloud.assuredworkloads.v1.AcknowledgeViolationRequest
+ DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.assuredworkloads.v1.AcknowledgeViolationRequest();
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.AcknowledgeViolationRequest
+ getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Required. The resource name of the Violation to acknowledge. + * Format: + * organizations/{organization}/locations/{location}/workloads/{workload}/violations/{violation} + *+ * + *
string name = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The name.
+ */
+ java.lang.String getName();
+ /**
+ *
+ *
+ * + * Required. The resource name of the Violation to acknowledge. + * Format: + * organizations/{organization}/locations/{location}/workloads/{workload}/violations/{violation} + *+ * + *
string name = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The bytes for name.
+ */
+ com.google.protobuf.ByteString getNameBytes();
+
+ /**
+ *
+ *
+ * + * Required. Business justification explaining the need for violation acknowledgement + *+ * + *
string comment = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The comment.
+ */
+ java.lang.String getComment();
+ /**
+ *
+ *
+ * + * Required. Business justification explaining the need for violation acknowledgement + *+ * + *
string comment = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The bytes for comment.
+ */
+ com.google.protobuf.ByteString getCommentBytes();
+
+ /**
+ *
+ *
+ * + * Optional. Name of the OrgPolicy which was modified with non-compliant change and + * resulted in this violation. + * Format: + * projects/{project_number}/policies/{constraint_name} + * folders/{folder_id}/policies/{constraint_name} + * organizations/{organization_id}/policies/{constraint_name} + *+ * + *
string non_compliant_org_policy = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The nonCompliantOrgPolicy.
+ */
+ java.lang.String getNonCompliantOrgPolicy();
+ /**
+ *
+ *
+ * + * Optional. Name of the OrgPolicy which was modified with non-compliant change and + * resulted in this violation. + * Format: + * projects/{project_number}/policies/{constraint_name} + * folders/{folder_id}/policies/{constraint_name} + * organizations/{organization_id}/policies/{constraint_name} + *+ * + *
string non_compliant_org_policy = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The bytes for nonCompliantOrgPolicy.
+ */
+ com.google.protobuf.ByteString getNonCompliantOrgPolicyBytes();
+}
diff --git a/java-assured-workloads/proto-google-cloud-assured-workloads-v1/src/main/java/com/google/cloud/assuredworkloads/v1/AcknowledgeViolationResponse.java b/java-assured-workloads/proto-google-cloud-assured-workloads-v1/src/main/java/com/google/cloud/assuredworkloads/v1/AcknowledgeViolationResponse.java
new file mode 100644
index 000000000000..a66ab1d8d30d
--- /dev/null
+++ b/java-assured-workloads/proto-google-cloud-assured-workloads-v1/src/main/java/com/google/cloud/assuredworkloads/v1/AcknowledgeViolationResponse.java
@@ -0,0 +1,445 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/assuredworkloads/v1/assuredworkloads.proto
+
+package com.google.cloud.assuredworkloads.v1;
+
+/**
+ *
+ *
+ * + * Response for violation acknowledgement + *+ * + * Protobuf type {@code google.cloud.assuredworkloads.v1.AcknowledgeViolationResponse} + */ +public final class AcknowledgeViolationResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.assuredworkloads.v1.AcknowledgeViolationResponse) + AcknowledgeViolationResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use AcknowledgeViolationResponse.newBuilder() to construct. + private AcknowledgeViolationResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private AcknowledgeViolationResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AcknowledgeViolationResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto + .internal_static_google_cloud_assuredworkloads_v1_AcknowledgeViolationResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto + .internal_static_google_cloud_assuredworkloads_v1_AcknowledgeViolationResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.assuredworkloads.v1.AcknowledgeViolationResponse.class, + com.google.cloud.assuredworkloads.v1.AcknowledgeViolationResponse.Builder.class); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.assuredworkloads.v1.AcknowledgeViolationResponse)) { + return super.equals(obj); + } + com.google.cloud.assuredworkloads.v1.AcknowledgeViolationResponse other = + (com.google.cloud.assuredworkloads.v1.AcknowledgeViolationResponse) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.assuredworkloads.v1.AcknowledgeViolationResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.assuredworkloads.v1.AcknowledgeViolationResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.assuredworkloads.v1.AcknowledgeViolationResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.assuredworkloads.v1.AcknowledgeViolationResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.assuredworkloads.v1.AcknowledgeViolationResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.assuredworkloads.v1.AcknowledgeViolationResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.assuredworkloads.v1.AcknowledgeViolationResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.assuredworkloads.v1.AcknowledgeViolationResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.assuredworkloads.v1.AcknowledgeViolationResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.assuredworkloads.v1.AcknowledgeViolationResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.assuredworkloads.v1.AcknowledgeViolationResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.assuredworkloads.v1.AcknowledgeViolationResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.assuredworkloads.v1.AcknowledgeViolationResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+ * Response for violation acknowledgement + *+ * + * Protobuf type {@code google.cloud.assuredworkloads.v1.AcknowledgeViolationResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
- * Optional. Compliance controls that should be applied to the resources - * managed by the workload. + * Optional. Compliance controls that should be applied to the resources managed by + * the workload. ** *
@@ -316,8 +241,8 @@ public int getComplianceRegimeValue() {
*
*
*
- * Optional. Compliance controls that should be applied to the resources
- * managed by the workload.
+ * Optional. Compliance controls that should be applied to the resources managed by
+ * the workload.
*
*
*
@@ -365,7 +290,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
.getNumber()) {
output.writeEnum(4, complianceRegime_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -389,7 +314,7 @@ public int getSerializedSize() {
.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, complianceRegime_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -412,7 +337,7 @@ public boolean equals(final java.lang.Object obj) {
if (!getDisplayName().equals(other.getDisplayName())) return false;
if (!getParent().equals(other.getParent())) return false;
if (complianceRegime_ != other.complianceRegime_) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -433,7 +358,7 @@ public int hashCode() {
hash = (53 * hash) + getParent().hashCode();
hash = (37 * hash) + COMPLIANCE_REGIME_FIELD_NUMBER;
hash = (53 * hash) + complianceRegime_;
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -565,17 +490,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
// Construct using
// com.google.cloud.assuredworkloads.v1.CreateWorkloadOperationMetadata.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
+ private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
- maybeForceBuilderInitialization();
- }
-
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
}
@java.lang.Override
@@ -697,7 +615,7 @@ public Builder mergeFrom(
if (other.complianceRegime_ != 0) {
setComplianceRegimeValue(other.getComplianceRegimeValue());
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -712,19 +630,55 @@ public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.cloud.assuredworkloads.v1.CreateWorkloadOperationMetadata parsedMessage = null;
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10:
+ {
+ input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry);
+
+ break;
+ } // case 10
+ case 18:
+ {
+ displayName_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 18
+ case 26:
+ {
+ parent_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 26
+ case 32:
+ {
+ complianceRegime_ = input.readEnum();
+
+ break;
+ } // case 32
+ default:
+ {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage =
- (com.google.cloud.assuredworkloads.v1.CreateWorkloadOperationMetadata)
- e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
@@ -1137,8 +1091,8 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) {
*
*
*
- * Optional. Compliance controls that should be applied to the resources
- * managed by the workload.
+ * Optional. Compliance controls that should be applied to the resources managed by
+ * the workload.
*
*
*
@@ -1155,8 +1109,8 @@ public int getComplianceRegimeValue() {
*
*
*
- * Optional. Compliance controls that should be applied to the resources
- * managed by the workload.
+ * Optional. Compliance controls that should be applied to the resources managed by
+ * the workload.
*
*
*
@@ -1176,8 +1130,8 @@ public Builder setComplianceRegimeValue(int value) {
*
*
*
- * Optional. Compliance controls that should be applied to the resources
- * managed by the workload.
+ * Optional. Compliance controls that should be applied to the resources managed by
+ * the workload.
*
*
*
@@ -1199,8 +1153,8 @@ public com.google.cloud.assuredworkloads.v1.Workload.ComplianceRegime getComplia
*
*
*
- * Optional. Compliance controls that should be applied to the resources
- * managed by the workload.
+ * Optional. Compliance controls that should be applied to the resources managed by
+ * the workload.
*
*
*
@@ -1224,8 +1178,8 @@ public Builder setComplianceRegime(
*
*
*
- * Optional. Compliance controls that should be applied to the resources
- * managed by the workload.
+ * Optional. Compliance controls that should be applied to the resources managed by
+ * the workload.
*
*
*
@@ -1275,7 +1229,18 @@ public CreateWorkloadOperationMetadata parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new CreateWorkloadOperationMetadata(input, extensionRegistry);
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
}
};
diff --git a/java-assured-workloads/proto-google-cloud-assured-workloads-v1/src/main/java/com/google/cloud/assuredworkloads/v1/CreateWorkloadOperationMetadataOrBuilder.java b/java-assured-workloads/proto-google-cloud-assured-workloads-v1/src/main/java/com/google/cloud/assuredworkloads/v1/CreateWorkloadOperationMetadataOrBuilder.java
index b73db6ff6990..cf53e83f2a7f 100644
--- a/java-assured-workloads/proto-google-cloud-assured-workloads-v1/src/main/java/com/google/cloud/assuredworkloads/v1/CreateWorkloadOperationMetadataOrBuilder.java
+++ b/java-assured-workloads/proto-google-cloud-assured-workloads-v1/src/main/java/com/google/cloud/assuredworkloads/v1/CreateWorkloadOperationMetadataOrBuilder.java
@@ -115,8 +115,8 @@ public interface CreateWorkloadOperationMetadataOrBuilder
*
*
*
- * Optional. Compliance controls that should be applied to the resources
- * managed by the workload.
+ * Optional. Compliance controls that should be applied to the resources managed by
+ * the workload.
*
*
*
@@ -130,8 +130,8 @@ public interface CreateWorkloadOperationMetadataOrBuilder
*
*
*
- * Optional. Compliance controls that should be applied to the resources
- * managed by the workload.
+ * Optional. Compliance controls that should be applied to the resources managed by
+ * the workload.
*
*
*
diff --git a/java-assured-workloads/proto-google-cloud-assured-workloads-v1/src/main/java/com/google/cloud/assuredworkloads/v1/CreateWorkloadRequest.java b/java-assured-workloads/proto-google-cloud-assured-workloads-v1/src/main/java/com/google/cloud/assuredworkloads/v1/CreateWorkloadRequest.java
index 52c29c868b24..f431d3efb926 100644
--- a/java-assured-workloads/proto-google-cloud-assured-workloads-v1/src/main/java/com/google/cloud/assuredworkloads/v1/CreateWorkloadRequest.java
+++ b/java-assured-workloads/proto-google-cloud-assured-workloads-v1/src/main/java/com/google/cloud/assuredworkloads/v1/CreateWorkloadRequest.java
@@ -53,75 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
- private CreateWorkloadRequest(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- if (extensionRegistry == null) {
- throw new java.lang.NullPointerException();
- }
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder();
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 10:
- {
- java.lang.String s = input.readStringRequireUtf8();
-
- parent_ = s;
- break;
- }
- case 18:
- {
- com.google.cloud.assuredworkloads.v1.Workload.Builder subBuilder = null;
- if (workload_ != null) {
- subBuilder = workload_.toBuilder();
- }
- workload_ =
- input.readMessage(
- com.google.cloud.assuredworkloads.v1.Workload.parser(), extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(workload_);
- workload_ = subBuilder.buildPartial();
- }
-
- break;
- }
- case 26:
- {
- java.lang.String s = input.readStringRequireUtf8();
-
- externalId_ = s;
- break;
- }
- default:
- {
- if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (com.google.protobuf.UninitializedMessageException e) {
- throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
-
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
.internal_static_google_cloud_assuredworkloads_v1_CreateWorkloadRequest_descriptor;
@@ -252,8 +183,8 @@ public com.google.cloud.assuredworkloads.v1.WorkloadOrBuilder getWorkloadOrBuild
*
*
*
- * Optional. A identifier associated with the workload and underlying projects
- * which allows for the break down of billing costs for a workload. The value
+ * Optional. A identifier associated with the workload and underlying projects which
+ * allows for the break down of billing costs for a workload. The value
* provided for the identifier will add a label to the workload and contained
* projects with the identifier as the value.
*
@@ -278,8 +209,8 @@ public java.lang.String getExternalId() {
*
*
*
- * Optional. A identifier associated with the workload and underlying projects
- * which allows for the break down of billing costs for a workload. The value
+ * Optional. A identifier associated with the workload and underlying projects which
+ * allows for the break down of billing costs for a workload. The value
* provided for the identifier will add a label to the workload and contained
* projects with the identifier as the value.
*
@@ -324,7 +255,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(externalId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, externalId_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -342,7 +273,7 @@ public int getSerializedSize() {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(externalId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, externalId_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -364,7 +295,7 @@ public boolean equals(final java.lang.Object obj) {
if (!getWorkload().equals(other.getWorkload())) return false;
}
if (!getExternalId().equals(other.getExternalId())) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -383,7 +314,7 @@ public int hashCode() {
}
hash = (37 * hash) + EXTERNAL_ID_FIELD_NUMBER;
hash = (53 * hash) + getExternalId().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -513,17 +444,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
}
// Construct using com.google.cloud.assuredworkloads.v1.CreateWorkloadRequest.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
+ private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
- maybeForceBuilderInitialization();
- }
-
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
}
@java.lang.Override
@@ -634,7 +558,7 @@ public Builder mergeFrom(com.google.cloud.assuredworkloads.v1.CreateWorkloadRequ
externalId_ = other.externalId_;
onChanged();
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -649,18 +573,49 @@ public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.cloud.assuredworkloads.v1.CreateWorkloadRequest parsedMessage = null;
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10:
+ {
+ parent_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 10
+ case 18:
+ {
+ input.readMessage(getWorkloadFieldBuilder().getBuilder(), extensionRegistry);
+
+ break;
+ } // case 18
+ case 26:
+ {
+ externalId_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 26
+ default:
+ {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage =
- (com.google.cloud.assuredworkloads.v1.CreateWorkloadRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
@@ -994,8 +949,8 @@ public com.google.cloud.assuredworkloads.v1.WorkloadOrBuilder getWorkloadOrBuild
*
*
*
- * Optional. A identifier associated with the workload and underlying projects
- * which allows for the break down of billing costs for a workload. The value
+ * Optional. A identifier associated with the workload and underlying projects which
+ * allows for the break down of billing costs for a workload. The value
* provided for the identifier will add a label to the workload and contained
* projects with the identifier as the value.
*
@@ -1019,8 +974,8 @@ public java.lang.String getExternalId() {
*
*
*
- * Optional. A identifier associated with the workload and underlying projects
- * which allows for the break down of billing costs for a workload. The value
+ * Optional. A identifier associated with the workload and underlying projects which
+ * allows for the break down of billing costs for a workload. The value
* provided for the identifier will add a label to the workload and contained
* projects with the identifier as the value.
*
@@ -1044,8 +999,8 @@ public com.google.protobuf.ByteString getExternalIdBytes() {
*
*
*
- * Optional. A identifier associated with the workload and underlying projects
- * which allows for the break down of billing costs for a workload. The value
+ * Optional. A identifier associated with the workload and underlying projects which
+ * allows for the break down of billing costs for a workload. The value
* provided for the identifier will add a label to the workload and contained
* projects with the identifier as the value.
*
@@ -1068,8 +1023,8 @@ public Builder setExternalId(java.lang.String value) {
*
*
*
- * Optional. A identifier associated with the workload and underlying projects
- * which allows for the break down of billing costs for a workload. The value
+ * Optional. A identifier associated with the workload and underlying projects which
+ * allows for the break down of billing costs for a workload. The value
* provided for the identifier will add a label to the workload and contained
* projects with the identifier as the value.
*
@@ -1088,8 +1043,8 @@ public Builder clearExternalId() {
*
*
*
- * Optional. A identifier associated with the workload and underlying projects
- * which allows for the break down of billing costs for a workload. The value
+ * Optional. A identifier associated with the workload and underlying projects which
+ * allows for the break down of billing costs for a workload. The value
* provided for the identifier will add a label to the workload and contained
* projects with the identifier as the value.
*
@@ -1142,7 +1097,18 @@ public CreateWorkloadRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new CreateWorkloadRequest(input, extensionRegistry);
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
}
};
diff --git a/java-assured-workloads/proto-google-cloud-assured-workloads-v1/src/main/java/com/google/cloud/assuredworkloads/v1/CreateWorkloadRequestOrBuilder.java b/java-assured-workloads/proto-google-cloud-assured-workloads-v1/src/main/java/com/google/cloud/assuredworkloads/v1/CreateWorkloadRequestOrBuilder.java
index bfad0707ecef..fdfd8dea218b 100644
--- a/java-assured-workloads/proto-google-cloud-assured-workloads-v1/src/main/java/com/google/cloud/assuredworkloads/v1/CreateWorkloadRequestOrBuilder.java
+++ b/java-assured-workloads/proto-google-cloud-assured-workloads-v1/src/main/java/com/google/cloud/assuredworkloads/v1/CreateWorkloadRequestOrBuilder.java
@@ -99,8 +99,8 @@ public interface CreateWorkloadRequestOrBuilder
*
*
*
- * Optional. A identifier associated with the workload and underlying projects
- * which allows for the break down of billing costs for a workload. The value
+ * Optional. A identifier associated with the workload and underlying projects which
+ * allows for the break down of billing costs for a workload. The value
* provided for the identifier will add a label to the workload and contained
* projects with the identifier as the value.
*
@@ -114,8 +114,8 @@ public interface CreateWorkloadRequestOrBuilder
*
*
*
- * Optional. A identifier associated with the workload and underlying projects
- * which allows for the break down of billing costs for a workload. The value
+ * Optional. A identifier associated with the workload and underlying projects which
+ * allows for the break down of billing costs for a workload. The value
* provided for the identifier will add a label to the workload and contained
* projects with the identifier as the value.
*
diff --git a/java-assured-workloads/proto-google-cloud-assured-workloads-v1/src/main/java/com/google/cloud/assuredworkloads/v1/DeleteWorkloadRequest.java b/java-assured-workloads/proto-google-cloud-assured-workloads-v1/src/main/java/com/google/cloud/assuredworkloads/v1/DeleteWorkloadRequest.java
index dbf35323319b..5b0f1ea0abd5 100644
--- a/java-assured-workloads/proto-google-cloud-assured-workloads-v1/src/main/java/com/google/cloud/assuredworkloads/v1/DeleteWorkloadRequest.java
+++ b/java-assured-workloads/proto-google-cloud-assured-workloads-v1/src/main/java/com/google/cloud/assuredworkloads/v1/DeleteWorkloadRequest.java
@@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
- private DeleteWorkloadRequest(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- if (extensionRegistry == null) {
- throw new java.lang.NullPointerException();
- }
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder();
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 10:
- {
- java.lang.String s = input.readStringRequireUtf8();
-
- name_ = s;
- break;
- }
- case 18:
- {
- java.lang.String s = input.readStringRequireUtf8();
-
- etag_ = s;
- break;
- }
- default:
- {
- if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (com.google.protobuf.UninitializedMessageException e) {
- throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
-
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
.internal_static_google_cloud_assuredworkloads_v1_DeleteWorkloadRequest_descriptor;
@@ -249,7 +196,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, etag_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -264,7 +211,7 @@ public int getSerializedSize() {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, etag_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -282,7 +229,7 @@ public boolean equals(final java.lang.Object obj) {
if (!getName().equals(other.getName())) return false;
if (!getEtag().equals(other.getEtag())) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -297,7 +244,7 @@ public int hashCode() {
hash = (53 * hash) + getName().hashCode();
hash = (37 * hash) + ETAG_FIELD_NUMBER;
hash = (53 * hash) + getEtag().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -427,17 +374,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
}
// Construct using com.google.cloud.assuredworkloads.v1.DeleteWorkloadRequest.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
+ private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
- maybeForceBuilderInitialization();
- }
-
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
}
@java.lang.Override
@@ -534,7 +474,7 @@ public Builder mergeFrom(com.google.cloud.assuredworkloads.v1.DeleteWorkloadRequ
etag_ = other.etag_;
onChanged();
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -549,18 +489,43 @@ public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.cloud.assuredworkloads.v1.DeleteWorkloadRequest parsedMessage = null;
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10:
+ {
+ name_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 10
+ case 18:
+ {
+ etag_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 18
+ default:
+ {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage =
- (com.google.cloud.assuredworkloads.v1.DeleteWorkloadRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
@@ -833,7 +798,18 @@ public DeleteWorkloadRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new DeleteWorkloadRequest(input, extensionRegistry);
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
}
};
diff --git a/java-assured-workloads/proto-google-cloud-assured-workloads-v1/src/main/java/com/google/cloud/assuredworkloads/v1/GetViolationRequest.java b/java-assured-workloads/proto-google-cloud-assured-workloads-v1/src/main/java/com/google/cloud/assuredworkloads/v1/GetViolationRequest.java
new file mode 100644
index 000000000000..c4e6936d7a38
--- /dev/null
+++ b/java-assured-workloads/proto-google-cloud-assured-workloads-v1/src/main/java/com/google/cloud/assuredworkloads/v1/GetViolationRequest.java
@@ -0,0 +1,644 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/assuredworkloads/v1/assuredworkloads.proto
+
+package com.google.cloud.assuredworkloads.v1;
+
+/**
+ *
+ *
+ *
+ * Request for fetching a Workload Violation.
+ *
+ *
+ * Protobuf type {@code google.cloud.assuredworkloads.v1.GetViolationRequest}
+ */
+public final class GetViolationRequest extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:google.cloud.assuredworkloads.v1.GetViolationRequest)
+ GetViolationRequestOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use GetViolationRequest.newBuilder() to construct.
+ private GetViolationRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+
+ private GetViolationRequest() {
+ name_ = "";
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
+ return new GetViolationRequest();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
+ return this.unknownFields;
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
+ .internal_static_google_cloud_assuredworkloads_v1_GetViolationRequest_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
+ .internal_static_google_cloud_assuredworkloads_v1_GetViolationRequest_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.cloud.assuredworkloads.v1.GetViolationRequest.class,
+ com.google.cloud.assuredworkloads.v1.GetViolationRequest.Builder.class);
+ }
+
+ public static final int NAME_FIELD_NUMBER = 1;
+ private volatile java.lang.Object name_;
+ /**
+ *
+ *
+ *
+ * Required. The resource name of the Violation to fetch (ie. Violation.name).
+ * Format:
+ * organizations/{organization}/locations/{location}/workloads/{workload}/violations/{violation}
+ *
+ *
+ *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The name.
+ */
+ @java.lang.Override
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ name_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Required. The resource name of the Violation to fetch (ie. Violation.name).
+ * Format:
+ * organizations/{organization}/locations/{location}/workloads/{workload}/violations/{violation}
+ *
+ *
+ *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The bytes for name.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.assuredworkloads.v1.GetViolationRequest)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.assuredworkloads.v1.GetViolationRequest other =
+ (com.google.cloud.assuredworkloads.v1.GetViolationRequest) obj;
+
+ if (!getName().equals(other.getName())) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + NAME_FIELD_NUMBER;
+ hash = (53 * hash) + getName().hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.GetViolationRequest parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.GetViolationRequest parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.GetViolationRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.GetViolationRequest parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.GetViolationRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.GetViolationRequest parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.GetViolationRequest parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.GetViolationRequest parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.GetViolationRequest parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.GetViolationRequest parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.GetViolationRequest parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.GetViolationRequest parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(
+ com.google.cloud.assuredworkloads.v1.GetViolationRequest prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ *
+ * Request for fetching a Workload Violation.
+ *
+ *
+ * Protobuf type {@code google.cloud.assuredworkloads.v1.GetViolationRequest}
+ */
+ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ implements
+ // @@protoc_insertion_point(builder_implements:google.cloud.assuredworkloads.v1.GetViolationRequest)
+ com.google.cloud.assuredworkloads.v1.GetViolationRequestOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
+ .internal_static_google_cloud_assuredworkloads_v1_GetViolationRequest_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
+ .internal_static_google_cloud_assuredworkloads_v1_GetViolationRequest_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.cloud.assuredworkloads.v1.GetViolationRequest.class,
+ com.google.cloud.assuredworkloads.v1.GetViolationRequest.Builder.class);
+ }
+
+ // Construct using com.google.cloud.assuredworkloads.v1.GetViolationRequest.newBuilder()
+ private Builder() {}
+
+ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ super(parent);
+ }
+
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ name_ = "";
+
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
+ return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
+ .internal_static_google_cloud_assuredworkloads_v1_GetViolationRequest_descriptor;
+ }
+
+ @java.lang.Override
+ public com.google.cloud.assuredworkloads.v1.GetViolationRequest getDefaultInstanceForType() {
+ return com.google.cloud.assuredworkloads.v1.GetViolationRequest.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public com.google.cloud.assuredworkloads.v1.GetViolationRequest build() {
+ com.google.cloud.assuredworkloads.v1.GetViolationRequest result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public com.google.cloud.assuredworkloads.v1.GetViolationRequest buildPartial() {
+ com.google.cloud.assuredworkloads.v1.GetViolationRequest result =
+ new com.google.cloud.assuredworkloads.v1.GetViolationRequest(this);
+ result.name_ = name_;
+ onBuilt();
+ return result;
+ }
+
+ @java.lang.Override
+ public Builder clone() {
+ return super.clone();
+ }
+
+ @java.lang.Override
+ public Builder setField(
+ com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
+ return super.setField(field, value);
+ }
+
+ @java.lang.Override
+ public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
+ return super.clearField(field);
+ }
+
+ @java.lang.Override
+ public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+ return super.clearOneof(oneof);
+ }
+
+ @java.lang.Override
+ public Builder setRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
+ return super.setRepeatedField(field, index, value);
+ }
+
+ @java.lang.Override
+ public Builder addRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
+ return super.addRepeatedField(field, value);
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof com.google.cloud.assuredworkloads.v1.GetViolationRequest) {
+ return mergeFrom((com.google.cloud.assuredworkloads.v1.GetViolationRequest) other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(com.google.cloud.assuredworkloads.v1.GetViolationRequest other) {
+ if (other == com.google.cloud.assuredworkloads.v1.GetViolationRequest.getDefaultInstance())
+ return this;
+ if (!other.getName().isEmpty()) {
+ name_ = other.name_;
+ onChanged();
+ }
+ this.mergeUnknownFields(other.getUnknownFields());
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ return true;
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10:
+ {
+ name_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 10
+ default:
+ {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.unwrapIOException();
+ } finally {
+ onChanged();
+ } // finally
+ return this;
+ }
+
+ private java.lang.Object name_ = "";
+ /**
+ *
+ *
+ *
+ * Required. The resource name of the Violation to fetch (ie. Violation.name).
+ * Format:
+ * organizations/{organization}/locations/{location}/workloads/{workload}/violations/{violation}
+ *
+ *
+ *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The name.
+ */
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ name_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Required. The resource name of the Violation to fetch (ie. Violation.name).
+ * Format:
+ * organizations/{organization}/locations/{location}/workloads/{workload}/violations/{violation}
+ *
+ *
+ *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The bytes for name.
+ */
+ public com.google.protobuf.ByteString getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Required. The resource name of the Violation to fetch (ie. Violation.name).
+ * Format:
+ * organizations/{organization}/locations/{location}/workloads/{workload}/violations/{violation}
+ *
+ *
+ *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @param value The name to set.
+ * @return This builder for chaining.
+ */
+ public Builder setName(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Required. The resource name of the Violation to fetch (ie. Violation.name).
+ * Format:
+ * organizations/{organization}/locations/{location}/workloads/{workload}/violations/{violation}
+ *
+ *
+ *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearName() {
+
+ name_ = getDefaultInstance().getName();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Required. The resource name of the Violation to fetch (ie. Violation.name).
+ * Format:
+ * organizations/{organization}/locations/{location}/workloads/{workload}/violations/{violation}
+ *
+ *
+ *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @param value The bytes for name to set.
+ * @return This builder for chaining.
+ */
+ public Builder setNameBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.assuredworkloads.v1.GetViolationRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.assuredworkloads.v1.GetViolationRequest)
+ private static final com.google.cloud.assuredworkloads.v1.GetViolationRequest DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.assuredworkloads.v1.GetViolationRequest();
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.GetViolationRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser PARSER =
+ new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public GetViolationRequest parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
+ }
+ };
+
+ public static com.google.protobuf.Parser parser() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.cloud.assuredworkloads.v1.GetViolationRequest getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+}
diff --git a/java-assured-workloads/proto-google-cloud-assured-workloads-v1/src/main/java/com/google/cloud/assuredworkloads/v1/GetViolationRequestOrBuilder.java b/java-assured-workloads/proto-google-cloud-assured-workloads-v1/src/main/java/com/google/cloud/assuredworkloads/v1/GetViolationRequestOrBuilder.java
new file mode 100644
index 000000000000..8b94ff294bd4
--- /dev/null
+++ b/java-assured-workloads/proto-google-cloud-assured-workloads-v1/src/main/java/com/google/cloud/assuredworkloads/v1/GetViolationRequestOrBuilder.java
@@ -0,0 +1,58 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/assuredworkloads/v1/assuredworkloads.proto
+
+package com.google.cloud.assuredworkloads.v1;
+
+public interface GetViolationRequestOrBuilder
+ extends
+ // @@protoc_insertion_point(interface_extends:google.cloud.assuredworkloads.v1.GetViolationRequest)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ *
+ *
+ *
+ * Required. The resource name of the Violation to fetch (ie. Violation.name).
+ * Format:
+ * organizations/{organization}/locations/{location}/workloads/{workload}/violations/{violation}
+ *
+ *
+ *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The name.
+ */
+ java.lang.String getName();
+ /**
+ *
+ *
+ *
+ * Required. The resource name of the Violation to fetch (ie. Violation.name).
+ * Format:
+ * organizations/{organization}/locations/{location}/workloads/{workload}/violations/{violation}
+ *
+ *
+ *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The bytes for name.
+ */
+ com.google.protobuf.ByteString getNameBytes();
+}
diff --git a/java-assured-workloads/proto-google-cloud-assured-workloads-v1/src/main/java/com/google/cloud/assuredworkloads/v1/GetWorkloadRequest.java b/java-assured-workloads/proto-google-cloud-assured-workloads-v1/src/main/java/com/google/cloud/assuredworkloads/v1/GetWorkloadRequest.java
index 5a7bd056f618..fcc6a36e5cb7 100644
--- a/java-assured-workloads/proto-google-cloud-assured-workloads-v1/src/main/java/com/google/cloud/assuredworkloads/v1/GetWorkloadRequest.java
+++ b/java-assured-workloads/proto-google-cloud-assured-workloads-v1/src/main/java/com/google/cloud/assuredworkloads/v1/GetWorkloadRequest.java
@@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
- private GetWorkloadRequest(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- if (extensionRegistry == null) {
- throw new java.lang.NullPointerException();
- }
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder();
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 10:
- {
- java.lang.String s = input.readStringRequireUtf8();
-
- name_ = s;
- break;
- }
- default:
- {
- if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (com.google.protobuf.UninitializedMessageException e) {
- throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
-
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
.internal_static_google_cloud_assuredworkloads_v1_GetWorkloadRequest_descriptor;
@@ -119,8 +73,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
*
*
*
- * Required. The resource name of the Workload to fetch. This is the
- * workloads's relative path in the API, formatted as
+ * 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-1".
@@ -148,8 +102,8 @@ public java.lang.String getName() {
*
*
*
- * Required. The resource name of the Workload to fetch. This is the
- * workloads's relative path in the API, formatted as
+ * 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-1".
@@ -191,7 +145,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -203,7 +157,7 @@ public int getSerializedSize() {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -220,7 +174,7 @@ public boolean equals(final java.lang.Object obj) {
(com.google.cloud.assuredworkloads.v1.GetWorkloadRequest) obj;
if (!getName().equals(other.getName())) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -233,7 +187,7 @@ public int hashCode() {
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -363,17 +317,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
}
// Construct using com.google.cloud.assuredworkloads.v1.GetWorkloadRequest.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
+ private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
- maybeForceBuilderInitialization();
- }
-
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
}
@java.lang.Override
@@ -463,7 +410,7 @@ public Builder mergeFrom(com.google.cloud.assuredworkloads.v1.GetWorkloadRequest
name_ = other.name_;
onChanged();
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -478,18 +425,37 @@ public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.cloud.assuredworkloads.v1.GetWorkloadRequest parsedMessage = null;
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10:
+ {
+ name_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 10
+ default:
+ {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage =
- (com.google.cloud.assuredworkloads.v1.GetWorkloadRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
@@ -498,8 +464,8 @@ public Builder mergeFrom(
*
*
*
- * Required. The resource name of the Workload to fetch. This is the
- * workloads's relative path in the API, formatted as
+ * 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-1".
@@ -526,8 +492,8 @@ public java.lang.String getName() {
*
*
*
- * Required. The resource name of the Workload to fetch. This is the
- * workloads's relative path in the API, formatted as
+ * 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-1".
@@ -554,8 +520,8 @@ public com.google.protobuf.ByteString getNameBytes() {
*
*
*
- * Required. The resource name of the Workload to fetch. This is the
- * workloads's relative path in the API, formatted as
+ * 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-1".
@@ -581,8 +547,8 @@ public Builder setName(java.lang.String value) {
*
*
*
- * Required. The resource name of the Workload to fetch. This is the
- * workloads's relative path in the API, formatted as
+ * 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-1".
@@ -604,8 +570,8 @@ public Builder clearName() {
*
*
*
- * Required. The resource name of the Workload to fetch. This is the
- * workloads's relative path in the API, formatted as
+ * 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-1".
@@ -661,7 +627,18 @@ public GetWorkloadRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new GetWorkloadRequest(input, extensionRegistry);
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
}
};
diff --git a/java-assured-workloads/proto-google-cloud-assured-workloads-v1/src/main/java/com/google/cloud/assuredworkloads/v1/GetWorkloadRequestOrBuilder.java b/java-assured-workloads/proto-google-cloud-assured-workloads-v1/src/main/java/com/google/cloud/assuredworkloads/v1/GetWorkloadRequestOrBuilder.java
index c0ce0880fce8..e2fca96f9516 100644
--- a/java-assured-workloads/proto-google-cloud-assured-workloads-v1/src/main/java/com/google/cloud/assuredworkloads/v1/GetWorkloadRequestOrBuilder.java
+++ b/java-assured-workloads/proto-google-cloud-assured-workloads-v1/src/main/java/com/google/cloud/assuredworkloads/v1/GetWorkloadRequestOrBuilder.java
@@ -27,8 +27,8 @@ public interface GetWorkloadRequestOrBuilder
*
*
*
- * Required. The resource name of the Workload to fetch. This is the
- * workloads's relative path in the API, formatted as
+ * 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-1".
@@ -45,8 +45,8 @@ public interface GetWorkloadRequestOrBuilder
*
*
*
- * Required. The resource name of the Workload to fetch. This is the
- * workloads's relative path in the API, formatted as
+ * 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-1".
diff --git a/java-assured-workloads/proto-google-cloud-assured-workloads-v1/src/main/java/com/google/cloud/assuredworkloads/v1/ListViolationsRequest.java b/java-assured-workloads/proto-google-cloud-assured-workloads-v1/src/main/java/com/google/cloud/assuredworkloads/v1/ListViolationsRequest.java
new file mode 100644
index 000000000000..c94b86c17d7e
--- /dev/null
+++ b/java-assured-workloads/proto-google-cloud-assured-workloads-v1/src/main/java/com/google/cloud/assuredworkloads/v1/ListViolationsRequest.java
@@ -0,0 +1,1400 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/assuredworkloads/v1/assuredworkloads.proto
+
+package com.google.cloud.assuredworkloads.v1;
+
+/**
+ *
+ *
+ *
+ * Request for fetching violations in an organization.
+ *
+ *
+ * Protobuf type {@code google.cloud.assuredworkloads.v1.ListViolationsRequest}
+ */
+public final class ListViolationsRequest extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:google.cloud.assuredworkloads.v1.ListViolationsRequest)
+ ListViolationsRequestOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use ListViolationsRequest.newBuilder() to construct.
+ private ListViolationsRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+
+ private ListViolationsRequest() {
+ parent_ = "";
+ pageToken_ = "";
+ filter_ = "";
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
+ return new ListViolationsRequest();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
+ return this.unknownFields;
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
+ .internal_static_google_cloud_assuredworkloads_v1_ListViolationsRequest_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
+ .internal_static_google_cloud_assuredworkloads_v1_ListViolationsRequest_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.cloud.assuredworkloads.v1.ListViolationsRequest.class,
+ com.google.cloud.assuredworkloads.v1.ListViolationsRequest.Builder.class);
+ }
+
+ public static final int PARENT_FIELD_NUMBER = 1;
+ private volatile java.lang.Object parent_;
+ /**
+ *
+ *
+ *
+ * Required. The Workload name.
+ * Format `organizations/{org_id}/locations/{location}/workloads/{workload}`.
+ *
+ *
+ *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The parent.
+ */
+ @java.lang.Override
+ public java.lang.String getParent() {
+ java.lang.Object ref = parent_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ parent_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Required. The Workload name.
+ * Format `organizations/{org_id}/locations/{location}/workloads/{workload}`.
+ *
+ *
+ *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The bytes for parent.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getParentBytes() {
+ java.lang.Object ref = parent_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ parent_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int INTERVAL_FIELD_NUMBER = 2;
+ private com.google.cloud.assuredworkloads.v1.TimeWindow interval_;
+ /**
+ *
+ *
+ *
+ * Optional. Specifies the time window for retrieving active Violations.
+ * When specified, retrieves Violations that were active between start_time
+ * and end_time.
+ *
+ *
+ *
+ * .google.cloud.assuredworkloads.v1.TimeWindow interval = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return Whether the interval field is set.
+ */
+ @java.lang.Override
+ public boolean hasInterval() {
+ return interval_ != null;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. Specifies the time window for retrieving active Violations.
+ * When specified, retrieves Violations that were active between start_time
+ * and end_time.
+ *
+ *
+ *
+ * .google.cloud.assuredworkloads.v1.TimeWindow interval = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The interval.
+ */
+ @java.lang.Override
+ public com.google.cloud.assuredworkloads.v1.TimeWindow getInterval() {
+ return interval_ == null
+ ? com.google.cloud.assuredworkloads.v1.TimeWindow.getDefaultInstance()
+ : interval_;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. Specifies the time window for retrieving active Violations.
+ * When specified, retrieves Violations that were active between start_time
+ * and end_time.
+ *
+ *
+ *
+ * .google.cloud.assuredworkloads.v1.TimeWindow interval = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ @java.lang.Override
+ public com.google.cloud.assuredworkloads.v1.TimeWindowOrBuilder getIntervalOrBuilder() {
+ return getInterval();
+ }
+
+ public static final int PAGE_SIZE_FIELD_NUMBER = 3;
+ private int pageSize_;
+ /**
+ *
+ *
+ *
+ * Optional. Page size.
+ *
+ *
+ * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The pageSize.
+ */
+ @java.lang.Override
+ public int getPageSize() {
+ return pageSize_;
+ }
+
+ public static final int PAGE_TOKEN_FIELD_NUMBER = 4;
+ private volatile java.lang.Object pageToken_;
+ /**
+ *
+ *
+ *
+ * Optional. Page token returned from previous request.
+ *
+ *
+ * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The pageToken.
+ */
+ @java.lang.Override
+ public java.lang.String getPageToken() {
+ java.lang.Object ref = pageToken_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ pageToken_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Optional. Page token returned from previous request.
+ *
+ *
+ * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The bytes for pageToken.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getPageTokenBytes() {
+ java.lang.Object ref = pageToken_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ pageToken_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int FILTER_FIELD_NUMBER = 5;
+ private volatile java.lang.Object filter_;
+ /**
+ *
+ *
+ *
+ * Optional. A custom filter for filtering by the Violations properties.
+ *
+ *
+ * string filter = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The filter.
+ */
+ @java.lang.Override
+ public java.lang.String getFilter() {
+ java.lang.Object ref = filter_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ filter_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Optional. A custom filter for filtering by the Violations properties.
+ *
+ *
+ * string filter = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The bytes for filter.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getFilterBytes() {
+ java.lang.Object ref = filter_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ filter_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_);
+ }
+ if (interval_ != null) {
+ output.writeMessage(2, getInterval());
+ }
+ if (pageSize_ != 0) {
+ output.writeInt32(3, pageSize_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 5, filter_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_);
+ }
+ if (interval_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getInterval());
+ }
+ if (pageSize_ != 0) {
+ size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, filter_);
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.assuredworkloads.v1.ListViolationsRequest)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.assuredworkloads.v1.ListViolationsRequest other =
+ (com.google.cloud.assuredworkloads.v1.ListViolationsRequest) obj;
+
+ if (!getParent().equals(other.getParent())) return false;
+ if (hasInterval() != other.hasInterval()) return false;
+ if (hasInterval()) {
+ if (!getInterval().equals(other.getInterval())) return false;
+ }
+ if (getPageSize() != other.getPageSize()) return false;
+ if (!getPageToken().equals(other.getPageToken())) return false;
+ if (!getFilter().equals(other.getFilter())) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + PARENT_FIELD_NUMBER;
+ hash = (53 * hash) + getParent().hashCode();
+ if (hasInterval()) {
+ hash = (37 * hash) + INTERVAL_FIELD_NUMBER;
+ hash = (53 * hash) + getInterval().hashCode();
+ }
+ hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER;
+ hash = (53 * hash) + getPageSize();
+ hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER;
+ hash = (53 * hash) + getPageToken().hashCode();
+ hash = (37 * hash) + FILTER_FIELD_NUMBER;
+ hash = (53 * hash) + getFilter().hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.ListViolationsRequest parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.ListViolationsRequest parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.ListViolationsRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.ListViolationsRequest parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.ListViolationsRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.ListViolationsRequest parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.ListViolationsRequest parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.ListViolationsRequest parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.ListViolationsRequest parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.ListViolationsRequest parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.ListViolationsRequest parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.ListViolationsRequest parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(
+ com.google.cloud.assuredworkloads.v1.ListViolationsRequest prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ *
+ * Request for fetching violations in an organization.
+ *
+ *
+ * Protobuf type {@code google.cloud.assuredworkloads.v1.ListViolationsRequest}
+ */
+ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ implements
+ // @@protoc_insertion_point(builder_implements:google.cloud.assuredworkloads.v1.ListViolationsRequest)
+ com.google.cloud.assuredworkloads.v1.ListViolationsRequestOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
+ .internal_static_google_cloud_assuredworkloads_v1_ListViolationsRequest_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
+ .internal_static_google_cloud_assuredworkloads_v1_ListViolationsRequest_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.cloud.assuredworkloads.v1.ListViolationsRequest.class,
+ com.google.cloud.assuredworkloads.v1.ListViolationsRequest.Builder.class);
+ }
+
+ // Construct using com.google.cloud.assuredworkloads.v1.ListViolationsRequest.newBuilder()
+ private Builder() {}
+
+ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ super(parent);
+ }
+
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ parent_ = "";
+
+ if (intervalBuilder_ == null) {
+ interval_ = null;
+ } else {
+ interval_ = null;
+ intervalBuilder_ = null;
+ }
+ pageSize_ = 0;
+
+ pageToken_ = "";
+
+ filter_ = "";
+
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
+ return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
+ .internal_static_google_cloud_assuredworkloads_v1_ListViolationsRequest_descriptor;
+ }
+
+ @java.lang.Override
+ public com.google.cloud.assuredworkloads.v1.ListViolationsRequest getDefaultInstanceForType() {
+ return com.google.cloud.assuredworkloads.v1.ListViolationsRequest.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public com.google.cloud.assuredworkloads.v1.ListViolationsRequest build() {
+ com.google.cloud.assuredworkloads.v1.ListViolationsRequest result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public com.google.cloud.assuredworkloads.v1.ListViolationsRequest buildPartial() {
+ com.google.cloud.assuredworkloads.v1.ListViolationsRequest result =
+ new com.google.cloud.assuredworkloads.v1.ListViolationsRequest(this);
+ result.parent_ = parent_;
+ if (intervalBuilder_ == null) {
+ result.interval_ = interval_;
+ } else {
+ result.interval_ = intervalBuilder_.build();
+ }
+ result.pageSize_ = pageSize_;
+ result.pageToken_ = pageToken_;
+ result.filter_ = filter_;
+ onBuilt();
+ return result;
+ }
+
+ @java.lang.Override
+ public Builder clone() {
+ return super.clone();
+ }
+
+ @java.lang.Override
+ public Builder setField(
+ com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
+ return super.setField(field, value);
+ }
+
+ @java.lang.Override
+ public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
+ return super.clearField(field);
+ }
+
+ @java.lang.Override
+ public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+ return super.clearOneof(oneof);
+ }
+
+ @java.lang.Override
+ public Builder setRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
+ return super.setRepeatedField(field, index, value);
+ }
+
+ @java.lang.Override
+ public Builder addRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
+ return super.addRepeatedField(field, value);
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof com.google.cloud.assuredworkloads.v1.ListViolationsRequest) {
+ return mergeFrom((com.google.cloud.assuredworkloads.v1.ListViolationsRequest) other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(com.google.cloud.assuredworkloads.v1.ListViolationsRequest other) {
+ if (other == com.google.cloud.assuredworkloads.v1.ListViolationsRequest.getDefaultInstance())
+ return this;
+ if (!other.getParent().isEmpty()) {
+ parent_ = other.parent_;
+ onChanged();
+ }
+ if (other.hasInterval()) {
+ mergeInterval(other.getInterval());
+ }
+ if (other.getPageSize() != 0) {
+ setPageSize(other.getPageSize());
+ }
+ if (!other.getPageToken().isEmpty()) {
+ pageToken_ = other.pageToken_;
+ onChanged();
+ }
+ if (!other.getFilter().isEmpty()) {
+ filter_ = other.filter_;
+ onChanged();
+ }
+ this.mergeUnknownFields(other.getUnknownFields());
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ return true;
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10:
+ {
+ parent_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 10
+ case 18:
+ {
+ input.readMessage(getIntervalFieldBuilder().getBuilder(), extensionRegistry);
+
+ break;
+ } // case 18
+ case 24:
+ {
+ pageSize_ = input.readInt32();
+
+ break;
+ } // case 24
+ case 34:
+ {
+ pageToken_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 34
+ case 42:
+ {
+ filter_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 42
+ default:
+ {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.unwrapIOException();
+ } finally {
+ onChanged();
+ } // finally
+ return this;
+ }
+
+ private java.lang.Object parent_ = "";
+ /**
+ *
+ *
+ *
+ * Required. The Workload name.
+ * Format `organizations/{org_id}/locations/{location}/workloads/{workload}`.
+ *
+ *
+ *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The parent.
+ */
+ public java.lang.String getParent() {
+ java.lang.Object ref = parent_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ parent_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Required. The Workload name.
+ * Format `organizations/{org_id}/locations/{location}/workloads/{workload}`.
+ *
+ *
+ *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The bytes for parent.
+ */
+ public com.google.protobuf.ByteString getParentBytes() {
+ java.lang.Object ref = parent_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ parent_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Required. The Workload name.
+ * Format `organizations/{org_id}/locations/{location}/workloads/{workload}`.
+ *
+ *
+ *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @param value The parent to set.
+ * @return This builder for chaining.
+ */
+ public Builder setParent(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ parent_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Required. The Workload name.
+ * Format `organizations/{org_id}/locations/{location}/workloads/{workload}`.
+ *
+ *
+ *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearParent() {
+
+ parent_ = getDefaultInstance().getParent();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Required. The Workload name.
+ * Format `organizations/{org_id}/locations/{location}/workloads/{workload}`.
+ *
+ *
+ *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @param value The bytes for parent to set.
+ * @return This builder for chaining.
+ */
+ public Builder setParentBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ parent_ = value;
+ onChanged();
+ return this;
+ }
+
+ private com.google.cloud.assuredworkloads.v1.TimeWindow interval_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.assuredworkloads.v1.TimeWindow,
+ com.google.cloud.assuredworkloads.v1.TimeWindow.Builder,
+ com.google.cloud.assuredworkloads.v1.TimeWindowOrBuilder>
+ intervalBuilder_;
+ /**
+ *
+ *
+ *
+ * Optional. Specifies the time window for retrieving active Violations.
+ * When specified, retrieves Violations that were active between start_time
+ * and end_time.
+ *
+ *
+ *
+ * .google.cloud.assuredworkloads.v1.TimeWindow interval = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return Whether the interval field is set.
+ */
+ public boolean hasInterval() {
+ return intervalBuilder_ != null || interval_ != null;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. Specifies the time window for retrieving active Violations.
+ * When specified, retrieves Violations that were active between start_time
+ * and end_time.
+ *
+ *
+ *
+ * .google.cloud.assuredworkloads.v1.TimeWindow interval = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The interval.
+ */
+ public com.google.cloud.assuredworkloads.v1.TimeWindow getInterval() {
+ if (intervalBuilder_ == null) {
+ return interval_ == null
+ ? com.google.cloud.assuredworkloads.v1.TimeWindow.getDefaultInstance()
+ : interval_;
+ } else {
+ return intervalBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Optional. Specifies the time window for retrieving active Violations.
+ * When specified, retrieves Violations that were active between start_time
+ * and end_time.
+ *
+ *
+ *
+ * .google.cloud.assuredworkloads.v1.TimeWindow interval = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder setInterval(com.google.cloud.assuredworkloads.v1.TimeWindow value) {
+ if (intervalBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ interval_ = value;
+ onChanged();
+ } else {
+ intervalBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. Specifies the time window for retrieving active Violations.
+ * When specified, retrieves Violations that were active between start_time
+ * and end_time.
+ *
+ *
+ *
+ * .google.cloud.assuredworkloads.v1.TimeWindow interval = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder setInterval(
+ com.google.cloud.assuredworkloads.v1.TimeWindow.Builder builderForValue) {
+ if (intervalBuilder_ == null) {
+ interval_ = builderForValue.build();
+ onChanged();
+ } else {
+ intervalBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. Specifies the time window for retrieving active Violations.
+ * When specified, retrieves Violations that were active between start_time
+ * and end_time.
+ *
+ *
+ *
+ * .google.cloud.assuredworkloads.v1.TimeWindow interval = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder mergeInterval(com.google.cloud.assuredworkloads.v1.TimeWindow value) {
+ if (intervalBuilder_ == null) {
+ if (interval_ != null) {
+ interval_ =
+ com.google.cloud.assuredworkloads.v1.TimeWindow.newBuilder(interval_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ interval_ = value;
+ }
+ onChanged();
+ } else {
+ intervalBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. Specifies the time window for retrieving active Violations.
+ * When specified, retrieves Violations that were active between start_time
+ * and end_time.
+ *
+ *
+ *
+ * .google.cloud.assuredworkloads.v1.TimeWindow interval = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder clearInterval() {
+ if (intervalBuilder_ == null) {
+ interval_ = null;
+ onChanged();
+ } else {
+ interval_ = null;
+ intervalBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. Specifies the time window for retrieving active Violations.
+ * When specified, retrieves Violations that were active between start_time
+ * and end_time.
+ *
+ *
+ *
+ * .google.cloud.assuredworkloads.v1.TimeWindow interval = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public com.google.cloud.assuredworkloads.v1.TimeWindow.Builder getIntervalBuilder() {
+
+ onChanged();
+ return getIntervalFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ *
+ * Optional. Specifies the time window for retrieving active Violations.
+ * When specified, retrieves Violations that were active between start_time
+ * and end_time.
+ *
+ *
+ *
+ * .google.cloud.assuredworkloads.v1.TimeWindow interval = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public com.google.cloud.assuredworkloads.v1.TimeWindowOrBuilder getIntervalOrBuilder() {
+ if (intervalBuilder_ != null) {
+ return intervalBuilder_.getMessageOrBuilder();
+ } else {
+ return interval_ == null
+ ? com.google.cloud.assuredworkloads.v1.TimeWindow.getDefaultInstance()
+ : interval_;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Optional. Specifies the time window for retrieving active Violations.
+ * When specified, retrieves Violations that were active between start_time
+ * and end_time.
+ *
+ *
+ *
+ * .google.cloud.assuredworkloads.v1.TimeWindow interval = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.assuredworkloads.v1.TimeWindow,
+ com.google.cloud.assuredworkloads.v1.TimeWindow.Builder,
+ com.google.cloud.assuredworkloads.v1.TimeWindowOrBuilder>
+ getIntervalFieldBuilder() {
+ if (intervalBuilder_ == null) {
+ intervalBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.assuredworkloads.v1.TimeWindow,
+ com.google.cloud.assuredworkloads.v1.TimeWindow.Builder,
+ com.google.cloud.assuredworkloads.v1.TimeWindowOrBuilder>(
+ getInterval(), getParentForChildren(), isClean());
+ interval_ = null;
+ }
+ return intervalBuilder_;
+ }
+
+ private int pageSize_;
+ /**
+ *
+ *
+ *
+ * Optional. Page size.
+ *
+ *
+ * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The pageSize.
+ */
+ @java.lang.Override
+ public int getPageSize() {
+ return pageSize_;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. Page size.
+ *
+ *
+ * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param value The pageSize to set.
+ * @return This builder for chaining.
+ */
+ public Builder setPageSize(int value) {
+
+ pageSize_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. Page size.
+ *
+ *
+ * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearPageSize() {
+
+ pageSize_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object pageToken_ = "";
+ /**
+ *
+ *
+ *
+ * Optional. Page token returned from previous request.
+ *
+ *
+ * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The pageToken.
+ */
+ public java.lang.String getPageToken() {
+ java.lang.Object ref = pageToken_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ pageToken_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Optional. Page token returned from previous request.
+ *
+ *
+ * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The bytes for pageToken.
+ */
+ public com.google.protobuf.ByteString getPageTokenBytes() {
+ java.lang.Object ref = pageToken_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ pageToken_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Optional. Page token returned from previous request.
+ *
+ *
+ * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param value The pageToken to set.
+ * @return This builder for chaining.
+ */
+ public Builder setPageToken(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ pageToken_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. Page token returned from previous request.
+ *
+ *
+ * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearPageToken() {
+
+ pageToken_ = getDefaultInstance().getPageToken();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. Page token returned from previous request.
+ *
+ *
+ * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param value The bytes for pageToken to set.
+ * @return This builder for chaining.
+ */
+ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ pageToken_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object filter_ = "";
+ /**
+ *
+ *
+ *
+ * Optional. A custom filter for filtering by the Violations properties.
+ *
+ *
+ * string filter = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The filter.
+ */
+ public java.lang.String getFilter() {
+ java.lang.Object ref = filter_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ filter_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Optional. A custom filter for filtering by the Violations properties.
+ *
+ *
+ * string filter = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The bytes for filter.
+ */
+ public com.google.protobuf.ByteString getFilterBytes() {
+ java.lang.Object ref = filter_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ filter_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Optional. A custom filter for filtering by the Violations properties.
+ *
+ *
+ * string filter = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param value The filter to set.
+ * @return This builder for chaining.
+ */
+ public Builder setFilter(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ filter_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. A custom filter for filtering by the Violations properties.
+ *
+ *
+ * string filter = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearFilter() {
+
+ filter_ = getDefaultInstance().getFilter();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. A custom filter for filtering by the Violations properties.
+ *
+ *
+ * string filter = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param value The bytes for filter to set.
+ * @return This builder for chaining.
+ */
+ public Builder setFilterBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ filter_ = value;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.assuredworkloads.v1.ListViolationsRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.assuredworkloads.v1.ListViolationsRequest)
+ private static final com.google.cloud.assuredworkloads.v1.ListViolationsRequest DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.assuredworkloads.v1.ListViolationsRequest();
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.ListViolationsRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser PARSER =
+ new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public ListViolationsRequest parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
+ }
+ };
+
+ public static com.google.protobuf.Parser parser() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.cloud.assuredworkloads.v1.ListViolationsRequest getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+}
diff --git a/java-assured-workloads/proto-google-cloud-assured-workloads-v1/src/main/java/com/google/cloud/assuredworkloads/v1/ListViolationsRequestOrBuilder.java b/java-assured-workloads/proto-google-cloud-assured-workloads-v1/src/main/java/com/google/cloud/assuredworkloads/v1/ListViolationsRequestOrBuilder.java
new file mode 100644
index 000000000000..e51421042aed
--- /dev/null
+++ b/java-assured-workloads/proto-google-cloud-assured-workloads-v1/src/main/java/com/google/cloud/assuredworkloads/v1/ListViolationsRequestOrBuilder.java
@@ -0,0 +1,166 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/assuredworkloads/v1/assuredworkloads.proto
+
+package com.google.cloud.assuredworkloads.v1;
+
+public interface ListViolationsRequestOrBuilder
+ extends
+ // @@protoc_insertion_point(interface_extends:google.cloud.assuredworkloads.v1.ListViolationsRequest)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ *
+ *
+ *
+ * Required. The Workload name.
+ * Format `organizations/{org_id}/locations/{location}/workloads/{workload}`.
+ *
+ *
+ *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The parent.
+ */
+ java.lang.String getParent();
+ /**
+ *
+ *
+ *
+ * Required. The Workload name.
+ * Format `organizations/{org_id}/locations/{location}/workloads/{workload}`.
+ *
+ *
+ *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The bytes for parent.
+ */
+ com.google.protobuf.ByteString getParentBytes();
+
+ /**
+ *
+ *
+ *
+ * Optional. Specifies the time window for retrieving active Violations.
+ * When specified, retrieves Violations that were active between start_time
+ * and end_time.
+ *
+ *
+ *
+ * .google.cloud.assuredworkloads.v1.TimeWindow interval = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return Whether the interval field is set.
+ */
+ boolean hasInterval();
+ /**
+ *
+ *
+ *
+ * Optional. Specifies the time window for retrieving active Violations.
+ * When specified, retrieves Violations that were active between start_time
+ * and end_time.
+ *
+ *
+ *
+ * .google.cloud.assuredworkloads.v1.TimeWindow interval = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The interval.
+ */
+ com.google.cloud.assuredworkloads.v1.TimeWindow getInterval();
+ /**
+ *
+ *
+ *
+ * Optional. Specifies the time window for retrieving active Violations.
+ * When specified, retrieves Violations that were active between start_time
+ * and end_time.
+ *
+ *
+ *
+ * .google.cloud.assuredworkloads.v1.TimeWindow interval = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ com.google.cloud.assuredworkloads.v1.TimeWindowOrBuilder getIntervalOrBuilder();
+
+ /**
+ *
+ *
+ *
+ * Optional. Page size.
+ *
+ *
+ * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The pageSize.
+ */
+ int getPageSize();
+
+ /**
+ *
+ *
+ *
+ * Optional. Page token returned from previous request.
+ *
+ *
+ * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The pageToken.
+ */
+ java.lang.String getPageToken();
+ /**
+ *
+ *
+ *
+ * Optional. Page token returned from previous request.
+ *
+ *
+ * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The bytes for pageToken.
+ */
+ com.google.protobuf.ByteString getPageTokenBytes();
+
+ /**
+ *
+ *
+ *
+ * Optional. A custom filter for filtering by the Violations properties.
+ *
+ *
+ * string filter = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The filter.
+ */
+ java.lang.String getFilter();
+ /**
+ *
+ *
+ *
+ * Optional. A custom filter for filtering by the Violations properties.
+ *
+ *
+ * string filter = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The bytes for filter.
+ */
+ com.google.protobuf.ByteString getFilterBytes();
+}
diff --git a/java-assured-workloads/proto-google-cloud-assured-workloads-v1/src/main/java/com/google/cloud/assuredworkloads/v1/ListViolationsResponse.java b/java-assured-workloads/proto-google-cloud-assured-workloads-v1/src/main/java/com/google/cloud/assuredworkloads/v1/ListViolationsResponse.java
new file mode 100644
index 000000000000..37e8bea73951
--- /dev/null
+++ b/java-assured-workloads/proto-google-cloud-assured-workloads-v1/src/main/java/com/google/cloud/assuredworkloads/v1/ListViolationsResponse.java
@@ -0,0 +1,1108 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/assuredworkloads/v1/assuredworkloads.proto
+
+package com.google.cloud.assuredworkloads.v1;
+
+/**
+ *
+ *
+ *
+ * Response of ListViolations endpoint.
+ *
+ *
+ * Protobuf type {@code google.cloud.assuredworkloads.v1.ListViolationsResponse}
+ */
+public final class ListViolationsResponse extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:google.cloud.assuredworkloads.v1.ListViolationsResponse)
+ ListViolationsResponseOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use ListViolationsResponse.newBuilder() to construct.
+ private ListViolationsResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+
+ private ListViolationsResponse() {
+ violations_ = java.util.Collections.emptyList();
+ nextPageToken_ = "";
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
+ return new ListViolationsResponse();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
+ return this.unknownFields;
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
+ .internal_static_google_cloud_assuredworkloads_v1_ListViolationsResponse_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
+ .internal_static_google_cloud_assuredworkloads_v1_ListViolationsResponse_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.cloud.assuredworkloads.v1.ListViolationsResponse.class,
+ com.google.cloud.assuredworkloads.v1.ListViolationsResponse.Builder.class);
+ }
+
+ public static final int VIOLATIONS_FIELD_NUMBER = 1;
+ private java.util.List violations_;
+ /**
+ *
+ *
+ *
+ * List of Violations under a Workload.
+ *
+ *
+ * repeated .google.cloud.assuredworkloads.v1.Violation violations = 1;
+ */
+ @java.lang.Override
+ public java.util.List getViolationsList() {
+ return violations_;
+ }
+ /**
+ *
+ *
+ *
+ * List of Violations under a Workload.
+ *
+ *
+ * repeated .google.cloud.assuredworkloads.v1.Violation violations = 1;
+ */
+ @java.lang.Override
+ public java.util.List extends com.google.cloud.assuredworkloads.v1.ViolationOrBuilder>
+ getViolationsOrBuilderList() {
+ return violations_;
+ }
+ /**
+ *
+ *
+ *
+ * List of Violations under a Workload.
+ *
+ *
+ * repeated .google.cloud.assuredworkloads.v1.Violation violations = 1;
+ */
+ @java.lang.Override
+ public int getViolationsCount() {
+ return violations_.size();
+ }
+ /**
+ *
+ *
+ *
+ * List of Violations under a Workload.
+ *
+ *
+ * repeated .google.cloud.assuredworkloads.v1.Violation violations = 1;
+ */
+ @java.lang.Override
+ public com.google.cloud.assuredworkloads.v1.Violation getViolations(int index) {
+ return violations_.get(index);
+ }
+ /**
+ *
+ *
+ *
+ * List of Violations under a Workload.
+ *
+ *
+ * repeated .google.cloud.assuredworkloads.v1.Violation violations = 1;
+ */
+ @java.lang.Override
+ public com.google.cloud.assuredworkloads.v1.ViolationOrBuilder getViolationsOrBuilder(int index) {
+ return violations_.get(index);
+ }
+
+ public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2;
+ private volatile java.lang.Object nextPageToken_;
+ /**
+ *
+ *
+ *
+ * The next page token. Returns empty if reached the last page.
+ *
+ *
+ * string next_page_token = 2;
+ *
+ * @return The nextPageToken.
+ */
+ @java.lang.Override
+ public java.lang.String getNextPageToken() {
+ java.lang.Object ref = nextPageToken_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ nextPageToken_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The next page token. Returns empty if reached the last page.
+ *
+ *
+ * string next_page_token = 2;
+ *
+ * @return The bytes for nextPageToken.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getNextPageTokenBytes() {
+ java.lang.Object ref = nextPageToken_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ nextPageToken_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ for (int i = 0; i < violations_.size(); i++) {
+ output.writeMessage(1, violations_.get(i));
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ for (int i = 0; i < violations_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, violations_.get(i));
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_);
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.assuredworkloads.v1.ListViolationsResponse)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.assuredworkloads.v1.ListViolationsResponse other =
+ (com.google.cloud.assuredworkloads.v1.ListViolationsResponse) obj;
+
+ if (!getViolationsList().equals(other.getViolationsList())) return false;
+ if (!getNextPageToken().equals(other.getNextPageToken())) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (getViolationsCount() > 0) {
+ hash = (37 * hash) + VIOLATIONS_FIELD_NUMBER;
+ hash = (53 * hash) + getViolationsList().hashCode();
+ }
+ hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER;
+ hash = (53 * hash) + getNextPageToken().hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.ListViolationsResponse parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.ListViolationsResponse parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.ListViolationsResponse parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.ListViolationsResponse parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.ListViolationsResponse parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.ListViolationsResponse parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.ListViolationsResponse parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.ListViolationsResponse parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.ListViolationsResponse parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.ListViolationsResponse parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.ListViolationsResponse parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.ListViolationsResponse parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(
+ com.google.cloud.assuredworkloads.v1.ListViolationsResponse prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ *
+ * Response of ListViolations endpoint.
+ *
+ *
+ * Protobuf type {@code google.cloud.assuredworkloads.v1.ListViolationsResponse}
+ */
+ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ implements
+ // @@protoc_insertion_point(builder_implements:google.cloud.assuredworkloads.v1.ListViolationsResponse)
+ com.google.cloud.assuredworkloads.v1.ListViolationsResponseOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
+ .internal_static_google_cloud_assuredworkloads_v1_ListViolationsResponse_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
+ .internal_static_google_cloud_assuredworkloads_v1_ListViolationsResponse_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.cloud.assuredworkloads.v1.ListViolationsResponse.class,
+ com.google.cloud.assuredworkloads.v1.ListViolationsResponse.Builder.class);
+ }
+
+ // Construct using com.google.cloud.assuredworkloads.v1.ListViolationsResponse.newBuilder()
+ private Builder() {}
+
+ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ super(parent);
+ }
+
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ if (violationsBuilder_ == null) {
+ violations_ = java.util.Collections.emptyList();
+ } else {
+ violations_ = null;
+ violationsBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000001);
+ nextPageToken_ = "";
+
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
+ return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
+ .internal_static_google_cloud_assuredworkloads_v1_ListViolationsResponse_descriptor;
+ }
+
+ @java.lang.Override
+ public com.google.cloud.assuredworkloads.v1.ListViolationsResponse getDefaultInstanceForType() {
+ return com.google.cloud.assuredworkloads.v1.ListViolationsResponse.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public com.google.cloud.assuredworkloads.v1.ListViolationsResponse build() {
+ com.google.cloud.assuredworkloads.v1.ListViolationsResponse result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public com.google.cloud.assuredworkloads.v1.ListViolationsResponse buildPartial() {
+ com.google.cloud.assuredworkloads.v1.ListViolationsResponse result =
+ new com.google.cloud.assuredworkloads.v1.ListViolationsResponse(this);
+ int from_bitField0_ = bitField0_;
+ if (violationsBuilder_ == null) {
+ if (((bitField0_ & 0x00000001) != 0)) {
+ violations_ = java.util.Collections.unmodifiableList(violations_);
+ bitField0_ = (bitField0_ & ~0x00000001);
+ }
+ result.violations_ = violations_;
+ } else {
+ result.violations_ = violationsBuilder_.build();
+ }
+ result.nextPageToken_ = nextPageToken_;
+ onBuilt();
+ return result;
+ }
+
+ @java.lang.Override
+ public Builder clone() {
+ return super.clone();
+ }
+
+ @java.lang.Override
+ public Builder setField(
+ com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
+ return super.setField(field, value);
+ }
+
+ @java.lang.Override
+ public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
+ return super.clearField(field);
+ }
+
+ @java.lang.Override
+ public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+ return super.clearOneof(oneof);
+ }
+
+ @java.lang.Override
+ public Builder setRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
+ return super.setRepeatedField(field, index, value);
+ }
+
+ @java.lang.Override
+ public Builder addRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
+ return super.addRepeatedField(field, value);
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof com.google.cloud.assuredworkloads.v1.ListViolationsResponse) {
+ return mergeFrom((com.google.cloud.assuredworkloads.v1.ListViolationsResponse) other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(com.google.cloud.assuredworkloads.v1.ListViolationsResponse other) {
+ if (other == com.google.cloud.assuredworkloads.v1.ListViolationsResponse.getDefaultInstance())
+ return this;
+ if (violationsBuilder_ == null) {
+ if (!other.violations_.isEmpty()) {
+ if (violations_.isEmpty()) {
+ violations_ = other.violations_;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ } else {
+ ensureViolationsIsMutable();
+ violations_.addAll(other.violations_);
+ }
+ onChanged();
+ }
+ } else {
+ if (!other.violations_.isEmpty()) {
+ if (violationsBuilder_.isEmpty()) {
+ violationsBuilder_.dispose();
+ violationsBuilder_ = null;
+ violations_ = other.violations_;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ violationsBuilder_ =
+ com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
+ ? getViolationsFieldBuilder()
+ : null;
+ } else {
+ violationsBuilder_.addAllMessages(other.violations_);
+ }
+ }
+ }
+ if (!other.getNextPageToken().isEmpty()) {
+ nextPageToken_ = other.nextPageToken_;
+ onChanged();
+ }
+ this.mergeUnknownFields(other.getUnknownFields());
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ return true;
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10:
+ {
+ com.google.cloud.assuredworkloads.v1.Violation m =
+ input.readMessage(
+ com.google.cloud.assuredworkloads.v1.Violation.parser(), extensionRegistry);
+ if (violationsBuilder_ == null) {
+ ensureViolationsIsMutable();
+ violations_.add(m);
+ } else {
+ violationsBuilder_.addMessage(m);
+ }
+ break;
+ } // case 10
+ case 18:
+ {
+ nextPageToken_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 18
+ default:
+ {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.unwrapIOException();
+ } finally {
+ onChanged();
+ } // finally
+ return this;
+ }
+
+ private int bitField0_;
+
+ private java.util.List violations_ =
+ java.util.Collections.emptyList();
+
+ private void ensureViolationsIsMutable() {
+ if (!((bitField0_ & 0x00000001) != 0)) {
+ violations_ =
+ new java.util.ArrayList(violations_);
+ bitField0_ |= 0x00000001;
+ }
+ }
+
+ private com.google.protobuf.RepeatedFieldBuilderV3<
+ com.google.cloud.assuredworkloads.v1.Violation,
+ com.google.cloud.assuredworkloads.v1.Violation.Builder,
+ com.google.cloud.assuredworkloads.v1.ViolationOrBuilder>
+ violationsBuilder_;
+
+ /**
+ *
+ *
+ *
+ * List of Violations under a Workload.
+ *
+ *
+ * repeated .google.cloud.assuredworkloads.v1.Violation violations = 1;
+ */
+ public java.util.List getViolationsList() {
+ if (violationsBuilder_ == null) {
+ return java.util.Collections.unmodifiableList(violations_);
+ } else {
+ return violationsBuilder_.getMessageList();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * List of Violations under a Workload.
+ *
+ *
+ * repeated .google.cloud.assuredworkloads.v1.Violation violations = 1;
+ */
+ public int getViolationsCount() {
+ if (violationsBuilder_ == null) {
+ return violations_.size();
+ } else {
+ return violationsBuilder_.getCount();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * List of Violations under a Workload.
+ *
+ *
+ * repeated .google.cloud.assuredworkloads.v1.Violation violations = 1;
+ */
+ public com.google.cloud.assuredworkloads.v1.Violation getViolations(int index) {
+ if (violationsBuilder_ == null) {
+ return violations_.get(index);
+ } else {
+ return violationsBuilder_.getMessage(index);
+ }
+ }
+ /**
+ *
+ *
+ *
+ * List of Violations under a Workload.
+ *
+ *
+ * repeated .google.cloud.assuredworkloads.v1.Violation violations = 1;
+ */
+ public Builder setViolations(int index, com.google.cloud.assuredworkloads.v1.Violation value) {
+ if (violationsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureViolationsIsMutable();
+ violations_.set(index, value);
+ onChanged();
+ } else {
+ violationsBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * List of Violations under a Workload.
+ *
+ *
+ * repeated .google.cloud.assuredworkloads.v1.Violation violations = 1;
+ */
+ public Builder setViolations(
+ int index, com.google.cloud.assuredworkloads.v1.Violation.Builder builderForValue) {
+ if (violationsBuilder_ == null) {
+ ensureViolationsIsMutable();
+ violations_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ violationsBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * List of Violations under a Workload.
+ *
+ *
+ * repeated .google.cloud.assuredworkloads.v1.Violation violations = 1;
+ */
+ public Builder addViolations(com.google.cloud.assuredworkloads.v1.Violation value) {
+ if (violationsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureViolationsIsMutable();
+ violations_.add(value);
+ onChanged();
+ } else {
+ violationsBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * List of Violations under a Workload.
+ *
+ *
+ * repeated .google.cloud.assuredworkloads.v1.Violation violations = 1;
+ */
+ public Builder addViolations(int index, com.google.cloud.assuredworkloads.v1.Violation value) {
+ if (violationsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureViolationsIsMutable();
+ violations_.add(index, value);
+ onChanged();
+ } else {
+ violationsBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * List of Violations under a Workload.
+ *
+ *
+ * repeated .google.cloud.assuredworkloads.v1.Violation violations = 1;
+ */
+ public Builder addViolations(
+ com.google.cloud.assuredworkloads.v1.Violation.Builder builderForValue) {
+ if (violationsBuilder_ == null) {
+ ensureViolationsIsMutable();
+ violations_.add(builderForValue.build());
+ onChanged();
+ } else {
+ violationsBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * List of Violations under a Workload.
+ *
+ *
+ * repeated .google.cloud.assuredworkloads.v1.Violation violations = 1;
+ */
+ public Builder addViolations(
+ int index, com.google.cloud.assuredworkloads.v1.Violation.Builder builderForValue) {
+ if (violationsBuilder_ == null) {
+ ensureViolationsIsMutable();
+ violations_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ violationsBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * List of Violations under a Workload.
+ *
+ *
+ * repeated .google.cloud.assuredworkloads.v1.Violation violations = 1;
+ */
+ public Builder addAllViolations(
+ java.lang.Iterable extends com.google.cloud.assuredworkloads.v1.Violation> values) {
+ if (violationsBuilder_ == null) {
+ ensureViolationsIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, violations_);
+ onChanged();
+ } else {
+ violationsBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * List of Violations under a Workload.
+ *
+ *
+ * repeated .google.cloud.assuredworkloads.v1.Violation violations = 1;
+ */
+ public Builder clearViolations() {
+ if (violationsBuilder_ == null) {
+ violations_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ } else {
+ violationsBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * List of Violations under a Workload.
+ *
+ *
+ * repeated .google.cloud.assuredworkloads.v1.Violation violations = 1;
+ */
+ public Builder removeViolations(int index) {
+ if (violationsBuilder_ == null) {
+ ensureViolationsIsMutable();
+ violations_.remove(index);
+ onChanged();
+ } else {
+ violationsBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * List of Violations under a Workload.
+ *
+ *
+ * repeated .google.cloud.assuredworkloads.v1.Violation violations = 1;
+ */
+ public com.google.cloud.assuredworkloads.v1.Violation.Builder getViolationsBuilder(int index) {
+ return getViolationsFieldBuilder().getBuilder(index);
+ }
+ /**
+ *
+ *
+ *
+ * List of Violations under a Workload.
+ *
+ *
+ * repeated .google.cloud.assuredworkloads.v1.Violation violations = 1;
+ */
+ public com.google.cloud.assuredworkloads.v1.ViolationOrBuilder getViolationsOrBuilder(
+ int index) {
+ if (violationsBuilder_ == null) {
+ return violations_.get(index);
+ } else {
+ return violationsBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ *
+ *
+ *
+ * List of Violations under a Workload.
+ *
+ *
+ * repeated .google.cloud.assuredworkloads.v1.Violation violations = 1;
+ */
+ public java.util.List extends com.google.cloud.assuredworkloads.v1.ViolationOrBuilder>
+ getViolationsOrBuilderList() {
+ if (violationsBuilder_ != null) {
+ return violationsBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(violations_);
+ }
+ }
+ /**
+ *
+ *
+ *
+ * List of Violations under a Workload.
+ *
+ *
+ * repeated .google.cloud.assuredworkloads.v1.Violation violations = 1;
+ */
+ public com.google.cloud.assuredworkloads.v1.Violation.Builder addViolationsBuilder() {
+ return getViolationsFieldBuilder()
+ .addBuilder(com.google.cloud.assuredworkloads.v1.Violation.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ *
+ * List of Violations under a Workload.
+ *
+ *
+ * repeated .google.cloud.assuredworkloads.v1.Violation violations = 1;
+ */
+ public com.google.cloud.assuredworkloads.v1.Violation.Builder addViolationsBuilder(int index) {
+ return getViolationsFieldBuilder()
+ .addBuilder(index, com.google.cloud.assuredworkloads.v1.Violation.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ *
+ * List of Violations under a Workload.
+ *
+ *
+ * repeated .google.cloud.assuredworkloads.v1.Violation violations = 1;
+ */
+ public java.util.List
+ getViolationsBuilderList() {
+ return getViolationsFieldBuilder().getBuilderList();
+ }
+
+ private com.google.protobuf.RepeatedFieldBuilderV3<
+ com.google.cloud.assuredworkloads.v1.Violation,
+ com.google.cloud.assuredworkloads.v1.Violation.Builder,
+ com.google.cloud.assuredworkloads.v1.ViolationOrBuilder>
+ getViolationsFieldBuilder() {
+ if (violationsBuilder_ == null) {
+ violationsBuilder_ =
+ new com.google.protobuf.RepeatedFieldBuilderV3<
+ com.google.cloud.assuredworkloads.v1.Violation,
+ com.google.cloud.assuredworkloads.v1.Violation.Builder,
+ com.google.cloud.assuredworkloads.v1.ViolationOrBuilder>(
+ violations_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean());
+ violations_ = null;
+ }
+ return violationsBuilder_;
+ }
+
+ private java.lang.Object nextPageToken_ = "";
+ /**
+ *
+ *
+ *
+ * The next page token. Returns empty if reached the last page.
+ *
+ *
+ * string next_page_token = 2;
+ *
+ * @return The nextPageToken.
+ */
+ public java.lang.String getNextPageToken() {
+ java.lang.Object ref = nextPageToken_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ nextPageToken_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The next page token. Returns empty if reached the last page.
+ *
+ *
+ * string next_page_token = 2;
+ *
+ * @return The bytes for nextPageToken.
+ */
+ public com.google.protobuf.ByteString getNextPageTokenBytes() {
+ java.lang.Object ref = nextPageToken_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ nextPageToken_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The next page token. Returns empty if reached the last page.
+ *
+ *
+ * string next_page_token = 2;
+ *
+ * @param value The nextPageToken to set.
+ * @return This builder for chaining.
+ */
+ public Builder setNextPageToken(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ nextPageToken_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The next page token. Returns empty if reached the last page.
+ *
+ *
+ * string next_page_token = 2;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearNextPageToken() {
+
+ nextPageToken_ = getDefaultInstance().getNextPageToken();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The next page token. Returns empty if reached the last page.
+ *
+ *
+ * string next_page_token = 2;
+ *
+ * @param value The bytes for nextPageToken to set.
+ * @return This builder for chaining.
+ */
+ public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ nextPageToken_ = value;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.assuredworkloads.v1.ListViolationsResponse)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.assuredworkloads.v1.ListViolationsResponse)
+ private static final com.google.cloud.assuredworkloads.v1.ListViolationsResponse DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.assuredworkloads.v1.ListViolationsResponse();
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.ListViolationsResponse getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser PARSER =
+ new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public ListViolationsResponse parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
+ }
+ };
+
+ public static com.google.protobuf.Parser parser() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.cloud.assuredworkloads.v1.ListViolationsResponse getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+}
diff --git a/java-assured-workloads/proto-google-cloud-assured-workloads-v1/src/main/java/com/google/cloud/assuredworkloads/v1/ListViolationsResponseOrBuilder.java b/java-assured-workloads/proto-google-cloud-assured-workloads-v1/src/main/java/com/google/cloud/assuredworkloads/v1/ListViolationsResponseOrBuilder.java
new file mode 100644
index 000000000000..baff259159cd
--- /dev/null
+++ b/java-assured-workloads/proto-google-cloud-assured-workloads-v1/src/main/java/com/google/cloud/assuredworkloads/v1/ListViolationsResponseOrBuilder.java
@@ -0,0 +1,102 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/assuredworkloads/v1/assuredworkloads.proto
+
+package com.google.cloud.assuredworkloads.v1;
+
+public interface ListViolationsResponseOrBuilder
+ extends
+ // @@protoc_insertion_point(interface_extends:google.cloud.assuredworkloads.v1.ListViolationsResponse)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ *
+ *
+ *
+ * List of Violations under a Workload.
+ *
+ *
+ * repeated .google.cloud.assuredworkloads.v1.Violation violations = 1;
+ */
+ java.util.List getViolationsList();
+ /**
+ *
+ *
+ *
+ * List of Violations under a Workload.
+ *
+ *
+ * repeated .google.cloud.assuredworkloads.v1.Violation violations = 1;
+ */
+ com.google.cloud.assuredworkloads.v1.Violation getViolations(int index);
+ /**
+ *
+ *
+ *
+ * List of Violations under a Workload.
+ *
+ *
+ * repeated .google.cloud.assuredworkloads.v1.Violation violations = 1;
+ */
+ int getViolationsCount();
+ /**
+ *
+ *
+ *
+ * List of Violations under a Workload.
+ *
+ *
+ * repeated .google.cloud.assuredworkloads.v1.Violation violations = 1;
+ */
+ java.util.List extends com.google.cloud.assuredworkloads.v1.ViolationOrBuilder>
+ getViolationsOrBuilderList();
+ /**
+ *
+ *
+ *
+ * List of Violations under a Workload.
+ *
+ *
+ * repeated .google.cloud.assuredworkloads.v1.Violation violations = 1;
+ */
+ com.google.cloud.assuredworkloads.v1.ViolationOrBuilder getViolationsOrBuilder(int index);
+
+ /**
+ *
+ *
+ *
+ * The next page token. Returns empty if reached the last page.
+ *
+ *
+ * string next_page_token = 2;
+ *
+ * @return The nextPageToken.
+ */
+ java.lang.String getNextPageToken();
+ /**
+ *
+ *
+ *
+ * The next page token. Returns empty if reached the last page.
+ *
+ *
+ * string next_page_token = 2;
+ *
+ * @return The bytes for nextPageToken.
+ */
+ com.google.protobuf.ByteString getNextPageTokenBytes();
+}
diff --git a/java-assured-workloads/proto-google-cloud-assured-workloads-v1/src/main/java/com/google/cloud/assuredworkloads/v1/ListWorkloadsRequest.java b/java-assured-workloads/proto-google-cloud-assured-workloads-v1/src/main/java/com/google/cloud/assuredworkloads/v1/ListWorkloadsRequest.java
index 7fa3f28d1191..a3cba284028a 100644
--- a/java-assured-workloads/proto-google-cloud-assured-workloads-v1/src/main/java/com/google/cloud/assuredworkloads/v1/ListWorkloadsRequest.java
+++ b/java-assured-workloads/proto-google-cloud-assured-workloads-v1/src/main/java/com/google/cloud/assuredworkloads/v1/ListWorkloadsRequest.java
@@ -54,71 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
- private ListWorkloadsRequest(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- if (extensionRegistry == null) {
- throw new java.lang.NullPointerException();
- }
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder();
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 10:
- {
- java.lang.String s = input.readStringRequireUtf8();
-
- parent_ = s;
- break;
- }
- case 16:
- {
- pageSize_ = input.readInt32();
- break;
- }
- case 26:
- {
- java.lang.String s = input.readStringRequireUtf8();
-
- pageToken_ = s;
- break;
- }
- case 34:
- {
- java.lang.String s = input.readStringRequireUtf8();
-
- filter_ = s;
- break;
- }
- default:
- {
- if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (com.google.protobuf.UninitializedMessageException e) {
- throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
-
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
.internal_static_google_cloud_assuredworkloads_v1_ListWorkloadsRequest_descriptor;
@@ -337,7 +272,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -358,7 +293,7 @@ public int getSerializedSize() {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -378,7 +313,7 @@ public boolean equals(final java.lang.Object obj) {
if (getPageSize() != other.getPageSize()) return false;
if (!getPageToken().equals(other.getPageToken())) return false;
if (!getFilter().equals(other.getFilter())) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -397,7 +332,7 @@ public int hashCode() {
hash = (53 * hash) + getPageToken().hashCode();
hash = (37 * hash) + FILTER_FIELD_NUMBER;
hash = (53 * hash) + getFilter().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -527,17 +462,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
}
// Construct using com.google.cloud.assuredworkloads.v1.ListWorkloadsRequest.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
+ private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
- maybeForceBuilderInitialization();
- }
-
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
}
@java.lang.Override
@@ -647,7 +575,7 @@ public Builder mergeFrom(com.google.cloud.assuredworkloads.v1.ListWorkloadsReque
filter_ = other.filter_;
onChanged();
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -662,18 +590,55 @@ public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.cloud.assuredworkloads.v1.ListWorkloadsRequest parsedMessage = null;
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10:
+ {
+ parent_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 10
+ case 16:
+ {
+ pageSize_ = input.readInt32();
+
+ break;
+ } // case 16
+ case 26:
+ {
+ pageToken_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 26
+ case 34:
+ {
+ filter_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 34
+ default:
+ {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage =
- (com.google.cloud.assuredworkloads.v1.ListWorkloadsRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
@@ -1109,7 +1074,18 @@ public ListWorkloadsRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new ListWorkloadsRequest(input, extensionRegistry);
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
}
};
diff --git a/java-assured-workloads/proto-google-cloud-assured-workloads-v1/src/main/java/com/google/cloud/assuredworkloads/v1/ListWorkloadsResponse.java b/java-assured-workloads/proto-google-cloud-assured-workloads-v1/src/main/java/com/google/cloud/assuredworkloads/v1/ListWorkloadsResponse.java
index 509615c280e6..a025bf3c604e 100644
--- a/java-assured-workloads/proto-google-cloud-assured-workloads-v1/src/main/java/com/google/cloud/assuredworkloads/v1/ListWorkloadsResponse.java
+++ b/java-assured-workloads/proto-google-cloud-assured-workloads-v1/src/main/java/com/google/cloud/assuredworkloads/v1/ListWorkloadsResponse.java
@@ -53,68 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
- private ListWorkloadsResponse(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- if (extensionRegistry == null) {
- throw new java.lang.NullPointerException();
- }
- int mutable_bitField0_ = 0;
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder();
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 10:
- {
- if (!((mutable_bitField0_ & 0x00000001) != 0)) {
- workloads_ =
- new java.util.ArrayList();
- mutable_bitField0_ |= 0x00000001;
- }
- workloads_.add(
- input.readMessage(
- com.google.cloud.assuredworkloads.v1.Workload.parser(), extensionRegistry));
- break;
- }
- case 18:
- {
- java.lang.String s = input.readStringRequireUtf8();
-
- nextPageToken_ = s;
- break;
- }
- default:
- {
- if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (com.google.protobuf.UninitializedMessageException e) {
- throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
- } finally {
- if (((mutable_bitField0_ & 0x00000001) != 0)) {
- workloads_ = java.util.Collections.unmodifiableList(workloads_);
- }
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
-
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
.internal_static_google_cloud_assuredworkloads_v1_ListWorkloadsResponse_descriptor;
@@ -268,7 +206,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -283,7 +221,7 @@ public int getSerializedSize() {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -301,7 +239,7 @@ public boolean equals(final java.lang.Object obj) {
if (!getWorkloadsList().equals(other.getWorkloadsList())) return false;
if (!getNextPageToken().equals(other.getNextPageToken())) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -318,7 +256,7 @@ public int hashCode() {
}
hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER;
hash = (53 * hash) + getNextPageToken().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -448,19 +386,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
}
// Construct using com.google.cloud.assuredworkloads.v1.ListWorkloadsResponse.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
+ private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
- maybeForceBuilderInitialization();
- }
-
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
- getWorkloadsFieldBuilder();
- }
}
@java.lang.Override
@@ -468,10 +397,11 @@ public Builder clear() {
super.clear();
if (workloadsBuilder_ == null) {
workloads_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000001);
} else {
+ workloads_ = null;
workloadsBuilder_.clear();
}
+ bitField0_ = (bitField0_ & ~0x00000001);
nextPageToken_ = "";
return this;
@@ -593,7 +523,7 @@ public Builder mergeFrom(com.google.cloud.assuredworkloads.v1.ListWorkloadsRespo
nextPageToken_ = other.nextPageToken_;
onChanged();
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -608,18 +538,50 @@ public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.cloud.assuredworkloads.v1.ListWorkloadsResponse parsedMessage = null;
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10:
+ {
+ com.google.cloud.assuredworkloads.v1.Workload m =
+ input.readMessage(
+ com.google.cloud.assuredworkloads.v1.Workload.parser(), extensionRegistry);
+ if (workloadsBuilder_ == null) {
+ ensureWorkloadsIsMutable();
+ workloads_.add(m);
+ } else {
+ workloadsBuilder_.addMessage(m);
+ }
+ break;
+ } // case 10
+ case 18:
+ {
+ nextPageToken_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 18
+ default:
+ {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage =
- (com.google.cloud.assuredworkloads.v1.ListWorkloadsResponse) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
@@ -1114,7 +1076,18 @@ public ListWorkloadsResponse parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new ListWorkloadsResponse(input, extensionRegistry);
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
}
};
diff --git a/java-assured-workloads/proto-google-cloud-assured-workloads-v1/src/main/java/com/google/cloud/assuredworkloads/v1/RestrictAllowedResourcesRequest.java b/java-assured-workloads/proto-google-cloud-assured-workloads-v1/src/main/java/com/google/cloud/assuredworkloads/v1/RestrictAllowedResourcesRequest.java
new file mode 100644
index 000000000000..fc25bff40f07
--- /dev/null
+++ b/java-assured-workloads/proto-google-cloud-assured-workloads-v1/src/main/java/com/google/cloud/assuredworkloads/v1/RestrictAllowedResourcesRequest.java
@@ -0,0 +1,1006 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/assuredworkloads/v1/assuredworkloads.proto
+
+package com.google.cloud.assuredworkloads.v1;
+
+/**
+ *
+ *
+ *
+ * Request for restricting list of available resources in Workload environment.
+ *
+ *
+ * Protobuf type {@code google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest}
+ */
+public final class RestrictAllowedResourcesRequest extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest)
+ RestrictAllowedResourcesRequestOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use RestrictAllowedResourcesRequest.newBuilder() to construct.
+ private RestrictAllowedResourcesRequest(
+ com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+
+ private RestrictAllowedResourcesRequest() {
+ name_ = "";
+ restrictionType_ = 0;
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
+ return new RestrictAllowedResourcesRequest();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
+ return this.unknownFields;
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
+ .internal_static_google_cloud_assuredworkloads_v1_RestrictAllowedResourcesRequest_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
+ .internal_static_google_cloud_assuredworkloads_v1_RestrictAllowedResourcesRequest_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest.class,
+ com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest.Builder.class);
+ }
+
+ /**
+ *
+ *
+ *
+ * The type of restriction.
+ *
+ *
+ * Protobuf enum {@code
+ * google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest.RestrictionType}
+ */
+ public enum RestrictionType implements com.google.protobuf.ProtocolMessageEnum {
+ /**
+ *
+ *
+ *
+ * Unknown restriction type.
+ *
+ *
+ * RESTRICTION_TYPE_UNSPECIFIED = 0;
+ */
+ RESTRICTION_TYPE_UNSPECIFIED(0),
+ /**
+ *
+ *
+ *
+ * Allow the use all of all gcp products, irrespective of the compliance
+ * posture. This effectively removes gcp.restrictServiceUsage OrgPolicy
+ * on the AssuredWorkloads Folder.
+ *
+ *
+ * ALLOW_ALL_GCP_RESOURCES = 1;
+ */
+ ALLOW_ALL_GCP_RESOURCES(1),
+ /**
+ *
+ *
+ *
+ * Based on Workload's compliance regime, allowed list changes.
+ * See - https://cloud.google.com/assured-workloads/docs/supported-products
+ * for the list of supported resources.
+ *
+ *
+ * ALLOW_COMPLIANT_RESOURCES = 2;
+ */
+ ALLOW_COMPLIANT_RESOURCES(2),
+ UNRECOGNIZED(-1),
+ ;
+
+ /**
+ *
+ *
+ *
+ * Unknown restriction type.
+ *
+ *
+ * RESTRICTION_TYPE_UNSPECIFIED = 0;
+ */
+ public static final int RESTRICTION_TYPE_UNSPECIFIED_VALUE = 0;
+ /**
+ *
+ *
+ *
+ * Allow the use all of all gcp products, irrespective of the compliance
+ * posture. This effectively removes gcp.restrictServiceUsage OrgPolicy
+ * on the AssuredWorkloads Folder.
+ *
+ *
+ * ALLOW_ALL_GCP_RESOURCES = 1;
+ */
+ public static final int ALLOW_ALL_GCP_RESOURCES_VALUE = 1;
+ /**
+ *
+ *
+ *
+ * Based on Workload's compliance regime, allowed list changes.
+ * See - https://cloud.google.com/assured-workloads/docs/supported-products
+ * for the list of supported resources.
+ *
+ *
+ * ALLOW_COMPLIANT_RESOURCES = 2;
+ */
+ public static final int ALLOW_COMPLIANT_RESOURCES_VALUE = 2;
+
+ public final int getNumber() {
+ if (this == UNRECOGNIZED) {
+ throw new java.lang.IllegalArgumentException(
+ "Can't get the number of an unknown enum value.");
+ }
+ return value;
+ }
+
+ /**
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
+ * @deprecated Use {@link #forNumber(int)} instead.
+ */
+ @java.lang.Deprecated
+ public static RestrictionType valueOf(int value) {
+ return forNumber(value);
+ }
+
+ /**
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
+ */
+ public static RestrictionType forNumber(int value) {
+ switch (value) {
+ case 0:
+ return RESTRICTION_TYPE_UNSPECIFIED;
+ case 1:
+ return ALLOW_ALL_GCP_RESOURCES;
+ case 2:
+ return ALLOW_COMPLIANT_RESOURCES;
+ default:
+ return null;
+ }
+ }
+
+ public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() {
+ return internalValueMap;
+ }
+
+ private static final com.google.protobuf.Internal.EnumLiteMap
+ internalValueMap =
+ new com.google.protobuf.Internal.EnumLiteMap() {
+ public RestrictionType findValueByNumber(int number) {
+ return RestrictionType.forNumber(number);
+ }
+ };
+
+ public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
+ if (this == UNRECOGNIZED) {
+ throw new java.lang.IllegalStateException(
+ "Can't get the descriptor of an unrecognized enum value.");
+ }
+ return getDescriptor().getValues().get(ordinal());
+ }
+
+ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
+ return getDescriptor();
+ }
+
+ public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
+ return com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest.getDescriptor()
+ .getEnumTypes()
+ .get(0);
+ }
+
+ private static final RestrictionType[] VALUES = values();
+
+ public static RestrictionType valueOf(
+ com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
+ if (desc.getType() != getDescriptor()) {
+ throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
+ }
+ if (desc.getIndex() == -1) {
+ return UNRECOGNIZED;
+ }
+ return VALUES[desc.getIndex()];
+ }
+
+ private final int value;
+
+ private RestrictionType(int value) {
+ this.value = value;
+ }
+
+ // @@protoc_insertion_point(enum_scope:google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest.RestrictionType)
+ }
+
+ public static final int NAME_FIELD_NUMBER = 1;
+ private volatile java.lang.Object name_;
+ /**
+ *
+ *
+ *
+ * Required. The resource name of the Workload. 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-1".
+ *
+ *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The name.
+ */
+ @java.lang.Override
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ name_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Required. The resource name of the Workload. 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-1".
+ *
+ *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The bytes for name.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int RESTRICTION_TYPE_FIELD_NUMBER = 2;
+ private int restrictionType_;
+ /**
+ *
+ *
+ *
+ * Required. The type of restriction for using gcp products in the Workload environment.
+ *
+ *
+ *
+ * .google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest.RestrictionType restriction_type = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return The enum numeric value on the wire for restrictionType.
+ */
+ @java.lang.Override
+ public int getRestrictionTypeValue() {
+ return restrictionType_;
+ }
+ /**
+ *
+ *
+ *
+ * Required. The type of restriction for using gcp products in the Workload environment.
+ *
+ *
+ *
+ * .google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest.RestrictionType restriction_type = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return The restrictionType.
+ */
+ @java.lang.Override
+ public com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest.RestrictionType
+ getRestrictionType() {
+ @SuppressWarnings("deprecation")
+ com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest.RestrictionType result =
+ com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest.RestrictionType
+ .valueOf(restrictionType_);
+ return result == null
+ ? com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest.RestrictionType
+ .UNRECOGNIZED
+ : result;
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
+ }
+ if (restrictionType_
+ != com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest.RestrictionType
+ .RESTRICTION_TYPE_UNSPECIFIED
+ .getNumber()) {
+ output.writeEnum(2, restrictionType_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
+ }
+ if (restrictionType_
+ != com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest.RestrictionType
+ .RESTRICTION_TYPE_UNSPECIFIED
+ .getNumber()) {
+ size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, restrictionType_);
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest other =
+ (com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest) obj;
+
+ if (!getName().equals(other.getName())) return false;
+ if (restrictionType_ != other.restrictionType_) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + NAME_FIELD_NUMBER;
+ hash = (53 * hash) + getName().hashCode();
+ hash = (37 * hash) + RESTRICTION_TYPE_FIELD_NUMBER;
+ hash = (53 * hash) + restrictionType_;
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest parseFrom(
+ byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest
+ parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest
+ parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(
+ com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ *
+ * Request for restricting list of available resources in Workload environment.
+ *
+ *
+ * Protobuf type {@code google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest}
+ */
+ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ implements
+ // @@protoc_insertion_point(builder_implements:google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest)
+ com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequestOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
+ .internal_static_google_cloud_assuredworkloads_v1_RestrictAllowedResourcesRequest_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
+ .internal_static_google_cloud_assuredworkloads_v1_RestrictAllowedResourcesRequest_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest.class,
+ com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest.Builder.class);
+ }
+
+ // Construct using
+ // com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest.newBuilder()
+ private Builder() {}
+
+ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ super(parent);
+ }
+
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ name_ = "";
+
+ restrictionType_ = 0;
+
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
+ return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
+ .internal_static_google_cloud_assuredworkloads_v1_RestrictAllowedResourcesRequest_descriptor;
+ }
+
+ @java.lang.Override
+ public com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest
+ getDefaultInstanceForType() {
+ return com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest
+ .getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest build() {
+ com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest buildPartial() {
+ com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest result =
+ new com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest(this);
+ result.name_ = name_;
+ result.restrictionType_ = restrictionType_;
+ onBuilt();
+ return result;
+ }
+
+ @java.lang.Override
+ public Builder clone() {
+ return super.clone();
+ }
+
+ @java.lang.Override
+ public Builder setField(
+ com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
+ return super.setField(field, value);
+ }
+
+ @java.lang.Override
+ public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
+ return super.clearField(field);
+ }
+
+ @java.lang.Override
+ public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+ return super.clearOneof(oneof);
+ }
+
+ @java.lang.Override
+ public Builder setRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
+ return super.setRepeatedField(field, index, value);
+ }
+
+ @java.lang.Override
+ public Builder addRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
+ return super.addRepeatedField(field, value);
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest) {
+ return mergeFrom(
+ (com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest) other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(
+ com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest other) {
+ if (other
+ == com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest
+ .getDefaultInstance()) return this;
+ if (!other.getName().isEmpty()) {
+ name_ = other.name_;
+ onChanged();
+ }
+ if (other.restrictionType_ != 0) {
+ setRestrictionTypeValue(other.getRestrictionTypeValue());
+ }
+ this.mergeUnknownFields(other.getUnknownFields());
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ return true;
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10:
+ {
+ name_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 10
+ case 16:
+ {
+ restrictionType_ = input.readEnum();
+
+ break;
+ } // case 16
+ default:
+ {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.unwrapIOException();
+ } finally {
+ onChanged();
+ } // finally
+ return this;
+ }
+
+ private java.lang.Object name_ = "";
+ /**
+ *
+ *
+ *
+ * Required. The resource name of the Workload. 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-1".
+ *
+ *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The name.
+ */
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ name_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Required. The resource name of the Workload. 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-1".
+ *
+ *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The bytes for name.
+ */
+ public com.google.protobuf.ByteString getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Required. The resource name of the Workload. 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-1".
+ *
+ *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @param value The name to set.
+ * @return This builder for chaining.
+ */
+ public Builder setName(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Required. The resource name of the Workload. 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-1".
+ *
+ *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearName() {
+
+ name_ = getDefaultInstance().getName();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Required. The resource name of the Workload. 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-1".
+ *
+ *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @param value The bytes for name to set.
+ * @return This builder for chaining.
+ */
+ public Builder setNameBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+
+ private int restrictionType_ = 0;
+ /**
+ *
+ *
+ *
+ * Required. The type of restriction for using gcp products in the Workload environment.
+ *
+ *
+ *
+ * .google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest.RestrictionType restriction_type = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return The enum numeric value on the wire for restrictionType.
+ */
+ @java.lang.Override
+ public int getRestrictionTypeValue() {
+ return restrictionType_;
+ }
+ /**
+ *
+ *
+ *
+ * Required. The type of restriction for using gcp products in the Workload environment.
+ *
+ *
+ *
+ * .google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest.RestrictionType restriction_type = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @param value The enum numeric value on the wire for restrictionType to set.
+ * @return This builder for chaining.
+ */
+ public Builder setRestrictionTypeValue(int value) {
+
+ restrictionType_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Required. The type of restriction for using gcp products in the Workload environment.
+ *
+ *
+ *
+ * .google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest.RestrictionType restriction_type = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return The restrictionType.
+ */
+ @java.lang.Override
+ public com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest.RestrictionType
+ getRestrictionType() {
+ @SuppressWarnings("deprecation")
+ com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest.RestrictionType result =
+ com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest.RestrictionType
+ .valueOf(restrictionType_);
+ return result == null
+ ? com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest.RestrictionType
+ .UNRECOGNIZED
+ : result;
+ }
+ /**
+ *
+ *
+ *
+ * Required. The type of restriction for using gcp products in the Workload environment.
+ *
+ *
+ *
+ * .google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest.RestrictionType restriction_type = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @param value The restrictionType to set.
+ * @return This builder for chaining.
+ */
+ public Builder setRestrictionType(
+ com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest.RestrictionType
+ value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ restrictionType_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Required. The type of restriction for using gcp products in the Workload environment.
+ *
+ *
+ *
+ * .google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest.RestrictionType restriction_type = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearRestrictionType() {
+
+ restrictionType_ = 0;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest)
+ private static final com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest
+ DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest();
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest
+ getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser PARSER =
+ new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public RestrictAllowedResourcesRequest parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
+ }
+ };
+
+ public static com.google.protobuf.Parser parser() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest
+ getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+}
diff --git a/java-assured-workloads/proto-google-cloud-assured-workloads-v1/src/main/java/com/google/cloud/assuredworkloads/v1/RestrictAllowedResourcesRequestOrBuilder.java b/java-assured-workloads/proto-google-cloud-assured-workloads-v1/src/main/java/com/google/cloud/assuredworkloads/v1/RestrictAllowedResourcesRequestOrBuilder.java
new file mode 100644
index 000000000000..6d4286951e8d
--- /dev/null
+++ b/java-assured-workloads/proto-google-cloud-assured-workloads-v1/src/main/java/com/google/cloud/assuredworkloads/v1/RestrictAllowedResourcesRequestOrBuilder.java
@@ -0,0 +1,88 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/assuredworkloads/v1/assuredworkloads.proto
+
+package com.google.cloud.assuredworkloads.v1;
+
+public interface RestrictAllowedResourcesRequestOrBuilder
+ extends
+ // @@protoc_insertion_point(interface_extends:google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ *
+ *
+ *
+ * Required. The resource name of the Workload. 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-1".
+ *
+ *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The name.
+ */
+ java.lang.String getName();
+ /**
+ *
+ *
+ *
+ * Required. The resource name of the Workload. 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-1".
+ *
+ *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The bytes for name.
+ */
+ com.google.protobuf.ByteString getNameBytes();
+
+ /**
+ *
+ *
+ *
+ * Required. The type of restriction for using gcp products in the Workload environment.
+ *
+ *
+ *
+ * .google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest.RestrictionType restriction_type = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return The enum numeric value on the wire for restrictionType.
+ */
+ int getRestrictionTypeValue();
+ /**
+ *
+ *
+ *
+ * Required. The type of restriction for using gcp products in the Workload environment.
+ *
+ *
+ *
+ * .google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest.RestrictionType restriction_type = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return The restrictionType.
+ */
+ com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest.RestrictionType
+ getRestrictionType();
+}
diff --git a/java-assured-workloads/proto-google-cloud-assured-workloads-v1/src/main/java/com/google/cloud/assuredworkloads/v1/RestrictAllowedResourcesResponse.java b/java-assured-workloads/proto-google-cloud-assured-workloads-v1/src/main/java/com/google/cloud/assuredworkloads/v1/RestrictAllowedResourcesResponse.java
new file mode 100644
index 000000000000..7161af62020d
--- /dev/null
+++ b/java-assured-workloads/proto-google-cloud-assured-workloads-v1/src/main/java/com/google/cloud/assuredworkloads/v1/RestrictAllowedResourcesResponse.java
@@ -0,0 +1,448 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/assuredworkloads/v1/assuredworkloads.proto
+
+package com.google.cloud.assuredworkloads.v1;
+
+/**
+ *
+ *
+ *
+ * Response for restricting the list of allowed resources.
+ *
+ *
+ * Protobuf type {@code google.cloud.assuredworkloads.v1.RestrictAllowedResourcesResponse}
+ */
+public final class RestrictAllowedResourcesResponse extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:google.cloud.assuredworkloads.v1.RestrictAllowedResourcesResponse)
+ RestrictAllowedResourcesResponseOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use RestrictAllowedResourcesResponse.newBuilder() to construct.
+ private RestrictAllowedResourcesResponse(
+ com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+
+ private RestrictAllowedResourcesResponse() {}
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
+ return new RestrictAllowedResourcesResponse();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
+ return this.unknownFields;
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
+ .internal_static_google_cloud_assuredworkloads_v1_RestrictAllowedResourcesResponse_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
+ .internal_static_google_cloud_assuredworkloads_v1_RestrictAllowedResourcesResponse_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesResponse.class,
+ com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesResponse.Builder.class);
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesResponse)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesResponse other =
+ (com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesResponse) obj;
+
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesResponse parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesResponse parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesResponse parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesResponse parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesResponse parseFrom(
+ byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesResponse parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesResponse parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesResponse parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesResponse
+ parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesResponse
+ parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesResponse parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesResponse parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(
+ com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesResponse prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ *
+ * Response for restricting the list of allowed resources.
+ *
+ *
+ * Protobuf type {@code google.cloud.assuredworkloads.v1.RestrictAllowedResourcesResponse}
+ */
+ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ implements
+ // @@protoc_insertion_point(builder_implements:google.cloud.assuredworkloads.v1.RestrictAllowedResourcesResponse)
+ com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesResponseOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
+ .internal_static_google_cloud_assuredworkloads_v1_RestrictAllowedResourcesResponse_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
+ .internal_static_google_cloud_assuredworkloads_v1_RestrictAllowedResourcesResponse_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesResponse.class,
+ com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesResponse.Builder.class);
+ }
+
+ // Construct using
+ // com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesResponse.newBuilder()
+ private Builder() {}
+
+ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ super(parent);
+ }
+
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
+ return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
+ .internal_static_google_cloud_assuredworkloads_v1_RestrictAllowedResourcesResponse_descriptor;
+ }
+
+ @java.lang.Override
+ public com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesResponse
+ getDefaultInstanceForType() {
+ return com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesResponse
+ .getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesResponse build() {
+ com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesResponse result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesResponse buildPartial() {
+ com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesResponse result =
+ new com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesResponse(this);
+ onBuilt();
+ return result;
+ }
+
+ @java.lang.Override
+ public Builder clone() {
+ return super.clone();
+ }
+
+ @java.lang.Override
+ public Builder setField(
+ com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
+ return super.setField(field, value);
+ }
+
+ @java.lang.Override
+ public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
+ return super.clearField(field);
+ }
+
+ @java.lang.Override
+ public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+ return super.clearOneof(oneof);
+ }
+
+ @java.lang.Override
+ public Builder setRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
+ return super.setRepeatedField(field, index, value);
+ }
+
+ @java.lang.Override
+ public Builder addRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
+ return super.addRepeatedField(field, value);
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesResponse) {
+ return mergeFrom(
+ (com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesResponse) other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(
+ com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesResponse other) {
+ if (other
+ == com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesResponse
+ .getDefaultInstance()) return this;
+ this.mergeUnknownFields(other.getUnknownFields());
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ return true;
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default:
+ {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.unwrapIOException();
+ } finally {
+ onChanged();
+ } // finally
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.assuredworkloads.v1.RestrictAllowedResourcesResponse)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.assuredworkloads.v1.RestrictAllowedResourcesResponse)
+ private static final com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesResponse
+ DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesResponse();
+ }
+
+ public static com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesResponse
+ getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser PARSER =
+ new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public RestrictAllowedResourcesResponse parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
+ }
+ };
+
+ public static com.google.protobuf.Parser parser() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Parser