Skip to content

Commit

Permalink
feat: run generator (10-16-2021) (#99)
Browse files Browse the repository at this point in the history
Co-authored-by: Google Bot <yoshi-code-bot@google.com>
  • Loading branch information
github-actions[bot] and yoshi-code-bot committed Oct 16, 2021
1 parent 7a96f43 commit ee07971
Show file tree
Hide file tree
Showing 65 changed files with 595 additions and 617 deletions.
12 changes: 9 additions & 3 deletions src/main/java/com/google/events/cloud/audit/v1/Auth.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,20 @@

package com.google.events.cloud.audit.v1;

import java.util.Map;

/**
* The request authentication. May be absent for unauthenticated requests.
* Derived from the HTTP request `Authorization` header or equivalent.
*
* This message defines request authentication attributes. Terminology is
* based on the JSON Web Token (JWT) standard, but the terms also
* correlate to concepts in other standards.
*/
public class Auth {
private String[] accessLevels;
private String[] audiences;
private Claims claims;
private Map<String, Object> claims;
private String presenter;
private String principal;

Expand Down Expand Up @@ -75,8 +81,8 @@ public class Auth {
* SAML assertions are similarly specified, but with an identity provider
* dependent structure.
*/
public Claims getClaims() { return claims; }
public void setClaims(Claims value) { this.claims = value; }
public Map<String, Object> getClaims() { return claims; }
public void setClaims(Map<String, Object> value) { this.claims = value; }

/**
* The authorized presenter of the credential. Reflects the optional
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,20 @@

package com.google.events.cloud.audit.v1;

import java.util.Map;

/**
* Authentication information.
*
* Authentication information for the operation.
*/
public class AuthenticationInfo {
private String authoritySelector;
private String principalEmail;
private String principalSubject;
private ServiceAccountDelegationInfo[] serviceAccountDelegationInfo;
private String serviceAccountKeyName;
private AuthenticationInfoThirdPartyPrincipal thirdPartyPrincipal;
private Map<String, Object> thirdPartyPrincipal;

/**
* The authority selector specified by the requestor, if any.
Expand Down Expand Up @@ -76,6 +80,6 @@ public class AuthenticationInfo {
* When the JSON object represented here has a proto equivalent, the proto
* name will be indicated in the `@type` property.
*/
public AuthenticationInfoThirdPartyPrincipal getThirdPartyPrincipal() { return thirdPartyPrincipal; }
public void setThirdPartyPrincipal(AuthenticationInfoThirdPartyPrincipal value) { this.thirdPartyPrincipal = value; }
public Map<String, Object> getThirdPartyPrincipal() { return thirdPartyPrincipal; }
public void setThirdPartyPrincipal(Map<String, Object> value) { this.thirdPartyPrincipal = value; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class AuthorizationInfo {
private Boolean granted;
private String permission;
private String resource;
private ResourceAttributes resourceAttributes;
private ResourceAttributesClass resourceAttributes;

/**
* Whether or not authorization for `resource` and `permission`
Expand Down Expand Up @@ -54,6 +54,6 @@ public class AuthorizationInfo {
* condition evaluation, the user must also look into
* `AuditLogData.request_metadata.request_attributes`.
*/
public ResourceAttributes getResourceAttributes() { return resourceAttributes; }
public void setResourceAttributes(ResourceAttributes value) { this.resourceAttributes = value; }
public ResourceAttributesClass getResourceAttributes() { return resourceAttributes; }
public void setResourceAttributes(ResourceAttributesClass value) { this.resourceAttributes = value; }
}
46 changes: 0 additions & 46 deletions src/main/java/com/google/events/cloud/audit/v1/Claims.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@
* the last hop. Only two fields are used in this message, Peer.port and
* Peer.ip. These fields are optionally populated by those services utilizing
* the IAM condition feature.
*
* This message defines attributes for a node that handles a network request.
* The node can be either a service or an application that sends, forwards,
* or receives the request. Service peers should fill in
* `principal` and `labels` as appropriate.
*/
public class DestinationAttributes {
private String ip;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,16 @@

package com.google.events.cloud.audit.v1;

import java.util.Map;

/**
* First party (Google) identity as the real authority.
*
* First party identity principal.
*/
public class FirstPartyPrincipal {
private String principalEmail;
private ServiceMetadata serviceMetadata;
private Map<String, Object> serviceMetadata;

/**
* The email address of a Google account.
Expand All @@ -32,6 +36,6 @@ public class FirstPartyPrincipal {
/**
* Metadata about the service that uses the service account.
*/
public ServiceMetadata getServiceMetadata() { return serviceMetadata; }
public void setServiceMetadata(ServiceMetadata value) { this.serviceMetadata = value; }
public Map<String, Object> getServiceMetadata() { return serviceMetadata; }
public void setServiceMetadata(Map<String, Object> value) { this.serviceMetadata = value; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class LogEntryData {
private Operation operation;
private ProtoPayload protoPayload;
private OffsetDateTime receiveTimestamp;
private Resource resource;
private ResourceClass resource;
private Severity severity;
private String spanID;
private OffsetDateTime timestamp;
Expand Down Expand Up @@ -81,8 +81,8 @@ public class LogEntryData {
* the monitored resource designating the particular database that reported
* the error.
*/
public Resource getResource() { return resource; }
public void setResource(Resource value) { this.resource = value; }
public ResourceClass getResource() { return resource; }
public void setResource(ResourceClass value) { this.resource = value; }

/**
* The severity of the log entry.
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/com/google/events/cloud/audit/v1/Operation.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
/**
* Information about an operation associated with the log entry, if
* applicable.
*
* Additional information about a potentially long-running operation with which
* a log entry is associated.
*/
public class Operation {
private Boolean first;
Expand Down
39 changes: 23 additions & 16 deletions src/main/java/com/google/events/cloud/audit/v1/ProtoPayload.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,30 @@

package com.google.events.cloud.audit.v1;

import java.util.Map;

/**
* The log entry payload, which is always an AuditLog for Cloud Audit Log
* events.
*
* Common audit log format for Google Cloud Platform API operations.
* Copied from
* https://github.com/googleapis/googleapis/blob/master/google/cloud/audit/audit_log.proto,
* but changing service_data from Any to Struct.
*/
public class ProtoPayload {
private AuthenticationInfo authenticationInfo;
private AuthorizationInfo[] authorizationInfo;
private Metadata metadata;
private Map<String, Object> metadata;
private String methodName;
private Long numResponseItems;
private Request request;
private Map<String, Object> request;
private RequestMetadata requestMetadata;
private ResourceLocation resourceLocation;
private String resourceName;
private ResourceOriginalState resourceOriginalState;
private Response response;
private ServiceData serviceData;
private Map<String, Object> resourceOriginalState;
private Map<String, Object> response;
private Map<String, Object> serviceData;
private String serviceName;
private Status status;

Expand All @@ -54,8 +61,8 @@ public class ProtoPayload {
* Other service-specific data about the request, response, and other
* information associated with the current audited event.
*/
public Metadata getMetadata() { return metadata; }
public void setMetadata(Metadata value) { this.metadata = value; }
public Map<String, Object> getMetadata() { return metadata; }
public void setMetadata(Map<String, Object> value) { this.metadata = value; }

/**
* The name of the service method or operation.
Expand Down Expand Up @@ -83,8 +90,8 @@ public class ProtoPayload {
* When the JSON object represented here has a proto equivalent, the proto
* name will be indicated in the `@type` property.
*/
public Request getRequest() { return request; }
public void setRequest(Request value) { this.request = value; }
public Map<String, Object> getRequest() { return request; }
public void setRequest(Map<String, Object> value) { this.request = value; }

/**
* Metadata about the operation.
Expand Down Expand Up @@ -118,8 +125,8 @@ public class ProtoPayload {
* When the JSON object represented here has a proto equivalent,
* the proto name will be indicated in the `@type` property.
*/
public ResourceOriginalState getResourceOriginalState() { return resourceOriginalState; }
public void setResourceOriginalState(ResourceOriginalState value) { this.resourceOriginalState = value; }
public Map<String, Object> getResourceOriginalState() { return resourceOriginalState; }
public void setResourceOriginalState(Map<String, Object> value) { this.resourceOriginalState = value; }

/**
* The operation response. This may not include all response elements,
Expand All @@ -129,18 +136,18 @@ public class ProtoPayload {
* When the JSON object represented here has a proto equivalent, the proto
* name will be indicated in the `@type` property.
*/
public Response getResponse() { return response; }
public void setResponse(Response value) { this.response = value; }
public Map<String, Object> getResponse() { return response; }
public void setResponse(Map<String, Object> value) { this.response = value; }

/**
* Deprecated, use `metadata` field instead.
* Deprecated: Use `metadata` field instead.
* Other service-specific data about the request, response, and other
* activities.
* When the JSON object represented here has a proto equivalent, the proto
* name will be indicated in the `@type` property.
*/
public ServiceData getServiceData() { return serviceData; }
public void setServiceData(ServiceData value) { this.serviceData = value; }
public Map<String, Object> getServiceData() { return serviceData; }
public void setServiceData(Map<String, Object> value) { this.serviceData = value; }

/**
* The name of the API service performing the operation. For example,
Expand Down

0 comments on commit ee07971

Please sign in to comment.