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

com.oracle.bmc.database.model.PatchHistoryEntrySummary Maven / Gradle / Ivy

Go to download

This project contains the SDK used for Oracle Cloud Infrastructure Database Service

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.database.model;

/**
 * The record of a patch action on a specified target. 
* 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: 20160918") @com.fasterxml.jackson.databind.annotation.JsonDeserialize( builder = PatchHistoryEntrySummary.Builder.class) @com.fasterxml.jackson.annotation.JsonFilter( com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel.EXPLICITLY_SET_FILTER_NAME) public final class PatchHistoryEntrySummary extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel { @Deprecated @java.beans.ConstructorProperties({ "id", "patchId", "action", "lifecycleState", "lifecycleDetails", "timeStarted", "timeEnded", "patchType" }) public PatchHistoryEntrySummary( String id, String patchId, Action action, LifecycleState lifecycleState, String lifecycleDetails, java.util.Date timeStarted, java.util.Date timeEnded, PatchType patchType) { super(); this.id = id; this.patchId = patchId; this.action = action; this.lifecycleState = lifecycleState; this.lifecycleDetails = lifecycleDetails; this.timeStarted = timeStarted; this.timeEnded = timeEnded; this.patchType = patchType; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { /** * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the * patch history entry. */ @com.fasterxml.jackson.annotation.JsonProperty("id") private String id; /** * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the * patch history entry. * * @param id the value to set * @return this builder */ public Builder id(String id) { this.id = id; this.__explicitlySet__.add("id"); return this; } /** * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the * patch. */ @com.fasterxml.jackson.annotation.JsonProperty("patchId") private String patchId; /** * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the * patch. * * @param patchId the value to set * @return this builder */ public Builder patchId(String patchId) { this.patchId = patchId; this.__explicitlySet__.add("patchId"); return this; } /** The action being performed or was completed. */ @com.fasterxml.jackson.annotation.JsonProperty("action") private Action action; /** * The action being performed or was completed. * * @param action the value to set * @return this builder */ public Builder action(Action action) { this.action = action; this.__explicitlySet__.add("action"); return this; } /** The current state of the action. */ @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") private LifecycleState lifecycleState; /** * The current state of the action. * * @param lifecycleState the value to set * @return this builder */ public Builder lifecycleState(LifecycleState lifecycleState) { this.lifecycleState = lifecycleState; this.__explicitlySet__.add("lifecycleState"); return this; } /** * A descriptive text associated with the lifecycleState. Typically contains additional * displayable text. */ @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") private String lifecycleDetails; /** * A descriptive text associated with the lifecycleState. Typically contains additional * displayable text. * * @param lifecycleDetails the value to set * @return this builder */ public Builder lifecycleDetails(String lifecycleDetails) { this.lifecycleDetails = lifecycleDetails; this.__explicitlySet__.add("lifecycleDetails"); return this; } /** The date and time when the patch action started. */ @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") private java.util.Date timeStarted; /** * The date and time when the patch action started. * * @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; } /** The date and time when the patch action completed */ @com.fasterxml.jackson.annotation.JsonProperty("timeEnded") private java.util.Date timeEnded; /** * The date and time when the patch action completed * * @param timeEnded the value to set * @return this builder */ public Builder timeEnded(java.util.Date timeEnded) { this.timeEnded = timeEnded; this.__explicitlySet__.add("timeEnded"); return this; } /** The type of Patch operation. */ @com.fasterxml.jackson.annotation.JsonProperty("patchType") private PatchType patchType; /** * The type of Patch operation. * * @param patchType the value to set * @return this builder */ public Builder patchType(PatchType patchType) { this.patchType = patchType; this.__explicitlySet__.add("patchType"); return this; } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); public PatchHistoryEntrySummary build() { PatchHistoryEntrySummary model = new PatchHistoryEntrySummary( this.id, this.patchId, this.action, this.lifecycleState, this.lifecycleDetails, this.timeStarted, this.timeEnded, this.patchType); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } return model; } @com.fasterxml.jackson.annotation.JsonIgnore public Builder copy(PatchHistoryEntrySummary model) { if (model.wasPropertyExplicitlySet("id")) { this.id(model.getId()); } if (model.wasPropertyExplicitlySet("patchId")) { this.patchId(model.getPatchId()); } if (model.wasPropertyExplicitlySet("action")) { this.action(model.getAction()); } if (model.wasPropertyExplicitlySet("lifecycleState")) { this.lifecycleState(model.getLifecycleState()); } if (model.wasPropertyExplicitlySet("lifecycleDetails")) { this.lifecycleDetails(model.getLifecycleDetails()); } if (model.wasPropertyExplicitlySet("timeStarted")) { this.timeStarted(model.getTimeStarted()); } if (model.wasPropertyExplicitlySet("timeEnded")) { this.timeEnded(model.getTimeEnded()); } if (model.wasPropertyExplicitlySet("patchType")) { this.patchType(model.getPatchType()); } 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/Content/General/Concepts/identifiers.htm) of the * patch history entry. */ @com.fasterxml.jackson.annotation.JsonProperty("id") private final String id; /** * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the * patch history entry. * * @return the value */ public String getId() { return id; } /** * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the * patch. */ @com.fasterxml.jackson.annotation.JsonProperty("patchId") private final String patchId; /** * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the * patch. * * @return the value */ public String getPatchId() { return patchId; } /** The action being performed or was completed. */ public enum Action implements com.oracle.bmc.http.internal.BmcEnum { Apply("APPLY"), Precheck("PRECHECK"), /** * This value is used if a service returns a value for this enum that is not recognized by * this version of the SDK. */ UnknownEnumValue(null); private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(Action.class); private final String value; private static java.util.Map map; static { map = new java.util.HashMap<>(); for (Action v : Action.values()) { if (v != UnknownEnumValue) { map.put(v.getValue(), v); } } } Action(String value) { this.value = value; } @com.fasterxml.jackson.annotation.JsonValue public String getValue() { return value; } @com.fasterxml.jackson.annotation.JsonCreator public static Action create(String key) { if (map.containsKey(key)) { return map.get(key); } LOG.warn( "Received unknown value '{}' for enum 'Action', returning UnknownEnumValue", key); return UnknownEnumValue; } }; /** The action being performed or was completed. */ @com.fasterxml.jackson.annotation.JsonProperty("action") private final Action action; /** * The action being performed or was completed. * * @return the value */ public Action getAction() { return action; } /** The current state of the action. */ public enum LifecycleState implements com.oracle.bmc.http.internal.BmcEnum { InProgress("IN_PROGRESS"), Succeeded("SUCCEEDED"), Failed("FAILED"), /** * This value is used if a service returns a value for this enum that is not recognized by * this version of the SDK. */ UnknownEnumValue(null); private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(LifecycleState.class); private final String value; private static java.util.Map map; static { map = new java.util.HashMap<>(); for (LifecycleState v : LifecycleState.values()) { if (v != UnknownEnumValue) { map.put(v.getValue(), v); } } } LifecycleState(String value) { this.value = value; } @com.fasterxml.jackson.annotation.JsonValue public String getValue() { return value; } @com.fasterxml.jackson.annotation.JsonCreator public static LifecycleState create(String key) { if (map.containsKey(key)) { return map.get(key); } LOG.warn( "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", key); return UnknownEnumValue; } }; /** The current state of the action. */ @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") private final LifecycleState lifecycleState; /** * The current state of the action. * * @return the value */ public LifecycleState getLifecycleState() { return lifecycleState; } /** * A descriptive text associated with the lifecycleState. Typically contains additional * displayable text. */ @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") private final String lifecycleDetails; /** * A descriptive text associated with the lifecycleState. Typically contains additional * displayable text. * * @return the value */ public String getLifecycleDetails() { return lifecycleDetails; } /** The date and time when the patch action started. */ @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") private final java.util.Date timeStarted; /** * The date and time when the patch action started. * * @return the value */ public java.util.Date getTimeStarted() { return timeStarted; } /** The date and time when the patch action completed */ @com.fasterxml.jackson.annotation.JsonProperty("timeEnded") private final java.util.Date timeEnded; /** * The date and time when the patch action completed * * @return the value */ public java.util.Date getTimeEnded() { return timeEnded; } /** The type of Patch operation. */ public enum PatchType implements com.oracle.bmc.http.internal.BmcEnum { Os("OS"), Db("DB"), Gi("GI"), /** * This value is used if a service returns a value for this enum that is not recognized by * this version of the SDK. */ UnknownEnumValue(null); private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(PatchType.class); private final String value; private static java.util.Map map; static { map = new java.util.HashMap<>(); for (PatchType v : PatchType.values()) { if (v != UnknownEnumValue) { map.put(v.getValue(), v); } } } PatchType(String value) { this.value = value; } @com.fasterxml.jackson.annotation.JsonValue public String getValue() { return value; } @com.fasterxml.jackson.annotation.JsonCreator public static PatchType create(String key) { if (map.containsKey(key)) { return map.get(key); } LOG.warn( "Received unknown value '{}' for enum 'PatchType', returning UnknownEnumValue", key); return UnknownEnumValue; } }; /** The type of Patch operation. */ @com.fasterxml.jackson.annotation.JsonProperty("patchType") private final PatchType patchType; /** * The type of Patch operation. * * @return the value */ public PatchType getPatchType() { return patchType; } @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("PatchHistoryEntrySummary("); sb.append("super=").append(super.toString()); sb.append("id=").append(String.valueOf(this.id)); sb.append(", patchId=").append(String.valueOf(this.patchId)); sb.append(", action=").append(String.valueOf(this.action)); sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); sb.append(", timeStarted=").append(String.valueOf(this.timeStarted)); sb.append(", timeEnded=").append(String.valueOf(this.timeEnded)); sb.append(", patchType=").append(String.valueOf(this.patchType)); sb.append(")"); return sb.toString(); } @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof PatchHistoryEntrySummary)) { return false; } PatchHistoryEntrySummary other = (PatchHistoryEntrySummary) o; return java.util.Objects.equals(this.id, other.id) && java.util.Objects.equals(this.patchId, other.patchId) && java.util.Objects.equals(this.action, other.action) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) && java.util.Objects.equals(this.timeStarted, other.timeStarted) && java.util.Objects.equals(this.timeEnded, other.timeEnded) && java.util.Objects.equals(this.patchType, other.patchType) && 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.patchId == null ? 43 : this.patchId.hashCode()); result = (result * PRIME) + (this.action == null ? 43 : this.action.hashCode()); result = (result * PRIME) + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); result = (result * PRIME) + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); result = (result * PRIME) + (this.timeStarted == null ? 43 : this.timeStarted.hashCode()); result = (result * PRIME) + (this.timeEnded == null ? 43 : this.timeEnded.hashCode()); result = (result * PRIME) + (this.patchType == null ? 43 : this.patchType.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy