
com.rapidapi.p.wordsapiv1.models.DefinitionsResponse Maven / Gradle / Ivy
/*
* WordsAPILib
*
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
*/
package com.rapidapi.p.wordsapiv1.models;
import com.fasterxml.jackson.annotation.JsonGetter;
import com.fasterxml.jackson.annotation.JsonSetter;
import java.util.List;
/**
* This is a model class for DefinitionsResponse type.
*/
public class DefinitionsResponse {
private String word;
private List definition;
/**
* Default constructor.
*/
public DefinitionsResponse() {
}
/**
* Initialization constructor.
* @param word String value for word.
* @param definition List of String value for definition.
*/
public DefinitionsResponse(
String word,
List definition) {
this.word = word;
this.definition = definition;
}
/**
* Getter for Word.
* The word that is searched.
* @return Returns the String
*/
@JsonGetter("word")
public String getWord() {
return word;
}
/**
* Setter for Word.
* The word that is searched.
* @param word Value for String
*/
@JsonSetter("word")
public void setWord(String word) {
this.word = word;
}
/**
* Getter for Definition.
* The definitions of the searched word.
* @return Returns the List of String
*/
@JsonGetter("definition")
public List getDefinition() {
return definition;
}
/**
* Setter for Definition.
* The definitions of the searched word.
* @param definition Value for List of String
*/
@JsonSetter("definition")
public void setDefinition(List definition) {
this.definition = definition;
}
/**
* Converts this DefinitionsResponse into string format.
* @return String representation of this class
*/
@Override
public String toString() {
return "DefinitionsResponse [" + "word=" + word + ", definition=" + definition + "]";
}
/**
* Builds a new {@link DefinitionsResponse.Builder} object.
* Creates the instance with the state of the current model.
* @return a new {@link DefinitionsResponse.Builder} object
*/
public Builder toBuilder() {
Builder builder = new Builder(word, definition);
return builder;
}
/**
* Class to build instances of {@link DefinitionsResponse}.
*/
public static class Builder {
private String word;
private List definition;
/**
* Initialization constructor.
*/
public Builder() {
}
/**
* Initialization constructor.
* @param word String value for word.
* @param definition List of String value for definition.
*/
public Builder(String word, List definition) {
this.word = word;
this.definition = definition;
}
/**
* Setter for word.
* @param word String value for word.
* @return Builder
*/
public Builder word(String word) {
this.word = word;
return this;
}
/**
* Setter for definition.
* @param definition List of String value for definition.
* @return Builder
*/
public Builder definition(List definition) {
this.definition = definition;
return this;
}
/**
* Builds a new {@link DefinitionsResponse} object using the set fields.
* @return {@link DefinitionsResponse}
*/
public DefinitionsResponse build() {
return new DefinitionsResponse(word, definition);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy