io.swagger.petstore3.models.PetImage Maven / Gradle / Ivy
/*
* SwaggerPetstoreOpenAPI30Lib
*
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
*/
package io.swagger.petstore3.models;
import com.fasterxml.jackson.annotation.JsonGetter;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonSetter;
/**
* This is a model class for PetImage type.
*/
public class PetImage {
private Integer code;
private String type;
private String message;
/**
* Default constructor.
*/
public PetImage() {
}
/**
* Initialization constructor.
* @param code Integer value for code.
* @param type String value for type.
* @param message String value for message.
*/
public PetImage(
Integer code,
String type,
String message) {
this.code = code;
this.type = type;
this.message = message;
}
/**
* Getter for Code.
* @return Returns the Integer
*/
@JsonGetter("code")
@JsonInclude(JsonInclude.Include.NON_NULL)
public Integer getCode() {
return code;
}
/**
* Setter for Code.
* @param code Value for Integer
*/
@JsonSetter("code")
public void setCode(Integer code) {
this.code = code;
}
/**
* Getter for Type.
* @return Returns the String
*/
@JsonGetter("type")
@JsonInclude(JsonInclude.Include.NON_NULL)
public String getType() {
return type;
}
/**
* Setter for Type.
* @param type Value for String
*/
@JsonSetter("type")
public void setType(String type) {
this.type = type;
}
/**
* Getter for Message.
* @return Returns the String
*/
@JsonGetter("message")
@JsonInclude(JsonInclude.Include.NON_NULL)
public String getMessage() {
return message;
}
/**
* Setter for Message.
* @param message Value for String
*/
@JsonSetter("message")
public void setMessage(String message) {
this.message = message;
}
/**
* Converts this PetImage into string format.
* @return String representation of this class
*/
@Override
public String toString() {
return "PetImage [" + "code=" + code + ", type=" + type + ", message=" + message + "]";
}
/**
* Builds a new {@link PetImage.Builder} object.
* Creates the instance with the state of the current model.
* @return a new {@link PetImage.Builder} object
*/
public Builder toBuilder() {
Builder builder = new Builder()
.code(getCode())
.type(getType())
.message(getMessage());
return builder;
}
/**
* Class to build instances of {@link PetImage}.
*/
public static class Builder {
private Integer code;
private String type;
private String message;
/**
* Setter for code.
* @param code Integer value for code.
* @return Builder
*/
public Builder code(Integer code) {
this.code = code;
return this;
}
/**
* Setter for type.
* @param type String value for type.
* @return Builder
*/
public Builder type(String type) {
this.type = type;
return this;
}
/**
* Setter for message.
* @param message String value for message.
* @return Builder
*/
public Builder message(String message) {
this.message = message;
return this;
}
/**
* Builds a new {@link PetImage} object using the set fields.
* @return {@link PetImage}
*/
public PetImage build() {
return new PetImage(code, type, message);
}
}
}