Class AuditLog (2.15.0)

public final class AuditLog extends GeneratedMessageV3 implements AuditLogOrBuilder

Common audit log format for Google Cloud Platform API operations.

Protobuf type google.cloud.audit.AuditLog

Implements

AuditLogOrBuilder

Static Fields

AUTHENTICATION_INFO_FIELD_NUMBER

public static final int AUTHENTICATION_INFO_FIELD_NUMBER
Field Value
TypeDescription
int

AUTHORIZATION_INFO_FIELD_NUMBER

public static final int AUTHORIZATION_INFO_FIELD_NUMBER
Field Value
TypeDescription
int

METADATA_FIELD_NUMBER

public static final int METADATA_FIELD_NUMBER
Field Value
TypeDescription
int

METHOD_NAME_FIELD_NUMBER

public static final int METHOD_NAME_FIELD_NUMBER
Field Value
TypeDescription
int

NUM_RESPONSE_ITEMS_FIELD_NUMBER

public static final int NUM_RESPONSE_ITEMS_FIELD_NUMBER
Field Value
TypeDescription
int

POLICY_VIOLATION_INFO_FIELD_NUMBER

public static final int POLICY_VIOLATION_INFO_FIELD_NUMBER
Field Value
TypeDescription
int

REQUEST_FIELD_NUMBER

public static final int REQUEST_FIELD_NUMBER
Field Value
TypeDescription
int

REQUEST_METADATA_FIELD_NUMBER

public static final int REQUEST_METADATA_FIELD_NUMBER
Field Value
TypeDescription
int

RESOURCE_LOCATION_FIELD_NUMBER

public static final int RESOURCE_LOCATION_FIELD_NUMBER
Field Value
TypeDescription
int

RESOURCE_NAME_FIELD_NUMBER

public static final int RESOURCE_NAME_FIELD_NUMBER
Field Value
TypeDescription
int

RESOURCE_ORIGINAL_STATE_FIELD_NUMBER

public static final int RESOURCE_ORIGINAL_STATE_FIELD_NUMBER
Field Value
TypeDescription
int

RESPONSE_FIELD_NUMBER

public static final int RESPONSE_FIELD_NUMBER
Field Value
TypeDescription
int

SERVICE_DATA_FIELD_NUMBER

public static final int SERVICE_DATA_FIELD_NUMBER
Field Value
TypeDescription
int

SERVICE_NAME_FIELD_NUMBER

public static final int SERVICE_NAME_FIELD_NUMBER
Field Value
TypeDescription
int

STATUS_FIELD_NUMBER

public static final int STATUS_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static AuditLog getDefaultInstance()
Returns
TypeDescription
AuditLog

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static AuditLog.Builder newBuilder()
Returns
TypeDescription
AuditLog.Builder

newBuilder(AuditLog prototype)

public static AuditLog.Builder newBuilder(AuditLog prototype)
Parameter
NameDescription
prototypeAuditLog
Returns
TypeDescription
AuditLog.Builder

parseDelimitedFrom(InputStream input)

public static AuditLog parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
AuditLog
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static AuditLog parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AuditLog
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static AuditLog parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
AuditLog
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static AuditLog parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AuditLog
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static AuditLog parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
AuditLog
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static AuditLog parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AuditLog
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static AuditLog parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
AuditLog
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static AuditLog parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AuditLog
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static AuditLog parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
AuditLog
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static AuditLog parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AuditLog
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static AuditLog parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
AuditLog
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static AuditLog parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AuditLog
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<AuditLog> parser()
Returns
TypeDescription
Parser<AuditLog>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getAuthenticationInfo()

public AuthenticationInfo getAuthenticationInfo()

Authentication information.

.google.cloud.audit.AuthenticationInfo authentication_info = 3;

Returns
TypeDescription
AuthenticationInfo

The authenticationInfo.

getAuthenticationInfoOrBuilder()

public AuthenticationInfoOrBuilder getAuthenticationInfoOrBuilder()

Authentication information.

.google.cloud.audit.AuthenticationInfo authentication_info = 3;

Returns
TypeDescription
AuthenticationInfoOrBuilder

getAuthorizationInfo(int index)

public AuthorizationInfo getAuthorizationInfo(int index)

Authorization information. If there are multiple resources or permissions involved, then there is one AuthorizationInfo element for each {resource, permission} tuple.

repeated .google.cloud.audit.AuthorizationInfo authorization_info = 9;

Parameter
NameDescription
indexint
Returns
TypeDescription
AuthorizationInfo

getAuthorizationInfoCount()

public int getAuthorizationInfoCount()

Authorization information. If there are multiple resources or permissions involved, then there is one AuthorizationInfo element for each {resource, permission} tuple.

repeated .google.cloud.audit.AuthorizationInfo authorization_info = 9;

Returns
TypeDescription
int

getAuthorizationInfoList()

public List<AuthorizationInfo> getAuthorizationInfoList()

Authorization information. If there are multiple resources or permissions involved, then there is one AuthorizationInfo element for each {resource, permission} tuple.

repeated .google.cloud.audit.AuthorizationInfo authorization_info = 9;

Returns
TypeDescription
List<AuthorizationInfo>

getAuthorizationInfoOrBuilder(int index)

public AuthorizationInfoOrBuilder getAuthorizationInfoOrBuilder(int index)

Authorization information. If there are multiple resources or permissions involved, then there is one AuthorizationInfo element for each {resource, permission} tuple.

repeated .google.cloud.audit.AuthorizationInfo authorization_info = 9;

Parameter
NameDescription
indexint
Returns
TypeDescription
AuthorizationInfoOrBuilder

getAuthorizationInfoOrBuilderList()

public List<? extends AuthorizationInfoOrBuilder> getAuthorizationInfoOrBuilderList()

Authorization information. If there are multiple resources or permissions involved, then there is one AuthorizationInfo element for each {resource, permission} tuple.

repeated .google.cloud.audit.AuthorizationInfo authorization_info = 9;

Returns
TypeDescription
List<? extends com.google.cloud.audit.AuthorizationInfoOrBuilder>

getDefaultInstanceForType()

public AuditLog getDefaultInstanceForType()
Returns
TypeDescription
AuditLog

getMetadata()

public Struct getMetadata()

Other service-specific data about the request, response, and other information associated with the current audited event.

.google.protobuf.Struct metadata = 18;

Returns
TypeDescription
Struct

The metadata.

getMetadataOrBuilder()

public StructOrBuilder getMetadataOrBuilder()

Other service-specific data about the request, response, and other information associated with the current audited event.

.google.protobuf.Struct metadata = 18;

Returns
TypeDescription
StructOrBuilder

getMethodName()

public String getMethodName()

The name of the service method or operation. For API calls, this should be the name of the API method. For example, "google.cloud.bigquery.v2.TableService.InsertTable" "google.logging.v2.ConfigServiceV2.CreateSink"

string method_name = 8;

Returns
TypeDescription
String

The methodName.

getMethodNameBytes()

public ByteString getMethodNameBytes()

The name of the service method or operation. For API calls, this should be the name of the API method. For example, "google.cloud.bigquery.v2.TableService.InsertTable" "google.logging.v2.ConfigServiceV2.CreateSink"

string method_name = 8;

Returns
TypeDescription
ByteString

The bytes for methodName.

getNumResponseItems()

public long getNumResponseItems()

The number of items returned from a List or Query API method, if applicable.

int64 num_response_items = 12;

Returns
TypeDescription
long

The numResponseItems.

getParserForType()

public Parser<AuditLog> getParserForType()
Returns
TypeDescription
Parser<AuditLog>
Overrides

getPolicyViolationInfo()

public PolicyViolationInfo getPolicyViolationInfo()

Indicates the policy violations for this request. If the request is denied by the policy, violation information will be logged here.

.google.cloud.audit.PolicyViolationInfo policy_violation_info = 25;

Returns
TypeDescription
PolicyViolationInfo

The policyViolationInfo.

getPolicyViolationInfoOrBuilder()

public PolicyViolationInfoOrBuilder getPolicyViolationInfoOrBuilder()

Indicates the policy violations for this request. If the request is denied by the policy, violation information will be logged here.

.google.cloud.audit.PolicyViolationInfo policy_violation_info = 25;

Returns
TypeDescription
PolicyViolationInfoOrBuilder

getRequest()

public Struct getRequest()

The operation request. This may not include all request parameters, such as those that are too large, privacy-sensitive, or duplicated elsewhere in the log record. It should never include user-generated data, such as file contents. When the JSON object represented here has a proto equivalent, the proto name will be indicated in the @type property.

.google.protobuf.Struct request = 16;

Returns
TypeDescription
Struct

The request.

getRequestMetadata()

public RequestMetadata getRequestMetadata()

Metadata about the operation.

.google.cloud.audit.RequestMetadata request_metadata = 4;

Returns
TypeDescription
RequestMetadata

The requestMetadata.

getRequestMetadataOrBuilder()

public RequestMetadataOrBuilder getRequestMetadataOrBuilder()

Metadata about the operation.

.google.cloud.audit.RequestMetadata request_metadata = 4;

Returns
TypeDescription
RequestMetadataOrBuilder

getRequestOrBuilder()

public StructOrBuilder getRequestOrBuilder()

The operation request. This may not include all request parameters, such as those that are too large, privacy-sensitive, or duplicated elsewhere in the log record. It should never include user-generated data, such as file contents. When the JSON object represented here has a proto equivalent, the proto name will be indicated in the @type property.

.google.protobuf.Struct request = 16;

Returns
TypeDescription
StructOrBuilder

getResourceLocation()

public ResourceLocation getResourceLocation()

The resource location information.

.google.cloud.audit.ResourceLocation resource_location = 20;

Returns
TypeDescription
ResourceLocation

The resourceLocation.

getResourceLocationOrBuilder()

public ResourceLocationOrBuilder getResourceLocationOrBuilder()

The resource location information.

.google.cloud.audit.ResourceLocation resource_location = 20;

Returns
TypeDescription
ResourceLocationOrBuilder

getResourceName()

public String getResourceName()

The resource or collection that is the target of the operation. The name is a scheme-less URI, not including the API service name. For example: "projects/PROJECT_ID/zones/us-central1-a/instances" "projects/PROJECT_ID/datasets/DATASET_ID"

string resource_name = 11;

Returns
TypeDescription
String

The resourceName.

getResourceNameBytes()

public ByteString getResourceNameBytes()

The resource or collection that is the target of the operation. The name is a scheme-less URI, not including the API service name. For example: "projects/PROJECT_ID/zones/us-central1-a/instances" "projects/PROJECT_ID/datasets/DATASET_ID"

string resource_name = 11;

Returns
TypeDescription
ByteString

The bytes for resourceName.

getResourceOriginalState()

public Struct getResourceOriginalState()

The resource's original state before mutation. Present only for operations which have successfully modified the targeted resource(s). In general, this field should contain all changed fields, except those that are already been included in request, response, metadata or service_data fields. When the JSON object represented here has a proto equivalent, the proto name will be indicated in the @type property.

.google.protobuf.Struct resource_original_state = 19;

Returns
TypeDescription
Struct

The resourceOriginalState.

getResourceOriginalStateOrBuilder()

public StructOrBuilder getResourceOriginalStateOrBuilder()

The resource's original state before mutation. Present only for operations which have successfully modified the targeted resource(s). In general, this field should contain all changed fields, except those that are already been included in request, response, metadata or service_data fields. When the JSON object represented here has a proto equivalent, the proto name will be indicated in the @type property.

.google.protobuf.Struct resource_original_state = 19;

Returns
TypeDescription
StructOrBuilder

getResponse()

public Struct getResponse()

The operation response. This may not include all response elements, such as those that are too large, privacy-sensitive, or duplicated elsewhere in the log record. It should never include user-generated data, such as file contents. When the JSON object represented here has a proto equivalent, the proto name will be indicated in the @type property.

.google.protobuf.Struct response = 17;

Returns
TypeDescription
Struct

The response.

getResponseOrBuilder()

public StructOrBuilder getResponseOrBuilder()

The operation response. This may not include all response elements, such as those that are too large, privacy-sensitive, or duplicated elsewhere in the log record. It should never include user-generated data, such as file contents. When the JSON object represented here has a proto equivalent, the proto name will be indicated in the @type property.

.google.protobuf.Struct response = 17;

Returns
TypeDescription
StructOrBuilder

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getServiceData() (deprecated)

public Any getServiceData()

Deprecated. google.cloud.audit.AuditLog.service_data is deprecated. See google/cloud/audit/audit_log.proto;l=110

Deprecated. Use the metadata field instead. Other service-specific data about the request, response, and other activities.

.google.protobuf.Any service_data = 15 [deprecated = true];

Returns
TypeDescription
Any

The serviceData.

getServiceDataOrBuilder()

public AnyOrBuilder getServiceDataOrBuilder()

Deprecated. Use the metadata field instead. Other service-specific data about the request, response, and other activities.

.google.protobuf.Any service_data = 15 [deprecated = true];

Returns
TypeDescription
AnyOrBuilder

getServiceName()

public String getServiceName()

The name of the API service performing the operation. For example, "compute.googleapis.com".

string service_name = 7;

Returns
TypeDescription
String

The serviceName.

getServiceNameBytes()

public ByteString getServiceNameBytes()

The name of the API service performing the operation. For example, "compute.googleapis.com".

string service_name = 7;

Returns
TypeDescription
ByteString

The bytes for serviceName.

getStatus()

public Status getStatus()

The status of the overall operation.

.google.rpc.Status status = 2;

Returns
TypeDescription
Status

The status.

getStatusOrBuilder()

public StatusOrBuilder getStatusOrBuilder()

The status of the overall operation.

.google.rpc.Status status = 2;

Returns
TypeDescription
StatusOrBuilder

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

hasAuthenticationInfo()

public boolean hasAuthenticationInfo()

Authentication information.

.google.cloud.audit.AuthenticationInfo authentication_info = 3;

Returns
TypeDescription
boolean

Whether the authenticationInfo field is set.

hasMetadata()

public boolean hasMetadata()

Other service-specific data about the request, response, and other information associated with the current audited event.

.google.protobuf.Struct metadata = 18;

Returns
TypeDescription
boolean

Whether the metadata field is set.

hasPolicyViolationInfo()

public boolean hasPolicyViolationInfo()

Indicates the policy violations for this request. If the request is denied by the policy, violation information will be logged here.

.google.cloud.audit.PolicyViolationInfo policy_violation_info = 25;

Returns
TypeDescription
boolean

Whether the policyViolationInfo field is set.

hasRequest()

public boolean hasRequest()

The operation request. This may not include all request parameters, such as those that are too large, privacy-sensitive, or duplicated elsewhere in the log record. It should never include user-generated data, such as file contents. When the JSON object represented here has a proto equivalent, the proto name will be indicated in the @type property.

.google.protobuf.Struct request = 16;

Returns
TypeDescription
boolean

Whether the request field is set.

hasRequestMetadata()

public boolean hasRequestMetadata()

Metadata about the operation.

.google.cloud.audit.RequestMetadata request_metadata = 4;

Returns
TypeDescription
boolean

Whether the requestMetadata field is set.

hasResourceLocation()

public boolean hasResourceLocation()

The resource location information.

.google.cloud.audit.ResourceLocation resource_location = 20;

Returns
TypeDescription
boolean

Whether the resourceLocation field is set.

hasResourceOriginalState()

public boolean hasResourceOriginalState()

The resource's original state before mutation. Present only for operations which have successfully modified the targeted resource(s). In general, this field should contain all changed fields, except those that are already been included in request, response, metadata or service_data fields. When the JSON object represented here has a proto equivalent, the proto name will be indicated in the @type property.

.google.protobuf.Struct resource_original_state = 19;

Returns
TypeDescription
boolean

Whether the resourceOriginalState field is set.

hasResponse()

public boolean hasResponse()

The operation response. This may not include all response elements, such as those that are too large, privacy-sensitive, or duplicated elsewhere in the log record. It should never include user-generated data, such as file contents. When the JSON object represented here has a proto equivalent, the proto name will be indicated in the @type property.

.google.protobuf.Struct response = 17;

Returns
TypeDescription
boolean

Whether the response field is set.

hasServiceData() (deprecated)

public boolean hasServiceData()

Deprecated. google.cloud.audit.AuditLog.service_data is deprecated. See google/cloud/audit/audit_log.proto;l=110

Deprecated. Use the metadata field instead. Other service-specific data about the request, response, and other activities.

.google.protobuf.Any service_data = 15 [deprecated = true];

Returns
TypeDescription
boolean

Whether the serviceData field is set.

hasStatus()

public boolean hasStatus()

The status of the overall operation.

.google.rpc.Status status = 2;

Returns
TypeDescription
boolean

Whether the status field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public AuditLog.Builder newBuilderForType()
Returns
TypeDescription
AuditLog.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected AuditLog.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
AuditLog.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public AuditLog.Builder toBuilder()
Returns
TypeDescription
AuditLog.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException