Class Source.Builder

  • All Implemented Interfaces:
    SourceOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    Source

    public static final class Source.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<Source.Builder>
    implements SourceOrBuilder
     Security Command Center finding source. A finding source
     is an entity or a mechanism that can produce a finding. A source is like a
     container of findings that come from the same scanner, logger, monitor, etc.
     
    Protobuf type google.cloud.securitycenter.v1p1beta1.Source
    • Method Detail

      • getDescriptor

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

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

        public Source.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<Source.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<Source.Builder>
      • getDefaultInstanceForType

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

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

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

        public Source.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<Source.Builder>
      • setField

        public Source.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<Source.Builder>
      • clearField

        public Source.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<Source.Builder>
      • clearOneof

        public Source.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<Source.Builder>
      • setRepeatedField

        public Source.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<Source.Builder>
      • addRepeatedField

        public Source.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<Source.Builder>
      • mergeFrom

        public Source.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<Source.Builder>
      • isInitialized

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

        public Source.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<Source.Builder>
        Throws:
        IOException
      • getName

        public String getName()
         The relative resource name of this source. See:
         https://cloud.google.com/apis/design/resource_names#relative_resource_name
         Example:
         "organizations/{organization_id}/sources/{source_id}"
         
        string name = 1;
        Specified by:
        getName in interface SourceOrBuilder
        Returns:
        The name.
      • getNameBytes

        public com.google.protobuf.ByteString getNameBytes()
         The relative resource name of this source. See:
         https://cloud.google.com/apis/design/resource_names#relative_resource_name
         Example:
         "organizations/{organization_id}/sources/{source_id}"
         
        string name = 1;
        Specified by:
        getNameBytes in interface SourceOrBuilder
        Returns:
        The bytes for name.
      • setName

        public Source.Builder setName​(String value)
         The relative resource name of this source. See:
         https://cloud.google.com/apis/design/resource_names#relative_resource_name
         Example:
         "organizations/{organization_id}/sources/{source_id}"
         
        string name = 1;
        Parameters:
        value - The name to set.
        Returns:
        This builder for chaining.
      • clearName

        public Source.Builder clearName()
         The relative resource name of this source. See:
         https://cloud.google.com/apis/design/resource_names#relative_resource_name
         Example:
         "organizations/{organization_id}/sources/{source_id}"
         
        string name = 1;
        Returns:
        This builder for chaining.
      • setNameBytes

        public Source.Builder setNameBytes​(com.google.protobuf.ByteString value)
         The relative resource name of this source. See:
         https://cloud.google.com/apis/design/resource_names#relative_resource_name
         Example:
         "organizations/{organization_id}/sources/{source_id}"
         
        string name = 1;
        Parameters:
        value - The bytes for name to set.
        Returns:
        This builder for chaining.
      • getDisplayName

        public String getDisplayName()
         The source's display name.
         A source's display name must be unique amongst its siblings, for example,
         two sources with the same parent can't share the same display name.
         The display name must have a length between 1 and 64 characters
         (inclusive).
         
        string display_name = 2;
        Specified by:
        getDisplayName in interface SourceOrBuilder
        Returns:
        The displayName.
      • getDisplayNameBytes

        public com.google.protobuf.ByteString getDisplayNameBytes()
         The source's display name.
         A source's display name must be unique amongst its siblings, for example,
         two sources with the same parent can't share the same display name.
         The display name must have a length between 1 and 64 characters
         (inclusive).
         
        string display_name = 2;
        Specified by:
        getDisplayNameBytes in interface SourceOrBuilder
        Returns:
        The bytes for displayName.
      • setDisplayName

        public Source.Builder setDisplayName​(String value)
         The source's display name.
         A source's display name must be unique amongst its siblings, for example,
         two sources with the same parent can't share the same display name.
         The display name must have a length between 1 and 64 characters
         (inclusive).
         
        string display_name = 2;
        Parameters:
        value - The displayName to set.
        Returns:
        This builder for chaining.
      • clearDisplayName

        public Source.Builder clearDisplayName()
         The source's display name.
         A source's display name must be unique amongst its siblings, for example,
         two sources with the same parent can't share the same display name.
         The display name must have a length between 1 and 64 characters
         (inclusive).
         
        string display_name = 2;
        Returns:
        This builder for chaining.
      • setDisplayNameBytes

        public Source.Builder setDisplayNameBytes​(com.google.protobuf.ByteString value)
         The source's display name.
         A source's display name must be unique amongst its siblings, for example,
         two sources with the same parent can't share the same display name.
         The display name must have a length between 1 and 64 characters
         (inclusive).
         
        string display_name = 2;
        Parameters:
        value - The bytes for displayName to set.
        Returns:
        This builder for chaining.
      • getDescription

        public String getDescription()
         The description of the source (max of 1024 characters).
         Example:
         "Web Security Scanner is a web security scanner for common
         vulnerabilities in App Engine applications. It can automatically
         scan and detect four common vulnerabilities, including cross-site-scripting
         (XSS), Flash injection, mixed content (HTTP in HTTPS), and
         outdated/insecure libraries."
         
        string description = 3;
        Specified by:
        getDescription in interface SourceOrBuilder
        Returns:
        The description.
      • getDescriptionBytes

        public com.google.protobuf.ByteString getDescriptionBytes()
         The description of the source (max of 1024 characters).
         Example:
         "Web Security Scanner is a web security scanner for common
         vulnerabilities in App Engine applications. It can automatically
         scan and detect four common vulnerabilities, including cross-site-scripting
         (XSS), Flash injection, mixed content (HTTP in HTTPS), and
         outdated/insecure libraries."
         
        string description = 3;
        Specified by:
        getDescriptionBytes in interface SourceOrBuilder
        Returns:
        The bytes for description.
      • setDescription

        public Source.Builder setDescription​(String value)
         The description of the source (max of 1024 characters).
         Example:
         "Web Security Scanner is a web security scanner for common
         vulnerabilities in App Engine applications. It can automatically
         scan and detect four common vulnerabilities, including cross-site-scripting
         (XSS), Flash injection, mixed content (HTTP in HTTPS), and
         outdated/insecure libraries."
         
        string description = 3;
        Parameters:
        value - The description to set.
        Returns:
        This builder for chaining.
      • clearDescription

        public Source.Builder clearDescription()
         The description of the source (max of 1024 characters).
         Example:
         "Web Security Scanner is a web security scanner for common
         vulnerabilities in App Engine applications. It can automatically
         scan and detect four common vulnerabilities, including cross-site-scripting
         (XSS), Flash injection, mixed content (HTTP in HTTPS), and
         outdated/insecure libraries."
         
        string description = 3;
        Returns:
        This builder for chaining.
      • setDescriptionBytes

        public Source.Builder setDescriptionBytes​(com.google.protobuf.ByteString value)
         The description of the source (max of 1024 characters).
         Example:
         "Web Security Scanner is a web security scanner for common
         vulnerabilities in App Engine applications. It can automatically
         scan and detect four common vulnerabilities, including cross-site-scripting
         (XSS), Flash injection, mixed content (HTTP in HTTPS), and
         outdated/insecure libraries."
         
        string description = 3;
        Parameters:
        value - The bytes for description to set.
        Returns:
        This builder for chaining.
      • getCanonicalName

        public String getCanonicalName()
         The canonical name of the finding. It's either
         "organizations/{organization_id}/sources/{source_id}",
         "folders/{folder_id}/sources/{source_id}" or
         "projects/{project_number}/sources/{source_id}",
         depending on the closest CRM ancestor of the resource associated with the
         finding.
         
        string canonical_name = 14;
        Specified by:
        getCanonicalName in interface SourceOrBuilder
        Returns:
        The canonicalName.
      • getCanonicalNameBytes

        public com.google.protobuf.ByteString getCanonicalNameBytes()
         The canonical name of the finding. It's either
         "organizations/{organization_id}/sources/{source_id}",
         "folders/{folder_id}/sources/{source_id}" or
         "projects/{project_number}/sources/{source_id}",
         depending on the closest CRM ancestor of the resource associated with the
         finding.
         
        string canonical_name = 14;
        Specified by:
        getCanonicalNameBytes in interface SourceOrBuilder
        Returns:
        The bytes for canonicalName.
      • setCanonicalName

        public Source.Builder setCanonicalName​(String value)
         The canonical name of the finding. It's either
         "organizations/{organization_id}/sources/{source_id}",
         "folders/{folder_id}/sources/{source_id}" or
         "projects/{project_number}/sources/{source_id}",
         depending on the closest CRM ancestor of the resource associated with the
         finding.
         
        string canonical_name = 14;
        Parameters:
        value - The canonicalName to set.
        Returns:
        This builder for chaining.
      • clearCanonicalName

        public Source.Builder clearCanonicalName()
         The canonical name of the finding. It's either
         "organizations/{organization_id}/sources/{source_id}",
         "folders/{folder_id}/sources/{source_id}" or
         "projects/{project_number}/sources/{source_id}",
         depending on the closest CRM ancestor of the resource associated with the
         finding.
         
        string canonical_name = 14;
        Returns:
        This builder for chaining.
      • setCanonicalNameBytes

        public Source.Builder setCanonicalNameBytes​(com.google.protobuf.ByteString value)
         The canonical name of the finding. It's either
         "organizations/{organization_id}/sources/{source_id}",
         "folders/{folder_id}/sources/{source_id}" or
         "projects/{project_number}/sources/{source_id}",
         depending on the closest CRM ancestor of the resource associated with the
         finding.
         
        string canonical_name = 14;
        Parameters:
        value - The bytes for canonicalName to set.
        Returns:
        This builder for chaining.
      • setUnknownFields

        public final Source.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<Source.Builder>
      • mergeUnknownFields

        public final Source.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<Source.Builder>