com.oracle.bmc.vulnerabilityscanning.model.HostEndpointProtectionScanResultSummary Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of oci-java-sdk-vulnerabilityscanning Show documentation
Show all versions of oci-java-sdk-vulnerabilityscanning Show documentation
This project contains the SDK used for Oracle Cloud Infrastructure Vulnerability Scanning
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 summary of a result for endpoint protections found in a host 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 = HostEndpointProtectionScanResultSummary.Builder.class)
@com.fasterxml.jackson.annotation.JsonFilter(
com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel.EXPLICITLY_SET_FILTER_NAME)
public final class HostEndpointProtectionScanResultSummary
extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel {
@Deprecated
@java.beans.ConstructorProperties({
"id",
"displayName",
"instanceId",
"compartmentId",
"timeStarted",
"timeFinished",
"problemSeverity",
"endpointProtectionsCount",
"lifecycleState"
})
public HostEndpointProtectionScanResultSummary(
String id,
String displayName,
String instanceId,
String compartmentId,
java.util.Date timeStarted,
java.util.Date timeFinished,
ScanResultProblemSeverity problemSeverity,
Integer endpointProtectionsCount,
LifecycleState lifecycleState) {
super();
this.id = id;
this.displayName = displayName;
this.instanceId = instanceId;
this.compartmentId = compartmentId;
this.timeStarted = timeStarted;
this.timeFinished = timeFinished;
this.problemSeverity = problemSeverity;
this.endpointProtectionsCount = endpointProtectionsCount;
this.lifecycleState = lifecycleState;
}
@com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "")
public static class Builder {
/** Unique identifier of the scan */
@com.fasterxml.jackson.annotation.JsonProperty("id")
private String id;
/**
* Unique identifier of the scan
*
* @param id the value to set
* @return this builder
*/
public Builder id(String id) {
this.id = id;
this.__explicitlySet__.add("id");
return this;
}
/** Name of the resource */
@com.fasterxml.jackson.annotation.JsonProperty("displayName")
private String displayName;
/**
* Name of the resource
*
* @param displayName the value to set
* @return this builder
*/
public Builder displayName(String displayName) {
this.displayName = displayName;
this.__explicitlySet__.add("displayName");
return this;
}
/** Instance ID of the Compute Instance scanned */
@com.fasterxml.jackson.annotation.JsonProperty("instanceId")
private String instanceId;
/**
* Instance ID of the Compute Instance scanned
*
* @param instanceId the value to set
* @return this builder
*/
public Builder instanceId(String instanceId) {
this.instanceId = instanceId;
this.__explicitlySet__.add("instanceId");
return this;
}
/**
* Compartment ID of the resource. This is set to the same as the compartment ID of the scan
* target
*/
@com.fasterxml.jackson.annotation.JsonProperty("compartmentId")
private String compartmentId;
/**
* Compartment ID of the resource. This is set to the same as the compartment ID of the 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;
}
/**
* 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;
}
/** Problem severity in this report */
@com.fasterxml.jackson.annotation.JsonProperty("problemSeverity")
private ScanResultProblemSeverity problemSeverity;
/**
* Problem severity in this report
*
* @param problemSeverity the value to set
* @return this builder
*/
public Builder problemSeverity(ScanResultProblemSeverity problemSeverity) {
this.problemSeverity = problemSeverity;
this.__explicitlySet__.add("problemSeverity");
return this;
}
/** Total number of endpoint protections found in this scan */
@com.fasterxml.jackson.annotation.JsonProperty("endpointProtectionsCount")
private Integer endpointProtectionsCount;
/**
* Total number of endpoint protections found in this scan
*
* @param endpointProtectionsCount the value to set
* @return this builder
*/
public Builder endpointProtectionsCount(Integer endpointProtectionsCount) {
this.endpointProtectionsCount = endpointProtectionsCount;
this.__explicitlySet__.add("endpointProtectionsCount");
return this;
}
/** The current state of the result. */
@com.fasterxml.jackson.annotation.JsonProperty("lifecycleState")
private LifecycleState lifecycleState;
/**
* The current state of the result.
*
* @param lifecycleState the value to set
* @return this builder
*/
public Builder lifecycleState(LifecycleState lifecycleState) {
this.lifecycleState = lifecycleState;
this.__explicitlySet__.add("lifecycleState");
return this;
}
@com.fasterxml.jackson.annotation.JsonIgnore
private final java.util.Set __explicitlySet__ = new java.util.HashSet();
public HostEndpointProtectionScanResultSummary build() {
HostEndpointProtectionScanResultSummary model =
new HostEndpointProtectionScanResultSummary(
this.id,
this.displayName,
this.instanceId,
this.compartmentId,
this.timeStarted,
this.timeFinished,
this.problemSeverity,
this.endpointProtectionsCount,
this.lifecycleState);
for (String explicitlySetProperty : this.__explicitlySet__) {
model.markPropertyAsExplicitlySet(explicitlySetProperty);
}
return model;
}
@com.fasterxml.jackson.annotation.JsonIgnore
public Builder copy(HostEndpointProtectionScanResultSummary model) {
if (model.wasPropertyExplicitlySet("id")) {
this.id(model.getId());
}
if (model.wasPropertyExplicitlySet("displayName")) {
this.displayName(model.getDisplayName());
}
if (model.wasPropertyExplicitlySet("instanceId")) {
this.instanceId(model.getInstanceId());
}
if (model.wasPropertyExplicitlySet("compartmentId")) {
this.compartmentId(model.getCompartmentId());
}
if (model.wasPropertyExplicitlySet("timeStarted")) {
this.timeStarted(model.getTimeStarted());
}
if (model.wasPropertyExplicitlySet("timeFinished")) {
this.timeFinished(model.getTimeFinished());
}
if (model.wasPropertyExplicitlySet("problemSeverity")) {
this.problemSeverity(model.getProblemSeverity());
}
if (model.wasPropertyExplicitlySet("endpointProtectionsCount")) {
this.endpointProtectionsCount(model.getEndpointProtectionsCount());
}
if (model.wasPropertyExplicitlySet("lifecycleState")) {
this.lifecycleState(model.getLifecycleState());
}
return this;
}
}
/** Create a new builder. */
public static Builder builder() {
return new Builder();
}
public Builder toBuilder() {
return new Builder().copy(this);
}
/** Unique identifier of the scan */
@com.fasterxml.jackson.annotation.JsonProperty("id")
private final String id;
/**
* Unique identifier of the scan
*
* @return the value
*/
public String getId() {
return id;
}
/** Name of the resource */
@com.fasterxml.jackson.annotation.JsonProperty("displayName")
private final String displayName;
/**
* Name of the resource
*
* @return the value
*/
public String getDisplayName() {
return displayName;
}
/** Instance ID of the Compute Instance scanned */
@com.fasterxml.jackson.annotation.JsonProperty("instanceId")
private final String instanceId;
/**
* Instance ID of the Compute Instance scanned
*
* @return the value
*/
public String getInstanceId() {
return instanceId;
}
/**
* Compartment ID of the resource. This is set to the same as the compartment ID of the scan
* target
*/
@com.fasterxml.jackson.annotation.JsonProperty("compartmentId")
private final String compartmentId;
/**
* Compartment ID of the resource. This is set to the same as the compartment ID of the scan
* target
*
* @return the value
*/
public String getCompartmentId() {
return compartmentId;
}
/**
* 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;
}
/** Problem severity in this report */
@com.fasterxml.jackson.annotation.JsonProperty("problemSeverity")
private final ScanResultProblemSeverity problemSeverity;
/**
* Problem severity in this report
*
* @return the value
*/
public ScanResultProblemSeverity getProblemSeverity() {
return problemSeverity;
}
/** Total number of endpoint protections found in this scan */
@com.fasterxml.jackson.annotation.JsonProperty("endpointProtectionsCount")
private final Integer endpointProtectionsCount;
/**
* Total number of endpoint protections found in this scan
*
* @return the value
*/
public Integer getEndpointProtectionsCount() {
return endpointProtectionsCount;
}
/** The current state of the result. */
@com.fasterxml.jackson.annotation.JsonProperty("lifecycleState")
private final LifecycleState lifecycleState;
/**
* The current state of the result.
*
* @return the value
*/
public LifecycleState getLifecycleState() {
return lifecycleState;
}
@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("HostEndpointProtectionScanResultSummary(");
sb.append("super=").append(super.toString());
sb.append("id=").append(String.valueOf(this.id));
sb.append(", displayName=").append(String.valueOf(this.displayName));
sb.append(", instanceId=").append(String.valueOf(this.instanceId));
sb.append(", compartmentId=").append(String.valueOf(this.compartmentId));
sb.append(", timeStarted=").append(String.valueOf(this.timeStarted));
sb.append(", timeFinished=").append(String.valueOf(this.timeFinished));
sb.append(", problemSeverity=").append(String.valueOf(this.problemSeverity));
sb.append(", endpointProtectionsCount=")
.append(String.valueOf(this.endpointProtectionsCount));
sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState));
sb.append(")");
return sb.toString();
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof HostEndpointProtectionScanResultSummary)) {
return false;
}
HostEndpointProtectionScanResultSummary other = (HostEndpointProtectionScanResultSummary) o;
return java.util.Objects.equals(this.id, other.id)
&& java.util.Objects.equals(this.displayName, other.displayName)
&& java.util.Objects.equals(this.instanceId, other.instanceId)
&& java.util.Objects.equals(this.compartmentId, other.compartmentId)
&& java.util.Objects.equals(this.timeStarted, other.timeStarted)
&& java.util.Objects.equals(this.timeFinished, other.timeFinished)
&& java.util.Objects.equals(this.problemSeverity, other.problemSeverity)
&& java.util.Objects.equals(
this.endpointProtectionsCount, other.endpointProtectionsCount)
&& java.util.Objects.equals(this.lifecycleState, other.lifecycleState)
&& 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.displayName == null ? 43 : this.displayName.hashCode());
result = (result * PRIME) + (this.instanceId == null ? 43 : this.instanceId.hashCode());
result =
(result * PRIME)
+ (this.compartmentId == null ? 43 : this.compartmentId.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.problemSeverity == null ? 43 : this.problemSeverity.hashCode());
result =
(result * PRIME)
+ (this.endpointProtectionsCount == null
? 43
: this.endpointProtectionsCount.hashCode());
result =
(result * PRIME)
+ (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode());
result = (result * PRIME) + super.hashCode();
return result;
}
}