com.bandwidth.voice.models.Transcript Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bandwidth-sdk Show documentation
Show all versions of bandwidth-sdk Show documentation
The official client SDK for Bandwidth's Voice, Messaging, MFA, and WebRTC APIs
/*
* BandwidthLib
*
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
*/
package com.bandwidth.voice.models;
import com.fasterxml.jackson.annotation.JsonGetter;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonSetter;
/**
* This is a model class for Transcript type.
*/
public class Transcript {
@JsonInclude(JsonInclude.Include.NON_NULL)
private String text;
@JsonInclude(JsonInclude.Include.NON_NULL)
private Double confidence;
/**
* Default constructor.
*/
public Transcript() {
}
/**
* Initialization constructor.
* @param text String value for text.
* @param confidence Double value for confidence.
*/
public Transcript(
String text,
Double confidence) {
this.text = text;
this.confidence = confidence;
}
/**
* Getter for Text.
* @return Returns the String
*/
@JsonGetter("text")
public String getText() {
return text;
}
/**
* Setter for Text.
* @param text Value for String
*/
@JsonSetter("text")
public void setText(String text) {
this.text = text;
}
/**
* Getter for Confidence.
* @return Returns the Double
*/
@JsonGetter("confidence")
public Double getConfidence() {
return confidence;
}
/**
* Setter for Confidence.
* @param confidence Value for Double
*/
@JsonSetter("confidence")
public void setConfidence(Double confidence) {
this.confidence = confidence;
}
/**
* Converts this Transcript into string format.
* @return String representation of this class
*/
@Override
public String toString() {
return "Transcript [" + "text=" + text + ", confidence=" + confidence + "]";
}
/**
* Builds a new {@link Transcript.Builder} object.
* Creates the instance with the state of the current model.
* @return a new {@link Transcript.Builder} object
*/
public Builder toBuilder() {
Builder builder = new Builder()
.text(getText())
.confidence(getConfidence());
return builder;
}
/**
* Class to build instances of {@link Transcript}.
*/
public static class Builder {
private String text;
private Double confidence;
/**
* Setter for text.
* @param text String value for text.
* @return Builder
*/
public Builder text(String text) {
this.text = text;
return this;
}
/**
* Setter for confidence.
* @param confidence Double value for confidence.
* @return Builder
*/
public Builder confidence(Double confidence) {
this.confidence = confidence;
return this;
}
/**
* Builds a new {@link Transcript} object using the set fields.
* @return {@link Transcript}
*/
public Transcript build() {
return new Transcript(text, confidence);
}
}
}