Class Violation (2.4.0)

public final class Violation extends GeneratedMessageV3 implements ViolationOrBuilder

Workload monitoring Violation.

Protobuf type google.cloud.assuredworkloads.v1.Violation

Implements

ViolationOrBuilder

Static Fields

ACKNOWLEDGED_FIELD_NUMBER

public static final int ACKNOWLEDGED_FIELD_NUMBER
Field Value
TypeDescription
int

ACKNOWLEDGEMENT_TIME_FIELD_NUMBER

public static final int ACKNOWLEDGEMENT_TIME_FIELD_NUMBER
Field Value
TypeDescription
int
public static final int AUDIT_LOG_LINK_FIELD_NUMBER
Field Value
TypeDescription
int

BEGIN_TIME_FIELD_NUMBER

public static final int BEGIN_TIME_FIELD_NUMBER
Field Value
TypeDescription
int

CATEGORY_FIELD_NUMBER

public static final int CATEGORY_FIELD_NUMBER
Field Value
TypeDescription
int

DESCRIPTION_FIELD_NUMBER

public static final int DESCRIPTION_FIELD_NUMBER
Field Value
TypeDescription
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
TypeDescription
int

NON_COMPLIANT_ORG_POLICY_FIELD_NUMBER

public static final int NON_COMPLIANT_ORG_POLICY_FIELD_NUMBER
Field Value
TypeDescription
int

ORG_POLICY_CONSTRAINT_FIELD_NUMBER

public static final int ORG_POLICY_CONSTRAINT_FIELD_NUMBER
Field Value
TypeDescription
int

REMEDIATION_FIELD_NUMBER

public static final int REMEDIATION_FIELD_NUMBER
Field Value
TypeDescription
int

RESOLVE_TIME_FIELD_NUMBER

public static final int RESOLVE_TIME_FIELD_NUMBER
Field Value
TypeDescription
int

STATE_FIELD_NUMBER

public static final int STATE_FIELD_NUMBER
Field Value
TypeDescription
int

UPDATE_TIME_FIELD_NUMBER

public static final int UPDATE_TIME_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static Violation getDefaultInstance()
Returns
TypeDescription
Violation

getDescriptor()

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

newBuilder()

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

newBuilder(Violation prototype)

public static Violation.Builder newBuilder(Violation prototype)
Parameter
NameDescription
prototypeViolation
Returns
TypeDescription
Violation.Builder

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

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

getAcknowledged()

public boolean getAcknowledged()

Output only. A boolean that indicates if the violation is acknowledged

bool acknowledged = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
boolean

The acknowledged.

getAcknowledgementTime()

public 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];

Returns
TypeDescription
Timestamp

The acknowledgementTime.

getAcknowledgementTimeOrBuilder()

public 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];

Returns
TypeDescription
TimestampOrBuilder
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];

Returns
TypeDescription
String

The auditLogLink.

getAuditLogLinkBytes()

public 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];

Returns
TypeDescription
ByteString

The bytes for auditLogLink.

getBeginTime()

public Timestamp getBeginTime()

Output only. Time of the event which triggered the Violation.

.google.protobuf.Timestamp begin_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Timestamp

The beginTime.

getBeginTimeOrBuilder()

public TimestampOrBuilder getBeginTimeOrBuilder()

Output only. Time of the event which triggered the Violation.

.google.protobuf.Timestamp begin_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
TimestampOrBuilder

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];

Returns
TypeDescription
String

The category.

getCategoryBytes()

public 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];

Returns
TypeDescription
ByteString

The bytes for category.

getDefaultInstanceForType()

public Violation getDefaultInstanceForType()
Returns
TypeDescription
Violation

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];

Returns
TypeDescription
String

The description.

getDescriptionBytes()

public 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];

Returns
TypeDescription
ByteString

The bytes for description.

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];

Returns
TypeDescription
String

The name.

getNameBytes()

public 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];

Returns
TypeDescription
ByteString

The bytes for name.

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];

Returns
TypeDescription
String

The nonCompliantOrgPolicy.

getNonCompliantOrgPolicyBytes()

public 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];

Returns
TypeDescription
ByteString

The bytes for nonCompliantOrgPolicy.

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];

Returns
TypeDescription
String

The orgPolicyConstraint.

getOrgPolicyConstraintBytes()

public 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];

Returns
TypeDescription
ByteString

The bytes for orgPolicyConstraint.

getParserForType()

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

getRemediation()

public Violation.Remediation getRemediation()

Output only. Compliance violation remediation

.google.cloud.assuredworkloads.v1.Violation.Remediation remediation = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Violation.Remediation

The remediation.

getRemediationOrBuilder()

public Violation.RemediationOrBuilder getRemediationOrBuilder()

Output only. Compliance violation remediation

.google.cloud.assuredworkloads.v1.Violation.Remediation remediation = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Violation.RemediationOrBuilder

getResolveTime()

public 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];

Returns
TypeDescription
Timestamp

The resolveTime.

getResolveTimeOrBuilder()

public 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];

Returns
TypeDescription
TimestampOrBuilder

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

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];

Returns
TypeDescription
Violation.State

The state.

getStateValue()

public int getStateValue()

Output only. State of the violation

.google.cloud.assuredworkloads.v1.Violation.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
int

The enum numeric value on the wire for state.

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

getUpdateTime()

public 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];

Returns
TypeDescription
Timestamp

The updateTime.

getUpdateTimeOrBuilder()

public 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];

Returns
TypeDescription
TimestampOrBuilder

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];

Returns
TypeDescription
boolean

Whether the acknowledgementTime field is set.

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];

Returns
TypeDescription
boolean

Whether the beginTime field is set.

hasRemediation()

public boolean hasRemediation()

Output only. Compliance violation remediation

.google.cloud.assuredworkloads.v1.Violation.Remediation remediation = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
boolean

Whether the remediation field is set.

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];

Returns
TypeDescription
boolean

Whether the resolveTime field is set.

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];

Returns
TypeDescription
boolean

Whether the updateTime 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 Violation.Builder newBuilderForType()
Returns
TypeDescription
Violation.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

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

writeTo(CodedOutputStream output)

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