Class SecurityMarks.Builder (2.41.0)

public static final class SecurityMarks.Builder extends GeneratedMessageV3.Builder<SecurityMarks.Builder> implements SecurityMarksOrBuilder

User specified security marks that are attached to the parent Security Command Center resource. Security marks are scoped within a Security Command Center organization -- they can be modified and viewed by all users who have proper permissions on the organization.

Protobuf type google.cloud.securitycenter.v1.SecurityMarks

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public SecurityMarks.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
SecurityMarks.Builder
Overrides

build()

public SecurityMarks build()
Returns
TypeDescription
SecurityMarks

buildPartial()

public SecurityMarks buildPartial()
Returns
TypeDescription
SecurityMarks

clear()

public SecurityMarks.Builder clear()
Returns
TypeDescription
SecurityMarks.Builder
Overrides

clearCanonicalName()

public SecurityMarks.Builder clearCanonicalName()

The canonical name of the marks. Examples: "organizations/{organization_id}/assets/{asset_id}/securityMarks" "folders/{folder_id}/assets/{asset_id}/securityMarks" "projects/{project_number}/assets/{asset_id}/securityMarks" "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks" "folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks" "projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks"

string canonical_name = 3;

Returns
TypeDescription
SecurityMarks.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public SecurityMarks.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
SecurityMarks.Builder
Overrides

clearMarks()

public SecurityMarks.Builder clearMarks()
Returns
TypeDescription
SecurityMarks.Builder

clearName()

public SecurityMarks.Builder clearName()

The relative resource name of the SecurityMarks. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples: "organizations/{organization_id}/assets/{asset_id}/securityMarks" "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks".

string name = 1;

Returns
TypeDescription
SecurityMarks.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public SecurityMarks.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
SecurityMarks.Builder
Overrides

clone()

public SecurityMarks.Builder clone()
Returns
TypeDescription
SecurityMarks.Builder
Overrides

containsMarks(String key)

public boolean containsMarks(String key)

Mutable user specified security marks belonging to the parent resource. Constraints are as follows:

  • Keys and values are treated as case insensitive
  • Keys must be between 1 - 256 characters (inclusive)
  • Keys must be letters, numbers, underscores, or dashes
  • Values have leading and trailing whitespace trimmed, remaining characters must be between 1 - 4096 characters (inclusive)

map<string, string> marks = 2;

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

getCanonicalName()

public String getCanonicalName()

The canonical name of the marks. Examples: "organizations/{organization_id}/assets/{asset_id}/securityMarks" "folders/{folder_id}/assets/{asset_id}/securityMarks" "projects/{project_number}/assets/{asset_id}/securityMarks" "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks" "folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks" "projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks"

string canonical_name = 3;

Returns
TypeDescription
String

The canonicalName.

getCanonicalNameBytes()

public ByteString getCanonicalNameBytes()

The canonical name of the marks. Examples: "organizations/{organization_id}/assets/{asset_id}/securityMarks" "folders/{folder_id}/assets/{asset_id}/securityMarks" "projects/{project_number}/assets/{asset_id}/securityMarks" "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks" "folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks" "projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks"

string canonical_name = 3;

Returns
TypeDescription
ByteString

The bytes for canonicalName.

getDefaultInstanceForType()

public SecurityMarks getDefaultInstanceForType()
Returns
TypeDescription
SecurityMarks

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getMarks() (deprecated)

public Map<String,String> getMarks()

Use #getMarksMap() instead.

Returns
TypeDescription
Map<String,String>

getMarksCount()

public int getMarksCount()

Mutable user specified security marks belonging to the parent resource. Constraints are as follows:

  • Keys and values are treated as case insensitive
  • Keys must be between 1 - 256 characters (inclusive)
  • Keys must be letters, numbers, underscores, or dashes
  • Values have leading and trailing whitespace trimmed, remaining characters must be between 1 - 4096 characters (inclusive)

map<string, string> marks = 2;

Returns
TypeDescription
int

getMarksMap()

public Map<String,String> getMarksMap()

Mutable user specified security marks belonging to the parent resource. Constraints are as follows:

  • Keys and values are treated as case insensitive
  • Keys must be between 1 - 256 characters (inclusive)
  • Keys must be letters, numbers, underscores, or dashes
  • Values have leading and trailing whitespace trimmed, remaining characters must be between 1 - 4096 characters (inclusive)

map<string, string> marks = 2;

Returns
TypeDescription
Map<String,String>

getMarksOrDefault(String key, String defaultValue)

public String getMarksOrDefault(String key, String defaultValue)

Mutable user specified security marks belonging to the parent resource. Constraints are as follows:

  • Keys and values are treated as case insensitive
  • Keys must be between 1 - 256 characters (inclusive)
  • Keys must be letters, numbers, underscores, or dashes
  • Values have leading and trailing whitespace trimmed, remaining characters must be between 1 - 4096 characters (inclusive)

map<string, string> marks = 2;

Parameters
NameDescription
keyString
defaultValueString
Returns
TypeDescription
String

getMarksOrThrow(String key)

public String getMarksOrThrow(String key)

Mutable user specified security marks belonging to the parent resource. Constraints are as follows:

  • Keys and values are treated as case insensitive
  • Keys must be between 1 - 256 characters (inclusive)
  • Keys must be letters, numbers, underscores, or dashes
  • Values have leading and trailing whitespace trimmed, remaining characters must be between 1 - 4096 characters (inclusive)

map<string, string> marks = 2;

Parameter
NameDescription
keyString
Returns
TypeDescription
String

getMutableMarks() (deprecated)

public Map<String,String> getMutableMarks()

Use alternate mutation accessors instead.

Returns
TypeDescription
Map<String,String>

getName()

public String getName()

The relative resource name of the SecurityMarks. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples: "organizations/{organization_id}/assets/{asset_id}/securityMarks" "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks".

string name = 1;

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

The relative resource name of the SecurityMarks. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples: "organizations/{organization_id}/assets/{asset_id}/securityMarks" "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks".

string name = 1;

Returns
TypeDescription
ByteString

The bytes for name.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

internalGetMutableMapField(int number)

protected MapField internalGetMutableMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(SecurityMarks other)

public SecurityMarks.Builder mergeFrom(SecurityMarks other)
Parameter
NameDescription
otherSecurityMarks
Returns
TypeDescription
SecurityMarks.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public SecurityMarks.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
SecurityMarks.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public SecurityMarks.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
SecurityMarks.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final SecurityMarks.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
SecurityMarks.Builder
Overrides

putAllMarks(Map<String,String> values)

public SecurityMarks.Builder putAllMarks(Map<String,String> values)

Mutable user specified security marks belonging to the parent resource. Constraints are as follows:

  • Keys and values are treated as case insensitive
  • Keys must be between 1 - 256 characters (inclusive)
  • Keys must be letters, numbers, underscores, or dashes
  • Values have leading and trailing whitespace trimmed, remaining characters must be between 1 - 4096 characters (inclusive)

map<string, string> marks = 2;

Parameter
NameDescription
valuesMap<String,String>
Returns
TypeDescription
SecurityMarks.Builder

putMarks(String key, String value)

public SecurityMarks.Builder putMarks(String key, String value)

Mutable user specified security marks belonging to the parent resource. Constraints are as follows:

  • Keys and values are treated as case insensitive
  • Keys must be between 1 - 256 characters (inclusive)
  • Keys must be letters, numbers, underscores, or dashes
  • Values have leading and trailing whitespace trimmed, remaining characters must be between 1 - 4096 characters (inclusive)

map<string, string> marks = 2;

Parameters
NameDescription
keyString
valueString
Returns
TypeDescription
SecurityMarks.Builder

removeMarks(String key)

public SecurityMarks.Builder removeMarks(String key)

Mutable user specified security marks belonging to the parent resource. Constraints are as follows:

  • Keys and values are treated as case insensitive
  • Keys must be between 1 - 256 characters (inclusive)
  • Keys must be letters, numbers, underscores, or dashes
  • Values have leading and trailing whitespace trimmed, remaining characters must be between 1 - 4096 characters (inclusive)

map<string, string> marks = 2;

Parameter
NameDescription
keyString
Returns
TypeDescription
SecurityMarks.Builder

setCanonicalName(String value)

public SecurityMarks.Builder setCanonicalName(String value)

The canonical name of the marks. Examples: "organizations/{organization_id}/assets/{asset_id}/securityMarks" "folders/{folder_id}/assets/{asset_id}/securityMarks" "projects/{project_number}/assets/{asset_id}/securityMarks" "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks" "folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks" "projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks"

string canonical_name = 3;

Parameter
NameDescription
valueString

The canonicalName to set.

Returns
TypeDescription
SecurityMarks.Builder

This builder for chaining.

setCanonicalNameBytes(ByteString value)

public SecurityMarks.Builder setCanonicalNameBytes(ByteString value)

The canonical name of the marks. Examples: "organizations/{organization_id}/assets/{asset_id}/securityMarks" "folders/{folder_id}/assets/{asset_id}/securityMarks" "projects/{project_number}/assets/{asset_id}/securityMarks" "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks" "folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks" "projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks"

string canonical_name = 3;

Parameter
NameDescription
valueByteString

The bytes for canonicalName to set.

Returns
TypeDescription
SecurityMarks.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public SecurityMarks.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
SecurityMarks.Builder
Overrides

setName(String value)

public SecurityMarks.Builder setName(String value)

The relative resource name of the SecurityMarks. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples: "organizations/{organization_id}/assets/{asset_id}/securityMarks" "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks".

string name = 1;

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
SecurityMarks.Builder

This builder for chaining.

setNameBytes(ByteString value)

public SecurityMarks.Builder setNameBytes(ByteString value)

The relative resource name of the SecurityMarks. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples: "organizations/{organization_id}/assets/{asset_id}/securityMarks" "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks".

string name = 1;

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
SecurityMarks.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public SecurityMarks.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
SecurityMarks.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final SecurityMarks.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
SecurityMarks.Builder
Overrides