openapitools.model.ChildBB Maven / Gradle / Ivy
/*
* Product Base Definitions
* This component represents the Open API interface of the accounting service.
*
* The version of the OpenAPI document: 0.0.1
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package openapitools.model;
import java.util.Objects;
import java.util.Map;
import java.util.HashMap;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import openapitools.model.BankAccount;
import openapitools.model.ChildB;
import openapitools.model.ParentClass;
import org.openapitools.jackson.nullable.JsonNullable;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.openapitools.jackson.nullable.JsonNullable;
import java.util.NoSuchElementException;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import openapitools.JSON;
/**
* ChildBB
*/
@JsonPropertyOrder({
ChildBB.JSON_PROPERTY_CHILD_B_B_ATTRIBUTE,
ChildBB.JSON_PROPERTY_DEPRECATED_ATTRIBUTE,
ChildBB.JSON_PROPERTY_DEPRECATED_BS,
ChildBB.JSON_PROPERTY_DEPRECATED_PARENT,
ChildBB.JSON_PROPERTY_DEPRECATED_ARRAY
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.9.0")
@JsonIgnoreProperties(
value = "objectType", // ignore manually set objectType, it will be automatically generated by Jackson during serialization
allowSetters = true // allows the objectType to be set during deserialization
)
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "objectType", visible = true)
public class ChildBB extends ChildB {
public static final String JSON_PROPERTY_CHILD_B_B_ATTRIBUTE = "childBBAttribute";
private Long childBBAttribute;
public static final String JSON_PROPERTY_DEPRECATED_ATTRIBUTE = "deprecatedAttribute";
@Deprecated
private Integer deprecatedAttribute;
public static final String JSON_PROPERTY_DEPRECATED_BS = "deprecatedBs";
@Deprecated
private List deprecatedBs = new ArrayList<>();
public static final String JSON_PROPERTY_DEPRECATED_PARENT = "deprecatedParent";
private ParentClass deprecatedParent;
public static final String JSON_PROPERTY_DEPRECATED_ARRAY = "deprecatedArray";
private JsonNullable deprecatedArray = JsonNullable.undefined();
public ChildBB() {
}
public ChildBB childBBAttribute(Long childBBAttribute) {
this.childBBAttribute = childBBAttribute;
return this;
}
/**
* Get childBBAttribute
* @return childBBAttribute
*/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_CHILD_B_B_ATTRIBUTE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public Long getChildBBAttribute() {
return childBBAttribute;
}
@JsonProperty(JSON_PROPERTY_CHILD_B_B_ATTRIBUTE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setChildBBAttribute(Long childBBAttribute) {
this.childBBAttribute = childBBAttribute;
}
@Deprecated
public ChildBB deprecatedAttribute(Integer deprecatedAttribute) {
this.deprecatedAttribute = deprecatedAttribute;
return this;
}
/**
* <br><br> Deprecated: Please keep `hands off`. (since: , removed with: )
* @return deprecatedAttribute
* @deprecated
*/
@Deprecated
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_DEPRECATED_ATTRIBUTE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public Integer getDeprecatedAttribute() {
return deprecatedAttribute;
}
@Deprecated
@JsonProperty(JSON_PROPERTY_DEPRECATED_ATTRIBUTE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setDeprecatedAttribute(Integer deprecatedAttribute) {
this.deprecatedAttribute = deprecatedAttribute;
}
@Deprecated
public ChildBB deprecatedBs(List deprecatedBs) {
this.deprecatedBs = deprecatedBs;
return this;
}
public ChildBB addDeprecatedBsItem(ChildB deprecatedBsItem) {
if (this.deprecatedBs == null) {
this.deprecatedBs = new ArrayList<>();
}
this.deprecatedBs.add(deprecatedBsItem);
return this;
}
/**
* Get deprecatedBs
* @return deprecatedBs
* @deprecated
*/
@Deprecated
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_DEPRECATED_BS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List getDeprecatedBs() {
return deprecatedBs;
}
@Deprecated
@JsonProperty(JSON_PROPERTY_DEPRECATED_BS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setDeprecatedBs(List deprecatedBs) {
this.deprecatedBs = deprecatedBs;
}
public ChildBB deprecatedParent(ParentClass deprecatedParent) {
this.deprecatedParent = deprecatedParent;
return this;
}
/**
* Get deprecatedParent
* @return deprecatedParent
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_DEPRECATED_PARENT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public ParentClass getDeprecatedParent() {
return deprecatedParent;
}
@JsonProperty(JSON_PROPERTY_DEPRECATED_PARENT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setDeprecatedParent(ParentClass deprecatedParent) {
this.deprecatedParent = deprecatedParent;
}
public ChildBB deprecatedArray(byte[] deprecatedArray) {
this.deprecatedArray = JsonNullable.of(deprecatedArray);
return this;
}
/**
* Get deprecatedArray
* @return deprecatedArray
*/
@javax.annotation.Nullable
@JsonIgnore
public byte[] getDeprecatedArray() {
return deprecatedArray.orElse(null);
}
@JsonProperty(JSON_PROPERTY_DEPRECATED_ARRAY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable getDeprecatedArray_JsonNullable() {
return deprecatedArray;
}
@JsonProperty(JSON_PROPERTY_DEPRECATED_ARRAY)
public void setDeprecatedArray_JsonNullable(JsonNullable deprecatedArray) {
this.deprecatedArray = deprecatedArray;
}
public void setDeprecatedArray(byte[] deprecatedArray) {
this.deprecatedArray = JsonNullable.of(deprecatedArray);
}
/**
* Return true if this ChildBB object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ChildBB childBB = (ChildBB) o;
return Objects.equals(this.childBBAttribute, childBB.childBBAttribute) &&
Objects.equals(this.deprecatedAttribute, childBB.deprecatedAttribute) &&
Objects.equals(this.deprecatedBs, childBB.deprecatedBs) &&
Objects.equals(this.deprecatedParent, childBB.deprecatedParent) &&
equalsNullable(this.deprecatedArray, childBB.deprecatedArray) &&
super.equals(o);
}
private static boolean equalsNullable(JsonNullable a, JsonNullable b) {
return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get()));
}
@Override
public int hashCode() {
return Objects.hash(childBBAttribute, deprecatedAttribute, deprecatedBs, deprecatedParent, hashCodeNullable(deprecatedArray), super.hashCode());
}
private static int hashCodeNullable(JsonNullable a) {
if (a == null) {
return 1;
}
return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ChildBB {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" childBBAttribute: ").append(toIndentedString(childBBAttribute)).append("\n");
sb.append(" deprecatedAttribute: ").append(toIndentedString(deprecatedAttribute)).append("\n");
sb.append(" deprecatedBs: ").append(toIndentedString(deprecatedBs)).append("\n");
sb.append(" deprecatedParent: ").append(toIndentedString(deprecatedParent)).append("\n");
sb.append(" deprecatedArray: ").append(toIndentedString(deprecatedArray)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
static {
// Initialize and register the discriminator mappings.
Map> mappings = new HashMap<>();
mappings.put("ChildBB", ChildBB.class);
JSON.registerDiscriminator(ChildBB.class, "objectType", mappings);
}
}