Skip to content

Commit

Permalink
feat: add apis for AssuredWorkload monitoring feature and to restrict…
Browse files Browse the repository at this point in the history
… allowed resources (googleapis#485)

- [ ] Regenerate this pull request now.

AssuredWorkload monitoring is a new feature which provides apis to fetch compliance violation for AssuredWorkloads. It also provides an api to acknowledge an unresolved violation.

RestrictAllowedResources api allows restricting list of available resources in Workload environment.

Committer: @ViswasK
PiperOrigin-RevId: 477959383

Source-Link: https://togithub.com/googleapis/googleapis/commit/0cad78c955be529d8a0e95d4fc70077ec2772602

Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/3052e0d7ac989bc571fb305894ada8525d1f248e
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMzA1MmUwZDdhYzk4OWJjNTcxZmIzMDU4OTRhZGE4NTI1ZDFmMjQ4ZSJ9

chore(bazel): update protobuf to v3.21.7

PiperOrigin-RevId: 477955264

Source-Link: https://togithub.com/googleapis/googleapis/commit/a724450af76d0001f23602684c49cd6a4b3a5654

Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/4abcbcaec855e74a0b22a4988cf9e0eb61a83094
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNGFiY2JjYWVjODU1ZTc0YTBiMjJhNDk4OGNmOWUwZWI2MWE4MzA5NCJ9
  • Loading branch information
gcf-owl-bot[bot] authored Oct 3, 2022
1 parent 863c9e1 commit f7a3fd6
Show file tree
Hide file tree
Showing 71 changed files with 24,258 additions and 3,670 deletions.
6 changes: 3 additions & 3 deletions java-assured-workloads/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,20 @@ If you are using Maven, add this to your pom.xml file:
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-assured-workloads</artifactId>
<version>2.2.0</version>
<version>2.2.1</version>
</dependency>
```

If you are using Gradle without BOM, add this to your dependencies:

```Groovy
implementation 'com.google.cloud:google-cloud-assured-workloads:2.2.0'
implementation 'com.google.cloud:google-cloud-assured-workloads:2.2.1'
```

If you are using SBT, add this to your dependencies:

```Scala
libraryDependencies += "com.google.cloud" % "google-cloud-assured-workloads" % "2.2.0"
libraryDependencies += "com.google.cloud" % "google-cloud-assured-workloads" % "2.2.1"
```

## Authentication
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package com.google.cloud.assuredworkloads.v1;

import static com.google.cloud.assuredworkloads.v1.AssuredWorkloadsServiceClient.ListViolationsPagedResponse;
import static com.google.cloud.assuredworkloads.v1.AssuredWorkloadsServiceClient.ListWorkloadsPagedResponse;

import com.google.api.core.ApiFunction;
Expand Down Expand Up @@ -98,6 +99,13 @@ public UnaryCallSettings<UpdateWorkloadRequest, Workload> updateWorkloadSettings
return ((AssuredWorkloadsServiceStubSettings) getStubSettings()).updateWorkloadSettings();
}

/** Returns the object with the settings used for calls to restrictAllowedResources. */
public UnaryCallSettings<RestrictAllowedResourcesRequest, RestrictAllowedResourcesResponse>
restrictAllowedResourcesSettings() {
return ((AssuredWorkloadsServiceStubSettings) getStubSettings())
.restrictAllowedResourcesSettings();
}

/** Returns the object with the settings used for calls to deleteWorkload. */
public UnaryCallSettings<DeleteWorkloadRequest, Empty> deleteWorkloadSettings() {
return ((AssuredWorkloadsServiceStubSettings) getStubSettings()).deleteWorkloadSettings();
Expand All @@ -114,6 +122,24 @@ public UnaryCallSettings<GetWorkloadRequest, Workload> getWorkloadSettings() {
return ((AssuredWorkloadsServiceStubSettings) getStubSettings()).listWorkloadsSettings();
}

/** Returns the object with the settings used for calls to listViolations. */
public PagedCallSettings<
ListViolationsRequest, ListViolationsResponse, ListViolationsPagedResponse>
listViolationsSettings() {
return ((AssuredWorkloadsServiceStubSettings) getStubSettings()).listViolationsSettings();
}

/** Returns the object with the settings used for calls to getViolation. */
public UnaryCallSettings<GetViolationRequest, Violation> getViolationSettings() {
return ((AssuredWorkloadsServiceStubSettings) getStubSettings()).getViolationSettings();
}

/** Returns the object with the settings used for calls to acknowledgeViolation. */
public UnaryCallSettings<AcknowledgeViolationRequest, AcknowledgeViolationResponse>
acknowledgeViolationSettings() {
return ((AssuredWorkloadsServiceStubSettings) getStubSettings()).acknowledgeViolationSettings();
}

public static final AssuredWorkloadsServiceSettings create(
AssuredWorkloadsServiceStubSettings stub) throws IOException {
return new AssuredWorkloadsServiceSettings.Builder(stub.toBuilder()).build();
Expand Down Expand Up @@ -247,6 +273,13 @@ public UnaryCallSettings.Builder<UpdateWorkloadRequest, Workload> updateWorkload
return getStubSettingsBuilder().updateWorkloadSettings();
}

/** Returns the builder for the settings used for calls to restrictAllowedResources. */
public UnaryCallSettings.Builder<
RestrictAllowedResourcesRequest, RestrictAllowedResourcesResponse>
restrictAllowedResourcesSettings() {
return getStubSettingsBuilder().restrictAllowedResourcesSettings();
}

/** Returns the builder for the settings used for calls to deleteWorkload. */
public UnaryCallSettings.Builder<DeleteWorkloadRequest, Empty> deleteWorkloadSettings() {
return getStubSettingsBuilder().deleteWorkloadSettings();
Expand All @@ -264,6 +297,24 @@ public UnaryCallSettings.Builder<GetWorkloadRequest, Workload> getWorkloadSettin
return getStubSettingsBuilder().listWorkloadsSettings();
}

/** Returns the builder for the settings used for calls to listViolations. */
public PagedCallSettings.Builder<
ListViolationsRequest, ListViolationsResponse, ListViolationsPagedResponse>
listViolationsSettings() {
return getStubSettingsBuilder().listViolationsSettings();
}

/** Returns the builder for the settings used for calls to getViolation. */
public UnaryCallSettings.Builder<GetViolationRequest, Violation> getViolationSettings() {
return getStubSettingsBuilder().getViolationSettings();
}

/** Returns the builder for the settings used for calls to acknowledgeViolation. */
public UnaryCallSettings.Builder<AcknowledgeViolationRequest, AcknowledgeViolationResponse>
acknowledgeViolationSettings() {
return getStubSettingsBuilder().acknowledgeViolationSettings();
}

@Override
public AssuredWorkloadsServiceSettings build() throws IOException {
return new AssuredWorkloadsServiceSettings(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,30 @@
"grpc": {
"libraryClient": "AssuredWorkloadsServiceClient",
"rpcs": {
"AcknowledgeViolation": {
"methods": ["acknowledgeViolation", "acknowledgeViolationCallable"]
},
"CreateWorkload": {
"methods": ["createWorkloadAsync", "createWorkloadAsync", "createWorkloadAsync", "createWorkloadOperationCallable", "createWorkloadCallable"]
},
"DeleteWorkload": {
"methods": ["deleteWorkload", "deleteWorkload", "deleteWorkload", "deleteWorkloadCallable"]
},
"GetViolation": {
"methods": ["getViolation", "getViolation", "getViolation", "getViolationCallable"]
},
"GetWorkload": {
"methods": ["getWorkload", "getWorkload", "getWorkload", "getWorkloadCallable"]
},
"ListViolations": {
"methods": ["listViolations", "listViolations", "listViolations", "listViolationsPagedCallable", "listViolationsCallable"]
},
"ListWorkloads": {
"methods": ["listWorkloads", "listWorkloads", "listWorkloads", "listWorkloadsPagedCallable", "listWorkloadsCallable"]
},
"RestrictAllowedResources": {
"methods": ["restrictAllowedResources", "restrictAllowedResourcesCallable"]
},
"UpdateWorkload": {
"methods": ["updateWorkload", "updateWorkload", "updateWorkloadCallable"]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,27 @@

package com.google.cloud.assuredworkloads.v1.stub;

import static com.google.cloud.assuredworkloads.v1.AssuredWorkloadsServiceClient.ListViolationsPagedResponse;
import static com.google.cloud.assuredworkloads.v1.AssuredWorkloadsServiceClient.ListWorkloadsPagedResponse;

import com.google.api.gax.core.BackgroundResource;
import com.google.api.gax.rpc.OperationCallable;
import com.google.api.gax.rpc.UnaryCallable;
import com.google.cloud.assuredworkloads.v1.AcknowledgeViolationRequest;
import com.google.cloud.assuredworkloads.v1.AcknowledgeViolationResponse;
import com.google.cloud.assuredworkloads.v1.CreateWorkloadOperationMetadata;
import com.google.cloud.assuredworkloads.v1.CreateWorkloadRequest;
import com.google.cloud.assuredworkloads.v1.DeleteWorkloadRequest;
import com.google.cloud.assuredworkloads.v1.GetViolationRequest;
import com.google.cloud.assuredworkloads.v1.GetWorkloadRequest;
import com.google.cloud.assuredworkloads.v1.ListViolationsRequest;
import com.google.cloud.assuredworkloads.v1.ListViolationsResponse;
import com.google.cloud.assuredworkloads.v1.ListWorkloadsRequest;
import com.google.cloud.assuredworkloads.v1.ListWorkloadsResponse;
import com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest;
import com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesResponse;
import com.google.cloud.assuredworkloads.v1.UpdateWorkloadRequest;
import com.google.cloud.assuredworkloads.v1.Violation;
import com.google.cloud.assuredworkloads.v1.Workload;
import com.google.longrunning.Operation;
import com.google.longrunning.stub.OperationsStub;
Expand Down Expand Up @@ -64,6 +73,11 @@ public UnaryCallable<UpdateWorkloadRequest, Workload> updateWorkloadCallable() {
throw new UnsupportedOperationException("Not implemented: updateWorkloadCallable()");
}

public UnaryCallable<RestrictAllowedResourcesRequest, RestrictAllowedResourcesResponse>
restrictAllowedResourcesCallable() {
throw new UnsupportedOperationException("Not implemented: restrictAllowedResourcesCallable()");
}

public UnaryCallable<DeleteWorkloadRequest, Empty> deleteWorkloadCallable() {
throw new UnsupportedOperationException("Not implemented: deleteWorkloadCallable()");
}
Expand All @@ -81,6 +95,24 @@ public UnaryCallable<ListWorkloadsRequest, ListWorkloadsResponse> listWorkloadsC
throw new UnsupportedOperationException("Not implemented: listWorkloadsCallable()");
}

public UnaryCallable<ListViolationsRequest, ListViolationsPagedResponse>
listViolationsPagedCallable() {
throw new UnsupportedOperationException("Not implemented: listViolationsPagedCallable()");
}

public UnaryCallable<ListViolationsRequest, ListViolationsResponse> listViolationsCallable() {
throw new UnsupportedOperationException("Not implemented: listViolationsCallable()");
}

public UnaryCallable<GetViolationRequest, Violation> getViolationCallable() {
throw new UnsupportedOperationException("Not implemented: getViolationCallable()");
}

public UnaryCallable<AcknowledgeViolationRequest, AcknowledgeViolationResponse>
acknowledgeViolationCallable() {
throw new UnsupportedOperationException("Not implemented: acknowledgeViolationCallable()");
}

@Override
public abstract void close();
}
Loading

0 comments on commit f7a3fd6

Please sign in to comment.