Class Violation

  • All Implemented Interfaces:
    ViolationOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

    public final class Violation
    extends com.google.protobuf.GeneratedMessageV3
    implements ViolationOrBuilder
     Workload monitoring Violation.
     
    Protobuf type google.cloud.assuredworkloads.v1.Violation
    See Also:
    Serialized Form
    • Field Detail

      • DESCRIPTION_FIELD_NUMBER

        public static final int DESCRIPTION_FIELD_NUMBER
        See Also:
        Constant Field Values
      • BEGIN_TIME_FIELD_NUMBER

        public static final int BEGIN_TIME_FIELD_NUMBER
        See Also:
        Constant Field Values
      • UPDATE_TIME_FIELD_NUMBER

        public static final int UPDATE_TIME_FIELD_NUMBER
        See Also:
        Constant Field Values
      • RESOLVE_TIME_FIELD_NUMBER

        public static final int RESOLVE_TIME_FIELD_NUMBER
        See Also:
        Constant Field Values
      • ORG_POLICY_CONSTRAINT_FIELD_NUMBER

        public static final int ORG_POLICY_CONSTRAINT_FIELD_NUMBER
        See Also:
        Constant Field Values
      • AUDIT_LOG_LINK_FIELD_NUMBER

        public static final int AUDIT_LOG_LINK_FIELD_NUMBER
        See Also:
        Constant Field Values
      • NON_COMPLIANT_ORG_POLICY_FIELD_NUMBER

        public static final int NON_COMPLIANT_ORG_POLICY_FIELD_NUMBER
        See Also:
        Constant Field Values
      • REMEDIATION_FIELD_NUMBER

        public static final int REMEDIATION_FIELD_NUMBER
        See Also:
        Constant Field Values
      • ACKNOWLEDGED_FIELD_NUMBER

        public static final int ACKNOWLEDGED_FIELD_NUMBER
        See Also:
        Constant Field Values
      • ACKNOWLEDGEMENT_TIME_FIELD_NUMBER

        public static final int ACKNOWLEDGEMENT_TIME_FIELD_NUMBER
        See Also:
        Constant Field Values
      • EXCEPTION_AUDIT_LOG_LINK_FIELD_NUMBER

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

      • newInstance

        protected 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()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • getName

        public String getName()
         Output only. Immutable. Name of the Violation.
         Format:
         organizations/{organization}/locations/{location}/workloads/{workload_id}/violations/{violations_id}
         
        string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE];
        Specified by:
        getName in interface ViolationOrBuilder
        Returns:
        The name.
      • getNameBytes

        public com.google.protobuf.ByteString getNameBytes()
         Output only. Immutable. Name of the Violation.
         Format:
         organizations/{organization}/locations/{location}/workloads/{workload_id}/violations/{violations_id}
         
        string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE];
        Specified by:
        getNameBytes in interface ViolationOrBuilder
        Returns:
        The bytes for name.
      • getDescription

        public String getDescription()
         Output only. Description for the Violation.
         e.g. OrgPolicy gcp.resourceLocations has non compliant value.
         
        string description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getDescription in interface ViolationOrBuilder
        Returns:
        The description.
      • getDescriptionBytes

        public com.google.protobuf.ByteString getDescriptionBytes()
         Output only. Description for the Violation.
         e.g. OrgPolicy gcp.resourceLocations has non compliant value.
         
        string description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getDescriptionBytes in interface ViolationOrBuilder
        Returns:
        The bytes for description.
      • hasBeginTime

        public boolean hasBeginTime()
         Output only. Time of the event which triggered the Violation.
         
        .google.protobuf.Timestamp begin_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        hasBeginTime in interface ViolationOrBuilder
        Returns:
        Whether the beginTime field is set.
      • getBeginTime

        public com.google.protobuf.Timestamp getBeginTime()
         Output only. Time of the event which triggered the Violation.
         
        .google.protobuf.Timestamp begin_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getBeginTime in interface ViolationOrBuilder
        Returns:
        The beginTime.
      • getBeginTimeOrBuilder

        public com.google.protobuf.TimestampOrBuilder getBeginTimeOrBuilder()
         Output only. Time of the event which triggered the Violation.
         
        .google.protobuf.Timestamp begin_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getBeginTimeOrBuilder in interface ViolationOrBuilder
      • hasUpdateTime

        public boolean hasUpdateTime()
         Output only. The last time when the Violation record was updated.
         
        .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        hasUpdateTime in interface ViolationOrBuilder
        Returns:
        Whether the updateTime field is set.
      • getUpdateTime

        public com.google.protobuf.Timestamp getUpdateTime()
         Output only. The last time when the Violation record was updated.
         
        .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getUpdateTime in interface ViolationOrBuilder
        Returns:
        The updateTime.
      • getUpdateTimeOrBuilder

        public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder()
         Output only. The last time when the Violation record was updated.
         
        .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getUpdateTimeOrBuilder in interface ViolationOrBuilder
      • hasResolveTime

        public boolean hasResolveTime()
         Output only. Time of the event which fixed the Violation.
         If the violation is ACTIVE this will be empty.
         
        .google.protobuf.Timestamp resolve_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        hasResolveTime in interface ViolationOrBuilder
        Returns:
        Whether the resolveTime field is set.
      • getResolveTime

        public com.google.protobuf.Timestamp getResolveTime()
         Output only. Time of the event which fixed the Violation.
         If the violation is ACTIVE this will be empty.
         
        .google.protobuf.Timestamp resolve_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getResolveTime in interface ViolationOrBuilder
        Returns:
        The resolveTime.
      • getResolveTimeOrBuilder

        public com.google.protobuf.TimestampOrBuilder getResolveTimeOrBuilder()
         Output only. Time of the event which fixed the Violation.
         If the violation is ACTIVE this will be empty.
         
        .google.protobuf.Timestamp resolve_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getResolveTimeOrBuilder in interface ViolationOrBuilder
      • getCategory

        public String getCategory()
         Output only. Category under which this violation is mapped.
         e.g. Location, Service Usage, Access, Encryption, etc.
         
        string category = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getCategory in interface ViolationOrBuilder
        Returns:
        The category.
      • getCategoryBytes

        public com.google.protobuf.ByteString getCategoryBytes()
         Output only. Category under which this violation is mapped.
         e.g. Location, Service Usage, Access, Encryption, etc.
         
        string category = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getCategoryBytes in interface ViolationOrBuilder
        Returns:
        The bytes for category.
      • getStateValue

        public int getStateValue()
         Output only. State of the violation
         
        .google.cloud.assuredworkloads.v1.Violation.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getStateValue in interface ViolationOrBuilder
        Returns:
        The enum numeric value on the wire for state.
      • getState

        public Violation.State getState()
         Output only. State of the violation
         
        .google.cloud.assuredworkloads.v1.Violation.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getState in interface ViolationOrBuilder
        Returns:
        The state.
      • getOrgPolicyConstraint

        public String getOrgPolicyConstraint()
         Output only. Immutable. The org-policy-constraint that was incorrectly changed, which resulted in
         this violation.
         
        string org_policy_constraint = 8 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE];
        Specified by:
        getOrgPolicyConstraint in interface ViolationOrBuilder
        Returns:
        The orgPolicyConstraint.
      • getOrgPolicyConstraintBytes

        public com.google.protobuf.ByteString getOrgPolicyConstraintBytes()
         Output only. Immutable. The org-policy-constraint that was incorrectly changed, which resulted in
         this violation.
         
        string org_policy_constraint = 8 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE];
        Specified by:
        getOrgPolicyConstraintBytes in interface ViolationOrBuilder
        Returns:
        The bytes for orgPolicyConstraint.
      • getAuditLogLink

        public String getAuditLogLink()
         Output only. Immutable. Audit Log Link for violated resource
         Format:
         https://console.cloud.google.com/logs/query;query={logName}{protoPayload.resourceName}{timeRange}{folder}
         
        string audit_log_link = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE];
        Specified by:
        getAuditLogLink in interface ViolationOrBuilder
        Returns:
        The auditLogLink.
      • getAuditLogLinkBytes

        public com.google.protobuf.ByteString getAuditLogLinkBytes()
         Output only. Immutable. Audit Log Link for violated resource
         Format:
         https://console.cloud.google.com/logs/query;query={logName}{protoPayload.resourceName}{timeRange}{folder}
         
        string audit_log_link = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE];
        Specified by:
        getAuditLogLinkBytes in interface ViolationOrBuilder
        Returns:
        The bytes for auditLogLink.
      • getNonCompliantOrgPolicy

        public String getNonCompliantOrgPolicy()
         Output only. Immutable. Name of the OrgPolicy which was modified with non-compliant change and
         resulted 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 = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE];
        Specified by:
        getNonCompliantOrgPolicy in interface ViolationOrBuilder
        Returns:
        The nonCompliantOrgPolicy.
      • getNonCompliantOrgPolicyBytes

        public com.google.protobuf.ByteString getNonCompliantOrgPolicyBytes()
         Output only. Immutable. Name of the OrgPolicy which was modified with non-compliant change and
         resulted 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 = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE];
        Specified by:
        getNonCompliantOrgPolicyBytes in interface ViolationOrBuilder
        Returns:
        The bytes for nonCompliantOrgPolicy.
      • hasRemediation

        public boolean hasRemediation()
         Output only. Compliance violation remediation
         
        .google.cloud.assuredworkloads.v1.Violation.Remediation remediation = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        hasRemediation in interface ViolationOrBuilder
        Returns:
        Whether the remediation field is set.
      • getRemediation

        public Violation.Remediation getRemediation()
         Output only. Compliance violation remediation
         
        .google.cloud.assuredworkloads.v1.Violation.Remediation remediation = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getRemediation in interface ViolationOrBuilder
        Returns:
        The remediation.
      • getAcknowledged

        public boolean getAcknowledged()
         Output only. A boolean that indicates if the violation is acknowledged
         
        bool acknowledged = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getAcknowledged in interface ViolationOrBuilder
        Returns:
        The acknowledged.
      • hasAcknowledgementTime

        public boolean hasAcknowledgementTime()
         Optional. Timestamp when this violation was acknowledged last.
         This will be absent when acknowledged field is marked as false.
         
        optional .google.protobuf.Timestamp acknowledgement_time = 15 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        hasAcknowledgementTime in interface ViolationOrBuilder
        Returns:
        Whether the acknowledgementTime field is set.
      • getAcknowledgementTime

        public com.google.protobuf.Timestamp getAcknowledgementTime()
         Optional. Timestamp when this violation was acknowledged last.
         This will be absent when acknowledged field is marked as false.
         
        optional .google.protobuf.Timestamp acknowledgement_time = 15 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getAcknowledgementTime in interface ViolationOrBuilder
        Returns:
        The acknowledgementTime.
      • getAcknowledgementTimeOrBuilder

        public com.google.protobuf.TimestampOrBuilder getAcknowledgementTimeOrBuilder()
         Optional. Timestamp when this violation was acknowledged last.
         This will be absent when acknowledged field is marked as false.
         
        optional .google.protobuf.Timestamp acknowledgement_time = 15 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getAcknowledgementTimeOrBuilder in interface ViolationOrBuilder
      • getExceptionAuditLogLink

        public String getExceptionAuditLogLink()
         Output only. Immutable. Audit Log link to find business justification provided for violation
         exception. Format:
         https://console.cloud.google.com/logs/query;query={logName}{protoPayload.resourceName}{protoPayload.methodName}{timeRange}{organization}
         
        string exception_audit_log_link = 16 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE];
        Specified by:
        getExceptionAuditLogLink in interface ViolationOrBuilder
        Returns:
        The exceptionAuditLogLink.
      • getExceptionAuditLogLinkBytes

        public com.google.protobuf.ByteString getExceptionAuditLogLinkBytes()
         Output only. Immutable. Audit Log link to find business justification provided for violation
         exception. Format:
         https://console.cloud.google.com/logs/query;query={logName}{protoPayload.resourceName}{protoPayload.methodName}{timeRange}{organization}
         
        string exception_audit_log_link = 16 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE];
        Specified by:
        getExceptionAuditLogLinkBytes in interface ViolationOrBuilder
        Returns:
        The bytes for exceptionAuditLogLink.
      • isInitialized

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

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

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

        public boolean equals​(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 Violation parseFrom​(ByteBuffer data)
                                   throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

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

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

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

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

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

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

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

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

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

        public static Violation getDefaultInstance()
      • parser

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

        public com.google.protobuf.Parser<Violation> 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.GeneratedMessageV3
      • getDefaultInstanceForType

        public Violation getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder