openapitools.model.BusinessChild 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.Arrays;
import openapitools.model.BusinessParent;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import openapitools.JSON;
/**
* BusinessChild
*/
@JsonPropertyOrder({
BusinessChild.JSON_PROPERTY_CHILD_ATTRIBUTE
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.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 BusinessChild extends BusinessParent {
public static final String JSON_PROPERTY_CHILD_ATTRIBUTE = "childAttribute";
private String childAttribute;
public BusinessChild() {
}
public BusinessChild childAttribute(String childAttribute) {
this.childAttribute = childAttribute;
return this;
}
/**
* Get childAttribute
* @return childAttribute
*/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_CHILD_ATTRIBUTE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getChildAttribute() {
return childAttribute;
}
@JsonProperty(JSON_PROPERTY_CHILD_ATTRIBUTE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setChildAttribute(String childAttribute) {
this.childAttribute = childAttribute;
}
/**
* Return true if this BusinessChild object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
BusinessChild businessChild = (BusinessChild) o;
return Objects.equals(this.childAttribute, businessChild.childAttribute) &&
super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(childAttribute, super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class BusinessChild {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" childAttribute: ").append(toIndentedString(childAttribute)).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("BusinessChild", BusinessChild.class);
JSON.registerDiscriminator(BusinessChild.class, "objectType", mappings);
}
}