com.rapidapi.p.wordsapiv1.models.FrequencyDetails 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;
/**
* This is a model class for FrequencyDetails type.
*/
public class FrequencyDetails {
private OptionalNullable zipf;
private OptionalNullable perMillion;
private OptionalNullable diversity;
/**
* Default constructor.
*/
public FrequencyDetails() {
}
/**
* Initialization constructor.
* @param zipf Double value for zipf.
* @param perMillion Double value for perMillion.
* @param diversity Double value for diversity.
*/
public FrequencyDetails(
Double zipf,
Double perMillion,
Double diversity) {
this.zipf = OptionalNullable.of(zipf);
this.perMillion = OptionalNullable.of(perMillion);
this.diversity = OptionalNullable.of(diversity);
}
/**
* Initialization constructor.
* @param zipf Double value for zipf.
* @param perMillion Double value for perMillion.
* @param diversity Double value for diversity.
*/
protected FrequencyDetails(OptionalNullable zipf, OptionalNullable perMillion,
OptionalNullable diversity) {
this.zipf = zipf;
this.perMillion = perMillion;
this.diversity = diversity;
}
/**
* Internal Getter for Zipf.
* Explains the zipf score.
* @return Returns the Internal Double
*/
@JsonGetter("zipf")
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonSerialize(using = OptionalNullable.Serializer.class)
protected OptionalNullable internalGetZipf() {
return this.zipf;
}
/**
* Getter for Zipf.
* Explains the zipf score.
* @return Returns the Double
*/
public Double getZipf() {
return OptionalNullable.getFrom(zipf);
}
/**
* Setter for Zipf.
* Explains the zipf score.
* @param zipf Value for Double
*/
@JsonSetter("zipf")
public void setZipf(Double zipf) {
this.zipf = OptionalNullable.of(zipf);
}
/**
* UnSetter for Zipf.
* Explains the zipf score.
*/
public void unsetZipf() {
zipf = null;
}
/**
* Internal Getter for PerMillion.
* Explains the perMillion score.
* @return Returns the Internal Double
*/
@JsonGetter("perMillion")
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonSerialize(using = OptionalNullable.Serializer.class)
protected OptionalNullable internalGetPerMillion() {
return this.perMillion;
}
/**
* Getter for PerMillion.
* Explains the perMillion score.
* @return Returns the Double
*/
public Double getPerMillion() {
return OptionalNullable.getFrom(perMillion);
}
/**
* Setter for PerMillion.
* Explains the perMillion score.
* @param perMillion Value for Double
*/
@JsonSetter("perMillion")
public void setPerMillion(Double perMillion) {
this.perMillion = OptionalNullable.of(perMillion);
}
/**
* UnSetter for PerMillion.
* Explains the perMillion score.
*/
public void unsetPerMillion() {
perMillion = null;
}
/**
* Internal Getter for Diversity.
* Explains the diversity score.
* @return Returns the Internal Double
*/
@JsonGetter("diversity")
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonSerialize(using = OptionalNullable.Serializer.class)
protected OptionalNullable internalGetDiversity() {
return this.diversity;
}
/**
* Getter for Diversity.
* Explains the diversity score.
* @return Returns the Double
*/
public Double getDiversity() {
return OptionalNullable.getFrom(diversity);
}
/**
* Setter for Diversity.
* Explains the diversity score.
* @param diversity Value for Double
*/
@JsonSetter("diversity")
public void setDiversity(Double diversity) {
this.diversity = OptionalNullable.of(diversity);
}
/**
* UnSetter for Diversity.
* Explains the diversity score.
*/
public void unsetDiversity() {
diversity = null;
}
/**
* Converts this FrequencyDetails into string format.
* @return String representation of this class
*/
@Override
public String toString() {
return "FrequencyDetails [" + "zipf=" + zipf + ", perMillion=" + perMillion + ", diversity="
+ diversity + "]";
}
/**
* Builds a new {@link FrequencyDetails.Builder} object.
* Creates the instance with the state of the current model.
* @return a new {@link FrequencyDetails.Builder} object
*/
public Builder toBuilder() {
Builder builder = new Builder();
builder.zipf = internalGetZipf();
builder.perMillion = internalGetPerMillion();
builder.diversity = internalGetDiversity();
return builder;
}
/**
* Class to build instances of {@link FrequencyDetails}.
*/
public static class Builder {
private OptionalNullable zipf;
private OptionalNullable perMillion;
private OptionalNullable diversity;
/**
* Setter for zipf.
* @param zipf Double value for zipf.
* @return Builder
*/
public Builder zipf(Double zipf) {
this.zipf = OptionalNullable.of(zipf);
return this;
}
/**
* UnSetter for zipf.
* @return Builder
*/
public Builder unsetZipf() {
zipf = null;
return this;
}
/**
* Setter for perMillion.
* @param perMillion Double value for perMillion.
* @return Builder
*/
public Builder perMillion(Double perMillion) {
this.perMillion = OptionalNullable.of(perMillion);
return this;
}
/**
* UnSetter for perMillion.
* @return Builder
*/
public Builder unsetPerMillion() {
perMillion = null;
return this;
}
/**
* Setter for diversity.
* @param diversity Double value for diversity.
* @return Builder
*/
public Builder diversity(Double diversity) {
this.diversity = OptionalNullable.of(diversity);
return this;
}
/**
* UnSetter for diversity.
* @return Builder
*/
public Builder unsetDiversity() {
diversity = null;
return this;
}
/**
* Builds a new {@link FrequencyDetails} object using the set fields.
* @return {@link FrequencyDetails}
*/
public FrequencyDetails build() {
return new FrequencyDetails(zipf, perMillion, diversity);
}
}
}