Class Occurrence

  • All Implemented Interfaces:
    com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, OccurrenceOrBuilder, Serializable

    public final class Occurrence
    extends com.google.protobuf.GeneratedMessageV3
    implements OccurrenceOrBuilder
     An instance of an analysis type that has been found on a resource.
     
    Protobuf type grafeas.v1beta1.Occurrence
    See Also:
    Serialized Form
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getUnknownFields

        public final com.google.protobuf.UnknownFieldSet getUnknownFields()
        Specified by:
        getUnknownFields in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getUnknownFields in class com.google.protobuf.GeneratedMessageV3
      • 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
      • getName

        public String getName()
         Output only. The name of the occurrence in the form of
         `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
         
        string name = 1;
        Specified by:
        getName in interface OccurrenceOrBuilder
        Returns:
        The name.
      • getNameBytes

        public com.google.protobuf.ByteString getNameBytes()
         Output only. The name of the occurrence in the form of
         `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
         
        string name = 1;
        Specified by:
        getNameBytes in interface OccurrenceOrBuilder
        Returns:
        The bytes for name.
      • hasResource

        public boolean hasResource()
         Required. Immutable. The resource for which the occurrence applies.
         
        .grafeas.v1beta1.Resource resource = 2;
        Specified by:
        hasResource in interface OccurrenceOrBuilder
        Returns:
        Whether the resource field is set.
      • getResource

        public Resource getResource()
         Required. Immutable. The resource for which the occurrence applies.
         
        .grafeas.v1beta1.Resource resource = 2;
        Specified by:
        getResource in interface OccurrenceOrBuilder
        Returns:
        The resource.
      • getNoteName

        public String getNoteName()
         Required. Immutable. The analysis note associated with this occurrence, in
         the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be
         used as a filter in list requests.
         
        string note_name = 3;
        Specified by:
        getNoteName in interface OccurrenceOrBuilder
        Returns:
        The noteName.
      • getNoteNameBytes

        public com.google.protobuf.ByteString getNoteNameBytes()
         Required. Immutable. The analysis note associated with this occurrence, in
         the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be
         used as a filter in list requests.
         
        string note_name = 3;
        Specified by:
        getNoteNameBytes in interface OccurrenceOrBuilder
        Returns:
        The bytes for noteName.
      • getKindValue

        public int getKindValue()
         Output only. This explicitly denotes which of the occurrence details are
         specified. This field can be used as a filter in list requests.
         
        .grafeas.v1beta1.NoteKind kind = 4;
        Specified by:
        getKindValue in interface OccurrenceOrBuilder
        Returns:
        The enum numeric value on the wire for kind.
      • getKind

        public NoteKind getKind()
         Output only. This explicitly denotes which of the occurrence details are
         specified. This field can be used as a filter in list requests.
         
        .grafeas.v1beta1.NoteKind kind = 4;
        Specified by:
        getKind in interface OccurrenceOrBuilder
        Returns:
        The kind.
      • getRemediation

        public String getRemediation()
         A description of actions that can be taken to remedy the note.
         
        string remediation = 5;
        Specified by:
        getRemediation in interface OccurrenceOrBuilder
        Returns:
        The remediation.
      • getRemediationBytes

        public com.google.protobuf.ByteString getRemediationBytes()
         A description of actions that can be taken to remedy the note.
         
        string remediation = 5;
        Specified by:
        getRemediationBytes in interface OccurrenceOrBuilder
        Returns:
        The bytes for remediation.
      • hasCreateTime

        public boolean hasCreateTime()
         Output only. The time this occurrence was created.
         
        .google.protobuf.Timestamp create_time = 6;
        Specified by:
        hasCreateTime in interface OccurrenceOrBuilder
        Returns:
        Whether the createTime field is set.
      • getCreateTime

        public com.google.protobuf.Timestamp getCreateTime()
         Output only. The time this occurrence was created.
         
        .google.protobuf.Timestamp create_time = 6;
        Specified by:
        getCreateTime in interface OccurrenceOrBuilder
        Returns:
        The createTime.
      • getCreateTimeOrBuilder

        public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder()
         Output only. The time this occurrence was created.
         
        .google.protobuf.Timestamp create_time = 6;
        Specified by:
        getCreateTimeOrBuilder in interface OccurrenceOrBuilder
      • hasUpdateTime

        public boolean hasUpdateTime()
         Output only. The time this occurrence was last updated.
         
        .google.protobuf.Timestamp update_time = 7;
        Specified by:
        hasUpdateTime in interface OccurrenceOrBuilder
        Returns:
        Whether the updateTime field is set.
      • getUpdateTime

        public com.google.protobuf.Timestamp getUpdateTime()
         Output only. The time this occurrence was last updated.
         
        .google.protobuf.Timestamp update_time = 7;
        Specified by:
        getUpdateTime in interface OccurrenceOrBuilder
        Returns:
        The updateTime.
      • getUpdateTimeOrBuilder

        public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder()
         Output only. The time this occurrence was last updated.
         
        .google.protobuf.Timestamp update_time = 7;
        Specified by:
        getUpdateTimeOrBuilder in interface OccurrenceOrBuilder
      • hasVulnerability

        public boolean hasVulnerability()
         Describes a security vulnerability.
         
        .grafeas.v1beta1.vulnerability.Details vulnerability = 8;
        Specified by:
        hasVulnerability in interface OccurrenceOrBuilder
        Returns:
        Whether the vulnerability field is set.
      • getVulnerability

        public Details getVulnerability()
         Describes a security vulnerability.
         
        .grafeas.v1beta1.vulnerability.Details vulnerability = 8;
        Specified by:
        getVulnerability in interface OccurrenceOrBuilder
        Returns:
        The vulnerability.
      • hasBuild

        public boolean hasBuild()
         Describes a verifiable build.
         
        .grafeas.v1beta1.build.Details build = 9;
        Specified by:
        hasBuild in interface OccurrenceOrBuilder
        Returns:
        Whether the build field is set.
      • getBuild

        public Details getBuild()
         Describes a verifiable build.
         
        .grafeas.v1beta1.build.Details build = 9;
        Specified by:
        getBuild in interface OccurrenceOrBuilder
        Returns:
        The build.
      • hasDerivedImage

        public boolean hasDerivedImage()
         Describes how this resource derives from the basis in the associated
         note.
         
        .grafeas.v1beta1.image.Details derived_image = 10;
        Specified by:
        hasDerivedImage in interface OccurrenceOrBuilder
        Returns:
        Whether the derivedImage field is set.
      • getDerivedImage

        public Details getDerivedImage()
         Describes how this resource derives from the basis in the associated
         note.
         
        .grafeas.v1beta1.image.Details derived_image = 10;
        Specified by:
        getDerivedImage in interface OccurrenceOrBuilder
        Returns:
        The derivedImage.
      • hasInstallation

        public boolean hasInstallation()
         Describes the installation of a package on the linked resource.
         
        .grafeas.v1beta1.package.Details installation = 11;
        Specified by:
        hasInstallation in interface OccurrenceOrBuilder
        Returns:
        Whether the installation field is set.
      • getInstallation

        public Details getInstallation()
         Describes the installation of a package on the linked resource.
         
        .grafeas.v1beta1.package.Details installation = 11;
        Specified by:
        getInstallation in interface OccurrenceOrBuilder
        Returns:
        The installation.
      • hasDeployment

        public boolean hasDeployment()
         Describes the deployment of an artifact on a runtime.
         
        .grafeas.v1beta1.deployment.Details deployment = 12;
        Specified by:
        hasDeployment in interface OccurrenceOrBuilder
        Returns:
        Whether the deployment field is set.
      • getDeployment

        public Details getDeployment()
         Describes the deployment of an artifact on a runtime.
         
        .grafeas.v1beta1.deployment.Details deployment = 12;
        Specified by:
        getDeployment in interface OccurrenceOrBuilder
        Returns:
        The deployment.
      • hasDiscovered

        public boolean hasDiscovered()
         Describes when a resource was discovered.
         
        .grafeas.v1beta1.discovery.Details discovered = 13;
        Specified by:
        hasDiscovered in interface OccurrenceOrBuilder
        Returns:
        Whether the discovered field is set.
      • getDiscovered

        public Details getDiscovered()
         Describes when a resource was discovered.
         
        .grafeas.v1beta1.discovery.Details discovered = 13;
        Specified by:
        getDiscovered in interface OccurrenceOrBuilder
        Returns:
        The discovered.
      • hasAttestation

        public boolean hasAttestation()
         Describes an attestation of an artifact.
         
        .grafeas.v1beta1.attestation.Details attestation = 14;
        Specified by:
        hasAttestation in interface OccurrenceOrBuilder
        Returns:
        Whether the attestation field is set.
      • getAttestation

        public Details getAttestation()
         Describes an attestation of an artifact.
         
        .grafeas.v1beta1.attestation.Details attestation = 14;
        Specified by:
        getAttestation in interface OccurrenceOrBuilder
        Returns:
        The attestation.
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static Occurrence parseFrom​(ByteBuffer data)
                                    throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Occurrence parseFrom​(ByteBuffer data,
                                           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                    throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Occurrence parseFrom​(com.google.protobuf.ByteString data)
                                    throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Occurrence parseFrom​(com.google.protobuf.ByteString data,
                                           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                    throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Occurrence parseFrom​(byte[] data)
                                    throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Occurrence parseFrom​(byte[] data,
                                           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                    throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Occurrence parseFrom​(com.google.protobuf.CodedInputStream input,
                                           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                    throws IOException
        Throws:
        IOException
      • newBuilderForType

        public Occurrence.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public Occurrence.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected Occurrence.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstance

        public static Occurrence getDefaultInstance()
      • parser

        public static com.google.protobuf.Parser<Occurrence> parser()
      • getParserForType

        public com.google.protobuf.Parser<Occurrence> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

        public Occurrence getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder