org.damap.base.rest.madmp.dto.FunderId Maven / Gradle / Ivy
Show all versions of base Show documentation
package org.damap.base.rest.madmp.dto;
import java.util.HashMap;
import java.util.Map;
import javax.annotation.processing.Generated;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonValue;
/**
* The Funder ID Schema
*
* Funder ID of the associated project
*
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"identifier",
"type"
})
@Generated("jsonschema2pojo")
public class FunderId {
/**
* The Funder ID Value Schema
*
* Funder ID, recommended to use CrossRef Funder Registry. See: https://www.crossref.org/services/funder-registry/
* (Required)
*
*/
@JsonProperty("identifier")
@JsonPropertyDescription("Funder ID, recommended to use CrossRef Funder Registry. See: https://www.crossref.org/services/funder-registry/")
private String identifier;
/**
* The Funder ID Type Schema
*
* Identifier type. Allowed values: fundref, url, other
* (Required)
*
*/
@JsonProperty("type")
@JsonPropertyDescription("Identifier type. Allowed values: fundref, url, other")
private FunderId.Type type;
@JsonIgnore
private Map additionalProperties = new HashMap();
/**
* The Funder ID Value Schema
*
* Funder ID, recommended to use CrossRef Funder Registry. See: https://www.crossref.org/services/funder-registry/
* (Required)
*
*/
@JsonProperty("identifier")
public String getIdentifier() {
return identifier;
}
/**
* The Funder ID Value Schema
*
* Funder ID, recommended to use CrossRef Funder Registry. See: https://www.crossref.org/services/funder-registry/
* (Required)
*
*/
@JsonProperty("identifier")
public void setIdentifier(String identifier) {
this.identifier = identifier;
}
/**
* The Funder ID Type Schema
*
* Identifier type. Allowed values: fundref, url, other
* (Required)
*
*/
@JsonProperty("type")
public FunderId.Type getType() {
return type;
}
/**
* The Funder ID Type Schema
*
* Identifier type. Allowed values: fundref, url, other
* (Required)
*
*/
@JsonProperty("type")
public void setType(FunderId.Type type) {
this.type = type;
}
@JsonAnyGetter
public Map getAdditionalProperties() {
return this.additionalProperties;
}
@JsonAnySetter
public void setAdditionalProperty(String name, Object value) {
this.additionalProperties.put(name, value);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(FunderId.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('[');
sb.append("identifier");
sb.append('=');
sb.append(((this.identifier == null)?"":this.identifier));
sb.append(',');
sb.append("type");
sb.append('=');
sb.append(((this.type == null)?"":this.type));
sb.append(',');
sb.append("additionalProperties");
sb.append('=');
sb.append(((this.additionalProperties == null)?"":this.additionalProperties));
sb.append(',');
if (sb.charAt((sb.length()- 1)) == ',') {
sb.setCharAt((sb.length()- 1), ']');
} else {
sb.append(']');
}
return sb.toString();
}
@Override
public int hashCode() {
int result = 1;
result = ((result* 31)+((this.identifier == null)? 0 :this.identifier.hashCode()));
result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode()));
result = ((result* 31)+((this.type == null)? 0 :this.type.hashCode()));
return result;
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if ((other instanceof FunderId) == false) {
return false;
}
FunderId rhs = ((FunderId) other);
return ((((this.identifier == rhs.identifier)||((this.identifier!= null)&&this.identifier.equals(rhs.identifier)))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.type == rhs.type)||((this.type!= null)&&this.type.equals(rhs.type))));
}
/**
* The Funder ID Type Schema
*
* Identifier type. Allowed values: fundref, url, other
*
*/
@Generated("jsonschema2pojo")
public enum Type {
FUNDREF("fundref"),
URL("url"),
OTHER("other");
private final String value;
private final static Map CONSTANTS = new HashMap();
static {
for (FunderId.Type c: values()) {
CONSTANTS.put(c.value, c);
}
}
Type(String value) {
this.value = value;
}
@Override
public String toString() {
return this.value;
}
@JsonValue
public String value() {
return this.value;
}
@JsonCreator
public static FunderId.Type fromValue(String value) {
FunderId.Type constant = CONSTANTS.get(value);
if (constant == null) {
throw new IllegalArgumentException(value);
} else {
return constant;
}
}
}
}