/*
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
/*
 * This code was generated by https://github.com/googleapis/google-api-java-client-services/
 * Modify at your own risk.
 */

package com.google.api.services.containeranalysis.v1alpha1.model;

/**
 * `Occurrence` includes information about analysis occurrences for an image.
 *
 * <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is
 * transmitted over HTTP when working with the Container Analysis API. For a detailed explanation
 * see:
 * <a href="https://developers.google.com/api-client-library/java/google-http-java-client/json">https://developers.google.com/api-client-library/java/google-http-java-client/json</a>
 * </p>
 *
 * @author Google, Inc.
 */
@SuppressWarnings("javadoc")
public final class Occurrence extends com.google.api.client.json.GenericJson {

  /**
   * Describes an attestation of an artifact.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private Attestation attestation;

  /**
   * Build details for a verifiable build.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private BuildDetails buildDetails;

  /**
   * Describes whether or not a resource passes compliance checks.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private ComplianceOccurrence compliance;

  /**
   * Output only. The time this `Occurrence` was created.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private String createTime;

  /**
   * Describes the deployment of an artifact on a runtime.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private Deployment deployment;

  /**
   * Describes how this resource derives from the basis in the associated note.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private Derived derivedImage;

  /**
   * Describes the initial scan status for this resource.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private Discovered discovered;

  /**
   * This represents a DSSE attestation occurrence
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private DSSEAttestationOccurrence dsseAttestation;

  /**
   * https://github.com/secure-systems-lab/dsse
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private Envelope envelope;

  /**
   * Describes the installation of a package on the linked resource.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private Installation installation;

  /**
   * Output only. This explicitly denotes which of the `Occurrence` details are specified. This
   * field can be used as a filter in list requests.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String kind;

  /**
   * Output only. The name of the `Occurrence` in the form
   * "projects/{project_id}/occurrences/{OCCURRENCE_ID}"
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String name;

  /**
   * An analysis note associated with this image, in the form
   * "providers/{provider_id}/notes/{NOTE_ID}" This field can be used as a filter in list requests.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String noteName;

  /**
   * A description of actions that can be taken to remedy the `Note`
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String remediation;

  /**
   * The resource for which the `Occurrence` applies.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private Resource resource;

  /**
   * The unique URL of the image or the container for which the `Occurrence` applies. For example,
   * https://gcr.io/project/image@sha256:foo This field can be used as a filter in list requests.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String resourceUrl;

  /**
   * Describes a specific software bill of materials document.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private DocumentOccurrence sbom;

  /**
   * Describes a specific SPDX File.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private FileOccurrence spdxFile;

  /**
   * Describes a specific SPDX Package.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private PackageInfoOccurrence spdxPackage;

  /**
   * Describes a specific relationship between SPDX elements.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private RelationshipOccurrence spdxRelationship;

  /**
   * Output only. The time this `Occurrence` was last updated.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private String updateTime;

  /**
   * Describes an upgrade.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private UpgradeOccurrence upgrade;

  /**
   * Details of a security vulnerability note.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private VulnerabilityDetails vulnerabilityDetails;

  /**
   * Describes an attestation of an artifact.
   * @return value or {@code null} for none
   */
  public Attestation getAttestation() {
    return attestation;
  }

  /**
   * Describes an attestation of an artifact.
   * @param attestation attestation or {@code null} for none
   */
  public Occurrence setAttestation(Attestation attestation) {
    this.attestation = attestation;
    return this;
  }

  /**
   * Build details for a verifiable build.
   * @return value or {@code null} for none
   */
  public BuildDetails getBuildDetails() {
    return buildDetails;
  }

  /**
   * Build details for a verifiable build.
   * @param buildDetails buildDetails or {@code null} for none
   */
  public Occurrence setBuildDetails(BuildDetails buildDetails) {
    this.buildDetails = buildDetails;
    return this;
  }

  /**
   * Describes whether or not a resource passes compliance checks.
   * @return value or {@code null} for none
   */
  public ComplianceOccurrence getCompliance() {
    return compliance;
  }

  /**
   * Describes whether or not a resource passes compliance checks.
   * @param compliance compliance or {@code null} for none
   */
  public Occurrence setCompliance(ComplianceOccurrence compliance) {
    this.compliance = compliance;
    return this;
  }

  /**
   * Output only. The time this `Occurrence` was created.
   * @return value or {@code null} for none
   */
  public String getCreateTime() {
    return createTime;
  }

  /**
   * Output only. The time this `Occurrence` was created.
   * @param createTime createTime or {@code null} for none
   */
  public Occurrence setCreateTime(String createTime) {
    this.createTime = createTime;
    return this;
  }

  /**
   * Describes the deployment of an artifact on a runtime.
   * @return value or {@code null} for none
   */
  public Deployment getDeployment() {
    return deployment;
  }

  /**
   * Describes the deployment of an artifact on a runtime.
   * @param deployment deployment or {@code null} for none
   */
  public Occurrence setDeployment(Deployment deployment) {
    this.deployment = deployment;
    return this;
  }

  /**
   * Describes how this resource derives from the basis in the associated note.
   * @return value or {@code null} for none
   */
  public Derived getDerivedImage() {
    return derivedImage;
  }

  /**
   * Describes how this resource derives from the basis in the associated note.
   * @param derivedImage derivedImage or {@code null} for none
   */
  public Occurrence setDerivedImage(Derived derivedImage) {
    this.derivedImage = derivedImage;
    return this;
  }

  /**
   * Describes the initial scan status for this resource.
   * @return value or {@code null} for none
   */
  public Discovered getDiscovered() {
    return discovered;
  }

  /**
   * Describes the initial scan status for this resource.
   * @param discovered discovered or {@code null} for none
   */
  public Occurrence setDiscovered(Discovered discovered) {
    this.discovered = discovered;
    return this;
  }

  /**
   * This represents a DSSE attestation occurrence
   * @return value or {@code null} for none
   */
  public DSSEAttestationOccurrence getDsseAttestation() {
    return dsseAttestation;
  }

  /**
   * This represents a DSSE attestation occurrence
   * @param dsseAttestation dsseAttestation or {@code null} for none
   */
  public Occurrence setDsseAttestation(DSSEAttestationOccurrence dsseAttestation) {
    this.dsseAttestation = dsseAttestation;
    return this;
  }

  /**
   * https://github.com/secure-systems-lab/dsse
   * @return value or {@code null} for none
   */
  public Envelope getEnvelope() {
    return envelope;
  }

  /**
   * https://github.com/secure-systems-lab/dsse
   * @param envelope envelope or {@code null} for none
   */
  public Occurrence setEnvelope(Envelope envelope) {
    this.envelope = envelope;
    return this;
  }

  /**
   * Describes the installation of a package on the linked resource.
   * @return value or {@code null} for none
   */
  public Installation getInstallation() {
    return installation;
  }

  /**
   * Describes the installation of a package on the linked resource.
   * @param installation installation or {@code null} for none
   */
  public Occurrence setInstallation(Installation installation) {
    this.installation = installation;
    return this;
  }

  /**
   * Output only. This explicitly denotes which of the `Occurrence` details are specified. This
   * field can be used as a filter in list requests.
   * @return value or {@code null} for none
   */
  public java.lang.String getKind() {
    return kind;
  }

  /**
   * Output only. This explicitly denotes which of the `Occurrence` details are specified. This
   * field can be used as a filter in list requests.
   * @param kind kind or {@code null} for none
   */
  public Occurrence setKind(java.lang.String kind) {
    this.kind = kind;
    return this;
  }

  /**
   * Output only. The name of the `Occurrence` in the form
   * "projects/{project_id}/occurrences/{OCCURRENCE_ID}"
   * @return value or {@code null} for none
   */
  public java.lang.String getName() {
    return name;
  }

  /**
   * Output only. The name of the `Occurrence` in the form
   * "projects/{project_id}/occurrences/{OCCURRENCE_ID}"
   * @param name name or {@code null} for none
   */
  public Occurrence setName(java.lang.String name) {
    this.name = name;
    return this;
  }

  /**
   * An analysis note associated with this image, in the form
   * "providers/{provider_id}/notes/{NOTE_ID}" This field can be used as a filter in list requests.
   * @return value or {@code null} for none
   */
  public java.lang.String getNoteName() {
    return noteName;
  }

  /**
   * An analysis note associated with this image, in the form
   * "providers/{provider_id}/notes/{NOTE_ID}" This field can be used as a filter in list requests.
   * @param noteName noteName or {@code null} for none
   */
  public Occurrence setNoteName(java.lang.String noteName) {
    this.noteName = noteName;
    return this;
  }

  /**
   * A description of actions that can be taken to remedy the `Note`
   * @return value or {@code null} for none
   */
  public java.lang.String getRemediation() {
    return remediation;
  }

  /**
   * A description of actions that can be taken to remedy the `Note`
   * @param remediation remediation or {@code null} for none
   */
  public Occurrence setRemediation(java.lang.String remediation) {
    this.remediation = remediation;
    return this;
  }

  /**
   * The resource for which the `Occurrence` applies.
   * @return value or {@code null} for none
   */
  public Resource getResource() {
    return resource;
  }

  /**
   * The resource for which the `Occurrence` applies.
   * @param resource resource or {@code null} for none
   */
  public Occurrence setResource(Resource resource) {
    this.resource = resource;
    return this;
  }

  /**
   * The unique URL of the image or the container for which the `Occurrence` applies. For example,
   * https://gcr.io/project/image@sha256:foo This field can be used as a filter in list requests.
   * @return value or {@code null} for none
   */
  public java.lang.String getResourceUrl() {
    return resourceUrl;
  }

  /**
   * The unique URL of the image or the container for which the `Occurrence` applies. For example,
   * https://gcr.io/project/image@sha256:foo This field can be used as a filter in list requests.
   * @param resourceUrl resourceUrl or {@code null} for none
   */
  public Occurrence setResourceUrl(java.lang.String resourceUrl) {
    this.resourceUrl = resourceUrl;
    return this;
  }

  /**
   * Describes a specific software bill of materials document.
   * @return value or {@code null} for none
   */
  public DocumentOccurrence getSbom() {
    return sbom;
  }

  /**
   * Describes a specific software bill of materials document.
   * @param sbom sbom or {@code null} for none
   */
  public Occurrence setSbom(DocumentOccurrence sbom) {
    this.sbom = sbom;
    return this;
  }

  /**
   * Describes a specific SPDX File.
   * @return value or {@code null} for none
   */
  public FileOccurrence getSpdxFile() {
    return spdxFile;
  }

  /**
   * Describes a specific SPDX File.
   * @param spdxFile spdxFile or {@code null} for none
   */
  public Occurrence setSpdxFile(FileOccurrence spdxFile) {
    this.spdxFile = spdxFile;
    return this;
  }

  /**
   * Describes a specific SPDX Package.
   * @return value or {@code null} for none
   */
  public PackageInfoOccurrence getSpdxPackage() {
    return spdxPackage;
  }

  /**
   * Describes a specific SPDX Package.
   * @param spdxPackage spdxPackage or {@code null} for none
   */
  public Occurrence setSpdxPackage(PackageInfoOccurrence spdxPackage) {
    this.spdxPackage = spdxPackage;
    return this;
  }

  /**
   * Describes a specific relationship between SPDX elements.
   * @return value or {@code null} for none
   */
  public RelationshipOccurrence getSpdxRelationship() {
    return spdxRelationship;
  }

  /**
   * Describes a specific relationship between SPDX elements.
   * @param spdxRelationship spdxRelationship or {@code null} for none
   */
  public Occurrence setSpdxRelationship(RelationshipOccurrence spdxRelationship) {
    this.spdxRelationship = spdxRelationship;
    return this;
  }

  /**
   * Output only. The time this `Occurrence` was last updated.
   * @return value or {@code null} for none
   */
  public String getUpdateTime() {
    return updateTime;
  }

  /**
   * Output only. The time this `Occurrence` was last updated.
   * @param updateTime updateTime or {@code null} for none
   */
  public Occurrence setUpdateTime(String updateTime) {
    this.updateTime = updateTime;
    return this;
  }

  /**
   * Describes an upgrade.
   * @return value or {@code null} for none
   */
  public UpgradeOccurrence getUpgrade() {
    return upgrade;
  }

  /**
   * Describes an upgrade.
   * @param upgrade upgrade or {@code null} for none
   */
  public Occurrence setUpgrade(UpgradeOccurrence upgrade) {
    this.upgrade = upgrade;
    return this;
  }

  /**
   * Details of a security vulnerability note.
   * @return value or {@code null} for none
   */
  public VulnerabilityDetails getVulnerabilityDetails() {
    return vulnerabilityDetails;
  }

  /**
   * Details of a security vulnerability note.
   * @param vulnerabilityDetails vulnerabilityDetails or {@code null} for none
   */
  public Occurrence setVulnerabilityDetails(VulnerabilityDetails vulnerabilityDetails) {
    this.vulnerabilityDetails = vulnerabilityDetails;
    return this;
  }

  @Override
  public Occurrence set(String fieldName, Object value) {
    return (Occurrence) super.set(fieldName, value);
  }

  @Override
  public Occurrence clone() {
    return (Occurrence) super.clone();
  }

}
