
com.rapidapi.p.wordsapiv1.models.FrequencyResponse 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;
/**
* This is a model class for FrequencyResponse type.
*/
public class FrequencyResponse {
private String word;
private FrequencyDetails frequency;
/**
* Default constructor.
*/
public FrequencyResponse() {
}
/**
* Initialization constructor.
* @param word String value for word.
* @param frequency FrequencyDetails value for frequency.
*/
public FrequencyResponse(
String word,
FrequencyDetails frequency) {
this.word = word;
this.frequency = frequency;
}
/**
* 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 Frequency.
* This model contains frequency details of a specific word.
* @return Returns the FrequencyDetails
*/
@JsonGetter("frequency")
public FrequencyDetails getFrequency() {
return frequency;
}
/**
* Setter for Frequency.
* This model contains frequency details of a specific word.
* @param frequency Value for FrequencyDetails
*/
@JsonSetter("frequency")
public void setFrequency(FrequencyDetails frequency) {
this.frequency = frequency;
}
/**
* Converts this FrequencyResponse into string format.
* @return String representation of this class
*/
@Override
public String toString() {
return "FrequencyResponse [" + "word=" + word + ", frequency=" + frequency + "]";
}
/**
* Builds a new {@link FrequencyResponse.Builder} object.
* Creates the instance with the state of the current model.
* @return a new {@link FrequencyResponse.Builder} object
*/
public Builder toBuilder() {
Builder builder = new Builder(word, frequency);
return builder;
}
/**
* Class to build instances of {@link FrequencyResponse}.
*/
public static class Builder {
private String word;
private FrequencyDetails frequency;
/**
* Initialization constructor.
*/
public Builder() {
}
/**
* Initialization constructor.
* @param word String value for word.
* @param frequency FrequencyDetails value for frequency.
*/
public Builder(String word, FrequencyDetails frequency) {
this.word = word;
this.frequency = frequency;
}
/**
* Setter for word.
* @param word String value for word.
* @return Builder
*/
public Builder word(String word) {
this.word = word;
return this;
}
/**
* Setter for frequency.
* @param frequency FrequencyDetails value for frequency.
* @return Builder
*/
public Builder frequency(FrequencyDetails frequency) {
this.frequency = frequency;
return this;
}
/**
* Builds a new {@link FrequencyResponse} object using the set fields.
* @return {@link FrequencyResponse}
*/
public FrequencyResponse build() {
return new FrequencyResponse(word, frequency);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy