Class SecurityMarks.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<SecurityMarks.Builder>
com.google.cloud.securitycenter.v1p1beta1.SecurityMarks.Builder
All Implemented Interfaces:
SecurityMarksOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
SecurityMarks

public static final class SecurityMarks.Builder extends com.google.protobuf.GeneratedMessage.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.v1p1beta1.SecurityMarks
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<SecurityMarks.Builder>
    • internalGetMutableMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
      Overrides:
      internalGetMutableMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<SecurityMarks.Builder>
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<SecurityMarks.Builder>
    • clear

      public SecurityMarks.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<SecurityMarks.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<SecurityMarks.Builder>
    • getDefaultInstanceForType

      public SecurityMarks getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public SecurityMarks build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public SecurityMarks buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public SecurityMarks.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<SecurityMarks.Builder>
    • mergeFrom

      public SecurityMarks.Builder mergeFrom(SecurityMarks other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<SecurityMarks.Builder>
    • mergeFrom

      public SecurityMarks.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<SecurityMarks.Builder>
      Throws:
      IOException
    • 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;
      Specified by:
      getName in interface SecurityMarksOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.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;
      Specified by:
      getNameBytes in interface SecurityMarksOrBuilder
      Returns:
      The bytes for name.
    • setName

      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;
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • 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:
      This builder for chaining.
    • setNameBytes

      public SecurityMarks.Builder setNameBytes(com.google.protobuf.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;
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • getMarksCount

      public int getMarksCount()
      Description copied from interface: SecurityMarksOrBuilder
       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;
      Specified by:
      getMarksCount in interface SecurityMarksOrBuilder
    • containsMarks

      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;
      Specified by:
      containsMarks in interface SecurityMarksOrBuilder
    • getMarks

      @Deprecated public Map<String,String> getMarks()
      Deprecated.
      Use getMarksMap() instead.
      Specified by:
      getMarks in interface SecurityMarksOrBuilder
    • 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;
      Specified by:
      getMarksMap in interface SecurityMarksOrBuilder
    • getMarksOrDefault

      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;
      Specified by:
      getMarksOrDefault in interface SecurityMarksOrBuilder
    • getMarksOrThrow

      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;
      Specified by:
      getMarksOrThrow in interface SecurityMarksOrBuilder
    • clearMarks

      public SecurityMarks.Builder clearMarks()
    • removeMarks

      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;
    • getMutableMarks

      @Deprecated public Map<String,String> getMutableMarks()
      Deprecated.
      Use alternate mutation accessors instead.
    • putMarks

      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;
    • putAllMarks

      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;
    • 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;
      Specified by:
      getCanonicalName in interface SecurityMarksOrBuilder
      Returns:
      The canonicalName.
    • getCanonicalNameBytes

      public com.google.protobuf.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;
      Specified by:
      getCanonicalNameBytes in interface SecurityMarksOrBuilder
      Returns:
      The bytes for canonicalName.
    • setCanonicalName

      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;
      Parameters:
      value - The canonicalName to set.
      Returns:
      This builder for chaining.
    • 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:
      This builder for chaining.
    • setCanonicalNameBytes

      public SecurityMarks.Builder setCanonicalNameBytes(com.google.protobuf.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;
      Parameters:
      value - The bytes for canonicalName to set.
      Returns:
      This builder for chaining.