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

com.rapidapi.p.wordsapiv1.models.WordDetails 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 WordDetails type.
 */
public class WordDetails {
    private OptionalNullable definition;
    private OptionalNullable partOfSpeech;
    private OptionalNullable> synonyms;
    private OptionalNullable> typeOf;
    private OptionalNullable> hasTypes;
    private OptionalNullable> derivation;
    private OptionalNullable> examples;
    private OptionalNullable> antonyms;
    private OptionalNullable> verbGroup;
    private OptionalNullable> hasParts;
    private OptionalNullable> hasSubstances;
    private OptionalNullable> entails;

    /**
     * Default constructor.
     */
    public WordDetails() {
    }

    /**
     * Initialization constructor.
     * @param  definition  String value for definition.
     * @param  partOfSpeech  String value for partOfSpeech.
     * @param  synonyms  List of String value for synonyms.
     * @param  typeOf  List of String value for typeOf.
     * @param  hasTypes  List of String value for hasTypes.
     * @param  derivation  List of String value for derivation.
     * @param  examples  List of String value for examples.
     * @param  antonyms  List of String value for antonyms.
     * @param  verbGroup  List of String value for verbGroup.
     * @param  hasParts  List of String value for hasParts.
     * @param  hasSubstances  List of String value for hasSubstances.
     * @param  entails  List of String value for entails.
     */
    public WordDetails(
            String definition,
            String partOfSpeech,
            List synonyms,
            List typeOf,
            List hasTypes,
            List derivation,
            List examples,
            List antonyms,
            List verbGroup,
            List hasParts,
            List hasSubstances,
            List entails) {
        this.definition = OptionalNullable.of(definition);
        this.partOfSpeech = OptionalNullable.of(partOfSpeech);
        this.synonyms = OptionalNullable.of(synonyms);
        this.typeOf = OptionalNullable.of(typeOf);
        this.hasTypes = OptionalNullable.of(hasTypes);
        this.derivation = OptionalNullable.of(derivation);
        this.examples = OptionalNullable.of(examples);
        this.antonyms = OptionalNullable.of(antonyms);
        this.verbGroup = OptionalNullable.of(verbGroup);
        this.hasParts = OptionalNullable.of(hasParts);
        this.hasSubstances = OptionalNullable.of(hasSubstances);
        this.entails = OptionalNullable.of(entails);
    }

    /**
     * Initialization constructor.
     * @param  definition  String value for definition.
     * @param  partOfSpeech  String value for partOfSpeech.
     * @param  synonyms  List of String value for synonyms.
     * @param  typeOf  List of String value for typeOf.
     * @param  hasTypes  List of String value for hasTypes.
     * @param  derivation  List of String value for derivation.
     * @param  examples  List of String value for examples.
     * @param  antonyms  List of String value for antonyms.
     * @param  verbGroup  List of String value for verbGroup.
     * @param  hasParts  List of String value for hasParts.
     * @param  hasSubstances  List of String value for hasSubstances.
     * @param  entails  List of String value for entails.
     */

    protected WordDetails(OptionalNullable definition,
            OptionalNullable partOfSpeech, OptionalNullable> synonyms,
            OptionalNullable> typeOf, OptionalNullable> hasTypes,
            OptionalNullable> derivation, OptionalNullable> examples,
            OptionalNullable> antonyms, OptionalNullable> verbGroup,
            OptionalNullable> hasParts, OptionalNullable> hasSubstances,
            OptionalNullable> entails) {
        this.definition = definition;
        this.partOfSpeech = partOfSpeech;
        this.synonyms = synonyms;
        this.typeOf = typeOf;
        this.hasTypes = hasTypes;
        this.derivation = derivation;
        this.examples = examples;
        this.antonyms = antonyms;
        this.verbGroup = verbGroup;
        this.hasParts = hasParts;
        this.hasSubstances = hasSubstances;
        this.entails = entails;
    }

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

    /**
     * Getter for Definition.
     * Explains the definition of the word.
     * @return Returns the String
     */
    public String getDefinition() {
        return OptionalNullable.getFrom(definition);
    }

    /**
     * Setter for Definition.
     * Explains the definition of the word.
     * @param definition Value for String
     */
    @JsonSetter("definition")
    public void setDefinition(String definition) {
        this.definition = OptionalNullable.of(definition);
    }

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

    /**
     * Internal Getter for PartOfSpeech.
     * Explains what part of speech the word is.
     * @return Returns the Internal String
     */
    @JsonGetter("partOfSpeech")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonSerialize(using = OptionalNullable.Serializer.class)
    protected OptionalNullable internalGetPartOfSpeech() {
        return this.partOfSpeech;
    }

    /**
     * Getter for PartOfSpeech.
     * Explains what part of speech the word is.
     * @return Returns the String
     */
    public String getPartOfSpeech() {
        return OptionalNullable.getFrom(partOfSpeech);
    }

    /**
     * Setter for PartOfSpeech.
     * Explains what part of speech the word is.
     * @param partOfSpeech Value for String
     */
    @JsonSetter("partOfSpeech")
    public void setPartOfSpeech(String partOfSpeech) {
        this.partOfSpeech = OptionalNullable.of(partOfSpeech);
    }

    /**
     * UnSetter for PartOfSpeech.
     * Explains what part of speech the word is.
     */
    public void unsetPartOfSpeech() {
        partOfSpeech = null;
    }

    /**
     * Internal Getter for Synonyms.
     * The list of synonyms.
     * @return Returns the Internal List of String
     */
    @JsonGetter("synonyms")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonSerialize(using = OptionalNullable.Serializer.class)
    protected OptionalNullable> internalGetSynonyms() {
        return this.synonyms;
    }

    /**
     * Getter for Synonyms.
     * The list of synonyms.
     * @return Returns the List of String
     */
    public List getSynonyms() {
        return OptionalNullable.getFrom(synonyms);
    }

    /**
     * Setter for Synonyms.
     * The list of synonyms.
     * @param synonyms Value for List of String
     */
    @JsonSetter("synonyms")
    public void setSynonyms(List synonyms) {
        this.synonyms = OptionalNullable.of(synonyms);
    }

    /**
     * UnSetter for Synonyms.
     * The list of synonyms.
     */
    public void unsetSynonyms() {
        synonyms = null;
    }

    /**
     * Internal Getter for TypeOf.
     * List of words that are more general than the searched word.
     * @return Returns the Internal List of String
     */
    @JsonGetter("typeOf")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonSerialize(using = OptionalNullable.Serializer.class)
    protected OptionalNullable> internalGetTypeOf() {
        return this.typeOf;
    }

    /**
     * Getter for TypeOf.
     * List of words that are more general than the searched word.
     * @return Returns the List of String
     */
    public List getTypeOf() {
        return OptionalNullable.getFrom(typeOf);
    }

    /**
     * Setter for TypeOf.
     * List of words that are more general than the searched word.
     * @param typeOf Value for List of String
     */
    @JsonSetter("typeOf")
    public void setTypeOf(List typeOf) {
        this.typeOf = OptionalNullable.of(typeOf);
    }

    /**
     * UnSetter for TypeOf.
     * List of words that are more general than the searched word.
     */
    public void unsetTypeOf() {
        typeOf = null;
    }

    /**
     * Internal Getter for HasTypes.
     * More specific examples of types of searched word.
     * @return Returns the Internal List of String
     */
    @JsonGetter("hasTypes")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonSerialize(using = OptionalNullable.Serializer.class)
    protected OptionalNullable> internalGetHasTypes() {
        return this.hasTypes;
    }

    /**
     * Getter for HasTypes.
     * More specific examples of types of searched word.
     * @return Returns the List of String
     */
    public List getHasTypes() {
        return OptionalNullable.getFrom(hasTypes);
    }

    /**
     * Setter for HasTypes.
     * More specific examples of types of searched word.
     * @param hasTypes Value for List of String
     */
    @JsonSetter("hasTypes")
    public void setHasTypes(List hasTypes) {
        this.hasTypes = OptionalNullable.of(hasTypes);
    }

    /**
     * UnSetter for HasTypes.
     * More specific examples of types of searched word.
     */
    public void unsetHasTypes() {
        hasTypes = null;
    }

    /**
     * Internal Getter for Derivation.
     * The derivation if any.
     * @return Returns the Internal List of String
     */
    @JsonGetter("derivation")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonSerialize(using = OptionalNullable.Serializer.class)
    protected OptionalNullable> internalGetDerivation() {
        return this.derivation;
    }

    /**
     * Getter for Derivation.
     * The derivation if any.
     * @return Returns the List of String
     */
    public List getDerivation() {
        return OptionalNullable.getFrom(derivation);
    }

    /**
     * Setter for Derivation.
     * The derivation if any.
     * @param derivation Value for List of String
     */
    @JsonSetter("derivation")
    public void setDerivation(List derivation) {
        this.derivation = OptionalNullable.of(derivation);
    }

    /**
     * UnSetter for Derivation.
     * The derivation if any.
     */
    public void unsetDerivation() {
        derivation = null;
    }

    /**
     * Internal Getter for Examples.
     * The usage examples of word if any.
     * @return Returns the Internal List of String
     */
    @JsonGetter("examples")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonSerialize(using = OptionalNullable.Serializer.class)
    protected OptionalNullable> internalGetExamples() {
        return this.examples;
    }

    /**
     * Getter for Examples.
     * The usage examples of word if any.
     * @return Returns the List of String
     */
    public List getExamples() {
        return OptionalNullable.getFrom(examples);
    }

    /**
     * Setter for Examples.
     * The usage examples of word if any.
     * @param examples Value for List of String
     */
    @JsonSetter("examples")
    public void setExamples(List examples) {
        this.examples = OptionalNullable.of(examples);
    }

    /**
     * UnSetter for Examples.
     * The usage examples of word if any.
     */
    public void unsetExamples() {
        examples = null;
    }

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

    /**
     * Getter for Antonyms.
     * List of antonyms for the searched word.
     * @return Returns the List of String
     */
    public List getAntonyms() {
        return OptionalNullable.getFrom(antonyms);
    }

    /**
     * Setter for Antonyms.
     * List of antonyms for the searched word.
     * @param antonyms Value for List of String
     */
    @JsonSetter("antonyms")
    public void setAntonyms(List antonyms) {
        this.antonyms = OptionalNullable.of(antonyms);
    }

    /**
     * UnSetter for Antonyms.
     * List of antonyms for the searched word.
     */
    public void unsetAntonyms() {
        antonyms = null;
    }

    /**
     * Internal Getter for VerbGroup.
     * The verb group of the searched word.
     * @return Returns the Internal List of String
     */
    @JsonGetter("verbGroup")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonSerialize(using = OptionalNullable.Serializer.class)
    protected OptionalNullable> internalGetVerbGroup() {
        return this.verbGroup;
    }

    /**
     * Getter for VerbGroup.
     * The verb group of the searched word.
     * @return Returns the List of String
     */
    public List getVerbGroup() {
        return OptionalNullable.getFrom(verbGroup);
    }

    /**
     * Setter for VerbGroup.
     * The verb group of the searched word.
     * @param verbGroup Value for List of String
     */
    @JsonSetter("verbGroup")
    public void setVerbGroup(List verbGroup) {
        this.verbGroup = OptionalNullable.of(verbGroup);
    }

    /**
     * UnSetter for VerbGroup.
     * The verb group of the searched word.
     */
    public void unsetVerbGroup() {
        verbGroup = null;
    }

    /**
     * Internal Getter for HasParts.
     * Words that are parts of the searched word.
     * @return Returns the Internal List of String
     */
    @JsonGetter("hasParts")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonSerialize(using = OptionalNullable.Serializer.class)
    protected OptionalNullable> internalGetHasParts() {
        return this.hasParts;
    }

    /**
     * Getter for HasParts.
     * Words that are parts of the searched word.
     * @return Returns the List of String
     */
    public List getHasParts() {
        return OptionalNullable.getFrom(hasParts);
    }

    /**
     * Setter for HasParts.
     * Words that are parts of the searched word.
     * @param hasParts Value for List of String
     */
    @JsonSetter("hasParts")
    public void setHasParts(List hasParts) {
        this.hasParts = OptionalNullable.of(hasParts);
    }

    /**
     * UnSetter for HasParts.
     * Words that are parts of the searched word.
     */
    public void unsetHasParts() {
        hasParts = null;
    }

    /**
     * Internal Getter for HasSubstances.
     * Words that are substances of the searched word.
     * @return Returns the Internal List of String
     */
    @JsonGetter("hasSubstances")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonSerialize(using = OptionalNullable.Serializer.class)
    protected OptionalNullable> internalGetHasSubstances() {
        return this.hasSubstances;
    }

    /**
     * Getter for HasSubstances.
     * Words that are substances of the searched word.
     * @return Returns the List of String
     */
    public List getHasSubstances() {
        return OptionalNullable.getFrom(hasSubstances);
    }

    /**
     * Setter for HasSubstances.
     * Words that are substances of the searched word.
     * @param hasSubstances Value for List of String
     */
    @JsonSetter("hasSubstances")
    public void setHasSubstances(List hasSubstances) {
        this.hasSubstances = OptionalNullable.of(hasSubstances);
    }

    /**
     * UnSetter for HasSubstances.
     * Words that are substances of the searched word.
     */
    public void unsetHasSubstances() {
        hasSubstances = null;
    }

    /**
     * Internal Getter for Entails.
     * Words that are implied by the searched word. Usually used for verbs.
     * @return Returns the Internal List of String
     */
    @JsonGetter("entails")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonSerialize(using = OptionalNullable.Serializer.class)
    protected OptionalNullable> internalGetEntails() {
        return this.entails;
    }

    /**
     * Getter for Entails.
     * Words that are implied by the searched word. Usually used for verbs.
     * @return Returns the List of String
     */
    public List getEntails() {
        return OptionalNullable.getFrom(entails);
    }

    /**
     * Setter for Entails.
     * Words that are implied by the searched word. Usually used for verbs.
     * @param entails Value for List of String
     */
    @JsonSetter("entails")
    public void setEntails(List entails) {
        this.entails = OptionalNullable.of(entails);
    }

    /**
     * UnSetter for Entails.
     * Words that are implied by the searched word. Usually used for verbs.
     */
    public void unsetEntails() {
        entails = null;
    }

    /**
     * Converts this WordDetails into string format.
     * @return String representation of this class
     */
    @Override
    public String toString() {
        return "WordDetails [" + "definition=" + definition + ", partOfSpeech=" + partOfSpeech
                + ", synonyms=" + synonyms + ", typeOf=" + typeOf + ", hasTypes=" + hasTypes
                + ", derivation=" + derivation + ", examples=" + examples + ", antonyms=" + antonyms
                + ", verbGroup=" + verbGroup + ", hasParts=" + hasParts + ", hasSubstances="
                + hasSubstances + ", entails=" + entails + "]";
    }

    /**
     * Builds a new {@link WordDetails.Builder} object.
     * Creates the instance with the state of the current model.
     * @return a new {@link WordDetails.Builder} object
     */
    public Builder toBuilder() {
        Builder builder = new Builder();
        builder.definition = internalGetDefinition();
        builder.partOfSpeech = internalGetPartOfSpeech();
        builder.synonyms = internalGetSynonyms();
        builder.typeOf = internalGetTypeOf();
        builder.hasTypes = internalGetHasTypes();
        builder.derivation = internalGetDerivation();
        builder.examples = internalGetExamples();
        builder.antonyms = internalGetAntonyms();
        builder.verbGroup = internalGetVerbGroup();
        builder.hasParts = internalGetHasParts();
        builder.hasSubstances = internalGetHasSubstances();
        builder.entails = internalGetEntails();
        return builder;
    }

    /**
     * Class to build instances of {@link WordDetails}.
     */
    public static class Builder {
        private OptionalNullable definition;
        private OptionalNullable partOfSpeech;
        private OptionalNullable> synonyms;
        private OptionalNullable> typeOf;
        private OptionalNullable> hasTypes;
        private OptionalNullable> derivation;
        private OptionalNullable> examples;
        private OptionalNullable> antonyms;
        private OptionalNullable> verbGroup;
        private OptionalNullable> hasParts;
        private OptionalNullable> hasSubstances;
        private OptionalNullable> entails;



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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        /**
         * Builds a new {@link WordDetails} object using the set fields.
         * @return {@link WordDetails}
         */
        public WordDetails build() {
            return new WordDetails(definition, partOfSpeech, synonyms, typeOf, hasTypes, derivation,
                    examples, antonyms, verbGroup, hasParts, hasSubstances, entails);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy