Class SecurityMarks.Builder (2.61.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
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public SecurityMarks.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
SecurityMarks.Builder
Overrides

build()

public SecurityMarks build()
Returns
Type Description
SecurityMarks

buildPartial()

public SecurityMarks buildPartial()
Returns
Type Description
SecurityMarks

clear()

public SecurityMarks.Builder clear()
Returns
Type Description
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
Type Description
SecurityMarks.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public SecurityMarks.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
SecurityMarks.Builder
Overrides

clearMarks()

public SecurityMarks.Builder clearMarks()
Returns
Type Description
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
Type Description
SecurityMarks.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public SecurityMarks.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
SecurityMarks.Builder
Overrides

clone()

public SecurityMarks.Builder clone()
Returns
Type Description
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
Name Description
key String
Returns
Type Description
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
Type Description
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
Type Description
ByteString

The bytes for canonicalName.

getDefaultInstanceForType()

public SecurityMarks getDefaultInstanceForType()
Returns
Type Description
SecurityMarks

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getMarks() (deprecated)

public Map<String,String> getMarks()

Use #getMarksMap() instead.

Returns
Type Description
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
Type Description
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
Type Description
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
Name Description
key String
defaultValue String
Returns
Type Description
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
Name Description
key String
Returns
Type Description
String

getMutableMarks() (deprecated)

public Map<String,String> getMutableMarks()

Use alternate mutation accessors instead.

Returns
Type Description
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
Type Description
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
Type Description
ByteString

The bytes for name.

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.Builder.internalGetMapFieldReflection(int)

internalGetMutableMapFieldReflection(int number)

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(SecurityMarks other)

public SecurityMarks.Builder mergeFrom(SecurityMarks other)
Parameter
Name Description
other SecurityMarks
Returns
Type Description
SecurityMarks.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public SecurityMarks.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
SecurityMarks.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public SecurityMarks.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
SecurityMarks.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final SecurityMarks.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
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
Name Description
values Map<String,String>
Returns
Type Description
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
Name Description
key String
value String
Returns
Type Description
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
Name Description
key String
Returns
Type Description
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
Name Description
value String

The canonicalName to set.

Returns
Type Description
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
Name Description
value ByteString

The bytes for canonicalName to set.

Returns
Type Description
SecurityMarks.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public SecurityMarks.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
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
Name Description
value String

The name to set.

Returns
Type Description
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
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
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
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
SecurityMarks.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final SecurityMarks.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
SecurityMarks.Builder
Overrides