All Downloads are FREE. Search and download functionalities are using the official Maven repository.

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.JsonInclude;
import com.fasterxml.jackson.annotation.JsonSetter;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import io.apimatic.core.types.OptionalNullable;
import java.util.List;

/**
 * This is a model class for DefinitionsResponse type.
 */
public class DefinitionsResponse {
    private OptionalNullable word;
    private OptionalNullable> 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 = OptionalNullable.of(word);
        this.definition = OptionalNullable.of(definition);
    }

    /**
     * Initialization constructor.
     * @param  word  String value for word.
     * @param  definition  List of String value for definition.
     */

    protected DefinitionsResponse(OptionalNullable word,
            OptionalNullable> definition) {
        this.word = word;
        this.definition = definition;
    }

    /**
     * Internal Getter for Word.
     * The word that is searched.
     * @return Returns the Internal String
     */
    @JsonGetter("word")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonSerialize(using = OptionalNullable.Serializer.class)
    protected OptionalNullable internalGetWord() {
        return this.word;
    }

    /**
     * Getter for Word.
     * The word that is searched.
     * @return Returns the String
     */
    public String getWord() {
        return OptionalNullable.getFrom(word);
    }

    /**
     * Setter for Word.
     * The word that is searched.
     * @param word Value for String
     */
    @JsonSetter("word")
    public void setWord(String word) {
        this.word = OptionalNullable.of(word);
    }

    /**
     * UnSetter for Word.
     * The word that is searched.
     */
    public void unsetWord() {
        word = null;
    }

    /**
     * Internal Getter for Definition.
     * The definitions of the searched word.
     * @return Returns the Internal List of String
     */
    @JsonGetter("definition")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonSerialize(using = OptionalNullable.Serializer.class)
    protected OptionalNullable> internalGetDefinition() {
        return this.definition;
    }

    /**
     * Getter for Definition.
     * The definitions of the searched word.
     * @return Returns the List of String
     */
    public List getDefinition() {
        return OptionalNullable.getFrom(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 = OptionalNullable.of(definition);
    }

    /**
     * UnSetter for Definition.
     * The definitions of the searched word.
     */
    public void unsetDefinition() {
        definition = null;
    }

    /**
     * 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();
        builder.word = internalGetWord();
        builder.definition = internalGetDefinition();
        return builder;
    }

    /**
     * Class to build instances of {@link DefinitionsResponse}.
     */
    public static class Builder {
        private OptionalNullable word;
        private OptionalNullable> definition;



        /**
         * Setter for word.
         * @param  word  String value for word.
         * @return Builder
         */
        public Builder word(String word) {
            this.word = OptionalNullable.of(word);
            return this;
        }

        /**
         * UnSetter for word.
         * @return Builder
         */
        public Builder unsetWord() {
            word = null;
            return this;
        }

        /**
         * Setter for definition.
         * @param  definition  List of String value for definition.
         * @return Builder
         */
        public Builder definition(List definition) {
            this.definition = OptionalNullable.of(definition);
            return this;
        }

        /**
         * UnSetter for definition.
         * @return Builder
         */
        public Builder unsetDefinition() {
            definition = null;
            return this;
        }

        /**
         * Builds a new {@link DefinitionsResponse} object using the set fields.
         * @return {@link DefinitionsResponse}
         */
        public DefinitionsResponse build() {
            return new DefinitionsResponse(word, definition);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy