Class AuditLog

  • All Implemented Interfaces:
    AuditLogOrBuilder, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<com.google.protobuf.GeneratedMessageV3>, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, java.io.Serializable

    public final class AuditLog
    extends com.google.protobuf.GeneratedMessageV3
    implements AuditLogOrBuilder
     Common audit log format for Google Cloud Platform API operations.
     
    Protobuf type google.cloud.audit.AuditLog
    See Also:
    Serialized Form
    • Field Detail

      • SERVICE_NAME_FIELD_NUMBER

        public static final int SERVICE_NAME_FIELD_NUMBER
        See Also:
        Constant Field Values
      • METHOD_NAME_FIELD_NUMBER

        public static final int METHOD_NAME_FIELD_NUMBER
        See Also:
        Constant Field Values
      • RESOURCE_NAME_FIELD_NUMBER

        public static final int RESOURCE_NAME_FIELD_NUMBER
        See Also:
        Constant Field Values
      • RESOURCE_LOCATION_FIELD_NUMBER

        public static final int RESOURCE_LOCATION_FIELD_NUMBER
        See Also:
        Constant Field Values
      • RESOURCE_ORIGINAL_STATE_FIELD_NUMBER

        public static final int RESOURCE_ORIGINAL_STATE_FIELD_NUMBER
        See Also:
        Constant Field Values
      • NUM_RESPONSE_ITEMS_FIELD_NUMBER

        public static final int NUM_RESPONSE_ITEMS_FIELD_NUMBER
        See Also:
        Constant Field Values
      • AUTHENTICATION_INFO_FIELD_NUMBER

        public static final int AUTHENTICATION_INFO_FIELD_NUMBER
        See Also:
        Constant Field Values
      • AUTHORIZATION_INFO_FIELD_NUMBER

        public static final int AUTHORIZATION_INFO_FIELD_NUMBER
        See Also:
        Constant Field Values
      • POLICY_VIOLATION_INFO_FIELD_NUMBER

        public static final int POLICY_VIOLATION_INFO_FIELD_NUMBER
        See Also:
        Constant Field Values
      • REQUEST_METADATA_FIELD_NUMBER

        public static final int REQUEST_METADATA_FIELD_NUMBER
        See Also:
        Constant Field Values
      • SERVICE_DATA_FIELD_NUMBER

        public static final int SERVICE_DATA_FIELD_NUMBER
        See Also:
        Constant Field Values
    • Method Detail

      • newInstance

        protected java.lang.Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Overrides:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • getServiceName

        public java.lang.String getServiceName()
         The name of the API service performing the operation. For example,
         `"compute.googleapis.com"`.
         
        string service_name = 7;
        Specified by:
        getServiceName in interface AuditLogOrBuilder
        Returns:
        The serviceName.
      • getServiceNameBytes

        public com.google.protobuf.ByteString getServiceNameBytes()
         The name of the API service performing the operation. For example,
         `"compute.googleapis.com"`.
         
        string service_name = 7;
        Specified by:
        getServiceNameBytes in interface AuditLogOrBuilder
        Returns:
        The bytes for serviceName.
      • getMethodName

        public java.lang.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;
        Specified by:
        getMethodName in interface AuditLogOrBuilder
        Returns:
        The methodName.
      • getMethodNameBytes

        public com.google.protobuf.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;
        Specified by:
        getMethodNameBytes in interface AuditLogOrBuilder
        Returns:
        The bytes for methodName.
      • getResourceName

        public java.lang.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;
        Specified by:
        getResourceName in interface AuditLogOrBuilder
        Returns:
        The resourceName.
      • getResourceNameBytes

        public com.google.protobuf.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;
        Specified by:
        getResourceNameBytes in interface AuditLogOrBuilder
        Returns:
        The bytes for resourceName.
      • hasResourceLocation

        public boolean hasResourceLocation()
         The resource location information.
         
        .google.cloud.audit.ResourceLocation resource_location = 20;
        Specified by:
        hasResourceLocation in interface AuditLogOrBuilder
        Returns:
        Whether the resourceLocation field is set.
      • getResourceLocation

        public ResourceLocation getResourceLocation()
         The resource location information.
         
        .google.cloud.audit.ResourceLocation resource_location = 20;
        Specified by:
        getResourceLocation in interface AuditLogOrBuilder
        Returns:
        The resourceLocation.
      • 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;
        Specified by:
        hasResourceOriginalState in interface AuditLogOrBuilder
        Returns:
        Whether the resourceOriginalState field is set.
      • getResourceOriginalState

        public com.google.protobuf.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;
        Specified by:
        getResourceOriginalState in interface AuditLogOrBuilder
        Returns:
        The resourceOriginalState.
      • getResourceOriginalStateOrBuilder

        public com.google.protobuf.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;
        Specified by:
        getResourceOriginalStateOrBuilder in interface AuditLogOrBuilder
      • getNumResponseItems

        public long getNumResponseItems()
         The number of items returned from a List or Query API method,
         if applicable.
         
        int64 num_response_items = 12;
        Specified by:
        getNumResponseItems in interface AuditLogOrBuilder
        Returns:
        The numResponseItems.
      • hasStatus

        public boolean hasStatus()
         The status of the overall operation.
         
        .google.rpc.Status status = 2;
        Specified by:
        hasStatus in interface AuditLogOrBuilder
        Returns:
        Whether the status field is set.
      • getStatus

        public Status getStatus()
         The status of the overall operation.
         
        .google.rpc.Status status = 2;
        Specified by:
        getStatus in interface AuditLogOrBuilder
        Returns:
        The status.
      • hasAuthenticationInfo

        public boolean hasAuthenticationInfo()
         Authentication information.
         
        .google.cloud.audit.AuthenticationInfo authentication_info = 3;
        Specified by:
        hasAuthenticationInfo in interface AuditLogOrBuilder
        Returns:
        Whether the authenticationInfo field is set.
      • getAuthorizationInfoList

        public java.util.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;
        Specified by:
        getAuthorizationInfoList in interface AuditLogOrBuilder
      • getAuthorizationInfoOrBuilderList

        public java.util.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;
        Specified by:
        getAuthorizationInfoOrBuilderList in interface AuditLogOrBuilder
      • 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;
        Specified by:
        getAuthorizationInfoCount in interface AuditLogOrBuilder
      • getAuthorizationInfo

        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;
        Specified by:
        getAuthorizationInfo in interface AuditLogOrBuilder
      • getAuthorizationInfoOrBuilder

        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;
        Specified by:
        getAuthorizationInfoOrBuilder in interface AuditLogOrBuilder
      • 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;
        Specified by:
        hasPolicyViolationInfo in interface AuditLogOrBuilder
        Returns:
        Whether the policyViolationInfo field is set.
      • 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;
        Specified by:
        getPolicyViolationInfo in interface AuditLogOrBuilder
        Returns:
        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;
        Specified by:
        getPolicyViolationInfoOrBuilder in interface AuditLogOrBuilder
      • hasRequestMetadata

        public boolean hasRequestMetadata()
         Metadata about the operation.
         
        .google.cloud.audit.RequestMetadata request_metadata = 4;
        Specified by:
        hasRequestMetadata in interface AuditLogOrBuilder
        Returns:
        Whether the requestMetadata field is set.
      • getRequestMetadata

        public RequestMetadata getRequestMetadata()
         Metadata about the operation.
         
        .google.cloud.audit.RequestMetadata request_metadata = 4;
        Specified by:
        getRequestMetadata in interface AuditLogOrBuilder
        Returns:
        The requestMetadata.
      • 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;
        Specified by:
        hasRequest in interface AuditLogOrBuilder
        Returns:
        Whether the request field is set.
      • getRequest

        public com.google.protobuf.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;
        Specified by:
        getRequest in interface AuditLogOrBuilder
        Returns:
        The request.
      • getRequestOrBuilder

        public com.google.protobuf.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;
        Specified by:
        getRequestOrBuilder in interface AuditLogOrBuilder
      • 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;
        Specified by:
        hasResponse in interface AuditLogOrBuilder
        Returns:
        Whether the response field is set.
      • getResponse

        public com.google.protobuf.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;
        Specified by:
        getResponse in interface AuditLogOrBuilder
        Returns:
        The response.
      • getResponseOrBuilder

        public com.google.protobuf.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;
        Specified by:
        getResponseOrBuilder in interface AuditLogOrBuilder
      • 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;
        Specified by:
        hasMetadata in interface AuditLogOrBuilder
        Returns:
        Whether the metadata field is set.
      • getMetadata

        public com.google.protobuf.Struct getMetadata()
         Other service-specific data about the request, response, and other
         information associated with the current audited event.
         
        .google.protobuf.Struct metadata = 18;
        Specified by:
        getMetadata in interface AuditLogOrBuilder
        Returns:
        The metadata.
      • getMetadataOrBuilder

        public com.google.protobuf.StructOrBuilder getMetadataOrBuilder()
         Other service-specific data about the request, response, and other
         information associated with the current audited event.
         
        .google.protobuf.Struct metadata = 18;
        Specified by:
        getMetadataOrBuilder in interface AuditLogOrBuilder
      • 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];
        Specified by:
        hasServiceData in interface AuditLogOrBuilder
        Returns:
        Whether the serviceData field is set.
      • getServiceData

        @Deprecated
        public com.google.protobuf.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];
        Specified by:
        getServiceData in interface AuditLogOrBuilder
        Returns:
        The serviceData.
      • getServiceDataOrBuilder

        @Deprecated
        public com.google.protobuf.AnyOrBuilder getServiceDataOrBuilder()
        Deprecated.
         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];
        Specified by:
        getServiceDataOrBuilder in interface AuditLogOrBuilder
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessage.ExtendableMessage<com.google.protobuf.GeneratedMessageV3>
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws java.io.IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessage
        Throws:
        java.io.IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessage
      • equals

        public boolean equals​(java.lang.Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static AuditLog parseFrom​(java.nio.ByteBuffer data)
                                  throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static AuditLog parseFrom​(java.nio.ByteBuffer data,
                                         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                  throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static AuditLog parseFrom​(com.google.protobuf.ByteString data)
                                  throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static AuditLog parseFrom​(com.google.protobuf.ByteString data,
                                         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                  throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static AuditLog parseFrom​(byte[] data)
                                  throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static AuditLog parseFrom​(byte[] data,
                                         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                  throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static AuditLog parseFrom​(java.io.InputStream input)
                                  throws java.io.IOException
        Throws:
        java.io.IOException
      • parseFrom

        public static AuditLog parseFrom​(java.io.InputStream input,
                                         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                  throws java.io.IOException
        Throws:
        java.io.IOException
      • parseDelimitedFrom

        public static AuditLog parseDelimitedFrom​(java.io.InputStream input)
                                           throws java.io.IOException
        Throws:
        java.io.IOException
      • parseDelimitedFrom

        public static AuditLog parseDelimitedFrom​(java.io.InputStream input,
                                                  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                           throws java.io.IOException
        Throws:
        java.io.IOException
      • parseFrom

        public static AuditLog parseFrom​(com.google.protobuf.CodedInputStream input)
                                  throws java.io.IOException
        Throws:
        java.io.IOException
      • parseFrom

        public static AuditLog parseFrom​(com.google.protobuf.CodedInputStream input,
                                         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                  throws java.io.IOException
        Throws:
        java.io.IOException
      • newBuilderForType

        public AuditLog.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public AuditLog.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected AuditLog.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstance

        public static AuditLog getDefaultInstance()
      • parser

        public static com.google.protobuf.Parser<AuditLog> parser()
      • getParserForType

        public com.google.protobuf.Parser<AuditLog> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessage
      • getDefaultInstanceForType

        public AuditLog getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<com.google.protobuf.GeneratedMessageV3>
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder