Package io.grafeas.v1

Class VulnerabilityOccurrence.Builder

    • 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<VulnerabilityOccurrence.Builder>
      • clear

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

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

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

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

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

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

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

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

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

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

        public VulnerabilityOccurrence.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<VulnerabilityOccurrence.Builder>
        Throws:
        IOException
      • getType

        public String getType()
         The type of package; whether native or non native (e.g., ruby gems, node.js
         packages, etc.).
         
        string type = 1;
        Specified by:
        getType in interface VulnerabilityOccurrenceOrBuilder
        Returns:
        The type.
      • getTypeBytes

        public com.google.protobuf.ByteString getTypeBytes()
         The type of package; whether native or non native (e.g., ruby gems, node.js
         packages, etc.).
         
        string type = 1;
        Specified by:
        getTypeBytes in interface VulnerabilityOccurrenceOrBuilder
        Returns:
        The bytes for type.
      • setType

        public VulnerabilityOccurrence.Builder setType​(String value)
         The type of package; whether native or non native (e.g., ruby gems, node.js
         packages, etc.).
         
        string type = 1;
        Parameters:
        value - The type to set.
        Returns:
        This builder for chaining.
      • clearType

        public VulnerabilityOccurrence.Builder clearType()
         The type of package; whether native or non native (e.g., ruby gems, node.js
         packages, etc.).
         
        string type = 1;
        Returns:
        This builder for chaining.
      • setTypeBytes

        public VulnerabilityOccurrence.Builder setTypeBytes​(com.google.protobuf.ByteString value)
         The type of package; whether native or non native (e.g., ruby gems, node.js
         packages, etc.).
         
        string type = 1;
        Parameters:
        value - The bytes for type to set.
        Returns:
        This builder for chaining.
      • getSeverityValue

        public int getSeverityValue()
         Output only. The note provider assigned severity of this vulnerability.
         
        .grafeas.v1.Severity severity = 2;
        Specified by:
        getSeverityValue in interface VulnerabilityOccurrenceOrBuilder
        Returns:
        The enum numeric value on the wire for severity.
      • setSeverityValue

        public VulnerabilityOccurrence.Builder setSeverityValue​(int value)
         Output only. The note provider assigned severity of this vulnerability.
         
        .grafeas.v1.Severity severity = 2;
        Parameters:
        value - The enum numeric value on the wire for severity to set.
        Returns:
        This builder for chaining.
      • setSeverity

        public VulnerabilityOccurrence.Builder setSeverity​(Severity value)
         Output only. The note provider assigned severity of this vulnerability.
         
        .grafeas.v1.Severity severity = 2;
        Parameters:
        value - The severity to set.
        Returns:
        This builder for chaining.
      • clearSeverity

        public VulnerabilityOccurrence.Builder clearSeverity()
         Output only. The note provider assigned severity of this vulnerability.
         
        .grafeas.v1.Severity severity = 2;
        Returns:
        This builder for chaining.
      • getCvssScore

        public float getCvssScore()
         Output only. The CVSS score of this vulnerability. CVSS score is on a
         scale of 0 - 10 where 0 indicates low severity and 10 indicates high
         severity.
         
        float cvss_score = 3;
        Specified by:
        getCvssScore in interface VulnerabilityOccurrenceOrBuilder
        Returns:
        The cvssScore.
      • setCvssScore

        public VulnerabilityOccurrence.Builder setCvssScore​(float value)
         Output only. The CVSS score of this vulnerability. CVSS score is on a
         scale of 0 - 10 where 0 indicates low severity and 10 indicates high
         severity.
         
        float cvss_score = 3;
        Parameters:
        value - The cvssScore to set.
        Returns:
        This builder for chaining.
      • clearCvssScore

        public VulnerabilityOccurrence.Builder clearCvssScore()
         Output only. The CVSS score of this vulnerability. CVSS score is on a
         scale of 0 - 10 where 0 indicates low severity and 10 indicates high
         severity.
         
        float cvss_score = 3;
        Returns:
        This builder for chaining.
      • hasCvssv3

        public boolean hasCvssv3()
         The cvss v3 score for the vulnerability.
         
        .grafeas.v1.CVSS cvssv3 = 10;
        Specified by:
        hasCvssv3 in interface VulnerabilityOccurrenceOrBuilder
        Returns:
        Whether the cvssv3 field is set.
      • getCvssv3Builder

        public CVSS.Builder getCvssv3Builder()
         The cvss v3 score for the vulnerability.
         
        .grafeas.v1.CVSS cvssv3 = 10;
      • getPackageIssueCount

        public int getPackageIssueCount()
         Required. The set of affected locations and their fixes (if available)
         within the associated resource.
         
        repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4;
        Specified by:
        getPackageIssueCount in interface VulnerabilityOccurrenceOrBuilder
      • clearPackageIssue

        public VulnerabilityOccurrence.Builder clearPackageIssue()
         Required. The set of affected locations and their fixes (if available)
         within the associated resource.
         
        repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4;
      • removePackageIssue

        public VulnerabilityOccurrence.Builder removePackageIssue​(int index)
         Required. The set of affected locations and their fixes (if available)
         within the associated resource.
         
        repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4;
      • getPackageIssueBuilder

        public VulnerabilityOccurrence.PackageIssue.Builder getPackageIssueBuilder​(int index)
         Required. The set of affected locations and their fixes (if available)
         within the associated resource.
         
        repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4;
      • addPackageIssueBuilder

        public VulnerabilityOccurrence.PackageIssue.Builder addPackageIssueBuilder()
         Required. The set of affected locations and their fixes (if available)
         within the associated resource.
         
        repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4;
      • addPackageIssueBuilder

        public VulnerabilityOccurrence.PackageIssue.Builder addPackageIssueBuilder​(int index)
         Required. The set of affected locations and their fixes (if available)
         within the associated resource.
         
        repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4;
      • getPackageIssueBuilderList

        public List<VulnerabilityOccurrence.PackageIssue.Builder> getPackageIssueBuilderList()
         Required. The set of affected locations and their fixes (if available)
         within the associated resource.
         
        repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4;
      • getShortDescriptionBytes

        public com.google.protobuf.ByteString getShortDescriptionBytes()
         Output only. A one sentence description of this vulnerability.
         
        string short_description = 5;
        Specified by:
        getShortDescriptionBytes in interface VulnerabilityOccurrenceOrBuilder
        Returns:
        The bytes for shortDescription.
      • setShortDescription

        public VulnerabilityOccurrence.Builder setShortDescription​(String value)
         Output only. A one sentence description of this vulnerability.
         
        string short_description = 5;
        Parameters:
        value - The shortDescription to set.
        Returns:
        This builder for chaining.
      • clearShortDescription

        public VulnerabilityOccurrence.Builder clearShortDescription()
         Output only. A one sentence description of this vulnerability.
         
        string short_description = 5;
        Returns:
        This builder for chaining.
      • setShortDescriptionBytes

        public VulnerabilityOccurrence.Builder setShortDescriptionBytes​(com.google.protobuf.ByteString value)
         Output only. A one sentence description of this vulnerability.
         
        string short_description = 5;
        Parameters:
        value - The bytes for shortDescription to set.
        Returns:
        This builder for chaining.
      • getLongDescriptionBytes

        public com.google.protobuf.ByteString getLongDescriptionBytes()
         Output only. A detailed description of this vulnerability.
         
        string long_description = 6;
        Specified by:
        getLongDescriptionBytes in interface VulnerabilityOccurrenceOrBuilder
        Returns:
        The bytes for longDescription.
      • setLongDescription

        public VulnerabilityOccurrence.Builder setLongDescription​(String value)
         Output only. A detailed description of this vulnerability.
         
        string long_description = 6;
        Parameters:
        value - The longDescription to set.
        Returns:
        This builder for chaining.
      • clearLongDescription

        public VulnerabilityOccurrence.Builder clearLongDescription()
         Output only. A detailed description of this vulnerability.
         
        string long_description = 6;
        Returns:
        This builder for chaining.
      • setLongDescriptionBytes

        public VulnerabilityOccurrence.Builder setLongDescriptionBytes​(com.google.protobuf.ByteString value)
         Output only. A detailed description of this vulnerability.
         
        string long_description = 6;
        Parameters:
        value - The bytes for longDescription to set.
        Returns:
        This builder for chaining.
      • setRelatedUrls

        public VulnerabilityOccurrence.Builder setRelatedUrls​(int index,
                                                              RelatedUrl value)
         Output only. URLs related to this vulnerability.
         
        repeated .grafeas.v1.RelatedUrl related_urls = 7;
      • addRelatedUrls

        public VulnerabilityOccurrence.Builder addRelatedUrls​(int index,
                                                              RelatedUrl value)
         Output only. URLs related to this vulnerability.
         
        repeated .grafeas.v1.RelatedUrl related_urls = 7;
      • clearRelatedUrls

        public VulnerabilityOccurrence.Builder clearRelatedUrls()
         Output only. URLs related to this vulnerability.
         
        repeated .grafeas.v1.RelatedUrl related_urls = 7;
      • removeRelatedUrls

        public VulnerabilityOccurrence.Builder removeRelatedUrls​(int index)
         Output only. URLs related to this vulnerability.
         
        repeated .grafeas.v1.RelatedUrl related_urls = 7;
      • getRelatedUrlsBuilder

        public RelatedUrl.Builder getRelatedUrlsBuilder​(int index)
         Output only. URLs related to this vulnerability.
         
        repeated .grafeas.v1.RelatedUrl related_urls = 7;
      • addRelatedUrlsBuilder

        public RelatedUrl.Builder addRelatedUrlsBuilder()
         Output only. URLs related to this vulnerability.
         
        repeated .grafeas.v1.RelatedUrl related_urls = 7;
      • addRelatedUrlsBuilder

        public RelatedUrl.Builder addRelatedUrlsBuilder​(int index)
         Output only. URLs related to this vulnerability.
         
        repeated .grafeas.v1.RelatedUrl related_urls = 7;
      • getRelatedUrlsBuilderList

        public List<RelatedUrl.Builder> getRelatedUrlsBuilderList()
         Output only. URLs related to this vulnerability.
         
        repeated .grafeas.v1.RelatedUrl related_urls = 7;
      • getEffectiveSeverityValue

        public int getEffectiveSeverityValue()
         The distro assigned severity for this vulnerability when it is available,
         otherwise this is the note provider assigned severity.
        
         When there are multiple PackageIssues for this vulnerability, they can have
         different effective severities because some might be provided by the distro
         while others are provided by the language ecosystem for a language pack.
         For this reason, it is advised to use the effective severity on the
         PackageIssue level. In the case where multiple PackageIssues have differing
         effective severities, this field should be the highest severity for any of
         the PackageIssues.
         
        .grafeas.v1.Severity effective_severity = 8;
        Specified by:
        getEffectiveSeverityValue in interface VulnerabilityOccurrenceOrBuilder
        Returns:
        The enum numeric value on the wire for effectiveSeverity.
      • setEffectiveSeverityValue

        public VulnerabilityOccurrence.Builder setEffectiveSeverityValue​(int value)
         The distro assigned severity for this vulnerability when it is available,
         otherwise this is the note provider assigned severity.
        
         When there are multiple PackageIssues for this vulnerability, they can have
         different effective severities because some might be provided by the distro
         while others are provided by the language ecosystem for a language pack.
         For this reason, it is advised to use the effective severity on the
         PackageIssue level. In the case where multiple PackageIssues have differing
         effective severities, this field should be the highest severity for any of
         the PackageIssues.
         
        .grafeas.v1.Severity effective_severity = 8;
        Parameters:
        value - The enum numeric value on the wire for effectiveSeverity to set.
        Returns:
        This builder for chaining.
      • getEffectiveSeverity

        public Severity getEffectiveSeverity()
         The distro assigned severity for this vulnerability when it is available,
         otherwise this is the note provider assigned severity.
        
         When there are multiple PackageIssues for this vulnerability, they can have
         different effective severities because some might be provided by the distro
         while others are provided by the language ecosystem for a language pack.
         For this reason, it is advised to use the effective severity on the
         PackageIssue level. In the case where multiple PackageIssues have differing
         effective severities, this field should be the highest severity for any of
         the PackageIssues.
         
        .grafeas.v1.Severity effective_severity = 8;
        Specified by:
        getEffectiveSeverity in interface VulnerabilityOccurrenceOrBuilder
        Returns:
        The effectiveSeverity.
      • setEffectiveSeverity

        public VulnerabilityOccurrence.Builder setEffectiveSeverity​(Severity value)
         The distro assigned severity for this vulnerability when it is available,
         otherwise this is the note provider assigned severity.
        
         When there are multiple PackageIssues for this vulnerability, they can have
         different effective severities because some might be provided by the distro
         while others are provided by the language ecosystem for a language pack.
         For this reason, it is advised to use the effective severity on the
         PackageIssue level. In the case where multiple PackageIssues have differing
         effective severities, this field should be the highest severity for any of
         the PackageIssues.
         
        .grafeas.v1.Severity effective_severity = 8;
        Parameters:
        value - The effectiveSeverity to set.
        Returns:
        This builder for chaining.
      • clearEffectiveSeverity

        public VulnerabilityOccurrence.Builder clearEffectiveSeverity()
         The distro assigned severity for this vulnerability when it is available,
         otherwise this is the note provider assigned severity.
        
         When there are multiple PackageIssues for this vulnerability, they can have
         different effective severities because some might be provided by the distro
         while others are provided by the language ecosystem for a language pack.
         For this reason, it is advised to use the effective severity on the
         PackageIssue level. In the case where multiple PackageIssues have differing
         effective severities, this field should be the highest severity for any of
         the PackageIssues.
         
        .grafeas.v1.Severity effective_severity = 8;
        Returns:
        This builder for chaining.
      • getFixAvailable

        public boolean getFixAvailable()
         Output only. Whether at least one of the affected packages has a fix
         available.
         
        bool fix_available = 9;
        Specified by:
        getFixAvailable in interface VulnerabilityOccurrenceOrBuilder
        Returns:
        The fixAvailable.
      • setFixAvailable

        public VulnerabilityOccurrence.Builder setFixAvailable​(boolean value)
         Output only. Whether at least one of the affected packages has a fix
         available.
         
        bool fix_available = 9;
        Parameters:
        value - The fixAvailable to set.
        Returns:
        This builder for chaining.
      • clearFixAvailable

        public VulnerabilityOccurrence.Builder clearFixAvailable()
         Output only. Whether at least one of the affected packages has a fix
         available.
         
        bool fix_available = 9;
        Returns:
        This builder for chaining.
      • getCvssVersionValue

        public int getCvssVersionValue()
         Output only. CVSS version used to populate cvss_score and severity.
         
        .grafeas.v1.CVSSVersion cvss_version = 11;
        Specified by:
        getCvssVersionValue in interface VulnerabilityOccurrenceOrBuilder
        Returns:
        The enum numeric value on the wire for cvssVersion.
      • setCvssVersionValue

        public VulnerabilityOccurrence.Builder setCvssVersionValue​(int value)
         Output only. CVSS version used to populate cvss_score and severity.
         
        .grafeas.v1.CVSSVersion cvss_version = 11;
        Parameters:
        value - The enum numeric value on the wire for cvssVersion to set.
        Returns:
        This builder for chaining.
      • setCvssVersion

        public VulnerabilityOccurrence.Builder setCvssVersion​(CVSSVersion value)
         Output only. CVSS version used to populate cvss_score and severity.
         
        .grafeas.v1.CVSSVersion cvss_version = 11;
        Parameters:
        value - The cvssVersion to set.
        Returns:
        This builder for chaining.
      • clearCvssVersion

        public VulnerabilityOccurrence.Builder clearCvssVersion()
         Output only. CVSS version used to populate cvss_score and severity.
         
        .grafeas.v1.CVSSVersion cvss_version = 11;
        Returns:
        This builder for chaining.
      • hasCvssV2

        public boolean hasCvssV2()
         The cvss v2 score for the vulnerability.
         
        .grafeas.v1.CVSS cvss_v2 = 12;
        Specified by:
        hasCvssV2 in interface VulnerabilityOccurrenceOrBuilder
        Returns:
        Whether the cvssV2 field is set.
      • getCvssV2Builder

        public CVSS.Builder getCvssV2Builder()
         The cvss v2 score for the vulnerability.
         
        .grafeas.v1.CVSS cvss_v2 = 12;
      • hasVexAssessment

        public boolean hasVexAssessment()
        .grafeas.v1.VulnerabilityOccurrence.VexAssessment vex_assessment = 13;
        Specified by:
        hasVexAssessment in interface VulnerabilityOccurrenceOrBuilder
        Returns:
        Whether the vexAssessment field is set.
      • setUnknownFields

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

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