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

com.oracle.bmc.oda.model.WorkRequestLogEntry Maven / Gradle / Ivy

/**
 * Copyright (c) 2016, 2023, 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.oda.model;

/**
 * A log message from the execution of a work request.
 * 
* 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). **/ @javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190506") @com.fasterxml.jackson.databind.annotation.JsonDeserialize( builder = WorkRequestLogEntry.Builder.class ) @com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) public final class WorkRequestLogEntry extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated @java.beans.ConstructorProperties({"message", "timeStamp"}) public WorkRequestLogEntry(String message, java.util.Date timeStamp) { super(); this.message = message; this.timeStamp = timeStamp; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { /** * Human-readable log message. **/ @com.fasterxml.jackson.annotation.JsonProperty("message") private String message; /** * Human-readable log message. * @param message the value to set * @return this builder **/ public Builder message(String message) { this.message = message; this.__explicitlySet__.add("message"); return this; } /** * When the log message was written. A date-time string as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339), section 14.29. **/ @com.fasterxml.jackson.annotation.JsonProperty("timeStamp") private java.util.Date timeStamp; /** * When the log message was written. A date-time string as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339), section 14.29. * @param timeStamp the value to set * @return this builder **/ public Builder timeStamp(java.util.Date timeStamp) { this.timeStamp = timeStamp; this.__explicitlySet__.add("timeStamp"); return this; } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); public WorkRequestLogEntry build() { WorkRequestLogEntry model = new WorkRequestLogEntry(this.message, this.timeStamp); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } return model; } @com.fasterxml.jackson.annotation.JsonIgnore public Builder copy(WorkRequestLogEntry model) { if (model.wasPropertyExplicitlySet("message")) { this.message(model.getMessage()); } if (model.wasPropertyExplicitlySet("timeStamp")) { this.timeStamp(model.getTimeStamp()); } return this; } } /** * Create a new builder. */ public static Builder builder() { return new Builder(); } public Builder toBuilder() { return new Builder().copy(this); } /** * Human-readable log message. **/ @com.fasterxml.jackson.annotation.JsonProperty("message") private final String message; /** * Human-readable log message. * @return the value **/ public String getMessage() { return message; } /** * When the log message was written. A date-time string as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339), section 14.29. **/ @com.fasterxml.jackson.annotation.JsonProperty("timeStamp") private final java.util.Date timeStamp; /** * When the log message was written. A date-time string as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339), section 14.29. * @return the value **/ public java.util.Date getTimeStamp() { return timeStamp; } @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("WorkRequestLogEntry("); sb.append("super=").append(super.toString()); sb.append("message=").append(String.valueOf(this.message)); sb.append(", timeStamp=").append(String.valueOf(this.timeStamp)); sb.append(")"); return sb.toString(); } @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof WorkRequestLogEntry)) { return false; } WorkRequestLogEntry other = (WorkRequestLogEntry) o; return java.util.Objects.equals(this.message, other.message) && java.util.Objects.equals(this.timeStamp, other.timeStamp) && super.equals(other); } @Override public int hashCode() { final int PRIME = 59; int result = 1; result = (result * PRIME) + (this.message == null ? 43 : this.message.hashCode()); result = (result * PRIME) + (this.timeStamp == null ? 43 : this.timeStamp.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy