com.sinch.sdk.domains.verification.models.requests.StartVerificationCalloutSpeechOptions Maven / Gradle / Ivy
Show all versions of sinch-sdk-java Show documentation
package com.sinch.sdk.domains.verification.models.requests;
import com.sinch.sdk.core.models.OptionalValue;
/**
* Text-To-Speech engine settings
*
* Dedicated options related to {@link StartVerificationCalloutOptions
* StartVerificationCalloutOptions}
*
* @since 1.1
*/
public class StartVerificationCalloutSpeechOptions {
private final OptionalValue locale;
private StartVerificationCalloutSpeechOptions(OptionalValue locale) {
this.locale = locale;
}
/**
* Getting Builder
*
* @return New Builder instance
* @since 1.1
*/
public static Builder builder() {
return new Builder();
}
public OptionalValue getLocale() {
return locale;
}
/**
* Dedicated Builder
*
* @since 1.1
*/
public static class Builder {
private OptionalValue locale = OptionalValue.empty();
private Builder() {}
/**
* A language-region identifier according to IANA. Only a subset of those identifiers is
* accepted to be used for Text To Speech engine
*
* @param locale Specifies expiry time
* @return current builder
* @since 1.1
*/
public Builder setLocale(String locale) {
this.locale = OptionalValue.of(locale);
return this;
}
/**
* Create instance
*
* @return The instance build with current builder values
* @since 1.1
*/
public StartVerificationCalloutSpeechOptions build() {
return new StartVerificationCalloutSpeechOptions(locale);
}
}
}