Class SimulatedFinding (0.21.0)

public final class SimulatedFinding extends GeneratedMessageV3 implements SimulatedFindingOrBuilder

A subset of the fields of the Security Center Finding proto. The minimum set of fields needed to represent a simulated finding from a SHA custom module.

Protobuf type google.cloud.securitycentermanagement.v1.SimulatedFinding

Static Fields

CATEGORY_FIELD_NUMBER

public static final int CATEGORY_FIELD_NUMBER
Field Value
Type Description
int

EVENT_TIME_FIELD_NUMBER

public static final int EVENT_TIME_FIELD_NUMBER
Field Value
Type Description
int

FINDING_CLASS_FIELD_NUMBER

public static final int FINDING_CLASS_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

PARENT_FIELD_NUMBER

public static final int PARENT_FIELD_NUMBER
Field Value
Type Description
int

RESOURCE_NAME_FIELD_NUMBER

public static final int RESOURCE_NAME_FIELD_NUMBER
Field Value
Type Description
int

SEVERITY_FIELD_NUMBER

public static final int SEVERITY_FIELD_NUMBER
Field Value
Type Description
int

SOURCE_PROPERTIES_FIELD_NUMBER

public static final int SOURCE_PROPERTIES_FIELD_NUMBER
Field Value
Type Description
int

STATE_FIELD_NUMBER

public static final int STATE_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static SimulatedFinding getDefaultInstance()
Returns
Type Description
SimulatedFinding

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static SimulatedFinding.Builder newBuilder()
Returns
Type Description
SimulatedFinding.Builder

newBuilder(SimulatedFinding prototype)

public static SimulatedFinding.Builder newBuilder(SimulatedFinding prototype)
Parameter
Name Description
prototype SimulatedFinding
Returns
Type Description
SimulatedFinding.Builder

parseDelimitedFrom(InputStream input)

public static SimulatedFinding parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
SimulatedFinding
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static SimulatedFinding parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
SimulatedFinding
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static SimulatedFinding parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
SimulatedFinding
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static SimulatedFinding parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
SimulatedFinding
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static SimulatedFinding parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
SimulatedFinding
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static SimulatedFinding parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
SimulatedFinding
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static SimulatedFinding parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
SimulatedFinding
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static SimulatedFinding parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
SimulatedFinding
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static SimulatedFinding parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
SimulatedFinding
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static SimulatedFinding parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
SimulatedFinding
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static SimulatedFinding parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
SimulatedFinding
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static SimulatedFinding parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
SimulatedFinding
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<SimulatedFinding> parser()
Returns
Type Description
Parser<SimulatedFinding>

Methods

containsSourceProperties(String key)

public boolean containsSourceProperties(String key)

Source specific properties. These properties are managed by the source that writes the finding. The key names in the source_properties map must be between 1 and 255 characters, and must start with a letter and contain alphanumeric characters or underscores only.

map<string, .google.protobuf.Value> source_properties = 6;

Parameter
Name Description
key String
Returns
Type Description
boolean

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getCategory()

public String getCategory()

The additional taxonomy group within findings from a given source. This field is immutable after creation time. Example: "XSS_FLASH_INJECTION"

string category = 4;

Returns
Type Description
String

The category.

getCategoryBytes()

public ByteString getCategoryBytes()

The additional taxonomy group within findings from a given source. This field is immutable after creation time. Example: "XSS_FLASH_INJECTION"

string category = 4;

Returns
Type Description
ByteString

The bytes for category.

getDefaultInstanceForType()

public SimulatedFinding getDefaultInstanceForType()
Returns
Type Description
SimulatedFinding

getEventTime()

public Timestamp getEventTime()

The time the finding was first detected. If an existing finding is updated, then this is the time the update occurred. For example, if the finding represents an open firewall, this property captures the time the detector believes the firewall became open. The accuracy is determined by the detector. If the finding is later resolved, then this time reflects when the finding was resolved. This must not be set to a value greater than the current timestamp.

.google.protobuf.Timestamp event_time = 7;

Returns
Type Description
Timestamp

The eventTime.

getEventTimeOrBuilder()

public TimestampOrBuilder getEventTimeOrBuilder()

The time the finding was first detected. If an existing finding is updated, then this is the time the update occurred. For example, if the finding represents an open firewall, this property captures the time the detector believes the firewall became open. The accuracy is determined by the detector. If the finding is later resolved, then this time reflects when the finding was resolved. This must not be set to a value greater than the current timestamp.

.google.protobuf.Timestamp event_time = 7;

Returns
Type Description
TimestampOrBuilder

getFindingClass()

public SimulatedFinding.FindingClass getFindingClass()

The class of the finding.

.google.cloud.securitycentermanagement.v1.SimulatedFinding.FindingClass finding_class = 9;

Returns
Type Description
SimulatedFinding.FindingClass

The findingClass.

getFindingClassValue()

public int getFindingClassValue()

The class of the finding.

.google.cloud.securitycentermanagement.v1.SimulatedFinding.FindingClass finding_class = 9;

Returns
Type Description
int

The enum numeric value on the wire for findingClass.

getName()

public String getName()

Identifier. The relative resource name of the finding. Example: organizations/{organization_id}/sources/{source_id}/findings/{finding_id}, folders/{folder_id}/sources/{source_id}/findings/{finding_id}, projects/{project_id}/sources/{source_id}/findings/{finding_id}.

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Identifier. The relative resource name of the finding. Example: organizations/{organization_id}/sources/{source_id}/findings/{finding_id}, folders/{folder_id}/sources/{source_id}/findings/{finding_id}, projects/{project_id}/sources/{source_id}/findings/{finding_id}.

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
ByteString

The bytes for name.

getParent()

public String getParent()

The relative resource name of the source the finding belongs to. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name This field is immutable after creation time. For example: organizations/{organization_id}/sources/{source_id}

string parent = 2;

Returns
Type Description
String

The parent.

getParentBytes()

public ByteString getParentBytes()

The relative resource name of the source the finding belongs to. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name This field is immutable after creation time. For example: organizations/{organization_id}/sources/{source_id}

string parent = 2;

Returns
Type Description
ByteString

The bytes for parent.

getParserForType()

public Parser<SimulatedFinding> getParserForType()
Returns
Type Description
Parser<SimulatedFinding>
Overrides

getResourceName()

public String getResourceName()

For findings on Google Cloud resources, the full resource name of the Google Cloud resource this finding is for. See: https://cloud.google.com/apis/design/resource_names#full_resource_name When the finding is for a non-Google Cloud resource, the resourceName can be a customer or partner defined string. This field is immutable after creation time.

string resource_name = 3;

Returns
Type Description
String

The resourceName.

getResourceNameBytes()

public ByteString getResourceNameBytes()

For findings on Google Cloud resources, the full resource name of the Google Cloud resource this finding is for. See: https://cloud.google.com/apis/design/resource_names#full_resource_name When the finding is for a non-Google Cloud resource, the resourceName can be a customer or partner defined string. This field is immutable after creation time.

string resource_name = 3;

Returns
Type Description
ByteString

The bytes for resourceName.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getSeverity()

public SimulatedFinding.Severity getSeverity()

The severity of the finding. This field is managed by the source that writes the finding.

.google.cloud.securitycentermanagement.v1.SimulatedFinding.Severity severity = 8;

Returns
Type Description
SimulatedFinding.Severity

The severity.

getSeverityValue()

public int getSeverityValue()

The severity of the finding. This field is managed by the source that writes the finding.

.google.cloud.securitycentermanagement.v1.SimulatedFinding.Severity severity = 8;

Returns
Type Description
int

The enum numeric value on the wire for severity.

getSourceProperties() (deprecated)

public Map<String,Value> getSourceProperties()
Returns
Type Description
Map<String,Value>

getSourcePropertiesCount()

public int getSourcePropertiesCount()

Source specific properties. These properties are managed by the source that writes the finding. The key names in the source_properties map must be between 1 and 255 characters, and must start with a letter and contain alphanumeric characters or underscores only.

map<string, .google.protobuf.Value> source_properties = 6;

Returns
Type Description
int

getSourcePropertiesMap()

public Map<String,Value> getSourcePropertiesMap()

Source specific properties. These properties are managed by the source that writes the finding. The key names in the source_properties map must be between 1 and 255 characters, and must start with a letter and contain alphanumeric characters or underscores only.

map<string, .google.protobuf.Value> source_properties = 6;

Returns
Type Description
Map<String,Value>

getSourcePropertiesOrDefault(String key, Value defaultValue)

public Value getSourcePropertiesOrDefault(String key, Value defaultValue)

Source specific properties. These properties are managed by the source that writes the finding. The key names in the source_properties map must be between 1 and 255 characters, and must start with a letter and contain alphanumeric characters or underscores only.

map<string, .google.protobuf.Value> source_properties = 6;

Parameters
Name Description
key String
defaultValue Value
Returns
Type Description
Value

getSourcePropertiesOrThrow(String key)

public Value getSourcePropertiesOrThrow(String key)

Source specific properties. These properties are managed by the source that writes the finding. The key names in the source_properties map must be between 1 and 255 characters, and must start with a letter and contain alphanumeric characters or underscores only.

map<string, .google.protobuf.Value> source_properties = 6;

Parameter
Name Description
key String
Returns
Type Description
Value

getState()

public SimulatedFinding.State getState()

Output only. The state of the finding.

.google.cloud.securitycentermanagement.v1.SimulatedFinding.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
SimulatedFinding.State

The state.

getStateValue()

public int getStateValue()

Output only. The state of the finding.

.google.cloud.securitycentermanagement.v1.SimulatedFinding.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The enum numeric value on the wire for state.

hasEventTime()

public boolean hasEventTime()

The time the finding was first detected. If an existing finding is updated, then this is the time the update occurred. For example, if the finding represents an open firewall, this property captures the time the detector believes the firewall became open. The accuracy is determined by the detector. If the finding is later resolved, then this time reflects when the finding was resolved. This must not be set to a value greater than the current timestamp.

.google.protobuf.Timestamp event_time = 7;

Returns
Type Description
boolean

Whether the eventTime field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public SimulatedFinding.Builder newBuilderForType()
Returns
Type Description
SimulatedFinding.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected SimulatedFinding.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
SimulatedFinding.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public SimulatedFinding.Builder toBuilder()
Returns
Type Description
SimulatedFinding.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException