All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.oracle.bmc.vulnerabilityscanning.model.ContainerScanResult Maven / Gradle / Ivy

The newest version!
/**
 * Copyright (c) 2016, 2024, Oracle and/or its affiliates.  All rights reserved.
 * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
 */
package com.oracle.bmc.vulnerabilityscanning.model;

/**
 * A scan result for a container scan 
* Note: Objects should always be created or deserialized using the {@link Builder}. This model * distinguishes fields that are {@code null} because they are unset from fields that are explicitly * set to {@code null}. This is done in the setter methods of the {@link Builder}, which maintain a * set of all explicitly set fields called {@link Builder#__explicitlySet__}. The {@link * #hashCode()} and {@link #equals(Object)} methods are implemented to take the explicitly set * fields into account. The constructor, on the other hand, does not take the explicitly set fields * into account (since the constructor cannot distinguish explicit {@code null} from unset {@code * null}). */ @jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210215") @com.fasterxml.jackson.databind.annotation.JsonDeserialize( builder = ContainerScanResult.Builder.class) @com.fasterxml.jackson.annotation.JsonFilter( com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel.EXPLICITLY_SET_FILTER_NAME) public final class ContainerScanResult extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel { @Deprecated @java.beans.ConstructorProperties({ "id", "registryUrl", "repository", "image", "compartmentId", "targetCompartmentId", "containerScanTargetId", "highestProblemSeverity", "problemCount", "timeStarted", "timeFinished", "problems" }) public ContainerScanResult( String id, String registryUrl, String repository, String image, String compartmentId, String targetCompartmentId, String containerScanTargetId, ScanResultProblemSeverity highestProblemSeverity, Integer problemCount, java.util.Date timeStarted, java.util.Date timeFinished, java.util.List problems) { super(); this.id = id; this.registryUrl = registryUrl; this.repository = repository; this.image = image; this.compartmentId = compartmentId; this.targetCompartmentId = targetCompartmentId; this.containerScanTargetId = containerScanTargetId; this.highestProblemSeverity = highestProblemSeverity; this.problemCount = problemCount; this.timeStarted = timeStarted; this.timeFinished = timeFinished; this.problems = problems; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { /** * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) * of container scan result. Immutable and generated on creation. */ @com.fasterxml.jackson.annotation.JsonProperty("id") private String id; /** * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) * of container scan result. Immutable and generated on creation. * * @param id the value to set * @return this builder */ public Builder id(String id) { this.id = id; this.__explicitlySet__.add("id"); return this; } /** The URL of the docker registry the repository is located in. */ @com.fasterxml.jackson.annotation.JsonProperty("registryUrl") private String registryUrl; /** * The URL of the docker registry the repository is located in. * * @param registryUrl the value to set * @return this builder */ public Builder registryUrl(String registryUrl) { this.registryUrl = registryUrl; this.__explicitlySet__.add("registryUrl"); return this; } /** Repository in which the container image scanned is located */ @com.fasterxml.jackson.annotation.JsonProperty("repository") private String repository; /** * Repository in which the container image scanned is located * * @param repository the value to set * @return this builder */ public Builder repository(String repository) { this.repository = repository; this.__explicitlySet__.add("repository"); return this; } /** Image name */ @com.fasterxml.jackson.annotation.JsonProperty("image") private String image; /** * Image name * * @param image the value to set * @return this builder */ public Builder image(String image) { this.image = image; this.__explicitlySet__.add("image"); return this; } /** * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) * of the container scan result's compartment. This is set to the same as the compartmentId * of the container scan target */ @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") private String compartmentId; /** * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) * of the container scan result's compartment. This is set to the same as the compartmentId * of the container scan target * * @param compartmentId the value to set * @return this builder */ public Builder compartmentId(String compartmentId) { this.compartmentId = compartmentId; this.__explicitlySet__.add("compartmentId"); return this; } /** * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) * of the compartment to where scan was performed. */ @com.fasterxml.jackson.annotation.JsonProperty("targetCompartmentId") private String targetCompartmentId; /** * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) * of the compartment to where scan was performed. * * @param targetCompartmentId the value to set * @return this builder */ public Builder targetCompartmentId(String targetCompartmentId) { this.targetCompartmentId = targetCompartmentId; this.__explicitlySet__.add("targetCompartmentId"); return this; } /** * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) * of container scan target. */ @com.fasterxml.jackson.annotation.JsonProperty("containerScanTargetId") private String containerScanTargetId; /** * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) * of container scan target. * * @param containerScanTargetId the value to set * @return this builder */ public Builder containerScanTargetId(String containerScanTargetId) { this.containerScanTargetId = containerScanTargetId; this.__explicitlySet__.add("containerScanTargetId"); return this; } /** Highest problem severity in this report */ @com.fasterxml.jackson.annotation.JsonProperty("highestProblemSeverity") private ScanResultProblemSeverity highestProblemSeverity; /** * Highest problem severity in this report * * @param highestProblemSeverity the value to set * @return this builder */ public Builder highestProblemSeverity(ScanResultProblemSeverity highestProblemSeverity) { this.highestProblemSeverity = highestProblemSeverity; this.__explicitlySet__.add("highestProblemSeverity"); return this; } /** Total number of problems found in this scan */ @com.fasterxml.jackson.annotation.JsonProperty("problemCount") private Integer problemCount; /** * Total number of problems found in this scan * * @param problemCount the value to set * @return this builder */ public Builder problemCount(Integer problemCount) { this.problemCount = problemCount; this.__explicitlySet__.add("problemCount"); return this; } /** * Date and time the scan was started, as described in [RFC * 3339](https://tools.ietf.org/rfc/rfc3339) */ @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") private java.util.Date timeStarted; /** * Date and time the scan was started, as described in [RFC * 3339](https://tools.ietf.org/rfc/rfc3339) * * @param timeStarted the value to set * @return this builder */ public Builder timeStarted(java.util.Date timeStarted) { this.timeStarted = timeStarted; this.__explicitlySet__.add("timeStarted"); return this; } /** * Date and time the scan was completed, as described in [RFC * 3339](https://tools.ietf.org/rfc/rfc3339) */ @com.fasterxml.jackson.annotation.JsonProperty("timeFinished") private java.util.Date timeFinished; /** * Date and time the scan was completed, as described in [RFC * 3339](https://tools.ietf.org/rfc/rfc3339) * * @param timeFinished the value to set * @return this builder */ public Builder timeFinished(java.util.Date timeFinished) { this.timeFinished = timeFinished; this.__explicitlySet__.add("timeFinished"); return this; } /** List of problems found in this scan */ @com.fasterxml.jackson.annotation.JsonProperty("problems") private java.util.List problems; /** * List of problems found in this scan * * @param problems the value to set * @return this builder */ public Builder problems(java.util.List problems) { this.problems = problems; this.__explicitlySet__.add("problems"); return this; } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); public ContainerScanResult build() { ContainerScanResult model = new ContainerScanResult( this.id, this.registryUrl, this.repository, this.image, this.compartmentId, this.targetCompartmentId, this.containerScanTargetId, this.highestProblemSeverity, this.problemCount, this.timeStarted, this.timeFinished, this.problems); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } return model; } @com.fasterxml.jackson.annotation.JsonIgnore public Builder copy(ContainerScanResult model) { if (model.wasPropertyExplicitlySet("id")) { this.id(model.getId()); } if (model.wasPropertyExplicitlySet("registryUrl")) { this.registryUrl(model.getRegistryUrl()); } if (model.wasPropertyExplicitlySet("repository")) { this.repository(model.getRepository()); } if (model.wasPropertyExplicitlySet("image")) { this.image(model.getImage()); } if (model.wasPropertyExplicitlySet("compartmentId")) { this.compartmentId(model.getCompartmentId()); } if (model.wasPropertyExplicitlySet("targetCompartmentId")) { this.targetCompartmentId(model.getTargetCompartmentId()); } if (model.wasPropertyExplicitlySet("containerScanTargetId")) { this.containerScanTargetId(model.getContainerScanTargetId()); } if (model.wasPropertyExplicitlySet("highestProblemSeverity")) { this.highestProblemSeverity(model.getHighestProblemSeverity()); } if (model.wasPropertyExplicitlySet("problemCount")) { this.problemCount(model.getProblemCount()); } if (model.wasPropertyExplicitlySet("timeStarted")) { this.timeStarted(model.getTimeStarted()); } if (model.wasPropertyExplicitlySet("timeFinished")) { this.timeFinished(model.getTimeFinished()); } if (model.wasPropertyExplicitlySet("problems")) { this.problems(model.getProblems()); } return this; } } /** Create a new builder. */ public static Builder builder() { return new Builder(); } public Builder toBuilder() { return new Builder().copy(this); } /** * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of * container scan result. Immutable and generated on creation. */ @com.fasterxml.jackson.annotation.JsonProperty("id") private final String id; /** * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of * container scan result. Immutable and generated on creation. * * @return the value */ public String getId() { return id; } /** The URL of the docker registry the repository is located in. */ @com.fasterxml.jackson.annotation.JsonProperty("registryUrl") private final String registryUrl; /** * The URL of the docker registry the repository is located in. * * @return the value */ public String getRegistryUrl() { return registryUrl; } /** Repository in which the container image scanned is located */ @com.fasterxml.jackson.annotation.JsonProperty("repository") private final String repository; /** * Repository in which the container image scanned is located * * @return the value */ public String getRepository() { return repository; } /** Image name */ @com.fasterxml.jackson.annotation.JsonProperty("image") private final String image; /** * Image name * * @return the value */ public String getImage() { return image; } /** * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of * the container scan result's compartment. This is set to the same as the compartmentId of the * container scan target */ @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") private final String compartmentId; /** * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of * the container scan result's compartment. This is set to the same as the compartmentId of the * container scan target * * @return the value */ public String getCompartmentId() { return compartmentId; } /** * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of * the compartment to where scan was performed. */ @com.fasterxml.jackson.annotation.JsonProperty("targetCompartmentId") private final String targetCompartmentId; /** * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of * the compartment to where scan was performed. * * @return the value */ public String getTargetCompartmentId() { return targetCompartmentId; } /** * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of * container scan target. */ @com.fasterxml.jackson.annotation.JsonProperty("containerScanTargetId") private final String containerScanTargetId; /** * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of * container scan target. * * @return the value */ public String getContainerScanTargetId() { return containerScanTargetId; } /** Highest problem severity in this report */ @com.fasterxml.jackson.annotation.JsonProperty("highestProblemSeverity") private final ScanResultProblemSeverity highestProblemSeverity; /** * Highest problem severity in this report * * @return the value */ public ScanResultProblemSeverity getHighestProblemSeverity() { return highestProblemSeverity; } /** Total number of problems found in this scan */ @com.fasterxml.jackson.annotation.JsonProperty("problemCount") private final Integer problemCount; /** * Total number of problems found in this scan * * @return the value */ public Integer getProblemCount() { return problemCount; } /** * Date and time the scan was started, as described in [RFC * 3339](https://tools.ietf.org/rfc/rfc3339) */ @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") private final java.util.Date timeStarted; /** * Date and time the scan was started, as described in [RFC * 3339](https://tools.ietf.org/rfc/rfc3339) * * @return the value */ public java.util.Date getTimeStarted() { return timeStarted; } /** * Date and time the scan was completed, as described in [RFC * 3339](https://tools.ietf.org/rfc/rfc3339) */ @com.fasterxml.jackson.annotation.JsonProperty("timeFinished") private final java.util.Date timeFinished; /** * Date and time the scan was completed, as described in [RFC * 3339](https://tools.ietf.org/rfc/rfc3339) * * @return the value */ public java.util.Date getTimeFinished() { return timeFinished; } /** List of problems found in this scan */ @com.fasterxml.jackson.annotation.JsonProperty("problems") private final java.util.List problems; /** * List of problems found in this scan * * @return the value */ public java.util.List getProblems() { return problems; } @Override public String toString() { return this.toString(true); } /** * Return a string representation of the object. * * @param includeByteArrayContents true to include the full contents of byte arrays * @return string representation */ public String toString(boolean includeByteArrayContents) { java.lang.StringBuilder sb = new java.lang.StringBuilder(); sb.append("ContainerScanResult("); sb.append("super=").append(super.toString()); sb.append("id=").append(String.valueOf(this.id)); sb.append(", registryUrl=").append(String.valueOf(this.registryUrl)); sb.append(", repository=").append(String.valueOf(this.repository)); sb.append(", image=").append(String.valueOf(this.image)); sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); sb.append(", targetCompartmentId=").append(String.valueOf(this.targetCompartmentId)); sb.append(", containerScanTargetId=").append(String.valueOf(this.containerScanTargetId)); sb.append(", highestProblemSeverity=").append(String.valueOf(this.highestProblemSeverity)); sb.append(", problemCount=").append(String.valueOf(this.problemCount)); sb.append(", timeStarted=").append(String.valueOf(this.timeStarted)); sb.append(", timeFinished=").append(String.valueOf(this.timeFinished)); sb.append(", problems=").append(String.valueOf(this.problems)); sb.append(")"); return sb.toString(); } @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof ContainerScanResult)) { return false; } ContainerScanResult other = (ContainerScanResult) o; return java.util.Objects.equals(this.id, other.id) && java.util.Objects.equals(this.registryUrl, other.registryUrl) && java.util.Objects.equals(this.repository, other.repository) && java.util.Objects.equals(this.image, other.image) && java.util.Objects.equals(this.compartmentId, other.compartmentId) && java.util.Objects.equals(this.targetCompartmentId, other.targetCompartmentId) && java.util.Objects.equals(this.containerScanTargetId, other.containerScanTargetId) && java.util.Objects.equals( this.highestProblemSeverity, other.highestProblemSeverity) && java.util.Objects.equals(this.problemCount, other.problemCount) && java.util.Objects.equals(this.timeStarted, other.timeStarted) && java.util.Objects.equals(this.timeFinished, other.timeFinished) && java.util.Objects.equals(this.problems, other.problems) && super.equals(other); } @Override public int hashCode() { final int PRIME = 59; int result = 1; result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); result = (result * PRIME) + (this.registryUrl == null ? 43 : this.registryUrl.hashCode()); result = (result * PRIME) + (this.repository == null ? 43 : this.repository.hashCode()); result = (result * PRIME) + (this.image == null ? 43 : this.image.hashCode()); result = (result * PRIME) + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); result = (result * PRIME) + (this.targetCompartmentId == null ? 43 : this.targetCompartmentId.hashCode()); result = (result * PRIME) + (this.containerScanTargetId == null ? 43 : this.containerScanTargetId.hashCode()); result = (result * PRIME) + (this.highestProblemSeverity == null ? 43 : this.highestProblemSeverity.hashCode()); result = (result * PRIME) + (this.problemCount == null ? 43 : this.problemCount.hashCode()); result = (result * PRIME) + (this.timeStarted == null ? 43 : this.timeStarted.hashCode()); result = (result * PRIME) + (this.timeFinished == null ? 43 : this.timeFinished.hashCode()); result = (result * PRIME) + (this.problems == null ? 43 : this.problems.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy