com.github.tjake.jlama.net.openai.model.ImagesResponse Maven / Gradle / Ivy
/*
* OpenAI API
* The OpenAI REST API. Please see https://platform.openai.com/docs/api-reference for more details.
*
* The version of the OpenAPI document: 2.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package com.github.tjake.jlama.net.openai.model;
import java.util.Objects;
import java.util.Map;
import java.util.HashMap;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import com.github.tjake.jlama.net.openai.model.Image;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import jakarta.validation.constraints.*;
import jakarta.validation.Valid;
import org.hibernate.validator.constraints.*;
import com.github.tjake.jlama.net.openai.JSON;
/**
* ImagesResponse
*/
@JsonPropertyOrder({
ImagesResponse.JSON_PROPERTY_CREATED,
ImagesResponse.JSON_PROPERTY_DATA
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0")
public class ImagesResponse {
public static final String JSON_PROPERTY_CREATED = "created";
private Integer created;
public static final String JSON_PROPERTY_DATA = "data";
private List<@Valid Image> data;
public ImagesResponse() {
}
public ImagesResponse created(Integer created) {
this.created = created;
return this;
}
/**
* Get created
* @return created
*/
@jakarta.annotation.Nonnull
@NotNull
@JsonProperty(JSON_PROPERTY_CREATED)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public Integer getCreated() {
return created;
}
@JsonProperty(JSON_PROPERTY_CREATED)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setCreated(Integer created) {
this.created = created;
}
public ImagesResponse data(List<@Valid Image> data) {
this.data = data;
return this;
}
public ImagesResponse addDataItem(Image dataItem) {
if (this.data == null) {
this.data = new ArrayList<>();
}
this.data.add(dataItem);
return this;
}
/**
* Get data
* @return data
*/
@jakarta.annotation.Nonnull
@NotNull
@Valid
@JsonProperty(JSON_PROPERTY_DATA)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public List<@Valid Image> getData() {
return data;
}
@JsonProperty(JSON_PROPERTY_DATA)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setData(List<@Valid Image> data) {
this.data = data;
}
/**
* Return true if this ImagesResponse object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ImagesResponse imagesResponse = (ImagesResponse) o;
return Objects.equals(this.created, imagesResponse.created) &&
Objects.equals(this.data, imagesResponse.data);
}
@Override
public int hashCode() {
return Objects.hash(created, data);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ImagesResponse {\n");
sb.append(" created: ").append(toIndentedString(created)).append("\n");
sb.append(" data: ").append(toIndentedString(data)).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 ");
}
}