Class 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.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.v1p1beta1.SecurityMarks
    • Method Detail

      • getDescriptor

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

        protected com.google.protobuf.MapField internalGetMapField​(int number)
        Overrides:
        internalGetMapField in class com.google.protobuf.GeneratedMessageV3.Builder<SecurityMarks.Builder>
      • internalGetMutableMapField

        protected com.google.protobuf.MapField internalGetMutableMapField​(int number)
        Overrides:
        internalGetMutableMapField in class com.google.protobuf.GeneratedMessageV3.Builder<SecurityMarks.Builder>
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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
      • clone

        public SecurityMarks.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<SecurityMarks.Builder>
      • setField

        public SecurityMarks.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                              Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<SecurityMarks.Builder>
      • clearField

        public SecurityMarks.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<SecurityMarks.Builder>
      • clearOneof

        public SecurityMarks.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<SecurityMarks.Builder>
      • setRepeatedField

        public SecurityMarks.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                      int index,
                                                      Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<SecurityMarks.Builder>
      • addRepeatedField

        public SecurityMarks.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                      Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<SecurityMarks.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>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.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
      • 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
      • 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.
      • setUnknownFields

        public final SecurityMarks.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<SecurityMarks.Builder>
      • mergeUnknownFields

        public final SecurityMarks.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<SecurityMarks.Builder>