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

com.oracle.bmc.dataintegration.model.PatchChangeSummary Maven / Gradle / Ivy

/**
 * 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.dataintegration.model;

/**
 * This is the patch report summary information. 
* 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: 20200430") @com.fasterxml.jackson.databind.annotation.JsonDeserialize( builder = PatchChangeSummary.Builder.class) @com.fasterxml.jackson.annotation.JsonFilter( com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel.EXPLICITLY_SET_FILTER_NAME) public final class PatchChangeSummary extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel { @Deprecated @java.beans.ConstructorProperties({ "key", "name", "namePath", "type", "objectVersion", "identifier", "action" }) public PatchChangeSummary( String key, String name, String namePath, Type type, Integer objectVersion, String identifier, Action action) { super(); this.key = key; this.name = name; this.namePath = namePath; this.type = type; this.objectVersion = objectVersion; this.identifier = identifier; this.action = action; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { /** The key of the object. */ @com.fasterxml.jackson.annotation.JsonProperty("key") private String key; /** * The key of the object. * * @param key the value to set * @return this builder */ public Builder key(String key) { this.key = key; this.__explicitlySet__.add("key"); return this; } /** * Free form text without any restriction on permitted characters. Name can have letters, * numbers, and special characters. The value is editable and is restricted to 1000 * characters. */ @com.fasterxml.jackson.annotation.JsonProperty("name") private String name; /** * Free form text without any restriction on permitted characters. Name can have letters, * numbers, and special characters. The value is editable and is restricted to 1000 * characters. * * @param name the value to set * @return this builder */ public Builder name(String name) { this.name = name; this.__explicitlySet__.add("name"); return this; } /** * The fully qualified path of the published object, which would include its project and * folder. */ @com.fasterxml.jackson.annotation.JsonProperty("namePath") private String namePath; /** * The fully qualified path of the published object, which would include its project and * folder. * * @param namePath the value to set * @return this builder */ public Builder namePath(String namePath) { this.namePath = namePath; this.__explicitlySet__.add("namePath"); return this; } /** The type of the object in patch. */ @com.fasterxml.jackson.annotation.JsonProperty("type") private Type type; /** * The type of the object in patch. * * @param type the value to set * @return this builder */ public Builder type(Type type) { this.type = type; this.__explicitlySet__.add("type"); return this; } /** The object version. */ @com.fasterxml.jackson.annotation.JsonProperty("objectVersion") private Integer objectVersion; /** * The object version. * * @param objectVersion the value to set * @return this builder */ public Builder objectVersion(Integer objectVersion) { this.objectVersion = objectVersion; this.__explicitlySet__.add("objectVersion"); return this; } /** * Value can only contain upper case letters, underscore and numbers. It should begin with * upper case letter or underscore. The value can be modified. */ @com.fasterxml.jackson.annotation.JsonProperty("identifier") private String identifier; /** * Value can only contain upper case letters, underscore and numbers. It should begin with * upper case letter or underscore. The value can be modified. * * @param identifier the value to set * @return this builder */ public Builder identifier(String identifier) { this.identifier = identifier; this.__explicitlySet__.add("identifier"); return this; } /** The patch action indicating if object was created, updated, or deleted. */ @com.fasterxml.jackson.annotation.JsonProperty("action") private Action action; /** * The patch action indicating if object was created, updated, or deleted. * * @param action the value to set * @return this builder */ public Builder action(Action action) { this.action = action; this.__explicitlySet__.add("action"); return this; } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); public PatchChangeSummary build() { PatchChangeSummary model = new PatchChangeSummary( this.key, this.name, this.namePath, this.type, this.objectVersion, this.identifier, this.action); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } return model; } @com.fasterxml.jackson.annotation.JsonIgnore public Builder copy(PatchChangeSummary model) { if (model.wasPropertyExplicitlySet("key")) { this.key(model.getKey()); } if (model.wasPropertyExplicitlySet("name")) { this.name(model.getName()); } if (model.wasPropertyExplicitlySet("namePath")) { this.namePath(model.getNamePath()); } if (model.wasPropertyExplicitlySet("type")) { this.type(model.getType()); } if (model.wasPropertyExplicitlySet("objectVersion")) { this.objectVersion(model.getObjectVersion()); } if (model.wasPropertyExplicitlySet("identifier")) { this.identifier(model.getIdentifier()); } if (model.wasPropertyExplicitlySet("action")) { this.action(model.getAction()); } return this; } } /** Create a new builder. */ public static Builder builder() { return new Builder(); } public Builder toBuilder() { return new Builder().copy(this); } /** The key of the object. */ @com.fasterxml.jackson.annotation.JsonProperty("key") private final String key; /** * The key of the object. * * @return the value */ public String getKey() { return key; } /** * Free form text without any restriction on permitted characters. Name can have letters, * numbers, and special characters. The value is editable and is restricted to 1000 characters. */ @com.fasterxml.jackson.annotation.JsonProperty("name") private final String name; /** * Free form text without any restriction on permitted characters. Name can have letters, * numbers, and special characters. The value is editable and is restricted to 1000 characters. * * @return the value */ public String getName() { return name; } /** * The fully qualified path of the published object, which would include its project and folder. */ @com.fasterxml.jackson.annotation.JsonProperty("namePath") private final String namePath; /** * The fully qualified path of the published object, which would include its project and folder. * * @return the value */ public String getNamePath() { return namePath; } /** The type of the object in patch. */ public enum Type implements com.oracle.bmc.http.internal.BmcEnum { IntegrationTask("INTEGRATION_TASK"), DataLoaderTask("DATA_LOADER_TASK"), PipelineTask("PIPELINE_TASK"), SqlTask("SQL_TASK"), OciDataflowTask("OCI_DATAFLOW_TASK"), RestTask("REST_TASK"), /** * 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(Type.class); private final String value; private static java.util.Map map; static { map = new java.util.HashMap<>(); for (Type v : Type.values()) { if (v != UnknownEnumValue) { map.put(v.getValue(), v); } } } Type(String value) { this.value = value; } @com.fasterxml.jackson.annotation.JsonValue public String getValue() { return value; } @com.fasterxml.jackson.annotation.JsonCreator public static Type create(String key) { if (map.containsKey(key)) { return map.get(key); } LOG.warn( "Received unknown value '{}' for enum 'Type', returning UnknownEnumValue", key); return UnknownEnumValue; } }; /** The type of the object in patch. */ @com.fasterxml.jackson.annotation.JsonProperty("type") private final Type type; /** * The type of the object in patch. * * @return the value */ public Type getType() { return type; } /** The object version. */ @com.fasterxml.jackson.annotation.JsonProperty("objectVersion") private final Integer objectVersion; /** * The object version. * * @return the value */ public Integer getObjectVersion() { return objectVersion; } /** * Value can only contain upper case letters, underscore and numbers. It should begin with upper * case letter or underscore. The value can be modified. */ @com.fasterxml.jackson.annotation.JsonProperty("identifier") private final String identifier; /** * Value can only contain upper case letters, underscore and numbers. It should begin with upper * case letter or underscore. The value can be modified. * * @return the value */ public String getIdentifier() { return identifier; } /** The patch action indicating if object was created, updated, or deleted. */ public enum Action implements com.oracle.bmc.http.internal.BmcEnum { Created("CREATED"), Deleted("DELETED"), Updated("UPDATED"), /** * 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 patch action indicating if object was created, updated, or deleted. */ @com.fasterxml.jackson.annotation.JsonProperty("action") private final Action action; /** * The patch action indicating if object was created, updated, or deleted. * * @return the value */ public Action getAction() { return action; } @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("PatchChangeSummary("); sb.append("super=").append(super.toString()); sb.append("key=").append(String.valueOf(this.key)); sb.append(", name=").append(String.valueOf(this.name)); sb.append(", namePath=").append(String.valueOf(this.namePath)); sb.append(", type=").append(String.valueOf(this.type)); sb.append(", objectVersion=").append(String.valueOf(this.objectVersion)); sb.append(", identifier=").append(String.valueOf(this.identifier)); sb.append(", action=").append(String.valueOf(this.action)); sb.append(")"); return sb.toString(); } @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof PatchChangeSummary)) { return false; } PatchChangeSummary other = (PatchChangeSummary) o; return java.util.Objects.equals(this.key, other.key) && java.util.Objects.equals(this.name, other.name) && java.util.Objects.equals(this.namePath, other.namePath) && java.util.Objects.equals(this.type, other.type) && java.util.Objects.equals(this.objectVersion, other.objectVersion) && java.util.Objects.equals(this.identifier, other.identifier) && java.util.Objects.equals(this.action, other.action) && super.equals(other); } @Override public int hashCode() { final int PRIME = 59; int result = 1; result = (result * PRIME) + (this.key == null ? 43 : this.key.hashCode()); result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); result = (result * PRIME) + (this.namePath == null ? 43 : this.namePath.hashCode()); result = (result * PRIME) + (this.type == null ? 43 : this.type.hashCode()); result = (result * PRIME) + (this.objectVersion == null ? 43 : this.objectVersion.hashCode()); result = (result * PRIME) + (this.identifier == null ? 43 : this.identifier.hashCode()); result = (result * PRIME) + (this.action == null ? 43 : this.action.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy