Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: yandex/cloud/ai/stt/v3/stt.proto
package yandex.cloud.api.ai.stt.v3;
public final class Stt {
private Stt() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
/**
* Protobuf enum {@code speechkit.stt.v3.CodeType}
*/
public enum CodeType
implements com.google.protobuf.ProtocolMessageEnum {
/**
* CODE_TYPE_UNSPECIFIED = 0;
*/
CODE_TYPE_UNSPECIFIED(0),
/**
*
*all good
*
*
* WORKING = 1;
*/
WORKING(1),
/**
*
*for example, if speech is sent not in real time. or unknown context (and we've made fallback).
*
*
* WARNING = 2;
*/
WARNING(2),
/**
*
*after session was closed.
*
*
* CLOSED = 3;
*/
CLOSED(3),
UNRECOGNIZED(-1),
;
/**
* CODE_TYPE_UNSPECIFIED = 0;
*/
public static final int CODE_TYPE_UNSPECIFIED_VALUE = 0;
/**
*
*all good
*
*
* WORKING = 1;
*/
public static final int WORKING_VALUE = 1;
/**
*
*for example, if speech is sent not in real time. or unknown context (and we've made fallback).
*
*
* WARNING = 2;
*/
public static final int WARNING_VALUE = 2;
/**
*
*after session was closed.
*
*
* CLOSED = 3;
*/
public static final int CLOSED_VALUE = 3;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static CodeType valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static CodeType forNumber(int value) {
switch (value) {
case 0: return CODE_TYPE_UNSPECIFIED;
case 1: return WORKING;
case 2: return WARNING;
case 3: return CLOSED;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
CodeType> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public CodeType findValueByNumber(int number) {
return CodeType.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return yandex.cloud.api.ai.stt.v3.Stt.getDescriptor().getEnumTypes().get(0);
}
private static final CodeType[] VALUES = values();
public static CodeType valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private CodeType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:speechkit.stt.v3.CodeType)
}
public interface TextNormalizationOptionsOrBuilder extends
// @@protoc_insertion_point(interface_extends:speechkit.stt.v3.TextNormalizationOptions)
com.google.protobuf.MessageOrBuilder {
/**
* .speechkit.stt.v3.TextNormalizationOptions.TextNormalization text_normalization = 1;
* @return The enum numeric value on the wire for textNormalization.
*/
int getTextNormalizationValue();
/**
* .speechkit.stt.v3.TextNormalizationOptions.TextNormalization text_normalization = 1;
* @return The textNormalization.
*/
yandex.cloud.api.ai.stt.v3.Stt.TextNormalizationOptions.TextNormalization getTextNormalization();
/**
*
*
* .speechkit.stt.v3.TextNormalizationOptions.PhoneFormattingMode phone_formatting_mode = 4;
* @return The enum numeric value on the wire for phoneFormattingMode.
*/
int getPhoneFormattingModeValue();
/**
*
*
* TEXT_NORMALIZATION_DISABLED = 2;
*/
TEXT_NORMALIZATION_DISABLED(2),
UNRECOGNIZED(-1),
;
/**
* TEXT_NORMALIZATION_UNSPECIFIED = 0;
*/
public static final int TEXT_NORMALIZATION_UNSPECIFIED_VALUE = 0;
/**
*
* Enable normalization
*
*
* TEXT_NORMALIZATION_ENABLED = 1;
*/
public static final int TEXT_NORMALIZATION_ENABLED_VALUE = 1;
/**
*
* Disable normalization
*
*
* TEXT_NORMALIZATION_DISABLED = 2;
*/
public static final int TEXT_NORMALIZATION_DISABLED_VALUE = 2;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static TextNormalization valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static TextNormalization forNumber(int value) {
switch (value) {
case 0: return TEXT_NORMALIZATION_UNSPECIFIED;
case 1: return TEXT_NORMALIZATION_ENABLED;
case 2: return TEXT_NORMALIZATION_DISABLED;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
TextNormalization> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public TextNormalization findValueByNumber(int number) {
return TextNormalization.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return yandex.cloud.api.ai.stt.v3.Stt.TextNormalizationOptions.getDescriptor().getEnumTypes().get(0);
}
private static final TextNormalization[] VALUES = values();
public static TextNormalization valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private TextNormalization(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:speechkit.stt.v3.TextNormalizationOptions.TextNormalization)
}
/**
* Protobuf enum {@code speechkit.stt.v3.TextNormalizationOptions.PhoneFormattingMode}
*/
public enum PhoneFormattingMode
implements com.google.protobuf.ProtocolMessageEnum {
/**
* PHONE_FORMATTING_MODE_UNSPECIFIED = 0;
*/
PHONE_FORMATTING_MODE_UNSPECIFIED(0),
/**
*
* Disable phone formatting
*
*
* PHONE_FORMATTING_MODE_DISABLED = 1;
*/
PHONE_FORMATTING_MODE_DISABLED(1),
UNRECOGNIZED(-1),
;
/**
* PHONE_FORMATTING_MODE_UNSPECIFIED = 0;
*/
public static final int PHONE_FORMATTING_MODE_UNSPECIFIED_VALUE = 0;
/**
*
* Disable phone formatting
*
*
* PHONE_FORMATTING_MODE_DISABLED = 1;
*/
public static final int PHONE_FORMATTING_MODE_DISABLED_VALUE = 1;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static PhoneFormattingMode valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static PhoneFormattingMode forNumber(int value) {
switch (value) {
case 0: return PHONE_FORMATTING_MODE_UNSPECIFIED;
case 1: return PHONE_FORMATTING_MODE_DISABLED;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
PhoneFormattingMode> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public PhoneFormattingMode findValueByNumber(int number) {
return PhoneFormattingMode.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return yandex.cloud.api.ai.stt.v3.Stt.TextNormalizationOptions.getDescriptor().getEnumTypes().get(1);
}
private static final PhoneFormattingMode[] VALUES = values();
public static PhoneFormattingMode valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private PhoneFormattingMode(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:speechkit.stt.v3.TextNormalizationOptions.PhoneFormattingMode)
}
public static final int TEXT_NORMALIZATION_FIELD_NUMBER = 1;
private int textNormalization_;
/**
* .speechkit.stt.v3.TextNormalizationOptions.TextNormalization text_normalization = 1;
* @return The enum numeric value on the wire for textNormalization.
*/
@java.lang.Override public int getTextNormalizationValue() {
return textNormalization_;
}
/**
* .speechkit.stt.v3.TextNormalizationOptions.TextNormalization text_normalization = 1;
* @return The textNormalization.
*/
@java.lang.Override public yandex.cloud.api.ai.stt.v3.Stt.TextNormalizationOptions.TextNormalization getTextNormalization() {
@SuppressWarnings("deprecation")
yandex.cloud.api.ai.stt.v3.Stt.TextNormalizationOptions.TextNormalization result = yandex.cloud.api.ai.stt.v3.Stt.TextNormalizationOptions.TextNormalization.valueOf(textNormalization_);
return result == null ? yandex.cloud.api.ai.stt.v3.Stt.TextNormalizationOptions.TextNormalization.UNRECOGNIZED : result;
}
public static final int PROFANITY_FILTER_FIELD_NUMBER = 2;
private boolean profanityFilter_;
/**
*
* Profanity filter (default: false).
*
*
* bool profanity_filter = 2;
* @return The profanityFilter.
*/
@java.lang.Override
public boolean getProfanityFilter() {
return profanityFilter_;
}
public static final int LITERATURE_TEXT_FIELD_NUMBER = 3;
private boolean literatureText_;
/**
*
* Rewrite text in literature style (default: false).
*
*
* bool literature_text = 3;
* @return The literatureText.
*/
@java.lang.Override
public boolean getLiteratureText() {
return literatureText_;
}
public static final int PHONE_FORMATTING_MODE_FIELD_NUMBER = 4;
private int phoneFormattingMode_;
/**
*
* Define phone formatting mode
*
*
* .speechkit.stt.v3.TextNormalizationOptions.PhoneFormattingMode phone_formatting_mode = 4;
* @return The enum numeric value on the wire for phoneFormattingMode.
*/
@java.lang.Override public int getPhoneFormattingModeValue() {
return phoneFormattingMode_;
}
/**
*
* Rewrite text in literature style (default: false).
*
*
* bool literature_text = 3;
* @param value The literatureText to set.
* @return This builder for chaining.
*/
public Builder setLiteratureText(boolean value) {
literatureText_ = value;
onChanged();
return this;
}
/**
*
* Rewrite text in literature style (default: false).
*
*
* bool literature_text = 3;
* @return This builder for chaining.
*/
public Builder clearLiteratureText() {
literatureText_ = false;
onChanged();
return this;
}
private int phoneFormattingMode_ = 0;
/**
*
* Define phone formatting mode
*
*
* .speechkit.stt.v3.TextNormalizationOptions.PhoneFormattingMode phone_formatting_mode = 4;
* @return The enum numeric value on the wire for phoneFormattingMode.
*/
@java.lang.Override public int getPhoneFormattingModeValue() {
return phoneFormattingMode_;
}
/**
*
* Define phone formatting mode
*
*
* .speechkit.stt.v3.TextNormalizationOptions.PhoneFormattingMode phone_formatting_mode = 4;
* @param value The enum numeric value on the wire for phoneFormattingMode to set.
* @return This builder for chaining.
*/
public Builder setPhoneFormattingModeValue(int value) {
phoneFormattingMode_ = value;
onChanged();
return this;
}
/**
*
* Define phone formatting mode
*
*
* .speechkit.stt.v3.TextNormalizationOptions.PhoneFormattingMode phone_formatting_mode = 4;
* @return The phoneFormattingMode.
*/
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.TextNormalizationOptions.PhoneFormattingMode getPhoneFormattingMode() {
@SuppressWarnings("deprecation")
yandex.cloud.api.ai.stt.v3.Stt.TextNormalizationOptions.PhoneFormattingMode result = yandex.cloud.api.ai.stt.v3.Stt.TextNormalizationOptions.PhoneFormattingMode.valueOf(phoneFormattingMode_);
return result == null ? yandex.cloud.api.ai.stt.v3.Stt.TextNormalizationOptions.PhoneFormattingMode.UNRECOGNIZED : result;
}
/**
*
* Define phone formatting mode
*
*
* .speechkit.stt.v3.TextNormalizationOptions.PhoneFormattingMode phone_formatting_mode = 4;
* @param value The phoneFormattingMode to set.
* @return This builder for chaining.
*/
public Builder setPhoneFormattingMode(yandex.cloud.api.ai.stt.v3.Stt.TextNormalizationOptions.PhoneFormattingMode value) {
if (value == null) {
throw new NullPointerException();
}
phoneFormattingMode_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Define phone formatting mode
*
*
* .speechkit.stt.v3.TextNormalizationOptions.PhoneFormattingMode phone_formatting_mode = 4;
* @return This builder for chaining.
*/
public Builder clearPhoneFormattingMode() {
phoneFormattingMode_ = 0;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:speechkit.stt.v3.TextNormalizationOptions)
}
// @@protoc_insertion_point(class_scope:speechkit.stt.v3.TextNormalizationOptions)
private static final yandex.cloud.api.ai.stt.v3.Stt.TextNormalizationOptions DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.ai.stt.v3.Stt.TextNormalizationOptions();
}
public static yandex.cloud.api.ai.stt.v3.Stt.TextNormalizationOptions getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public TextNormalizationOptions parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new TextNormalizationOptions(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.TextNormalizationOptions getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface DefaultEouClassifierOrBuilder extends
// @@protoc_insertion_point(interface_extends:speechkit.stt.v3.DefaultEouClassifier)
com.google.protobuf.MessageOrBuilder {
/**
*
* EOU sensitivity. Currently two levels, faster with more error and more conservative (our default).
*
*
* .speechkit.stt.v3.DefaultEouClassifier.EouSensitivity type = 1;
* @return The enum numeric value on the wire for type.
*/
int getTypeValue();
/**
*
* EOU sensitivity. Currently two levels, faster with more error and more conservative (our default).
*
*
* .speechkit.stt.v3.DefaultEouClassifier.EouSensitivity type = 1;
* @return The type.
*/
yandex.cloud.api.ai.stt.v3.Stt.DefaultEouClassifier.EouSensitivity getType();
/**
*
* Hint for max pause between words. Our EOU detector could use this information to distinguish between end of utterance and slow speech (like one <long pause> two <long pause> three, etc).
*
*
* int64 max_pause_between_words_hint_ms = 2;
* @return The maxPauseBetweenWordsHintMs.
*/
long getMaxPauseBetweenWordsHintMs();
}
/**
* Protobuf type {@code speechkit.stt.v3.DefaultEouClassifier}
*/
public static final class DefaultEouClassifier extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:speechkit.stt.v3.DefaultEouClassifier)
DefaultEouClassifierOrBuilder {
private static final long serialVersionUID = 0L;
// Use DefaultEouClassifier.newBuilder() to construct.
private DefaultEouClassifier(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private DefaultEouClassifier() {
type_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new DefaultEouClassifier();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private DefaultEouClassifier(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
int rawValue = input.readEnum();
type_ = rawValue;
break;
}
case 16: {
maxPauseBetweenWordsHintMs_ = input.readInt64();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_DefaultEouClassifier_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_DefaultEouClassifier_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.ai.stt.v3.Stt.DefaultEouClassifier.class, yandex.cloud.api.ai.stt.v3.Stt.DefaultEouClassifier.Builder.class);
}
/**
* Protobuf enum {@code speechkit.stt.v3.DefaultEouClassifier.EouSensitivity}
*/
public enum EouSensitivity
implements com.google.protobuf.ProtocolMessageEnum {
/**
* EOU_SENSITIVITY_UNSPECIFIED = 0;
*/
EOU_SENSITIVITY_UNSPECIFIED(0),
/**
* DEFAULT = 1;
*/
DEFAULT(1),
/**
* HIGH = 2;
*/
HIGH(2),
UNRECOGNIZED(-1),
;
/**
* EOU_SENSITIVITY_UNSPECIFIED = 0;
*/
public static final int EOU_SENSITIVITY_UNSPECIFIED_VALUE = 0;
/**
* DEFAULT = 1;
*/
public static final int DEFAULT_VALUE = 1;
/**
* HIGH = 2;
*/
public static final int HIGH_VALUE = 2;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static EouSensitivity valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static EouSensitivity forNumber(int value) {
switch (value) {
case 0: return EOU_SENSITIVITY_UNSPECIFIED;
case 1: return DEFAULT;
case 2: return HIGH;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
EouSensitivity> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public EouSensitivity findValueByNumber(int number) {
return EouSensitivity.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return yandex.cloud.api.ai.stt.v3.Stt.DefaultEouClassifier.getDescriptor().getEnumTypes().get(0);
}
private static final EouSensitivity[] VALUES = values();
public static EouSensitivity valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private EouSensitivity(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:speechkit.stt.v3.DefaultEouClassifier.EouSensitivity)
}
public static final int TYPE_FIELD_NUMBER = 1;
private int type_;
/**
*
* EOU sensitivity. Currently two levels, faster with more error and more conservative (our default).
*
*
* .speechkit.stt.v3.DefaultEouClassifier.EouSensitivity type = 1;
* @return The enum numeric value on the wire for type.
*/
@java.lang.Override public int getTypeValue() {
return type_;
}
/**
*
* EOU sensitivity. Currently two levels, faster with more error and more conservative (our default).
*
*
* .speechkit.stt.v3.DefaultEouClassifier.EouSensitivity type = 1;
* @return The type.
*/
@java.lang.Override public yandex.cloud.api.ai.stt.v3.Stt.DefaultEouClassifier.EouSensitivity getType() {
@SuppressWarnings("deprecation")
yandex.cloud.api.ai.stt.v3.Stt.DefaultEouClassifier.EouSensitivity result = yandex.cloud.api.ai.stt.v3.Stt.DefaultEouClassifier.EouSensitivity.valueOf(type_);
return result == null ? yandex.cloud.api.ai.stt.v3.Stt.DefaultEouClassifier.EouSensitivity.UNRECOGNIZED : result;
}
public static final int MAX_PAUSE_BETWEEN_WORDS_HINT_MS_FIELD_NUMBER = 2;
private long maxPauseBetweenWordsHintMs_;
/**
*
* Hint for max pause between words. Our EOU detector could use this information to distinguish between end of utterance and slow speech (like one <long pause> two <long pause> three, etc).
*
*
* int64 max_pause_between_words_hint_ms = 2;
* @return The maxPauseBetweenWordsHintMs.
*/
@java.lang.Override
public long getMaxPauseBetweenWordsHintMs() {
return maxPauseBetweenWordsHintMs_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (type_ != yandex.cloud.api.ai.stt.v3.Stt.DefaultEouClassifier.EouSensitivity.EOU_SENSITIVITY_UNSPECIFIED.getNumber()) {
output.writeEnum(1, type_);
}
if (maxPauseBetweenWordsHintMs_ != 0L) {
output.writeInt64(2, maxPauseBetweenWordsHintMs_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (type_ != yandex.cloud.api.ai.stt.v3.Stt.DefaultEouClassifier.EouSensitivity.EOU_SENSITIVITY_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, type_);
}
if (maxPauseBetweenWordsHintMs_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(2, maxPauseBetweenWordsHintMs_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof yandex.cloud.api.ai.stt.v3.Stt.DefaultEouClassifier)) {
return super.equals(obj);
}
yandex.cloud.api.ai.stt.v3.Stt.DefaultEouClassifier other = (yandex.cloud.api.ai.stt.v3.Stt.DefaultEouClassifier) obj;
if (type_ != other.type_) return false;
if (getMaxPauseBetweenWordsHintMs()
!= other.getMaxPauseBetweenWordsHintMs()) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + TYPE_FIELD_NUMBER;
hash = (53 * hash) + type_;
hash = (37 * hash) + MAX_PAUSE_BETWEEN_WORDS_HINT_MS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getMaxPauseBetweenWordsHintMs());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.ai.stt.v3.Stt.DefaultEouClassifier parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.stt.v3.Stt.DefaultEouClassifier parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.DefaultEouClassifier parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.stt.v3.Stt.DefaultEouClassifier parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.DefaultEouClassifier parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.stt.v3.Stt.DefaultEouClassifier parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.DefaultEouClassifier parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.stt.v3.Stt.DefaultEouClassifier parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.DefaultEouClassifier parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.stt.v3.Stt.DefaultEouClassifier parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.DefaultEouClassifier parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.stt.v3.Stt.DefaultEouClassifier parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(yandex.cloud.api.ai.stt.v3.Stt.DefaultEouClassifier prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code speechkit.stt.v3.DefaultEouClassifier}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:speechkit.stt.v3.DefaultEouClassifier)
yandex.cloud.api.ai.stt.v3.Stt.DefaultEouClassifierOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_DefaultEouClassifier_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_DefaultEouClassifier_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.ai.stt.v3.Stt.DefaultEouClassifier.class, yandex.cloud.api.ai.stt.v3.Stt.DefaultEouClassifier.Builder.class);
}
// Construct using yandex.cloud.api.ai.stt.v3.Stt.DefaultEouClassifier.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
type_ = 0;
maxPauseBetweenWordsHintMs_ = 0L;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_DefaultEouClassifier_descriptor;
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.DefaultEouClassifier getDefaultInstanceForType() {
return yandex.cloud.api.ai.stt.v3.Stt.DefaultEouClassifier.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.DefaultEouClassifier build() {
yandex.cloud.api.ai.stt.v3.Stt.DefaultEouClassifier result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.DefaultEouClassifier buildPartial() {
yandex.cloud.api.ai.stt.v3.Stt.DefaultEouClassifier result = new yandex.cloud.api.ai.stt.v3.Stt.DefaultEouClassifier(this);
result.type_ = type_;
result.maxPauseBetweenWordsHintMs_ = maxPauseBetweenWordsHintMs_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof yandex.cloud.api.ai.stt.v3.Stt.DefaultEouClassifier) {
return mergeFrom((yandex.cloud.api.ai.stt.v3.Stt.DefaultEouClassifier)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.ai.stt.v3.Stt.DefaultEouClassifier other) {
if (other == yandex.cloud.api.ai.stt.v3.Stt.DefaultEouClassifier.getDefaultInstance()) return this;
if (other.type_ != 0) {
setTypeValue(other.getTypeValue());
}
if (other.getMaxPauseBetweenWordsHintMs() != 0L) {
setMaxPauseBetweenWordsHintMs(other.getMaxPauseBetweenWordsHintMs());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
yandex.cloud.api.ai.stt.v3.Stt.DefaultEouClassifier parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.ai.stt.v3.Stt.DefaultEouClassifier) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int type_ = 0;
/**
*
* EOU sensitivity. Currently two levels, faster with more error and more conservative (our default).
*
*
* .speechkit.stt.v3.DefaultEouClassifier.EouSensitivity type = 1;
* @return The enum numeric value on the wire for type.
*/
@java.lang.Override public int getTypeValue() {
return type_;
}
/**
*
* EOU sensitivity. Currently two levels, faster with more error and more conservative (our default).
*
*
* .speechkit.stt.v3.DefaultEouClassifier.EouSensitivity type = 1;
* @param value The enum numeric value on the wire for type to set.
* @return This builder for chaining.
*/
public Builder setTypeValue(int value) {
type_ = value;
onChanged();
return this;
}
/**
*
* EOU sensitivity. Currently two levels, faster with more error and more conservative (our default).
*
*
* .speechkit.stt.v3.DefaultEouClassifier.EouSensitivity type = 1;
* @return The type.
*/
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.DefaultEouClassifier.EouSensitivity getType() {
@SuppressWarnings("deprecation")
yandex.cloud.api.ai.stt.v3.Stt.DefaultEouClassifier.EouSensitivity result = yandex.cloud.api.ai.stt.v3.Stt.DefaultEouClassifier.EouSensitivity.valueOf(type_);
return result == null ? yandex.cloud.api.ai.stt.v3.Stt.DefaultEouClassifier.EouSensitivity.UNRECOGNIZED : result;
}
/**
*
* EOU sensitivity. Currently two levels, faster with more error and more conservative (our default).
*
*
* .speechkit.stt.v3.DefaultEouClassifier.EouSensitivity type = 1;
* @param value The type to set.
* @return This builder for chaining.
*/
public Builder setType(yandex.cloud.api.ai.stt.v3.Stt.DefaultEouClassifier.EouSensitivity value) {
if (value == null) {
throw new NullPointerException();
}
type_ = value.getNumber();
onChanged();
return this;
}
/**
*
* EOU sensitivity. Currently two levels, faster with more error and more conservative (our default).
*
*
* .speechkit.stt.v3.DefaultEouClassifier.EouSensitivity type = 1;
* @return This builder for chaining.
*/
public Builder clearType() {
type_ = 0;
onChanged();
return this;
}
private long maxPauseBetweenWordsHintMs_ ;
/**
*
* Hint for max pause between words. Our EOU detector could use this information to distinguish between end of utterance and slow speech (like one <long pause> two <long pause> three, etc).
*
*
* int64 max_pause_between_words_hint_ms = 2;
* @return The maxPauseBetweenWordsHintMs.
*/
@java.lang.Override
public long getMaxPauseBetweenWordsHintMs() {
return maxPauseBetweenWordsHintMs_;
}
/**
*
* Hint for max pause between words. Our EOU detector could use this information to distinguish between end of utterance and slow speech (like one <long pause> two <long pause> three, etc).
*
*
* int64 max_pause_between_words_hint_ms = 2;
* @param value The maxPauseBetweenWordsHintMs to set.
* @return This builder for chaining.
*/
public Builder setMaxPauseBetweenWordsHintMs(long value) {
maxPauseBetweenWordsHintMs_ = value;
onChanged();
return this;
}
/**
*
* Hint for max pause between words. Our EOU detector could use this information to distinguish between end of utterance and slow speech (like one <long pause> two <long pause> three, etc).
*
*
* int64 max_pause_between_words_hint_ms = 2;
* @return This builder for chaining.
*/
public Builder clearMaxPauseBetweenWordsHintMs() {
maxPauseBetweenWordsHintMs_ = 0L;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:speechkit.stt.v3.DefaultEouClassifier)
}
// @@protoc_insertion_point(class_scope:speechkit.stt.v3.DefaultEouClassifier)
private static final yandex.cloud.api.ai.stt.v3.Stt.DefaultEouClassifier DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.ai.stt.v3.Stt.DefaultEouClassifier();
}
public static yandex.cloud.api.ai.stt.v3.Stt.DefaultEouClassifier getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public DefaultEouClassifier parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new DefaultEouClassifier(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.DefaultEouClassifier getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ExternalEouClassifierOrBuilder extends
// @@protoc_insertion_point(interface_extends:speechkit.stt.v3.ExternalEouClassifier)
com.google.protobuf.MessageOrBuilder {
}
/**
*
* Use EOU provided by user
*
*
* Protobuf type {@code speechkit.stt.v3.ExternalEouClassifier}
*/
public static final class ExternalEouClassifier extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:speechkit.stt.v3.ExternalEouClassifier)
ExternalEouClassifierOrBuilder {
private static final long serialVersionUID = 0L;
// Use ExternalEouClassifier.newBuilder() to construct.
private ExternalEouClassifier(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ExternalEouClassifier() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ExternalEouClassifier();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ExternalEouClassifier(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_ExternalEouClassifier_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_ExternalEouClassifier_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.ai.stt.v3.Stt.ExternalEouClassifier.class, yandex.cloud.api.ai.stt.v3.Stt.ExternalEouClassifier.Builder.class);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof yandex.cloud.api.ai.stt.v3.Stt.ExternalEouClassifier)) {
return super.equals(obj);
}
yandex.cloud.api.ai.stt.v3.Stt.ExternalEouClassifier other = (yandex.cloud.api.ai.stt.v3.Stt.ExternalEouClassifier) obj;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.ai.stt.v3.Stt.ExternalEouClassifier parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.stt.v3.Stt.ExternalEouClassifier parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.ExternalEouClassifier parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.stt.v3.Stt.ExternalEouClassifier parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.ExternalEouClassifier parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.stt.v3.Stt.ExternalEouClassifier parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.ExternalEouClassifier parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.stt.v3.Stt.ExternalEouClassifier parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.ExternalEouClassifier parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.stt.v3.Stt.ExternalEouClassifier parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.ExternalEouClassifier parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.stt.v3.Stt.ExternalEouClassifier parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(yandex.cloud.api.ai.stt.v3.Stt.ExternalEouClassifier prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Use EOU provided by user
*
*
* Protobuf type {@code speechkit.stt.v3.ExternalEouClassifier}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:speechkit.stt.v3.ExternalEouClassifier)
yandex.cloud.api.ai.stt.v3.Stt.ExternalEouClassifierOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_ExternalEouClassifier_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_ExternalEouClassifier_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.ai.stt.v3.Stt.ExternalEouClassifier.class, yandex.cloud.api.ai.stt.v3.Stt.ExternalEouClassifier.Builder.class);
}
// Construct using yandex.cloud.api.ai.stt.v3.Stt.ExternalEouClassifier.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_ExternalEouClassifier_descriptor;
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.ExternalEouClassifier getDefaultInstanceForType() {
return yandex.cloud.api.ai.stt.v3.Stt.ExternalEouClassifier.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.ExternalEouClassifier build() {
yandex.cloud.api.ai.stt.v3.Stt.ExternalEouClassifier result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.ExternalEouClassifier buildPartial() {
yandex.cloud.api.ai.stt.v3.Stt.ExternalEouClassifier result = new yandex.cloud.api.ai.stt.v3.Stt.ExternalEouClassifier(this);
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof yandex.cloud.api.ai.stt.v3.Stt.ExternalEouClassifier) {
return mergeFrom((yandex.cloud.api.ai.stt.v3.Stt.ExternalEouClassifier)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.ai.stt.v3.Stt.ExternalEouClassifier other) {
if (other == yandex.cloud.api.ai.stt.v3.Stt.ExternalEouClassifier.getDefaultInstance()) return this;
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
yandex.cloud.api.ai.stt.v3.Stt.ExternalEouClassifier parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.ai.stt.v3.Stt.ExternalEouClassifier) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:speechkit.stt.v3.ExternalEouClassifier)
}
// @@protoc_insertion_point(class_scope:speechkit.stt.v3.ExternalEouClassifier)
private static final yandex.cloud.api.ai.stt.v3.Stt.ExternalEouClassifier DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.ai.stt.v3.Stt.ExternalEouClassifier();
}
public static yandex.cloud.api.ai.stt.v3.Stt.ExternalEouClassifier getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ExternalEouClassifier parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ExternalEouClassifier(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.ExternalEouClassifier getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface EouClassifierOptionsOrBuilder extends
// @@protoc_insertion_point(interface_extends:speechkit.stt.v3.EouClassifierOptions)
com.google.protobuf.MessageOrBuilder {
/**
*
* EOU classifier provided by SpeechKit. Default.
*
*
* .speechkit.stt.v3.DefaultEouClassifier default_classifier = 1;
* @return Whether the defaultClassifier field is set.
*/
boolean hasDefaultClassifier();
/**
*
* EOU classifier provided by SpeechKit. Default.
*
*
* string classifier = 1;
* @return The bytes for classifier.
*/
com.google.protobuf.ByteString
getClassifierBytes();
/**
*
* Describes the types of responses to which the classification results will come
*
*
* repeated .speechkit.stt.v3.RecognitionClassifier.TriggerType triggers = 2;
* @return A list containing the triggers.
*/
java.util.List getTriggersList();
/**
*
* Describes the types of responses to which the classification results will come
*
*
* repeated .speechkit.stt.v3.RecognitionClassifier.TriggerType triggers = 2;
* @return The count of triggers.
*/
int getTriggersCount();
/**
*
* Describes the types of responses to which the classification results will come
*
*
* repeated .speechkit.stt.v3.RecognitionClassifier.TriggerType triggers = 2;
* @param index The index of the element to return.
* @return The triggers at the given index.
*/
yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifier.TriggerType getTriggers(int index);
/**
*
* Describes the types of responses to which the classification results will come
*
*
* repeated .speechkit.stt.v3.RecognitionClassifier.TriggerType triggers = 2;
* @return A list containing the enum numeric values on the wire for triggers.
*/
java.util.List
getTriggersValueList();
/**
*
* Describes the types of responses to which the classification results will come
*
*
* repeated .speechkit.stt.v3.RecognitionClassifier.TriggerType triggers = 2;
* @param index The index of the value to return.
* @return The enum numeric value on the wire of triggers at the given index.
*/
int getTriggersValue(int index);
}
/**
* Protobuf type {@code speechkit.stt.v3.RecognitionClassifier}
*/
public static final class RecognitionClassifier extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:speechkit.stt.v3.RecognitionClassifier)
RecognitionClassifierOrBuilder {
private static final long serialVersionUID = 0L;
// Use RecognitionClassifier.newBuilder() to construct.
private RecognitionClassifier(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private RecognitionClassifier() {
classifier_ = "";
triggers_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new RecognitionClassifier();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private RecognitionClassifier(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
classifier_ = s;
break;
}
case 16: {
int rawValue = input.readEnum();
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
triggers_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
triggers_.add(rawValue);
break;
}
case 18: {
int length = input.readRawVarint32();
int oldLimit = input.pushLimit(length);
while(input.getBytesUntilLimit() > 0) {
int rawValue = input.readEnum();
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
triggers_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
triggers_.add(rawValue);
}
input.popLimit(oldLimit);
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
triggers_ = java.util.Collections.unmodifiableList(triggers_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_RecognitionClassifier_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_RecognitionClassifier_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifier.class, yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifier.Builder.class);
}
/**
* Protobuf enum {@code speechkit.stt.v3.RecognitionClassifier.TriggerType}
*/
public enum TriggerType
implements com.google.protobuf.ProtocolMessageEnum {
/**
*
*
* TRIGGER_TYPE_UNSPECIFIED = 0;
*/
public static final int TRIGGER_TYPE_UNSPECIFIED_VALUE = 0;
/**
*
* Apply classifier to utterance responses
*
*
* ON_UTTERANCE = 1;
*/
public static final int ON_UTTERANCE_VALUE = 1;
/**
*
* Apply classifier to final responses
*
*
* ON_FINAL = 2;
*/
public static final int ON_FINAL_VALUE = 2;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static TriggerType valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static TriggerType forNumber(int value) {
switch (value) {
case 0: return TRIGGER_TYPE_UNSPECIFIED;
case 1: return ON_UTTERANCE;
case 2: return ON_FINAL;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
TriggerType> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public TriggerType findValueByNumber(int number) {
return TriggerType.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifier.getDescriptor().getEnumTypes().get(0);
}
private static final TriggerType[] VALUES = values();
public static TriggerType valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private TriggerType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:speechkit.stt.v3.RecognitionClassifier.TriggerType)
}
public static final int CLASSIFIER_FIELD_NUMBER = 1;
private volatile java.lang.Object classifier_;
/**
*
*
* string classifier = 1;
* @return The bytes for classifier.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getClassifierBytes() {
java.lang.Object ref = classifier_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
classifier_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int TRIGGERS_FIELD_NUMBER = 2;
private java.util.List triggers_;
private static final com.google.protobuf.Internal.ListAdapter.Converter<
java.lang.Integer, yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifier.TriggerType> triggers_converter_ =
new com.google.protobuf.Internal.ListAdapter.Converter<
java.lang.Integer, yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifier.TriggerType>() {
public yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifier.TriggerType convert(java.lang.Integer from) {
@SuppressWarnings("deprecation")
yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifier.TriggerType result = yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifier.TriggerType.valueOf(from);
return result == null ? yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifier.TriggerType.UNRECOGNIZED : result;
}
};
/**
*
* Describes the types of responses to which the classification results will come
*
*
* repeated .speechkit.stt.v3.RecognitionClassifier.TriggerType triggers = 2;
* @return A list containing the triggers.
*/
@java.lang.Override
public java.util.List getTriggersList() {
return new com.google.protobuf.Internal.ListAdapter<
java.lang.Integer, yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifier.TriggerType>(triggers_, triggers_converter_);
}
/**
*
* Describes the types of responses to which the classification results will come
*
*
* repeated .speechkit.stt.v3.RecognitionClassifier.TriggerType triggers = 2;
* @return The count of triggers.
*/
@java.lang.Override
public int getTriggersCount() {
return triggers_.size();
}
/**
*
* Describes the types of responses to which the classification results will come
*
*
* repeated .speechkit.stt.v3.RecognitionClassifier.TriggerType triggers = 2;
* @param index The index of the element to return.
* @return The triggers at the given index.
*/
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifier.TriggerType getTriggers(int index) {
return triggers_converter_.convert(triggers_.get(index));
}
/**
*
* Describes the types of responses to which the classification results will come
*
*
* repeated .speechkit.stt.v3.RecognitionClassifier.TriggerType triggers = 2;
* @return A list containing the enum numeric values on the wire for triggers.
*/
@java.lang.Override
public java.util.List
getTriggersValueList() {
return triggers_;
}
/**
*
* Describes the types of responses to which the classification results will come
*
*
* repeated .speechkit.stt.v3.RecognitionClassifier.TriggerType triggers = 2;
* @param index The index of the value to return.
* @return The enum numeric value on the wire of triggers at the given index.
*/
@java.lang.Override
public int getTriggersValue(int index) {
return triggers_.get(index);
}
private int triggersMemoizedSerializedSize;
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(classifier_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, classifier_);
}
if (getTriggersList().size() > 0) {
output.writeUInt32NoTag(18);
output.writeUInt32NoTag(triggersMemoizedSerializedSize);
}
for (int i = 0; i < triggers_.size(); i++) {
output.writeEnumNoTag(triggers_.get(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(classifier_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, classifier_);
}
{
int dataSize = 0;
for (int i = 0; i < triggers_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeEnumSizeNoTag(triggers_.get(i));
}
size += dataSize;
if (!getTriggersList().isEmpty()) { size += 1;
size += com.google.protobuf.CodedOutputStream
.computeUInt32SizeNoTag(dataSize);
}triggersMemoizedSerializedSize = dataSize;
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifier)) {
return super.equals(obj);
}
yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifier other = (yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifier) obj;
if (!getClassifier()
.equals(other.getClassifier())) return false;
if (!triggers_.equals(other.triggers_)) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + CLASSIFIER_FIELD_NUMBER;
hash = (53 * hash) + getClassifier().hashCode();
if (getTriggersCount() > 0) {
hash = (37 * hash) + TRIGGERS_FIELD_NUMBER;
hash = (53 * hash) + triggers_.hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifier parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifier parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifier parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifier parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifier parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifier parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifier parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifier parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifier parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifier parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifier parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifier parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifier prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code speechkit.stt.v3.RecognitionClassifier}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:speechkit.stt.v3.RecognitionClassifier)
yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifierOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_RecognitionClassifier_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_RecognitionClassifier_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifier.class, yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifier.Builder.class);
}
// Construct using yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifier.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
classifier_ = "";
triggers_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_RecognitionClassifier_descriptor;
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifier getDefaultInstanceForType() {
return yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifier.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifier build() {
yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifier result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifier buildPartial() {
yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifier result = new yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifier(this);
int from_bitField0_ = bitField0_;
result.classifier_ = classifier_;
if (((bitField0_ & 0x00000001) != 0)) {
triggers_ = java.util.Collections.unmodifiableList(triggers_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.triggers_ = triggers_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifier) {
return mergeFrom((yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifier)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifier other) {
if (other == yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifier.getDefaultInstance()) return this;
if (!other.getClassifier().isEmpty()) {
classifier_ = other.classifier_;
onChanged();
}
if (!other.triggers_.isEmpty()) {
if (triggers_.isEmpty()) {
triggers_ = other.triggers_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureTriggersIsMutable();
triggers_.addAll(other.triggers_);
}
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifier parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifier) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object classifier_ = "";
/**
*
*
* string classifier = 1;
* @return The bytes for classifier.
*/
public com.google.protobuf.ByteString
getClassifierBytes() {
java.lang.Object ref = classifier_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
classifier_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Classifier name
*
*
* string classifier = 1;
* @param value The classifier to set.
* @return This builder for chaining.
*/
public Builder setClassifier(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
classifier_ = value;
onChanged();
return this;
}
/**
*
* Classifier name
*
*
* string classifier = 1;
* @return This builder for chaining.
*/
public Builder clearClassifier() {
classifier_ = getDefaultInstance().getClassifier();
onChanged();
return this;
}
/**
*
* Classifier name
*
*
* string classifier = 1;
* @param value The bytes for classifier to set.
* @return This builder for chaining.
*/
public Builder setClassifierBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
classifier_ = value;
onChanged();
return this;
}
private java.util.List triggers_ =
java.util.Collections.emptyList();
private void ensureTriggersIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
triggers_ = new java.util.ArrayList(triggers_);
bitField0_ |= 0x00000001;
}
}
/**
*
* Describes the types of responses to which the classification results will come
*
*
* repeated .speechkit.stt.v3.RecognitionClassifier.TriggerType triggers = 2;
* @return A list containing the triggers.
*/
public java.util.List getTriggersList() {
return new com.google.protobuf.Internal.ListAdapter<
java.lang.Integer, yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifier.TriggerType>(triggers_, triggers_converter_);
}
/**
*
* Describes the types of responses to which the classification results will come
*
*
* repeated .speechkit.stt.v3.RecognitionClassifier.TriggerType triggers = 2;
* @return The count of triggers.
*/
public int getTriggersCount() {
return triggers_.size();
}
/**
*
* Describes the types of responses to which the classification results will come
*
*
* repeated .speechkit.stt.v3.RecognitionClassifier.TriggerType triggers = 2;
* @param index The index of the element to return.
* @return The triggers at the given index.
*/
public yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifier.TriggerType getTriggers(int index) {
return triggers_converter_.convert(triggers_.get(index));
}
/**
*
* Describes the types of responses to which the classification results will come
*
*
* repeated .speechkit.stt.v3.RecognitionClassifier.TriggerType triggers = 2;
* @param index The index to set the value at.
* @param value The triggers to set.
* @return This builder for chaining.
*/
public Builder setTriggers(
int index, yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifier.TriggerType value) {
if (value == null) {
throw new NullPointerException();
}
ensureTriggersIsMutable();
triggers_.set(index, value.getNumber());
onChanged();
return this;
}
/**
*
* Describes the types of responses to which the classification results will come
*
*
* repeated .speechkit.stt.v3.RecognitionClassifier.TriggerType triggers = 2;
* @param value The triggers to add.
* @return This builder for chaining.
*/
public Builder addTriggers(yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifier.TriggerType value) {
if (value == null) {
throw new NullPointerException();
}
ensureTriggersIsMutable();
triggers_.add(value.getNumber());
onChanged();
return this;
}
/**
*
* Describes the types of responses to which the classification results will come
*
*
* repeated .speechkit.stt.v3.RecognitionClassifier.TriggerType triggers = 2;
* @param values The triggers to add.
* @return This builder for chaining.
*/
public Builder addAllTriggers(
java.lang.Iterable extends yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifier.TriggerType> values) {
ensureTriggersIsMutable();
for (yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifier.TriggerType value : values) {
triggers_.add(value.getNumber());
}
onChanged();
return this;
}
/**
*
* Describes the types of responses to which the classification results will come
*
* Describes the types of responses to which the classification results will come
*
*
* repeated .speechkit.stt.v3.RecognitionClassifier.TriggerType triggers = 2;
* @return A list containing the enum numeric values on the wire for triggers.
*/
public java.util.List
getTriggersValueList() {
return java.util.Collections.unmodifiableList(triggers_);
}
/**
*
* Describes the types of responses to which the classification results will come
*
*
* repeated .speechkit.stt.v3.RecognitionClassifier.TriggerType triggers = 2;
* @param index The index of the value to return.
* @return The enum numeric value on the wire of triggers at the given index.
*/
public int getTriggersValue(int index) {
return triggers_.get(index);
}
/**
*
* Describes the types of responses to which the classification results will come
*
*
* repeated .speechkit.stt.v3.RecognitionClassifier.TriggerType triggers = 2;
* @param index The index of the value to return.
* @return The enum numeric value on the wire of triggers at the given index.
* @return This builder for chaining.
*/
public Builder setTriggersValue(
int index, int value) {
ensureTriggersIsMutable();
triggers_.set(index, value);
onChanged();
return this;
}
/**
*
* Describes the types of responses to which the classification results will come
*
*
* repeated .speechkit.stt.v3.RecognitionClassifier.TriggerType triggers = 2;
* @param value The enum numeric value on the wire for triggers to add.
* @return This builder for chaining.
*/
public Builder addTriggersValue(int value) {
ensureTriggersIsMutable();
triggers_.add(value);
onChanged();
return this;
}
/**
*
* Describes the types of responses to which the classification results will come
*
*
* repeated .speechkit.stt.v3.RecognitionClassifier.TriggerType triggers = 2;
* @param values The enum numeric values on the wire for triggers to add.
* @return This builder for chaining.
*/
public Builder addAllTriggersValue(
java.lang.Iterable values) {
ensureTriggersIsMutable();
for (int value : values) {
triggers_.add(value);
}
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:speechkit.stt.v3.RecognitionClassifier)
}
// @@protoc_insertion_point(class_scope:speechkit.stt.v3.RecognitionClassifier)
private static final yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifier DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifier();
}
public static yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifier getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public RecognitionClassifier parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new RecognitionClassifier(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifier getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface RecognitionClassifierOptionsOrBuilder extends
// @@protoc_insertion_point(interface_extends:speechkit.stt.v3.RecognitionClassifierOptions)
com.google.protobuf.MessageOrBuilder {
/**
*
* Quantile levels in range (0, 1) for descriptive statistics
*
*
* repeated double descriptive_statistics_quantiles = 3;
* @return A list containing the descriptiveStatisticsQuantiles.
*/
public java.util.List
getDescriptiveStatisticsQuantilesList() {
return ((bitField0_ & 0x00000001) != 0) ?
java.util.Collections.unmodifiableList(descriptiveStatisticsQuantiles_) : descriptiveStatisticsQuantiles_;
}
/**
*
* Quantile levels in range (0, 1) for descriptive statistics
*
*
* repeated double descriptive_statistics_quantiles = 3;
* @return The count of descriptiveStatisticsQuantiles.
*/
public int getDescriptiveStatisticsQuantilesCount() {
return descriptiveStatisticsQuantiles_.size();
}
/**
*
* Quantile levels in range (0, 1) for descriptive statistics
*
*
* repeated double descriptive_statistics_quantiles = 3;
* @param index The index of the element to return.
* @return The descriptiveStatisticsQuantiles at the given index.
*/
public double getDescriptiveStatisticsQuantiles(int index) {
return descriptiveStatisticsQuantiles_.getDouble(index);
}
/**
*
* Quantile levels in range (0, 1) for descriptive statistics
*
*
* repeated double descriptive_statistics_quantiles = 3;
* @param index The index to set the value at.
* @param value The descriptiveStatisticsQuantiles to set.
* @return This builder for chaining.
*/
public Builder setDescriptiveStatisticsQuantiles(
int index, double value) {
ensureDescriptiveStatisticsQuantilesIsMutable();
descriptiveStatisticsQuantiles_.setDouble(index, value);
onChanged();
return this;
}
/**
*
* Quantile levels in range (0, 1) for descriptive statistics
*
*
* repeated double descriptive_statistics_quantiles = 3;
* @param value The descriptiveStatisticsQuantiles to add.
* @return This builder for chaining.
*/
public Builder addDescriptiveStatisticsQuantiles(double value) {
ensureDescriptiveStatisticsQuantilesIsMutable();
descriptiveStatisticsQuantiles_.addDouble(value);
onChanged();
return this;
}
/**
*
* Quantile levels in range (0, 1) for descriptive statistics
*
*
* repeated double descriptive_statistics_quantiles = 3;
* @param values The descriptiveStatisticsQuantiles to add.
* @return This builder for chaining.
*/
public Builder addAllDescriptiveStatisticsQuantiles(
java.lang.Iterable extends java.lang.Double> values) {
ensureDescriptiveStatisticsQuantilesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, descriptiveStatisticsQuantiles_);
onChanged();
return this;
}
/**
*
* Quantile levels in range (0, 1) for descriptive statistics
*
*
* repeated double descriptive_statistics_quantiles = 3;
* @return This builder for chaining.
*/
public Builder clearDescriptiveStatisticsQuantiles() {
descriptiveStatisticsQuantiles_ = emptyDoubleList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:speechkit.stt.v3.SpeechAnalysisOptions)
}
// @@protoc_insertion_point(class_scope:speechkit.stt.v3.SpeechAnalysisOptions)
private static final yandex.cloud.api.ai.stt.v3.Stt.SpeechAnalysisOptions DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.ai.stt.v3.Stt.SpeechAnalysisOptions();
}
public static yandex.cloud.api.ai.stt.v3.Stt.SpeechAnalysisOptions getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public SpeechAnalysisOptions parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new SpeechAnalysisOptions(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.SpeechAnalysisOptions getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface RawAudioOrBuilder extends
// @@protoc_insertion_point(interface_extends:speechkit.stt.v3.RawAudio)
com.google.protobuf.MessageOrBuilder {
/**
*
* Type of audio encoding
*
*
* .speechkit.stt.v3.RawAudio.AudioEncoding audio_encoding = 1;
* @return The enum numeric value on the wire for audioEncoding.
*/
int getAudioEncodingValue();
/**
*
*
* int64 sample_rate_hertz = 2;
* @return The sampleRateHertz.
*/
long getSampleRateHertz();
/**
*
* PCM channel count. Currently only single channel audio is supported in real-time recognition.
*
*
* int64 audio_channel_count = 3;
* @return The audioChannelCount.
*/
long getAudioChannelCount();
}
/**
*
* RAW Audio format spec (no container to infer type). Used in AudioFormat options.
*
*
* Protobuf type {@code speechkit.stt.v3.RawAudio}
*/
public static final class RawAudio extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:speechkit.stt.v3.RawAudio)
RawAudioOrBuilder {
private static final long serialVersionUID = 0L;
// Use RawAudio.newBuilder() to construct.
private RawAudio(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private RawAudio() {
audioEncoding_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new RawAudio();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private RawAudio(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
int rawValue = input.readEnum();
audioEncoding_ = rawValue;
break;
}
case 16: {
sampleRateHertz_ = input.readInt64();
break;
}
case 24: {
audioChannelCount_ = input.readInt64();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_RawAudio_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_RawAudio_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.ai.stt.v3.Stt.RawAudio.class, yandex.cloud.api.ai.stt.v3.Stt.RawAudio.Builder.class);
}
/**
* Protobuf enum {@code speechkit.stt.v3.RawAudio.AudioEncoding}
*/
public enum AudioEncoding
implements com.google.protobuf.ProtocolMessageEnum {
/**
* AUDIO_ENCODING_UNSPECIFIED = 0;
*/
AUDIO_ENCODING_UNSPECIFIED(0),
/**
*
* Audio bit depth 16-bit signed little-endian (Linear PCM).
*
*
* LINEAR16_PCM = 1;
*/
LINEAR16_PCM(1),
UNRECOGNIZED(-1),
;
/**
* AUDIO_ENCODING_UNSPECIFIED = 0;
*/
public static final int AUDIO_ENCODING_UNSPECIFIED_VALUE = 0;
/**
*
* Audio bit depth 16-bit signed little-endian (Linear PCM).
*
*
* LINEAR16_PCM = 1;
*/
public static final int LINEAR16_PCM_VALUE = 1;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static AudioEncoding valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static AudioEncoding forNumber(int value) {
switch (value) {
case 0: return AUDIO_ENCODING_UNSPECIFIED;
case 1: return LINEAR16_PCM;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
AudioEncoding> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public AudioEncoding findValueByNumber(int number) {
return AudioEncoding.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return yandex.cloud.api.ai.stt.v3.Stt.RawAudio.getDescriptor().getEnumTypes().get(0);
}
private static final AudioEncoding[] VALUES = values();
public static AudioEncoding valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private AudioEncoding(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:speechkit.stt.v3.RawAudio.AudioEncoding)
}
public static final int AUDIO_ENCODING_FIELD_NUMBER = 1;
private int audioEncoding_;
/**
*
* Type of audio encoding
*
*
* .speechkit.stt.v3.RawAudio.AudioEncoding audio_encoding = 1;
* @return The enum numeric value on the wire for audioEncoding.
*/
@java.lang.Override public int getAudioEncodingValue() {
return audioEncoding_;
}
/**
*
* Type of audio encoding
*
*
* .speechkit.stt.v3.RawAudio.AudioEncoding audio_encoding = 1;
* @return The audioEncoding.
*/
@java.lang.Override public yandex.cloud.api.ai.stt.v3.Stt.RawAudio.AudioEncoding getAudioEncoding() {
@SuppressWarnings("deprecation")
yandex.cloud.api.ai.stt.v3.Stt.RawAudio.AudioEncoding result = yandex.cloud.api.ai.stt.v3.Stt.RawAudio.AudioEncoding.valueOf(audioEncoding_);
return result == null ? yandex.cloud.api.ai.stt.v3.Stt.RawAudio.AudioEncoding.UNRECOGNIZED : result;
}
public static final int SAMPLE_RATE_HERTZ_FIELD_NUMBER = 2;
private long sampleRateHertz_;
/**
*
* PCM sample rate
*
*
* int64 sample_rate_hertz = 2;
* @return The sampleRateHertz.
*/
@java.lang.Override
public long getSampleRateHertz() {
return sampleRateHertz_;
}
public static final int AUDIO_CHANNEL_COUNT_FIELD_NUMBER = 3;
private long audioChannelCount_;
/**
*
* PCM channel count. Currently only single channel audio is supported in real-time recognition.
*
* RAW Audio format spec (no container to infer type). Used in AudioFormat options.
*
*
* Protobuf type {@code speechkit.stt.v3.RawAudio}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:speechkit.stt.v3.RawAudio)
yandex.cloud.api.ai.stt.v3.Stt.RawAudioOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_RawAudio_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_RawAudio_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.ai.stt.v3.Stt.RawAudio.class, yandex.cloud.api.ai.stt.v3.Stt.RawAudio.Builder.class);
}
// Construct using yandex.cloud.api.ai.stt.v3.Stt.RawAudio.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
audioEncoding_ = 0;
sampleRateHertz_ = 0L;
audioChannelCount_ = 0L;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_RawAudio_descriptor;
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.RawAudio getDefaultInstanceForType() {
return yandex.cloud.api.ai.stt.v3.Stt.RawAudio.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.RawAudio build() {
yandex.cloud.api.ai.stt.v3.Stt.RawAudio result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.RawAudio buildPartial() {
yandex.cloud.api.ai.stt.v3.Stt.RawAudio result = new yandex.cloud.api.ai.stt.v3.Stt.RawAudio(this);
result.audioEncoding_ = audioEncoding_;
result.sampleRateHertz_ = sampleRateHertz_;
result.audioChannelCount_ = audioChannelCount_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof yandex.cloud.api.ai.stt.v3.Stt.RawAudio) {
return mergeFrom((yandex.cloud.api.ai.stt.v3.Stt.RawAudio)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.ai.stt.v3.Stt.RawAudio other) {
if (other == yandex.cloud.api.ai.stt.v3.Stt.RawAudio.getDefaultInstance()) return this;
if (other.audioEncoding_ != 0) {
setAudioEncodingValue(other.getAudioEncodingValue());
}
if (other.getSampleRateHertz() != 0L) {
setSampleRateHertz(other.getSampleRateHertz());
}
if (other.getAudioChannelCount() != 0L) {
setAudioChannelCount(other.getAudioChannelCount());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
yandex.cloud.api.ai.stt.v3.Stt.RawAudio parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.ai.stt.v3.Stt.RawAudio) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int audioEncoding_ = 0;
/**
*
* Type of audio encoding
*
*
* .speechkit.stt.v3.RawAudio.AudioEncoding audio_encoding = 1;
* @return The enum numeric value on the wire for audioEncoding.
*/
@java.lang.Override public int getAudioEncodingValue() {
return audioEncoding_;
}
/**
*
* Type of audio encoding
*
*
* .speechkit.stt.v3.RawAudio.AudioEncoding audio_encoding = 1;
* @param value The enum numeric value on the wire for audioEncoding to set.
* @return This builder for chaining.
*/
public Builder setAudioEncodingValue(int value) {
audioEncoding_ = value;
onChanged();
return this;
}
/**
*
* Type of audio encoding
*
*
* .speechkit.stt.v3.RawAudio.AudioEncoding audio_encoding = 1;
* @return The audioEncoding.
*/
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.RawAudio.AudioEncoding getAudioEncoding() {
@SuppressWarnings("deprecation")
yandex.cloud.api.ai.stt.v3.Stt.RawAudio.AudioEncoding result = yandex.cloud.api.ai.stt.v3.Stt.RawAudio.AudioEncoding.valueOf(audioEncoding_);
return result == null ? yandex.cloud.api.ai.stt.v3.Stt.RawAudio.AudioEncoding.UNRECOGNIZED : result;
}
/**
*
* Type of audio encoding
*
*
* .speechkit.stt.v3.RawAudio.AudioEncoding audio_encoding = 1;
* @param value The audioEncoding to set.
* @return This builder for chaining.
*/
public Builder setAudioEncoding(yandex.cloud.api.ai.stt.v3.Stt.RawAudio.AudioEncoding value) {
if (value == null) {
throw new NullPointerException();
}
audioEncoding_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Type of audio encoding
*
*
* .speechkit.stt.v3.RawAudio.AudioEncoding audio_encoding = 1;
* @return This builder for chaining.
*/
public Builder clearAudioEncoding() {
audioEncoding_ = 0;
onChanged();
return this;
}
private long sampleRateHertz_ ;
/**
*
* PCM sample rate
*
*
* int64 sample_rate_hertz = 2;
* @return The sampleRateHertz.
*/
@java.lang.Override
public long getSampleRateHertz() {
return sampleRateHertz_;
}
/**
*
* PCM sample rate
*
*
* int64 sample_rate_hertz = 2;
* @param value The sampleRateHertz to set.
* @return This builder for chaining.
*/
public Builder setSampleRateHertz(long value) {
sampleRateHertz_ = value;
onChanged();
return this;
}
/**
*
* PCM sample rate
*
*
* int64 sample_rate_hertz = 2;
* @return This builder for chaining.
*/
public Builder clearSampleRateHertz() {
sampleRateHertz_ = 0L;
onChanged();
return this;
}
private long audioChannelCount_ ;
/**
*
* PCM channel count. Currently only single channel audio is supported in real-time recognition.
*
*
* int64 audio_channel_count = 3;
* @return The audioChannelCount.
*/
@java.lang.Override
public long getAudioChannelCount() {
return audioChannelCount_;
}
/**
*
* PCM channel count. Currently only single channel audio is supported in real-time recognition.
*
*
* int64 audio_channel_count = 3;
* @param value The audioChannelCount to set.
* @return This builder for chaining.
*/
public Builder setAudioChannelCount(long value) {
audioChannelCount_ = value;
onChanged();
return this;
}
/**
*
* PCM channel count. Currently only single channel audio is supported in real-time recognition.
*
*
* int64 audio_channel_count = 3;
* @return This builder for chaining.
*/
public Builder clearAudioChannelCount() {
audioChannelCount_ = 0L;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:speechkit.stt.v3.RawAudio)
}
// @@protoc_insertion_point(class_scope:speechkit.stt.v3.RawAudio)
private static final yandex.cloud.api.ai.stt.v3.Stt.RawAudio DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.ai.stt.v3.Stt.RawAudio();
}
public static yandex.cloud.api.ai.stt.v3.Stt.RawAudio getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public RawAudio parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new RawAudio(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.RawAudio getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ContainerAudioOrBuilder extends
// @@protoc_insertion_point(interface_extends:speechkit.stt.v3.ContainerAudio)
com.google.protobuf.MessageOrBuilder {
/**
*
* Type of audio container.
*
*
* .speechkit.stt.v3.ContainerAudio.ContainerAudioType container_audio_type = 1;
* @return The enum numeric value on the wire for containerAudioType.
*/
int getContainerAudioTypeValue();
/**
*
* Audio with fixed type in container. Used in AudioFormat options.
*
*
* Protobuf type {@code speechkit.stt.v3.ContainerAudio}
*/
public static final class ContainerAudio extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:speechkit.stt.v3.ContainerAudio)
ContainerAudioOrBuilder {
private static final long serialVersionUID = 0L;
// Use ContainerAudio.newBuilder() to construct.
private ContainerAudio(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ContainerAudio() {
containerAudioType_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ContainerAudio();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ContainerAudio(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
int rawValue = input.readEnum();
containerAudioType_ = rawValue;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_ContainerAudio_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_ContainerAudio_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.ai.stt.v3.Stt.ContainerAudio.class, yandex.cloud.api.ai.stt.v3.Stt.ContainerAudio.Builder.class);
}
/**
* Protobuf enum {@code speechkit.stt.v3.ContainerAudio.ContainerAudioType}
*/
public enum ContainerAudioType
implements com.google.protobuf.ProtocolMessageEnum {
/**
* CONTAINER_AUDIO_TYPE_UNSPECIFIED = 0;
*/
CONTAINER_AUDIO_TYPE_UNSPECIFIED(0),
/**
*
* Audio bit depth 16-bit signed little-endian (Linear PCM).
*
*
* WAV = 1;
*/
WAV(1),
/**
*
* Data is encoded using the OPUS audio codec and compressed using the OGG container format.
*
*
* OGG_OPUS = 2;
*/
OGG_OPUS(2),
/**
*
* Data is encoded using MPEG-1/2 Layer III and compressed using the MP3 container format.
*
*
* MP3 = 3;
*/
MP3(3),
UNRECOGNIZED(-1),
;
/**
* CONTAINER_AUDIO_TYPE_UNSPECIFIED = 0;
*/
public static final int CONTAINER_AUDIO_TYPE_UNSPECIFIED_VALUE = 0;
/**
*
* Audio bit depth 16-bit signed little-endian (Linear PCM).
*
*
* WAV = 1;
*/
public static final int WAV_VALUE = 1;
/**
*
* Data is encoded using the OPUS audio codec and compressed using the OGG container format.
*
*
* OGG_OPUS = 2;
*/
public static final int OGG_OPUS_VALUE = 2;
/**
*
* Data is encoded using MPEG-1/2 Layer III and compressed using the MP3 container format.
*
*
* MP3 = 3;
*/
public static final int MP3_VALUE = 3;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static ContainerAudioType valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static ContainerAudioType forNumber(int value) {
switch (value) {
case 0: return CONTAINER_AUDIO_TYPE_UNSPECIFIED;
case 1: return WAV;
case 2: return OGG_OPUS;
case 3: return MP3;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
ContainerAudioType> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public ContainerAudioType findValueByNumber(int number) {
return ContainerAudioType.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return yandex.cloud.api.ai.stt.v3.Stt.ContainerAudio.getDescriptor().getEnumTypes().get(0);
}
private static final ContainerAudioType[] VALUES = values();
public static ContainerAudioType valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private ContainerAudioType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:speechkit.stt.v3.ContainerAudio.ContainerAudioType)
}
public static final int CONTAINER_AUDIO_TYPE_FIELD_NUMBER = 1;
private int containerAudioType_;
/**
*
* Type of audio container.
*
*
* .speechkit.stt.v3.ContainerAudio.ContainerAudioType container_audio_type = 1;
* @return The enum numeric value on the wire for containerAudioType.
*/
@java.lang.Override public int getContainerAudioTypeValue() {
return containerAudioType_;
}
/**
*
* Type of audio container.
*
*
* .speechkit.stt.v3.ContainerAudio.ContainerAudioType container_audio_type = 1;
* @return The containerAudioType.
*/
@java.lang.Override public yandex.cloud.api.ai.stt.v3.Stt.ContainerAudio.ContainerAudioType getContainerAudioType() {
@SuppressWarnings("deprecation")
yandex.cloud.api.ai.stt.v3.Stt.ContainerAudio.ContainerAudioType result = yandex.cloud.api.ai.stt.v3.Stt.ContainerAudio.ContainerAudioType.valueOf(containerAudioType_);
return result == null ? yandex.cloud.api.ai.stt.v3.Stt.ContainerAudio.ContainerAudioType.UNRECOGNIZED : result;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (containerAudioType_ != yandex.cloud.api.ai.stt.v3.Stt.ContainerAudio.ContainerAudioType.CONTAINER_AUDIO_TYPE_UNSPECIFIED.getNumber()) {
output.writeEnum(1, containerAudioType_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (containerAudioType_ != yandex.cloud.api.ai.stt.v3.Stt.ContainerAudio.ContainerAudioType.CONTAINER_AUDIO_TYPE_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, containerAudioType_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof yandex.cloud.api.ai.stt.v3.Stt.ContainerAudio)) {
return super.equals(obj);
}
yandex.cloud.api.ai.stt.v3.Stt.ContainerAudio other = (yandex.cloud.api.ai.stt.v3.Stt.ContainerAudio) obj;
if (containerAudioType_ != other.containerAudioType_) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + CONTAINER_AUDIO_TYPE_FIELD_NUMBER;
hash = (53 * hash) + containerAudioType_;
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.ai.stt.v3.Stt.ContainerAudio parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.stt.v3.Stt.ContainerAudio parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.ContainerAudio parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.stt.v3.Stt.ContainerAudio parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.ContainerAudio parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.stt.v3.Stt.ContainerAudio parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.ContainerAudio parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.stt.v3.Stt.ContainerAudio parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.ContainerAudio parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.stt.v3.Stt.ContainerAudio parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.ContainerAudio parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.stt.v3.Stt.ContainerAudio parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(yandex.cloud.api.ai.stt.v3.Stt.ContainerAudio prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Audio with fixed type in container. Used in AudioFormat options.
*
*
* Protobuf type {@code speechkit.stt.v3.ContainerAudio}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:speechkit.stt.v3.ContainerAudio)
yandex.cloud.api.ai.stt.v3.Stt.ContainerAudioOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_ContainerAudio_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_ContainerAudio_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.ai.stt.v3.Stt.ContainerAudio.class, yandex.cloud.api.ai.stt.v3.Stt.ContainerAudio.Builder.class);
}
// Construct using yandex.cloud.api.ai.stt.v3.Stt.ContainerAudio.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
containerAudioType_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_ContainerAudio_descriptor;
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.ContainerAudio getDefaultInstanceForType() {
return yandex.cloud.api.ai.stt.v3.Stt.ContainerAudio.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.ContainerAudio build() {
yandex.cloud.api.ai.stt.v3.Stt.ContainerAudio result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.ContainerAudio buildPartial() {
yandex.cloud.api.ai.stt.v3.Stt.ContainerAudio result = new yandex.cloud.api.ai.stt.v3.Stt.ContainerAudio(this);
result.containerAudioType_ = containerAudioType_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof yandex.cloud.api.ai.stt.v3.Stt.ContainerAudio) {
return mergeFrom((yandex.cloud.api.ai.stt.v3.Stt.ContainerAudio)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.ai.stt.v3.Stt.ContainerAudio other) {
if (other == yandex.cloud.api.ai.stt.v3.Stt.ContainerAudio.getDefaultInstance()) return this;
if (other.containerAudioType_ != 0) {
setContainerAudioTypeValue(other.getContainerAudioTypeValue());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
yandex.cloud.api.ai.stt.v3.Stt.ContainerAudio parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.ai.stt.v3.Stt.ContainerAudio) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int containerAudioType_ = 0;
/**
*
* Type of audio container.
*
*
* .speechkit.stt.v3.ContainerAudio.ContainerAudioType container_audio_type = 1;
* @return The enum numeric value on the wire for containerAudioType.
*/
@java.lang.Override public int getContainerAudioTypeValue() {
return containerAudioType_;
}
/**
*
* Type of audio container.
*
*
* .speechkit.stt.v3.ContainerAudio.ContainerAudioType container_audio_type = 1;
* @param value The enum numeric value on the wire for containerAudioType to set.
* @return This builder for chaining.
*/
public Builder setContainerAudioTypeValue(int value) {
containerAudioType_ = value;
onChanged();
return this;
}
/**
*
* Type of audio container.
*
*
* .speechkit.stt.v3.ContainerAudio.ContainerAudioType container_audio_type = 1;
* @return The containerAudioType.
*/
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.ContainerAudio.ContainerAudioType getContainerAudioType() {
@SuppressWarnings("deprecation")
yandex.cloud.api.ai.stt.v3.Stt.ContainerAudio.ContainerAudioType result = yandex.cloud.api.ai.stt.v3.Stt.ContainerAudio.ContainerAudioType.valueOf(containerAudioType_);
return result == null ? yandex.cloud.api.ai.stt.v3.Stt.ContainerAudio.ContainerAudioType.UNRECOGNIZED : result;
}
/**
*
* Type of audio container.
*
*
* .speechkit.stt.v3.ContainerAudio.ContainerAudioType container_audio_type = 1;
* @param value The containerAudioType to set.
* @return This builder for chaining.
*/
public Builder setContainerAudioType(yandex.cloud.api.ai.stt.v3.Stt.ContainerAudio.ContainerAudioType value) {
if (value == null) {
throw new NullPointerException();
}
containerAudioType_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Type of audio container.
*
*
* .speechkit.stt.v3.ContainerAudio.ContainerAudioType container_audio_type = 1;
* @return This builder for chaining.
*/
public Builder clearContainerAudioType() {
containerAudioType_ = 0;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:speechkit.stt.v3.ContainerAudio)
}
// @@protoc_insertion_point(class_scope:speechkit.stt.v3.ContainerAudio)
private static final yandex.cloud.api.ai.stt.v3.Stt.ContainerAudio DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.ai.stt.v3.Stt.ContainerAudio();
}
public static yandex.cloud.api.ai.stt.v3.Stt.ContainerAudio getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ContainerAudio parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ContainerAudio(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.ContainerAudio getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface AudioFormatOptionsOrBuilder extends
// @@protoc_insertion_point(interface_extends:speechkit.stt.v3.AudioFormatOptions)
com.google.protobuf.MessageOrBuilder {
/**
*
* Audio without container.
*
*
* .speechkit.stt.v3.RawAudio raw_audio = 1;
* @return Whether the rawAudio field is set.
*/
boolean hasRawAudio();
/**
*
*
* .speechkit.stt.v3.ContainerAudio container_audio = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.ai.stt.v3.Stt.ContainerAudio, yandex.cloud.api.ai.stt.v3.Stt.ContainerAudio.Builder, yandex.cloud.api.ai.stt.v3.Stt.ContainerAudioOrBuilder>
getContainerAudioFieldBuilder() {
if (containerAudioBuilder_ == null) {
if (!(audioFormatCase_ == 2)) {
audioFormat_ = yandex.cloud.api.ai.stt.v3.Stt.ContainerAudio.getDefaultInstance();
}
containerAudioBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.ai.stt.v3.Stt.ContainerAudio, yandex.cloud.api.ai.stt.v3.Stt.ContainerAudio.Builder, yandex.cloud.api.ai.stt.v3.Stt.ContainerAudioOrBuilder>(
(yandex.cloud.api.ai.stt.v3.Stt.ContainerAudio) audioFormat_,
getParentForChildren(),
isClean());
audioFormat_ = null;
}
audioFormatCase_ = 2;
onChanged();;
return containerAudioBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:speechkit.stt.v3.AudioFormatOptions)
}
// @@protoc_insertion_point(class_scope:speechkit.stt.v3.AudioFormatOptions)
private static final yandex.cloud.api.ai.stt.v3.Stt.AudioFormatOptions DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.ai.stt.v3.Stt.AudioFormatOptions();
}
public static yandex.cloud.api.ai.stt.v3.Stt.AudioFormatOptions getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public AudioFormatOptions parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new AudioFormatOptions(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.AudioFormatOptions getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface LanguageRestrictionOptionsOrBuilder extends
// @@protoc_insertion_point(interface_extends:speechkit.stt.v3.LanguageRestrictionOptions)
com.google.protobuf.MessageOrBuilder {
/**
*
* Language restriction type
*
*
* .speechkit.stt.v3.LanguageRestrictionOptions.LanguageRestrictionType restriction_type = 1;
* @return The enum numeric value on the wire for restrictionType.
*/
int getRestrictionTypeValue();
/**
*
* The list of language codes to restrict recognition in the case of an auto model
*
*
* repeated string language_code = 2;
* @return A list containing the languageCode.
*/
java.util.List
getLanguageCodeList();
/**
*
* The list of language codes to restrict recognition in the case of an auto model
*
*
* repeated string language_code = 2;
* @return The count of languageCode.
*/
int getLanguageCodeCount();
/**
*
* The list of language codes to restrict recognition in the case of an auto model
*
*
* repeated string language_code = 2;
* @param index The index of the element to return.
* @return The languageCode at the given index.
*/
java.lang.String getLanguageCode(int index);
/**
*
* The list of language codes to restrict recognition in the case of an auto model
*
*
* repeated string language_code = 2;
* @param index The index of the value to return.
* @return The bytes of the languageCode at the given index.
*/
com.google.protobuf.ByteString
getLanguageCodeBytes(int index);
}
/**
*
* Type of restriction for the list of languages expected in the incoming speech stream.
*
*
* Protobuf type {@code speechkit.stt.v3.LanguageRestrictionOptions}
*/
public static final class LanguageRestrictionOptions extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:speechkit.stt.v3.LanguageRestrictionOptions)
LanguageRestrictionOptionsOrBuilder {
private static final long serialVersionUID = 0L;
// Use LanguageRestrictionOptions.newBuilder() to construct.
private LanguageRestrictionOptions(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private LanguageRestrictionOptions() {
restrictionType_ = 0;
languageCode_ = com.google.protobuf.LazyStringArrayList.EMPTY;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new LanguageRestrictionOptions();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private LanguageRestrictionOptions(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
int rawValue = input.readEnum();
restrictionType_ = rawValue;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
languageCode_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000001;
}
languageCode_.add(s);
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
languageCode_ = languageCode_.getUnmodifiableView();
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_LanguageRestrictionOptions_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_LanguageRestrictionOptions_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.ai.stt.v3.Stt.LanguageRestrictionOptions.class, yandex.cloud.api.ai.stt.v3.Stt.LanguageRestrictionOptions.Builder.class);
}
/**
* Protobuf enum {@code speechkit.stt.v3.LanguageRestrictionOptions.LanguageRestrictionType}
*/
public enum LanguageRestrictionType
implements com.google.protobuf.ProtocolMessageEnum {
/**
* LANGUAGE_RESTRICTION_TYPE_UNSPECIFIED = 0;
*/
LANGUAGE_RESTRICTION_TYPE_UNSPECIFIED(0),
/**
*
* The allowing list. The incoming audio can contain only the listed languages.
*
*
* WHITELIST = 1;
*/
WHITELIST(1),
/**
*
* The forbidding list. The incoming audio cannot contain the listed languages.
*
*
* BLACKLIST = 2;
*/
BLACKLIST(2),
UNRECOGNIZED(-1),
;
/**
* LANGUAGE_RESTRICTION_TYPE_UNSPECIFIED = 0;
*/
public static final int LANGUAGE_RESTRICTION_TYPE_UNSPECIFIED_VALUE = 0;
/**
*
* The allowing list. The incoming audio can contain only the listed languages.
*
*
* WHITELIST = 1;
*/
public static final int WHITELIST_VALUE = 1;
/**
*
* The forbidding list. The incoming audio cannot contain the listed languages.
*
*
* BLACKLIST = 2;
*/
public static final int BLACKLIST_VALUE = 2;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static LanguageRestrictionType valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static LanguageRestrictionType forNumber(int value) {
switch (value) {
case 0: return LANGUAGE_RESTRICTION_TYPE_UNSPECIFIED;
case 1: return WHITELIST;
case 2: return BLACKLIST;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
LanguageRestrictionType> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public LanguageRestrictionType findValueByNumber(int number) {
return LanguageRestrictionType.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return yandex.cloud.api.ai.stt.v3.Stt.LanguageRestrictionOptions.getDescriptor().getEnumTypes().get(0);
}
private static final LanguageRestrictionType[] VALUES = values();
public static LanguageRestrictionType valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private LanguageRestrictionType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:speechkit.stt.v3.LanguageRestrictionOptions.LanguageRestrictionType)
}
public static final int RESTRICTION_TYPE_FIELD_NUMBER = 1;
private int restrictionType_;
/**
*
* Language restriction type
*
*
* .speechkit.stt.v3.LanguageRestrictionOptions.LanguageRestrictionType restriction_type = 1;
* @return The enum numeric value on the wire for restrictionType.
*/
@java.lang.Override public int getRestrictionTypeValue() {
return restrictionType_;
}
/**
*
* Language restriction type
*
*
* .speechkit.stt.v3.LanguageRestrictionOptions.LanguageRestrictionType restriction_type = 1;
* @return The restrictionType.
*/
@java.lang.Override public yandex.cloud.api.ai.stt.v3.Stt.LanguageRestrictionOptions.LanguageRestrictionType getRestrictionType() {
@SuppressWarnings("deprecation")
yandex.cloud.api.ai.stt.v3.Stt.LanguageRestrictionOptions.LanguageRestrictionType result = yandex.cloud.api.ai.stt.v3.Stt.LanguageRestrictionOptions.LanguageRestrictionType.valueOf(restrictionType_);
return result == null ? yandex.cloud.api.ai.stt.v3.Stt.LanguageRestrictionOptions.LanguageRestrictionType.UNRECOGNIZED : result;
}
public static final int LANGUAGE_CODE_FIELD_NUMBER = 2;
private com.google.protobuf.LazyStringList languageCode_;
/**
*
* The list of language codes to restrict recognition in the case of an auto model
*
*
* repeated string language_code = 2;
* @return A list containing the languageCode.
*/
public com.google.protobuf.ProtocolStringList
getLanguageCodeList() {
return languageCode_;
}
/**
*
* The list of language codes to restrict recognition in the case of an auto model
*
*
* repeated string language_code = 2;
* @return The count of languageCode.
*/
public int getLanguageCodeCount() {
return languageCode_.size();
}
/**
*
* The list of language codes to restrict recognition in the case of an auto model
*
*
* repeated string language_code = 2;
* @param index The index of the element to return.
* @return The languageCode at the given index.
*/
public java.lang.String getLanguageCode(int index) {
return languageCode_.get(index);
}
/**
*
* The list of language codes to restrict recognition in the case of an auto model
*
*
* repeated string language_code = 2;
* @param index The index of the value to return.
* @return The bytes of the languageCode at the given index.
*/
public com.google.protobuf.ByteString
getLanguageCodeBytes(int index) {
return languageCode_.getByteString(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (restrictionType_ != yandex.cloud.api.ai.stt.v3.Stt.LanguageRestrictionOptions.LanguageRestrictionType.LANGUAGE_RESTRICTION_TYPE_UNSPECIFIED.getNumber()) {
output.writeEnum(1, restrictionType_);
}
for (int i = 0; i < languageCode_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, languageCode_.getRaw(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (restrictionType_ != yandex.cloud.api.ai.stt.v3.Stt.LanguageRestrictionOptions.LanguageRestrictionType.LANGUAGE_RESTRICTION_TYPE_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, restrictionType_);
}
{
int dataSize = 0;
for (int i = 0; i < languageCode_.size(); i++) {
dataSize += computeStringSizeNoTag(languageCode_.getRaw(i));
}
size += dataSize;
size += 1 * getLanguageCodeList().size();
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof yandex.cloud.api.ai.stt.v3.Stt.LanguageRestrictionOptions)) {
return super.equals(obj);
}
yandex.cloud.api.ai.stt.v3.Stt.LanguageRestrictionOptions other = (yandex.cloud.api.ai.stt.v3.Stt.LanguageRestrictionOptions) obj;
if (restrictionType_ != other.restrictionType_) return false;
if (!getLanguageCodeList()
.equals(other.getLanguageCodeList())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + RESTRICTION_TYPE_FIELD_NUMBER;
hash = (53 * hash) + restrictionType_;
if (getLanguageCodeCount() > 0) {
hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER;
hash = (53 * hash) + getLanguageCodeList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.ai.stt.v3.Stt.LanguageRestrictionOptions parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.stt.v3.Stt.LanguageRestrictionOptions parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.LanguageRestrictionOptions parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.stt.v3.Stt.LanguageRestrictionOptions parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.LanguageRestrictionOptions parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.stt.v3.Stt.LanguageRestrictionOptions parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.LanguageRestrictionOptions parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.stt.v3.Stt.LanguageRestrictionOptions parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.LanguageRestrictionOptions parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.stt.v3.Stt.LanguageRestrictionOptions parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.LanguageRestrictionOptions parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.stt.v3.Stt.LanguageRestrictionOptions parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(yandex.cloud.api.ai.stt.v3.Stt.LanguageRestrictionOptions prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Type of restriction for the list of languages expected in the incoming speech stream.
*
*
* Protobuf type {@code speechkit.stt.v3.LanguageRestrictionOptions}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:speechkit.stt.v3.LanguageRestrictionOptions)
yandex.cloud.api.ai.stt.v3.Stt.LanguageRestrictionOptionsOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_LanguageRestrictionOptions_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_LanguageRestrictionOptions_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.ai.stt.v3.Stt.LanguageRestrictionOptions.class, yandex.cloud.api.ai.stt.v3.Stt.LanguageRestrictionOptions.Builder.class);
}
// Construct using yandex.cloud.api.ai.stt.v3.Stt.LanguageRestrictionOptions.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
restrictionType_ = 0;
languageCode_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_LanguageRestrictionOptions_descriptor;
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.LanguageRestrictionOptions getDefaultInstanceForType() {
return yandex.cloud.api.ai.stt.v3.Stt.LanguageRestrictionOptions.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.LanguageRestrictionOptions build() {
yandex.cloud.api.ai.stt.v3.Stt.LanguageRestrictionOptions result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.LanguageRestrictionOptions buildPartial() {
yandex.cloud.api.ai.stt.v3.Stt.LanguageRestrictionOptions result = new yandex.cloud.api.ai.stt.v3.Stt.LanguageRestrictionOptions(this);
int from_bitField0_ = bitField0_;
result.restrictionType_ = restrictionType_;
if (((bitField0_ & 0x00000001) != 0)) {
languageCode_ = languageCode_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000001);
}
result.languageCode_ = languageCode_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof yandex.cloud.api.ai.stt.v3.Stt.LanguageRestrictionOptions) {
return mergeFrom((yandex.cloud.api.ai.stt.v3.Stt.LanguageRestrictionOptions)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.ai.stt.v3.Stt.LanguageRestrictionOptions other) {
if (other == yandex.cloud.api.ai.stt.v3.Stt.LanguageRestrictionOptions.getDefaultInstance()) return this;
if (other.restrictionType_ != 0) {
setRestrictionTypeValue(other.getRestrictionTypeValue());
}
if (!other.languageCode_.isEmpty()) {
if (languageCode_.isEmpty()) {
languageCode_ = other.languageCode_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureLanguageCodeIsMutable();
languageCode_.addAll(other.languageCode_);
}
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
yandex.cloud.api.ai.stt.v3.Stt.LanguageRestrictionOptions parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.ai.stt.v3.Stt.LanguageRestrictionOptions) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private int restrictionType_ = 0;
/**
*
* Language restriction type
*
*
* .speechkit.stt.v3.LanguageRestrictionOptions.LanguageRestrictionType restriction_type = 1;
* @return The enum numeric value on the wire for restrictionType.
*/
@java.lang.Override public int getRestrictionTypeValue() {
return restrictionType_;
}
/**
*
* Language restriction type
*
*
* .speechkit.stt.v3.LanguageRestrictionOptions.LanguageRestrictionType restriction_type = 1;
* @param value The enum numeric value on the wire for restrictionType to set.
* @return This builder for chaining.
*/
public Builder setRestrictionTypeValue(int value) {
restrictionType_ = value;
onChanged();
return this;
}
/**
*
* Language restriction type
*
*
* .speechkit.stt.v3.LanguageRestrictionOptions.LanguageRestrictionType restriction_type = 1;
* @return The restrictionType.
*/
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.LanguageRestrictionOptions.LanguageRestrictionType getRestrictionType() {
@SuppressWarnings("deprecation")
yandex.cloud.api.ai.stt.v3.Stt.LanguageRestrictionOptions.LanguageRestrictionType result = yandex.cloud.api.ai.stt.v3.Stt.LanguageRestrictionOptions.LanguageRestrictionType.valueOf(restrictionType_);
return result == null ? yandex.cloud.api.ai.stt.v3.Stt.LanguageRestrictionOptions.LanguageRestrictionType.UNRECOGNIZED : result;
}
/**
*
* Language restriction type
*
*
* .speechkit.stt.v3.LanguageRestrictionOptions.LanguageRestrictionType restriction_type = 1;
* @param value The restrictionType to set.
* @return This builder for chaining.
*/
public Builder setRestrictionType(yandex.cloud.api.ai.stt.v3.Stt.LanguageRestrictionOptions.LanguageRestrictionType value) {
if (value == null) {
throw new NullPointerException();
}
restrictionType_ = value.getNumber();
onChanged();
return this;
}
/**
*
* The list of language codes to restrict recognition in the case of an auto model
*
*
* repeated string language_code = 2;
* @return A list containing the languageCode.
*/
public com.google.protobuf.ProtocolStringList
getLanguageCodeList() {
return languageCode_.getUnmodifiableView();
}
/**
*
* The list of language codes to restrict recognition in the case of an auto model
*
*
* repeated string language_code = 2;
* @return The count of languageCode.
*/
public int getLanguageCodeCount() {
return languageCode_.size();
}
/**
*
* The list of language codes to restrict recognition in the case of an auto model
*
*
* repeated string language_code = 2;
* @param index The index of the element to return.
* @return The languageCode at the given index.
*/
public java.lang.String getLanguageCode(int index) {
return languageCode_.get(index);
}
/**
*
* The list of language codes to restrict recognition in the case of an auto model
*
*
* repeated string language_code = 2;
* @param index The index of the value to return.
* @return The bytes of the languageCode at the given index.
*/
public com.google.protobuf.ByteString
getLanguageCodeBytes(int index) {
return languageCode_.getByteString(index);
}
/**
*
* The list of language codes to restrict recognition in the case of an auto model
*
*
* repeated string language_code = 2;
* @param index The index to set the value at.
* @param value The languageCode to set.
* @return This builder for chaining.
*/
public Builder setLanguageCode(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureLanguageCodeIsMutable();
languageCode_.set(index, value);
onChanged();
return this;
}
/**
*
* The list of language codes to restrict recognition in the case of an auto model
*
*
* repeated string language_code = 2;
* @param value The languageCode to add.
* @return This builder for chaining.
*/
public Builder addLanguageCode(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureLanguageCodeIsMutable();
languageCode_.add(value);
onChanged();
return this;
}
/**
*
* The list of language codes to restrict recognition in the case of an auto model
*
*
* repeated string language_code = 2;
* @param values The languageCode to add.
* @return This builder for chaining.
*/
public Builder addAllLanguageCode(
java.lang.Iterable values) {
ensureLanguageCodeIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, languageCode_);
onChanged();
return this;
}
/**
*
* The list of language codes to restrict recognition in the case of an auto model
*
* The list of language codes to restrict recognition in the case of an auto model
*
*
* repeated string language_code = 2;
* @param value The bytes of the languageCode to add.
* @return This builder for chaining.
*/
public Builder addLanguageCodeBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureLanguageCodeIsMutable();
languageCode_.add(value);
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:speechkit.stt.v3.LanguageRestrictionOptions)
}
// @@protoc_insertion_point(class_scope:speechkit.stt.v3.LanguageRestrictionOptions)
private static final yandex.cloud.api.ai.stt.v3.Stt.LanguageRestrictionOptions DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.ai.stt.v3.Stt.LanguageRestrictionOptions();
}
public static yandex.cloud.api.ai.stt.v3.Stt.LanguageRestrictionOptions getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public LanguageRestrictionOptions parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new LanguageRestrictionOptions(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.LanguageRestrictionOptions getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface RecognitionModelOptionsOrBuilder extends
// @@protoc_insertion_point(interface_extends:speechkit.stt.v3.RecognitionModelOptions)
com.google.protobuf.MessageOrBuilder {
/**
*
* Sets the recognition model for the cloud version of SpeechKit. Possible values: 'general', 'general:rc', 'general:deprecated'.
* The model is ignored for SpeechKit Hybrid.
*
*
* string model = 1;
* @return The model.
*/
java.lang.String getModel();
/**
*
* Sets the recognition model for the cloud version of SpeechKit. Possible values: 'general', 'general:rc', 'general:deprecated'.
* The model is ignored for SpeechKit Hybrid.
*
*
* string model = 1;
* @return The bytes for model.
*/
com.google.protobuf.ByteString
getModelBytes();
/**
*
* Specified input audio.
*
*
* .speechkit.stt.v3.AudioFormatOptions audio_format = 2;
* @return Whether the audioFormat field is set.
*/
boolean hasAudioFormat();
/**
*
* How to deal with audio data (in real time, after all data is received, etc). Default is REAL_TIME.
*
*
* .speechkit.stt.v3.RecognitionModelOptions.AudioProcessingType audio_processing_type = 5;
* @return The enum numeric value on the wire for audioProcessingType.
*/
int getAudioProcessingTypeValue();
/**
*
* How to deal with audio data (in real time, after all data is received, etc). Default is REAL_TIME.
*
*
* .speechkit.stt.v3.RecognitionModelOptions.AudioProcessingType audio_processing_type = 5;
* @return The audioProcessingType.
*/
yandex.cloud.api.ai.stt.v3.Stt.RecognitionModelOptions.AudioProcessingType getAudioProcessingType();
}
/**
* Protobuf type {@code speechkit.stt.v3.RecognitionModelOptions}
*/
public static final class RecognitionModelOptions extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:speechkit.stt.v3.RecognitionModelOptions)
RecognitionModelOptionsOrBuilder {
private static final long serialVersionUID = 0L;
// Use RecognitionModelOptions.newBuilder() to construct.
private RecognitionModelOptions(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private RecognitionModelOptions() {
model_ = "";
audioProcessingType_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new RecognitionModelOptions();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private RecognitionModelOptions(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
model_ = s;
break;
}
case 18: {
yandex.cloud.api.ai.stt.v3.Stt.AudioFormatOptions.Builder subBuilder = null;
if (audioFormat_ != null) {
subBuilder = audioFormat_.toBuilder();
}
audioFormat_ = input.readMessage(yandex.cloud.api.ai.stt.v3.Stt.AudioFormatOptions.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(audioFormat_);
audioFormat_ = subBuilder.buildPartial();
}
break;
}
case 26: {
yandex.cloud.api.ai.stt.v3.Stt.TextNormalizationOptions.Builder subBuilder = null;
if (textNormalization_ != null) {
subBuilder = textNormalization_.toBuilder();
}
textNormalization_ = input.readMessage(yandex.cloud.api.ai.stt.v3.Stt.TextNormalizationOptions.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(textNormalization_);
textNormalization_ = subBuilder.buildPartial();
}
break;
}
case 34: {
yandex.cloud.api.ai.stt.v3.Stt.LanguageRestrictionOptions.Builder subBuilder = null;
if (languageRestriction_ != null) {
subBuilder = languageRestriction_.toBuilder();
}
languageRestriction_ = input.readMessage(yandex.cloud.api.ai.stt.v3.Stt.LanguageRestrictionOptions.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(languageRestriction_);
languageRestriction_ = subBuilder.buildPartial();
}
break;
}
case 40: {
int rawValue = input.readEnum();
audioProcessingType_ = rawValue;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_RecognitionModelOptions_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_RecognitionModelOptions_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.ai.stt.v3.Stt.RecognitionModelOptions.class, yandex.cloud.api.ai.stt.v3.Stt.RecognitionModelOptions.Builder.class);
}
/**
* Protobuf enum {@code speechkit.stt.v3.RecognitionModelOptions.AudioProcessingType}
*/
public enum AudioProcessingType
implements com.google.protobuf.ProtocolMessageEnum {
/**
* AUDIO_PROCESSING_TYPE_UNSPECIFIED = 0;
*/
AUDIO_PROCESSING_TYPE_UNSPECIFIED(0),
/**
*
* Process audio in mode optimized for real-time recognition, i.e. send partials and final responses as soon as possible
*
*
* REAL_TIME = 1;
*/
REAL_TIME(1),
/**
*
* Process audio after all data was received
*
*
* FULL_DATA = 2;
*/
FULL_DATA(2),
UNRECOGNIZED(-1),
;
/**
* AUDIO_PROCESSING_TYPE_UNSPECIFIED = 0;
*/
public static final int AUDIO_PROCESSING_TYPE_UNSPECIFIED_VALUE = 0;
/**
*
* Process audio in mode optimized for real-time recognition, i.e. send partials and final responses as soon as possible
*
*
* REAL_TIME = 1;
*/
public static final int REAL_TIME_VALUE = 1;
/**
*
* Process audio after all data was received
*
*
* FULL_DATA = 2;
*/
public static final int FULL_DATA_VALUE = 2;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static AudioProcessingType valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static AudioProcessingType forNumber(int value) {
switch (value) {
case 0: return AUDIO_PROCESSING_TYPE_UNSPECIFIED;
case 1: return REAL_TIME;
case 2: return FULL_DATA;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
AudioProcessingType> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public AudioProcessingType findValueByNumber(int number) {
return AudioProcessingType.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return yandex.cloud.api.ai.stt.v3.Stt.RecognitionModelOptions.getDescriptor().getEnumTypes().get(0);
}
private static final AudioProcessingType[] VALUES = values();
public static AudioProcessingType valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private AudioProcessingType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:speechkit.stt.v3.RecognitionModelOptions.AudioProcessingType)
}
public static final int MODEL_FIELD_NUMBER = 1;
private volatile java.lang.Object model_;
/**
*
* Sets the recognition model for the cloud version of SpeechKit. Possible values: 'general', 'general:rc', 'general:deprecated'.
* The model is ignored for SpeechKit Hybrid.
*
*
* string model = 1;
* @return The model.
*/
@java.lang.Override
public java.lang.String getModel() {
java.lang.Object ref = model_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
model_ = s;
return s;
}
}
/**
*
* Sets the recognition model for the cloud version of SpeechKit. Possible values: 'general', 'general:rc', 'general:deprecated'.
* The model is ignored for SpeechKit Hybrid.
*
*
* string model = 1;
* @return The bytes for model.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getModelBytes() {
java.lang.Object ref = model_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
model_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int AUDIO_FORMAT_FIELD_NUMBER = 2;
private yandex.cloud.api.ai.stt.v3.Stt.AudioFormatOptions audioFormat_;
/**
*
* Specified input audio.
*
*
* .speechkit.stt.v3.AudioFormatOptions audio_format = 2;
* @return Whether the audioFormat field is set.
*/
@java.lang.Override
public boolean hasAudioFormat() {
return audioFormat_ != null;
}
/**
*
*
* .speechkit.stt.v3.LanguageRestrictionOptions language_restriction = 4;
*/
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.LanguageRestrictionOptionsOrBuilder getLanguageRestrictionOrBuilder() {
return getLanguageRestriction();
}
public static final int AUDIO_PROCESSING_TYPE_FIELD_NUMBER = 5;
private int audioProcessingType_;
/**
*
* How to deal with audio data (in real time, after all data is received, etc). Default is REAL_TIME.
*
*
* .speechkit.stt.v3.RecognitionModelOptions.AudioProcessingType audio_processing_type = 5;
* @return The enum numeric value on the wire for audioProcessingType.
*/
@java.lang.Override public int getAudioProcessingTypeValue() {
return audioProcessingType_;
}
/**
*
* How to deal with audio data (in real time, after all data is received, etc). Default is REAL_TIME.
*
*
* .speechkit.stt.v3.RecognitionModelOptions.AudioProcessingType audio_processing_type = 5;
* @return The audioProcessingType.
*/
@java.lang.Override public yandex.cloud.api.ai.stt.v3.Stt.RecognitionModelOptions.AudioProcessingType getAudioProcessingType() {
@SuppressWarnings("deprecation")
yandex.cloud.api.ai.stt.v3.Stt.RecognitionModelOptions.AudioProcessingType result = yandex.cloud.api.ai.stt.v3.Stt.RecognitionModelOptions.AudioProcessingType.valueOf(audioProcessingType_);
return result == null ? yandex.cloud.api.ai.stt.v3.Stt.RecognitionModelOptions.AudioProcessingType.UNRECOGNIZED : result;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, model_);
}
if (audioFormat_ != null) {
output.writeMessage(2, getAudioFormat());
}
if (textNormalization_ != null) {
output.writeMessage(3, getTextNormalization());
}
if (languageRestriction_ != null) {
output.writeMessage(4, getLanguageRestriction());
}
if (audioProcessingType_ != yandex.cloud.api.ai.stt.v3.Stt.RecognitionModelOptions.AudioProcessingType.AUDIO_PROCESSING_TYPE_UNSPECIFIED.getNumber()) {
output.writeEnum(5, audioProcessingType_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, model_);
}
if (audioFormat_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getAudioFormat());
}
if (textNormalization_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getTextNormalization());
}
if (languageRestriction_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getLanguageRestriction());
}
if (audioProcessingType_ != yandex.cloud.api.ai.stt.v3.Stt.RecognitionModelOptions.AudioProcessingType.AUDIO_PROCESSING_TYPE_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(5, audioProcessingType_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof yandex.cloud.api.ai.stt.v3.Stt.RecognitionModelOptions)) {
return super.equals(obj);
}
yandex.cloud.api.ai.stt.v3.Stt.RecognitionModelOptions other = (yandex.cloud.api.ai.stt.v3.Stt.RecognitionModelOptions) obj;
if (!getModel()
.equals(other.getModel())) return false;
if (hasAudioFormat() != other.hasAudioFormat()) return false;
if (hasAudioFormat()) {
if (!getAudioFormat()
.equals(other.getAudioFormat())) return false;
}
if (hasTextNormalization() != other.hasTextNormalization()) return false;
if (hasTextNormalization()) {
if (!getTextNormalization()
.equals(other.getTextNormalization())) return false;
}
if (hasLanguageRestriction() != other.hasLanguageRestriction()) return false;
if (hasLanguageRestriction()) {
if (!getLanguageRestriction()
.equals(other.getLanguageRestriction())) return false;
}
if (audioProcessingType_ != other.audioProcessingType_) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + MODEL_FIELD_NUMBER;
hash = (53 * hash) + getModel().hashCode();
if (hasAudioFormat()) {
hash = (37 * hash) + AUDIO_FORMAT_FIELD_NUMBER;
hash = (53 * hash) + getAudioFormat().hashCode();
}
if (hasTextNormalization()) {
hash = (37 * hash) + TEXT_NORMALIZATION_FIELD_NUMBER;
hash = (53 * hash) + getTextNormalization().hashCode();
}
if (hasLanguageRestriction()) {
hash = (37 * hash) + LANGUAGE_RESTRICTION_FIELD_NUMBER;
hash = (53 * hash) + getLanguageRestriction().hashCode();
}
hash = (37 * hash) + AUDIO_PROCESSING_TYPE_FIELD_NUMBER;
hash = (53 * hash) + audioProcessingType_;
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.ai.stt.v3.Stt.RecognitionModelOptions parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.stt.v3.Stt.RecognitionModelOptions parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.RecognitionModelOptions parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.stt.v3.Stt.RecognitionModelOptions parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.RecognitionModelOptions parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.stt.v3.Stt.RecognitionModelOptions parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.RecognitionModelOptions parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.stt.v3.Stt.RecognitionModelOptions parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.RecognitionModelOptions parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.stt.v3.Stt.RecognitionModelOptions parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.RecognitionModelOptions parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.stt.v3.Stt.RecognitionModelOptions parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(yandex.cloud.api.ai.stt.v3.Stt.RecognitionModelOptions prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code speechkit.stt.v3.RecognitionModelOptions}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:speechkit.stt.v3.RecognitionModelOptions)
yandex.cloud.api.ai.stt.v3.Stt.RecognitionModelOptionsOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_RecognitionModelOptions_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_RecognitionModelOptions_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.ai.stt.v3.Stt.RecognitionModelOptions.class, yandex.cloud.api.ai.stt.v3.Stt.RecognitionModelOptions.Builder.class);
}
// Construct using yandex.cloud.api.ai.stt.v3.Stt.RecognitionModelOptions.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
model_ = "";
if (audioFormatBuilder_ == null) {
audioFormat_ = null;
} else {
audioFormat_ = null;
audioFormatBuilder_ = null;
}
if (textNormalizationBuilder_ == null) {
textNormalization_ = null;
} else {
textNormalization_ = null;
textNormalizationBuilder_ = null;
}
if (languageRestrictionBuilder_ == null) {
languageRestriction_ = null;
} else {
languageRestriction_ = null;
languageRestrictionBuilder_ = null;
}
audioProcessingType_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_RecognitionModelOptions_descriptor;
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.RecognitionModelOptions getDefaultInstanceForType() {
return yandex.cloud.api.ai.stt.v3.Stt.RecognitionModelOptions.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.RecognitionModelOptions build() {
yandex.cloud.api.ai.stt.v3.Stt.RecognitionModelOptions result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.RecognitionModelOptions buildPartial() {
yandex.cloud.api.ai.stt.v3.Stt.RecognitionModelOptions result = new yandex.cloud.api.ai.stt.v3.Stt.RecognitionModelOptions(this);
result.model_ = model_;
if (audioFormatBuilder_ == null) {
result.audioFormat_ = audioFormat_;
} else {
result.audioFormat_ = audioFormatBuilder_.build();
}
if (textNormalizationBuilder_ == null) {
result.textNormalization_ = textNormalization_;
} else {
result.textNormalization_ = textNormalizationBuilder_.build();
}
if (languageRestrictionBuilder_ == null) {
result.languageRestriction_ = languageRestriction_;
} else {
result.languageRestriction_ = languageRestrictionBuilder_.build();
}
result.audioProcessingType_ = audioProcessingType_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof yandex.cloud.api.ai.stt.v3.Stt.RecognitionModelOptions) {
return mergeFrom((yandex.cloud.api.ai.stt.v3.Stt.RecognitionModelOptions)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.ai.stt.v3.Stt.RecognitionModelOptions other) {
if (other == yandex.cloud.api.ai.stt.v3.Stt.RecognitionModelOptions.getDefaultInstance()) return this;
if (!other.getModel().isEmpty()) {
model_ = other.model_;
onChanged();
}
if (other.hasAudioFormat()) {
mergeAudioFormat(other.getAudioFormat());
}
if (other.hasTextNormalization()) {
mergeTextNormalization(other.getTextNormalization());
}
if (other.hasLanguageRestriction()) {
mergeLanguageRestriction(other.getLanguageRestriction());
}
if (other.audioProcessingType_ != 0) {
setAudioProcessingTypeValue(other.getAudioProcessingTypeValue());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
yandex.cloud.api.ai.stt.v3.Stt.RecognitionModelOptions parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.ai.stt.v3.Stt.RecognitionModelOptions) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object model_ = "";
/**
*
* Sets the recognition model for the cloud version of SpeechKit. Possible values: 'general', 'general:rc', 'general:deprecated'.
* The model is ignored for SpeechKit Hybrid.
*
*
* string model = 1;
* @return The model.
*/
public java.lang.String getModel() {
java.lang.Object ref = model_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
model_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Sets the recognition model for the cloud version of SpeechKit. Possible values: 'general', 'general:rc', 'general:deprecated'.
* The model is ignored for SpeechKit Hybrid.
*
*
* string model = 1;
* @return The bytes for model.
*/
public com.google.protobuf.ByteString
getModelBytes() {
java.lang.Object ref = model_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
model_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Sets the recognition model for the cloud version of SpeechKit. Possible values: 'general', 'general:rc', 'general:deprecated'.
* The model is ignored for SpeechKit Hybrid.
*
*
* string model = 1;
* @param value The model to set.
* @return This builder for chaining.
*/
public Builder setModel(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
model_ = value;
onChanged();
return this;
}
/**
*
* Sets the recognition model for the cloud version of SpeechKit. Possible values: 'general', 'general:rc', 'general:deprecated'.
* The model is ignored for SpeechKit Hybrid.
*
*
* string model = 1;
* @return This builder for chaining.
*/
public Builder clearModel() {
model_ = getDefaultInstance().getModel();
onChanged();
return this;
}
/**
*
* Sets the recognition model for the cloud version of SpeechKit. Possible values: 'general', 'general:rc', 'general:deprecated'.
* The model is ignored for SpeechKit Hybrid.
*
*
* string model = 1;
* @param value The bytes for model to set.
* @return This builder for chaining.
*/
public Builder setModelBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
model_ = value;
onChanged();
return this;
}
private yandex.cloud.api.ai.stt.v3.Stt.AudioFormatOptions audioFormat_;
private com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.ai.stt.v3.Stt.AudioFormatOptions, yandex.cloud.api.ai.stt.v3.Stt.AudioFormatOptions.Builder, yandex.cloud.api.ai.stt.v3.Stt.AudioFormatOptionsOrBuilder> audioFormatBuilder_;
/**
*
* Specified input audio.
*
*
* .speechkit.stt.v3.AudioFormatOptions audio_format = 2;
* @return Whether the audioFormat field is set.
*/
public boolean hasAudioFormat() {
return audioFormatBuilder_ != null || audioFormat_ != null;
}
/**
*
* How to deal with audio data (in real time, after all data is received, etc). Default is REAL_TIME.
*
*
* .speechkit.stt.v3.RecognitionModelOptions.AudioProcessingType audio_processing_type = 5;
* @return The enum numeric value on the wire for audioProcessingType.
*/
@java.lang.Override public int getAudioProcessingTypeValue() {
return audioProcessingType_;
}
/**
*
* How to deal with audio data (in real time, after all data is received, etc). Default is REAL_TIME.
*
*
* .speechkit.stt.v3.RecognitionModelOptions.AudioProcessingType audio_processing_type = 5;
* @param value The enum numeric value on the wire for audioProcessingType to set.
* @return This builder for chaining.
*/
public Builder setAudioProcessingTypeValue(int value) {
audioProcessingType_ = value;
onChanged();
return this;
}
/**
*
* How to deal with audio data (in real time, after all data is received, etc). Default is REAL_TIME.
*
*
* .speechkit.stt.v3.RecognitionModelOptions.AudioProcessingType audio_processing_type = 5;
* @return The audioProcessingType.
*/
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.RecognitionModelOptions.AudioProcessingType getAudioProcessingType() {
@SuppressWarnings("deprecation")
yandex.cloud.api.ai.stt.v3.Stt.RecognitionModelOptions.AudioProcessingType result = yandex.cloud.api.ai.stt.v3.Stt.RecognitionModelOptions.AudioProcessingType.valueOf(audioProcessingType_);
return result == null ? yandex.cloud.api.ai.stt.v3.Stt.RecognitionModelOptions.AudioProcessingType.UNRECOGNIZED : result;
}
/**
*
* How to deal with audio data (in real time, after all data is received, etc). Default is REAL_TIME.
*
*
* .speechkit.stt.v3.RecognitionModelOptions.AudioProcessingType audio_processing_type = 5;
* @param value The audioProcessingType to set.
* @return This builder for chaining.
*/
public Builder setAudioProcessingType(yandex.cloud.api.ai.stt.v3.Stt.RecognitionModelOptions.AudioProcessingType value) {
if (value == null) {
throw new NullPointerException();
}
audioProcessingType_ = value.getNumber();
onChanged();
return this;
}
/**
*
* How to deal with audio data (in real time, after all data is received, etc). Default is REAL_TIME.
*
*
* .speechkit.stt.v3.RecognitionModelOptions.AudioProcessingType audio_processing_type = 5;
* @return This builder for chaining.
*/
public Builder clearAudioProcessingType() {
audioProcessingType_ = 0;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:speechkit.stt.v3.RecognitionModelOptions)
}
// @@protoc_insertion_point(class_scope:speechkit.stt.v3.RecognitionModelOptions)
private static final yandex.cloud.api.ai.stt.v3.Stt.RecognitionModelOptions DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.ai.stt.v3.Stt.RecognitionModelOptions();
}
public static yandex.cloud.api.ai.stt.v3.Stt.RecognitionModelOptions getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public RecognitionModelOptions parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new RecognitionModelOptions(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.RecognitionModelOptions getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface StreamingOptionsOrBuilder extends
// @@protoc_insertion_point(interface_extends:speechkit.stt.v3.StreamingOptions)
com.google.protobuf.MessageOrBuilder {
/**
*
* Configuration for speech recognition model.
*
*
* .speechkit.stt.v3.RecognitionModelOptions recognition_model = 1;
* @return Whether the recognitionModel field is set.
*/
boolean hasRecognitionModel();
/**
*
* Configuration for speech analysis over speech recognition.
*
*
* .speechkit.stt.v3.SpeechAnalysisOptions speech_analysis = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.ai.stt.v3.Stt.SpeechAnalysisOptions, yandex.cloud.api.ai.stt.v3.Stt.SpeechAnalysisOptions.Builder, yandex.cloud.api.ai.stt.v3.Stt.SpeechAnalysisOptionsOrBuilder>
getSpeechAnalysisFieldBuilder() {
if (speechAnalysisBuilder_ == null) {
speechAnalysisBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.ai.stt.v3.Stt.SpeechAnalysisOptions, yandex.cloud.api.ai.stt.v3.Stt.SpeechAnalysisOptions.Builder, yandex.cloud.api.ai.stt.v3.Stt.SpeechAnalysisOptionsOrBuilder>(
getSpeechAnalysis(),
getParentForChildren(),
isClean());
speechAnalysis_ = null;
}
return speechAnalysisBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:speechkit.stt.v3.StreamingOptions)
}
// @@protoc_insertion_point(class_scope:speechkit.stt.v3.StreamingOptions)
private static final yandex.cloud.api.ai.stt.v3.Stt.StreamingOptions DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.ai.stt.v3.Stt.StreamingOptions();
}
public static yandex.cloud.api.ai.stt.v3.Stt.StreamingOptions getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public StreamingOptions parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new StreamingOptions(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.StreamingOptions getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface AudioChunkOrBuilder extends
// @@protoc_insertion_point(interface_extends:speechkit.stt.v3.AudioChunk)
com.google.protobuf.MessageOrBuilder {
/**
*
* Bytes with audio data.
*
*
* bytes data = 1;
* @return The data.
*/
com.google.protobuf.ByteString getData();
}
/**
*
* Data chunk with audio.
*
*
* Protobuf type {@code speechkit.stt.v3.AudioChunk}
*/
public static final class AudioChunk extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:speechkit.stt.v3.AudioChunk)
AudioChunkOrBuilder {
private static final long serialVersionUID = 0L;
// Use AudioChunk.newBuilder() to construct.
private AudioChunk(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private AudioChunk() {
data_ = com.google.protobuf.ByteString.EMPTY;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new AudioChunk();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private AudioChunk(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
data_ = input.readBytes();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_AudioChunk_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_AudioChunk_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.ai.stt.v3.Stt.AudioChunk.class, yandex.cloud.api.ai.stt.v3.Stt.AudioChunk.Builder.class);
}
public static final int DATA_FIELD_NUMBER = 1;
private com.google.protobuf.ByteString data_;
/**
*
* Bytes with audio data.
*
*
* bytes data = 1;
* @return The data.
*/
@java.lang.Override
public com.google.protobuf.ByteString getData() {
return data_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!data_.isEmpty()) {
output.writeBytes(1, data_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!data_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(1, data_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof yandex.cloud.api.ai.stt.v3.Stt.AudioChunk)) {
return super.equals(obj);
}
yandex.cloud.api.ai.stt.v3.Stt.AudioChunk other = (yandex.cloud.api.ai.stt.v3.Stt.AudioChunk) obj;
if (!getData()
.equals(other.getData())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + DATA_FIELD_NUMBER;
hash = (53 * hash) + getData().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.ai.stt.v3.Stt.AudioChunk parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.stt.v3.Stt.AudioChunk parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.AudioChunk parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.stt.v3.Stt.AudioChunk parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.AudioChunk parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.stt.v3.Stt.AudioChunk parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.AudioChunk parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.stt.v3.Stt.AudioChunk parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.AudioChunk parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.stt.v3.Stt.AudioChunk parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.AudioChunk parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.stt.v3.Stt.AudioChunk parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(yandex.cloud.api.ai.stt.v3.Stt.AudioChunk prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Data chunk with audio.
*
*
* Protobuf type {@code speechkit.stt.v3.AudioChunk}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:speechkit.stt.v3.AudioChunk)
yandex.cloud.api.ai.stt.v3.Stt.AudioChunkOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_AudioChunk_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_AudioChunk_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.ai.stt.v3.Stt.AudioChunk.class, yandex.cloud.api.ai.stt.v3.Stt.AudioChunk.Builder.class);
}
// Construct using yandex.cloud.api.ai.stt.v3.Stt.AudioChunk.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
data_ = com.google.protobuf.ByteString.EMPTY;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_AudioChunk_descriptor;
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.AudioChunk getDefaultInstanceForType() {
return yandex.cloud.api.ai.stt.v3.Stt.AudioChunk.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.AudioChunk build() {
yandex.cloud.api.ai.stt.v3.Stt.AudioChunk result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.AudioChunk buildPartial() {
yandex.cloud.api.ai.stt.v3.Stt.AudioChunk result = new yandex.cloud.api.ai.stt.v3.Stt.AudioChunk(this);
result.data_ = data_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof yandex.cloud.api.ai.stt.v3.Stt.AudioChunk) {
return mergeFrom((yandex.cloud.api.ai.stt.v3.Stt.AudioChunk)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.ai.stt.v3.Stt.AudioChunk other) {
if (other == yandex.cloud.api.ai.stt.v3.Stt.AudioChunk.getDefaultInstance()) return this;
if (other.getData() != com.google.protobuf.ByteString.EMPTY) {
setData(other.getData());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
yandex.cloud.api.ai.stt.v3.Stt.AudioChunk parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.ai.stt.v3.Stt.AudioChunk) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* Bytes with audio data.
*
*
* bytes data = 1;
* @return The data.
*/
@java.lang.Override
public com.google.protobuf.ByteString getData() {
return data_;
}
/**
*
* Bytes with audio data.
*
*
* bytes data = 1;
* @param value The data to set.
* @return This builder for chaining.
*/
public Builder setData(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
data_ = value;
onChanged();
return this;
}
/**
*
* Bytes with audio data.
*
*
* bytes data = 1;
* @return This builder for chaining.
*/
public Builder clearData() {
data_ = getDefaultInstance().getData();
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:speechkit.stt.v3.AudioChunk)
}
// @@protoc_insertion_point(class_scope:speechkit.stt.v3.AudioChunk)
private static final yandex.cloud.api.ai.stt.v3.Stt.AudioChunk DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.ai.stt.v3.Stt.AudioChunk();
}
public static yandex.cloud.api.ai.stt.v3.Stt.AudioChunk getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public AudioChunk parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new AudioChunk(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.AudioChunk getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface SilenceChunkOrBuilder extends
// @@protoc_insertion_point(interface_extends:speechkit.stt.v3.SilenceChunk)
com.google.protobuf.MessageOrBuilder {
/**
*
* Duration of silence chunk in ms.
*
*
* int64 duration_ms = 1;
* @return The durationMs.
*/
long getDurationMs();
}
/**
*
* Data chunk with silence.
*
*
* Protobuf type {@code speechkit.stt.v3.SilenceChunk}
*/
public static final class SilenceChunk extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:speechkit.stt.v3.SilenceChunk)
SilenceChunkOrBuilder {
private static final long serialVersionUID = 0L;
// Use SilenceChunk.newBuilder() to construct.
private SilenceChunk(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private SilenceChunk() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new SilenceChunk();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private SilenceChunk(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
durationMs_ = input.readInt64();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_SilenceChunk_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_SilenceChunk_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.ai.stt.v3.Stt.SilenceChunk.class, yandex.cloud.api.ai.stt.v3.Stt.SilenceChunk.Builder.class);
}
public static final int DURATION_MS_FIELD_NUMBER = 1;
private long durationMs_;
/**
*
* Duration of silence chunk in ms.
*
*
* int64 duration_ms = 1;
* @return The durationMs.
*/
@java.lang.Override
public long getDurationMs() {
return durationMs_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (durationMs_ != 0L) {
output.writeInt64(1, durationMs_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (durationMs_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(1, durationMs_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof yandex.cloud.api.ai.stt.v3.Stt.SilenceChunk)) {
return super.equals(obj);
}
yandex.cloud.api.ai.stt.v3.Stt.SilenceChunk other = (yandex.cloud.api.ai.stt.v3.Stt.SilenceChunk) obj;
if (getDurationMs()
!= other.getDurationMs()) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + DURATION_MS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getDurationMs());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.ai.stt.v3.Stt.SilenceChunk parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.stt.v3.Stt.SilenceChunk parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.SilenceChunk parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.stt.v3.Stt.SilenceChunk parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.SilenceChunk parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.stt.v3.Stt.SilenceChunk parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.SilenceChunk parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.stt.v3.Stt.SilenceChunk parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.SilenceChunk parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.stt.v3.Stt.SilenceChunk parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.SilenceChunk parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.stt.v3.Stt.SilenceChunk parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(yandex.cloud.api.ai.stt.v3.Stt.SilenceChunk prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Data chunk with silence.
*
*
* Protobuf type {@code speechkit.stt.v3.SilenceChunk}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:speechkit.stt.v3.SilenceChunk)
yandex.cloud.api.ai.stt.v3.Stt.SilenceChunkOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_SilenceChunk_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_SilenceChunk_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.ai.stt.v3.Stt.SilenceChunk.class, yandex.cloud.api.ai.stt.v3.Stt.SilenceChunk.Builder.class);
}
// Construct using yandex.cloud.api.ai.stt.v3.Stt.SilenceChunk.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
durationMs_ = 0L;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_SilenceChunk_descriptor;
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.SilenceChunk getDefaultInstanceForType() {
return yandex.cloud.api.ai.stt.v3.Stt.SilenceChunk.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.SilenceChunk build() {
yandex.cloud.api.ai.stt.v3.Stt.SilenceChunk result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.SilenceChunk buildPartial() {
yandex.cloud.api.ai.stt.v3.Stt.SilenceChunk result = new yandex.cloud.api.ai.stt.v3.Stt.SilenceChunk(this);
result.durationMs_ = durationMs_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof yandex.cloud.api.ai.stt.v3.Stt.SilenceChunk) {
return mergeFrom((yandex.cloud.api.ai.stt.v3.Stt.SilenceChunk)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.ai.stt.v3.Stt.SilenceChunk other) {
if (other == yandex.cloud.api.ai.stt.v3.Stt.SilenceChunk.getDefaultInstance()) return this;
if (other.getDurationMs() != 0L) {
setDurationMs(other.getDurationMs());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
yandex.cloud.api.ai.stt.v3.Stt.SilenceChunk parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.ai.stt.v3.Stt.SilenceChunk) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private long durationMs_ ;
/**
*
* Duration of silence chunk in ms.
*
*
* int64 duration_ms = 1;
* @return The durationMs.
*/
@java.lang.Override
public long getDurationMs() {
return durationMs_;
}
/**
*
* Duration of silence chunk in ms.
*
*
* int64 duration_ms = 1;
* @param value The durationMs to set.
* @return This builder for chaining.
*/
public Builder setDurationMs(long value) {
durationMs_ = value;
onChanged();
return this;
}
/**
*
* Duration of silence chunk in ms.
*
*
* int64 duration_ms = 1;
* @return This builder for chaining.
*/
public Builder clearDurationMs() {
durationMs_ = 0L;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:speechkit.stt.v3.SilenceChunk)
}
// @@protoc_insertion_point(class_scope:speechkit.stt.v3.SilenceChunk)
private static final yandex.cloud.api.ai.stt.v3.Stt.SilenceChunk DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.ai.stt.v3.Stt.SilenceChunk();
}
public static yandex.cloud.api.ai.stt.v3.Stt.SilenceChunk getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public SilenceChunk parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new SilenceChunk(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.SilenceChunk getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface EouOrBuilder extends
// @@protoc_insertion_point(interface_extends:speechkit.stt.v3.Eou)
com.google.protobuf.MessageOrBuilder {
}
/**
*
* Force EOU
*
*
* Protobuf type {@code speechkit.stt.v3.Eou}
*/
public static final class Eou extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:speechkit.stt.v3.Eou)
EouOrBuilder {
private static final long serialVersionUID = 0L;
// Use Eou.newBuilder() to construct.
private Eou(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Eou() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Eou();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Eou(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_Eou_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_Eou_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.ai.stt.v3.Stt.Eou.class, yandex.cloud.api.ai.stt.v3.Stt.Eou.Builder.class);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof yandex.cloud.api.ai.stt.v3.Stt.Eou)) {
return super.equals(obj);
}
yandex.cloud.api.ai.stt.v3.Stt.Eou other = (yandex.cloud.api.ai.stt.v3.Stt.Eou) obj;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.ai.stt.v3.Stt.Eou parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.stt.v3.Stt.Eou parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.Eou parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.stt.v3.Stt.Eou parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.Eou parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.stt.v3.Stt.Eou parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.Eou parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.stt.v3.Stt.Eou parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.Eou parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.stt.v3.Stt.Eou parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.Eou parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.stt.v3.Stt.Eou parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(yandex.cloud.api.ai.stt.v3.Stt.Eou prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Force EOU
*
*
* Protobuf type {@code speechkit.stt.v3.Eou}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:speechkit.stt.v3.Eou)
yandex.cloud.api.ai.stt.v3.Stt.EouOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_Eou_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_Eou_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.ai.stt.v3.Stt.Eou.class, yandex.cloud.api.ai.stt.v3.Stt.Eou.Builder.class);
}
// Construct using yandex.cloud.api.ai.stt.v3.Stt.Eou.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_Eou_descriptor;
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.Eou getDefaultInstanceForType() {
return yandex.cloud.api.ai.stt.v3.Stt.Eou.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.Eou build() {
yandex.cloud.api.ai.stt.v3.Stt.Eou result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.Eou buildPartial() {
yandex.cloud.api.ai.stt.v3.Stt.Eou result = new yandex.cloud.api.ai.stt.v3.Stt.Eou(this);
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof yandex.cloud.api.ai.stt.v3.Stt.Eou) {
return mergeFrom((yandex.cloud.api.ai.stt.v3.Stt.Eou)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.ai.stt.v3.Stt.Eou other) {
if (other == yandex.cloud.api.ai.stt.v3.Stt.Eou.getDefaultInstance()) return this;
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
yandex.cloud.api.ai.stt.v3.Stt.Eou parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.ai.stt.v3.Stt.Eou) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:speechkit.stt.v3.Eou)
}
// @@protoc_insertion_point(class_scope:speechkit.stt.v3.Eou)
private static final yandex.cloud.api.ai.stt.v3.Stt.Eou DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.ai.stt.v3.Stt.Eou();
}
public static yandex.cloud.api.ai.stt.v3.Stt.Eou getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Eou parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Eou(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.Eou getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface StreamingRequestOrBuilder extends
// @@protoc_insertion_point(interface_extends:speechkit.stt.v3.StreamingRequest)
com.google.protobuf.MessageOrBuilder {
/**
*
* Session options. Should be the first message from user.
*
*
* .speechkit.stt.v3.StreamingOptions session_options = 1;
* @return Whether the sessionOptions field is set.
*/
boolean hasSessionOptions();
/**
*
* Session options. Should be the first message from user.
*
* Streaming audio request
* Events are control messages from user.
* First message should be session options.
* The next messages are audio data chunks or control messages.
*
*
* Protobuf type {@code speechkit.stt.v3.StreamingRequest}
*/
public static final class StreamingRequest extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:speechkit.stt.v3.StreamingRequest)
StreamingRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use StreamingRequest.newBuilder() to construct.
private StreamingRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private StreamingRequest() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new StreamingRequest();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private StreamingRequest(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
yandex.cloud.api.ai.stt.v3.Stt.StreamingOptions.Builder subBuilder = null;
if (eventCase_ == 1) {
subBuilder = ((yandex.cloud.api.ai.stt.v3.Stt.StreamingOptions) event_).toBuilder();
}
event_ =
input.readMessage(yandex.cloud.api.ai.stt.v3.Stt.StreamingOptions.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((yandex.cloud.api.ai.stt.v3.Stt.StreamingOptions) event_);
event_ = subBuilder.buildPartial();
}
eventCase_ = 1;
break;
}
case 18: {
yandex.cloud.api.ai.stt.v3.Stt.AudioChunk.Builder subBuilder = null;
if (eventCase_ == 2) {
subBuilder = ((yandex.cloud.api.ai.stt.v3.Stt.AudioChunk) event_).toBuilder();
}
event_ =
input.readMessage(yandex.cloud.api.ai.stt.v3.Stt.AudioChunk.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((yandex.cloud.api.ai.stt.v3.Stt.AudioChunk) event_);
event_ = subBuilder.buildPartial();
}
eventCase_ = 2;
break;
}
case 26: {
yandex.cloud.api.ai.stt.v3.Stt.SilenceChunk.Builder subBuilder = null;
if (eventCase_ == 3) {
subBuilder = ((yandex.cloud.api.ai.stt.v3.Stt.SilenceChunk) event_).toBuilder();
}
event_ =
input.readMessage(yandex.cloud.api.ai.stt.v3.Stt.SilenceChunk.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((yandex.cloud.api.ai.stt.v3.Stt.SilenceChunk) event_);
event_ = subBuilder.buildPartial();
}
eventCase_ = 3;
break;
}
case 34: {
yandex.cloud.api.ai.stt.v3.Stt.Eou.Builder subBuilder = null;
if (eventCase_ == 4) {
subBuilder = ((yandex.cloud.api.ai.stt.v3.Stt.Eou) event_).toBuilder();
}
event_ =
input.readMessage(yandex.cloud.api.ai.stt.v3.Stt.Eou.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((yandex.cloud.api.ai.stt.v3.Stt.Eou) event_);
event_ = subBuilder.buildPartial();
}
eventCase_ = 4;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_StreamingRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_StreamingRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.ai.stt.v3.Stt.StreamingRequest.class, yandex.cloud.api.ai.stt.v3.Stt.StreamingRequest.Builder.class);
}
private int eventCase_ = 0;
private java.lang.Object event_;
public enum EventCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
SESSION_OPTIONS(1),
CHUNK(2),
SILENCE_CHUNK(3),
EOU(4),
EVENT_NOT_SET(0);
private final int value;
private EventCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static EventCase valueOf(int value) {
return forNumber(value);
}
public static EventCase forNumber(int value) {
switch (value) {
case 1: return SESSION_OPTIONS;
case 2: return CHUNK;
case 3: return SILENCE_CHUNK;
case 4: return EOU;
case 0: return EVENT_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public EventCase
getEventCase() {
return EventCase.forNumber(
eventCase_);
}
public static final int SESSION_OPTIONS_FIELD_NUMBER = 1;
/**
*
* Session options. Should be the first message from user.
*
*
* .speechkit.stt.v3.StreamingOptions session_options = 1;
* @return Whether the sessionOptions field is set.
*/
@java.lang.Override
public boolean hasSessionOptions() {
return eventCase_ == 1;
}
/**
*
* Session options. Should be the first message from user.
*
*
* .speechkit.stt.v3.StreamingOptions session_options = 1;
* @return The sessionOptions.
*/
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.StreamingOptions getSessionOptions() {
if (eventCase_ == 1) {
return (yandex.cloud.api.ai.stt.v3.Stt.StreamingOptions) event_;
}
return yandex.cloud.api.ai.stt.v3.Stt.StreamingOptions.getDefaultInstance();
}
/**
*
* Session options. Should be the first message from user.
*
*
* .speechkit.stt.v3.StreamingOptions session_options = 1;
*/
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.StreamingOptionsOrBuilder getSessionOptionsOrBuilder() {
if (eventCase_ == 1) {
return (yandex.cloud.api.ai.stt.v3.Stt.StreamingOptions) event_;
}
return yandex.cloud.api.ai.stt.v3.Stt.StreamingOptions.getDefaultInstance();
}
public static final int CHUNK_FIELD_NUMBER = 2;
/**
*
* Chunk with audio data.
*
*
* .speechkit.stt.v3.AudioChunk chunk = 2;
* @return Whether the chunk field is set.
*/
@java.lang.Override
public boolean hasChunk() {
return eventCase_ == 2;
}
/**
*
* Chunk with audio data.
*
*
* .speechkit.stt.v3.AudioChunk chunk = 2;
* @return The chunk.
*/
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.AudioChunk getChunk() {
if (eventCase_ == 2) {
return (yandex.cloud.api.ai.stt.v3.Stt.AudioChunk) event_;
}
return yandex.cloud.api.ai.stt.v3.Stt.AudioChunk.getDefaultInstance();
}
/**
*
* Chunk with audio data.
*
*
* .speechkit.stt.v3.AudioChunk chunk = 2;
*/
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.AudioChunkOrBuilder getChunkOrBuilder() {
if (eventCase_ == 2) {
return (yandex.cloud.api.ai.stt.v3.Stt.AudioChunk) event_;
}
return yandex.cloud.api.ai.stt.v3.Stt.AudioChunk.getDefaultInstance();
}
public static final int SILENCE_CHUNK_FIELD_NUMBER = 3;
/**
*
* Chunk with silence.
*
*
* .speechkit.stt.v3.SilenceChunk silence_chunk = 3;
* @return Whether the silenceChunk field is set.
*/
@java.lang.Override
public boolean hasSilenceChunk() {
return eventCase_ == 3;
}
/**
*
* Chunk with silence.
*
*
* .speechkit.stt.v3.SilenceChunk silence_chunk = 3;
* @return The silenceChunk.
*/
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.SilenceChunk getSilenceChunk() {
if (eventCase_ == 3) {
return (yandex.cloud.api.ai.stt.v3.Stt.SilenceChunk) event_;
}
return yandex.cloud.api.ai.stt.v3.Stt.SilenceChunk.getDefaultInstance();
}
/**
*
* Chunk with silence.
*
*
* .speechkit.stt.v3.SilenceChunk silence_chunk = 3;
*/
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.SilenceChunkOrBuilder getSilenceChunkOrBuilder() {
if (eventCase_ == 3) {
return (yandex.cloud.api.ai.stt.v3.Stt.SilenceChunk) event_;
}
return yandex.cloud.api.ai.stt.v3.Stt.SilenceChunk.getDefaultInstance();
}
public static final int EOU_FIELD_NUMBER = 4;
/**
*
* Request to end current utterance. Works only with external EOU detector.
*
*
* .speechkit.stt.v3.Eou eou = 4;
* @return Whether the eou field is set.
*/
@java.lang.Override
public boolean hasEou() {
return eventCase_ == 4;
}
/**
*
* Request to end current utterance. Works only with external EOU detector.
*
*
* .speechkit.stt.v3.Eou eou = 4;
* @return The eou.
*/
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.Eou getEou() {
if (eventCase_ == 4) {
return (yandex.cloud.api.ai.stt.v3.Stt.Eou) event_;
}
return yandex.cloud.api.ai.stt.v3.Stt.Eou.getDefaultInstance();
}
/**
*
* Request to end current utterance. Works only with external EOU detector.
*
*
* .speechkit.stt.v3.Eou eou = 4;
*/
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.EouOrBuilder getEouOrBuilder() {
if (eventCase_ == 4) {
return (yandex.cloud.api.ai.stt.v3.Stt.Eou) event_;
}
return yandex.cloud.api.ai.stt.v3.Stt.Eou.getDefaultInstance();
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (eventCase_ == 1) {
output.writeMessage(1, (yandex.cloud.api.ai.stt.v3.Stt.StreamingOptions) event_);
}
if (eventCase_ == 2) {
output.writeMessage(2, (yandex.cloud.api.ai.stt.v3.Stt.AudioChunk) event_);
}
if (eventCase_ == 3) {
output.writeMessage(3, (yandex.cloud.api.ai.stt.v3.Stt.SilenceChunk) event_);
}
if (eventCase_ == 4) {
output.writeMessage(4, (yandex.cloud.api.ai.stt.v3.Stt.Eou) event_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (eventCase_ == 1) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, (yandex.cloud.api.ai.stt.v3.Stt.StreamingOptions) event_);
}
if (eventCase_ == 2) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, (yandex.cloud.api.ai.stt.v3.Stt.AudioChunk) event_);
}
if (eventCase_ == 3) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, (yandex.cloud.api.ai.stt.v3.Stt.SilenceChunk) event_);
}
if (eventCase_ == 4) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, (yandex.cloud.api.ai.stt.v3.Stt.Eou) event_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof yandex.cloud.api.ai.stt.v3.Stt.StreamingRequest)) {
return super.equals(obj);
}
yandex.cloud.api.ai.stt.v3.Stt.StreamingRequest other = (yandex.cloud.api.ai.stt.v3.Stt.StreamingRequest) obj;
if (!getEventCase().equals(other.getEventCase())) return false;
switch (eventCase_) {
case 1:
if (!getSessionOptions()
.equals(other.getSessionOptions())) return false;
break;
case 2:
if (!getChunk()
.equals(other.getChunk())) return false;
break;
case 3:
if (!getSilenceChunk()
.equals(other.getSilenceChunk())) return false;
break;
case 4:
if (!getEou()
.equals(other.getEou())) return false;
break;
case 0:
default:
}
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
switch (eventCase_) {
case 1:
hash = (37 * hash) + SESSION_OPTIONS_FIELD_NUMBER;
hash = (53 * hash) + getSessionOptions().hashCode();
break;
case 2:
hash = (37 * hash) + CHUNK_FIELD_NUMBER;
hash = (53 * hash) + getChunk().hashCode();
break;
case 3:
hash = (37 * hash) + SILENCE_CHUNK_FIELD_NUMBER;
hash = (53 * hash) + getSilenceChunk().hashCode();
break;
case 4:
hash = (37 * hash) + EOU_FIELD_NUMBER;
hash = (53 * hash) + getEou().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.ai.stt.v3.Stt.StreamingRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.stt.v3.Stt.StreamingRequest parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.StreamingRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.stt.v3.Stt.StreamingRequest parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.StreamingRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.stt.v3.Stt.StreamingRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.StreamingRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.stt.v3.Stt.StreamingRequest parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.StreamingRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.stt.v3.Stt.StreamingRequest parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.StreamingRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.stt.v3.Stt.StreamingRequest parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(yandex.cloud.api.ai.stt.v3.Stt.StreamingRequest prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Streaming audio request
* Events are control messages from user.
* First message should be session options.
* The next messages are audio data chunks or control messages.
*
*
* Protobuf type {@code speechkit.stt.v3.StreamingRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:speechkit.stt.v3.StreamingRequest)
yandex.cloud.api.ai.stt.v3.Stt.StreamingRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_StreamingRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_StreamingRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.ai.stt.v3.Stt.StreamingRequest.class, yandex.cloud.api.ai.stt.v3.Stt.StreamingRequest.Builder.class);
}
// Construct using yandex.cloud.api.ai.stt.v3.Stt.StreamingRequest.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
eventCase_ = 0;
event_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_StreamingRequest_descriptor;
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.StreamingRequest getDefaultInstanceForType() {
return yandex.cloud.api.ai.stt.v3.Stt.StreamingRequest.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.StreamingRequest build() {
yandex.cloud.api.ai.stt.v3.Stt.StreamingRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.StreamingRequest buildPartial() {
yandex.cloud.api.ai.stt.v3.Stt.StreamingRequest result = new yandex.cloud.api.ai.stt.v3.Stt.StreamingRequest(this);
if (eventCase_ == 1) {
if (sessionOptionsBuilder_ == null) {
result.event_ = event_;
} else {
result.event_ = sessionOptionsBuilder_.build();
}
}
if (eventCase_ == 2) {
if (chunkBuilder_ == null) {
result.event_ = event_;
} else {
result.event_ = chunkBuilder_.build();
}
}
if (eventCase_ == 3) {
if (silenceChunkBuilder_ == null) {
result.event_ = event_;
} else {
result.event_ = silenceChunkBuilder_.build();
}
}
if (eventCase_ == 4) {
if (eouBuilder_ == null) {
result.event_ = event_;
} else {
result.event_ = eouBuilder_.build();
}
}
result.eventCase_ = eventCase_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof yandex.cloud.api.ai.stt.v3.Stt.StreamingRequest) {
return mergeFrom((yandex.cloud.api.ai.stt.v3.Stt.StreamingRequest)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.ai.stt.v3.Stt.StreamingRequest other) {
if (other == yandex.cloud.api.ai.stt.v3.Stt.StreamingRequest.getDefaultInstance()) return this;
switch (other.getEventCase()) {
case SESSION_OPTIONS: {
mergeSessionOptions(other.getSessionOptions());
break;
}
case CHUNK: {
mergeChunk(other.getChunk());
break;
}
case SILENCE_CHUNK: {
mergeSilenceChunk(other.getSilenceChunk());
break;
}
case EOU: {
mergeEou(other.getEou());
break;
}
case EVENT_NOT_SET: {
break;
}
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
yandex.cloud.api.ai.stt.v3.Stt.StreamingRequest parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.ai.stt.v3.Stt.StreamingRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int eventCase_ = 0;
private java.lang.Object event_;
public EventCase
getEventCase() {
return EventCase.forNumber(
eventCase_);
}
public Builder clearEvent() {
eventCase_ = 0;
event_ = null;
onChanged();
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.ai.stt.v3.Stt.StreamingOptions, yandex.cloud.api.ai.stt.v3.Stt.StreamingOptions.Builder, yandex.cloud.api.ai.stt.v3.Stt.StreamingOptionsOrBuilder> sessionOptionsBuilder_;
/**
*
* Session options. Should be the first message from user.
*
*
* .speechkit.stt.v3.StreamingOptions session_options = 1;
* @return Whether the sessionOptions field is set.
*/
@java.lang.Override
public boolean hasSessionOptions() {
return eventCase_ == 1;
}
/**
*
* Session options. Should be the first message from user.
*
*
* .speechkit.stt.v3.StreamingOptions session_options = 1;
* @return The sessionOptions.
*/
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.StreamingOptions getSessionOptions() {
if (sessionOptionsBuilder_ == null) {
if (eventCase_ == 1) {
return (yandex.cloud.api.ai.stt.v3.Stt.StreamingOptions) event_;
}
return yandex.cloud.api.ai.stt.v3.Stt.StreamingOptions.getDefaultInstance();
} else {
if (eventCase_ == 1) {
return sessionOptionsBuilder_.getMessage();
}
return yandex.cloud.api.ai.stt.v3.Stt.StreamingOptions.getDefaultInstance();
}
}
/**
*
* Session options. Should be the first message from user.
*
* Configuration for speech analysis over speech recognition.
*
*
* .speechkit.stt.v3.SpeechAnalysisOptions speech_analysis = 5;
*/
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.SpeechAnalysisOptionsOrBuilder getSpeechAnalysisOrBuilder() {
return getSpeechAnalysis();
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (audioSourceCase_ == 1) {
output.writeBytes(
1, (com.google.protobuf.ByteString) audioSource_);
}
if (audioSourceCase_ == 2) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, audioSource_);
}
if (recognitionModel_ != null) {
output.writeMessage(3, getRecognitionModel());
}
if (recognitionClassifier_ != null) {
output.writeMessage(4, getRecognitionClassifier());
}
if (speechAnalysis_ != null) {
output.writeMessage(5, getSpeechAnalysis());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (audioSourceCase_ == 1) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(
1, (com.google.protobuf.ByteString) audioSource_);
}
if (audioSourceCase_ == 2) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, audioSource_);
}
if (recognitionModel_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getRecognitionModel());
}
if (recognitionClassifier_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getRecognitionClassifier());
}
if (speechAnalysis_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, getSpeechAnalysis());
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof yandex.cloud.api.ai.stt.v3.Stt.RecognizeFileRequest)) {
return super.equals(obj);
}
yandex.cloud.api.ai.stt.v3.Stt.RecognizeFileRequest other = (yandex.cloud.api.ai.stt.v3.Stt.RecognizeFileRequest) obj;
if (hasRecognitionModel() != other.hasRecognitionModel()) return false;
if (hasRecognitionModel()) {
if (!getRecognitionModel()
.equals(other.getRecognitionModel())) return false;
}
if (hasRecognitionClassifier() != other.hasRecognitionClassifier()) return false;
if (hasRecognitionClassifier()) {
if (!getRecognitionClassifier()
.equals(other.getRecognitionClassifier())) return false;
}
if (hasSpeechAnalysis() != other.hasSpeechAnalysis()) return false;
if (hasSpeechAnalysis()) {
if (!getSpeechAnalysis()
.equals(other.getSpeechAnalysis())) return false;
}
if (!getAudioSourceCase().equals(other.getAudioSourceCase())) return false;
switch (audioSourceCase_) {
case 1:
if (!getContent()
.equals(other.getContent())) return false;
break;
case 2:
if (!getUri()
.equals(other.getUri())) return false;
break;
case 0:
default:
}
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasRecognitionModel()) {
hash = (37 * hash) + RECOGNITION_MODEL_FIELD_NUMBER;
hash = (53 * hash) + getRecognitionModel().hashCode();
}
if (hasRecognitionClassifier()) {
hash = (37 * hash) + RECOGNITION_CLASSIFIER_FIELD_NUMBER;
hash = (53 * hash) + getRecognitionClassifier().hashCode();
}
if (hasSpeechAnalysis()) {
hash = (37 * hash) + SPEECH_ANALYSIS_FIELD_NUMBER;
hash = (53 * hash) + getSpeechAnalysis().hashCode();
}
switch (audioSourceCase_) {
case 1:
hash = (37 * hash) + CONTENT_FIELD_NUMBER;
hash = (53 * hash) + getContent().hashCode();
break;
case 2:
hash = (37 * hash) + URI_FIELD_NUMBER;
hash = (53 * hash) + getUri().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.ai.stt.v3.Stt.RecognizeFileRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.stt.v3.Stt.RecognizeFileRequest parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.RecognizeFileRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.stt.v3.Stt.RecognizeFileRequest parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.RecognizeFileRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.stt.v3.Stt.RecognizeFileRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.RecognizeFileRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.stt.v3.Stt.RecognizeFileRequest parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.RecognizeFileRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.stt.v3.Stt.RecognizeFileRequest parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.RecognizeFileRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.stt.v3.Stt.RecognizeFileRequest parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(yandex.cloud.api.ai.stt.v3.Stt.RecognizeFileRequest prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code speechkit.stt.v3.RecognizeFileRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:speechkit.stt.v3.RecognizeFileRequest)
yandex.cloud.api.ai.stt.v3.Stt.RecognizeFileRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_RecognizeFileRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_RecognizeFileRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.ai.stt.v3.Stt.RecognizeFileRequest.class, yandex.cloud.api.ai.stt.v3.Stt.RecognizeFileRequest.Builder.class);
}
// Construct using yandex.cloud.api.ai.stt.v3.Stt.RecognizeFileRequest.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (recognitionModelBuilder_ == null) {
recognitionModel_ = null;
} else {
recognitionModel_ = null;
recognitionModelBuilder_ = null;
}
if (recognitionClassifierBuilder_ == null) {
recognitionClassifier_ = null;
} else {
recognitionClassifier_ = null;
recognitionClassifierBuilder_ = null;
}
if (speechAnalysisBuilder_ == null) {
speechAnalysis_ = null;
} else {
speechAnalysis_ = null;
speechAnalysisBuilder_ = null;
}
audioSourceCase_ = 0;
audioSource_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_RecognizeFileRequest_descriptor;
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.RecognizeFileRequest getDefaultInstanceForType() {
return yandex.cloud.api.ai.stt.v3.Stt.RecognizeFileRequest.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.RecognizeFileRequest build() {
yandex.cloud.api.ai.stt.v3.Stt.RecognizeFileRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.RecognizeFileRequest buildPartial() {
yandex.cloud.api.ai.stt.v3.Stt.RecognizeFileRequest result = new yandex.cloud.api.ai.stt.v3.Stt.RecognizeFileRequest(this);
if (audioSourceCase_ == 1) {
result.audioSource_ = audioSource_;
}
if (audioSourceCase_ == 2) {
result.audioSource_ = audioSource_;
}
if (recognitionModelBuilder_ == null) {
result.recognitionModel_ = recognitionModel_;
} else {
result.recognitionModel_ = recognitionModelBuilder_.build();
}
if (recognitionClassifierBuilder_ == null) {
result.recognitionClassifier_ = recognitionClassifier_;
} else {
result.recognitionClassifier_ = recognitionClassifierBuilder_.build();
}
if (speechAnalysisBuilder_ == null) {
result.speechAnalysis_ = speechAnalysis_;
} else {
result.speechAnalysis_ = speechAnalysisBuilder_.build();
}
result.audioSourceCase_ = audioSourceCase_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof yandex.cloud.api.ai.stt.v3.Stt.RecognizeFileRequest) {
return mergeFrom((yandex.cloud.api.ai.stt.v3.Stt.RecognizeFileRequest)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.ai.stt.v3.Stt.RecognizeFileRequest other) {
if (other == yandex.cloud.api.ai.stt.v3.Stt.RecognizeFileRequest.getDefaultInstance()) return this;
if (other.hasRecognitionModel()) {
mergeRecognitionModel(other.getRecognitionModel());
}
if (other.hasRecognitionClassifier()) {
mergeRecognitionClassifier(other.getRecognitionClassifier());
}
if (other.hasSpeechAnalysis()) {
mergeSpeechAnalysis(other.getSpeechAnalysis());
}
switch (other.getAudioSourceCase()) {
case CONTENT: {
setContent(other.getContent());
break;
}
case URI: {
audioSourceCase_ = 2;
audioSource_ = other.audioSource_;
onChanged();
break;
}
case AUDIOSOURCE_NOT_SET: {
break;
}
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
yandex.cloud.api.ai.stt.v3.Stt.RecognizeFileRequest parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.ai.stt.v3.Stt.RecognizeFileRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int audioSourceCase_ = 0;
private java.lang.Object audioSource_;
public AudioSourceCase
getAudioSourceCase() {
return AudioSourceCase.forNumber(
audioSourceCase_);
}
public Builder clearAudioSource() {
audioSourceCase_ = 0;
audioSource_ = null;
onChanged();
return this;
}
/**
*
* Bytes with data
*
*
* bytes content = 1;
* @return Whether the content field is set.
*/
public boolean hasContent() {
return audioSourceCase_ == 1;
}
/**
*
* Bytes with data
*
*
* bytes content = 1;
* @return The content.
*/
public com.google.protobuf.ByteString getContent() {
if (audioSourceCase_ == 1) {
return (com.google.protobuf.ByteString) audioSource_;
}
return com.google.protobuf.ByteString.EMPTY;
}
/**
*
* Bytes with data
*
*
* bytes content = 1;
* @param value The content to set.
* @return This builder for chaining.
*/
public Builder setContent(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
audioSourceCase_ = 1;
audioSource_ = value;
onChanged();
return this;
}
/**
*
* Bytes with data
*
*
* bytes content = 1;
* @return This builder for chaining.
*/
public Builder clearContent() {
if (audioSourceCase_ == 1) {
audioSourceCase_ = 0;
audioSource_ = null;
onChanged();
}
return this;
}
/**
*
* S3 data url
*
*
* string uri = 2;
* @return Whether the uri field is set.
*/
@java.lang.Override
public boolean hasUri() {
return audioSourceCase_ == 2;
}
/**
*
* S3 data url
*
*
* string uri = 2;
* @return The uri.
*/
@java.lang.Override
public java.lang.String getUri() {
java.lang.Object ref = "";
if (audioSourceCase_ == 2) {
ref = audioSource_;
}
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (audioSourceCase_ == 2) {
audioSource_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* S3 data url
*
*
* string uri = 2;
* @return The bytes for uri.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getUriBytes() {
java.lang.Object ref = "";
if (audioSourceCase_ == 2) {
ref = audioSource_;
}
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (audioSourceCase_ == 2) {
audioSource_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* S3 data url
*
*
* string uri = 2;
* @param value The uri to set.
* @return This builder for chaining.
*/
public Builder setUri(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
audioSourceCase_ = 2;
audioSource_ = value;
onChanged();
return this;
}
/**
*
* S3 data url
*
*
* string uri = 2;
* @return This builder for chaining.
*/
public Builder clearUri() {
if (audioSourceCase_ == 2) {
audioSourceCase_ = 0;
audioSource_ = null;
onChanged();
}
return this;
}
/**
*
* S3 data url
*
*
* string uri = 2;
* @param value The bytes for uri to set.
* @return This builder for chaining.
*/
public Builder setUriBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
audioSourceCase_ = 2;
audioSource_ = value;
onChanged();
return this;
}
private yandex.cloud.api.ai.stt.v3.Stt.RecognitionModelOptions recognitionModel_;
private com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.ai.stt.v3.Stt.RecognitionModelOptions, yandex.cloud.api.ai.stt.v3.Stt.RecognitionModelOptions.Builder, yandex.cloud.api.ai.stt.v3.Stt.RecognitionModelOptionsOrBuilder> recognitionModelBuilder_;
/**
*
* Configuration for speech recognition model.
*
*
* .speechkit.stt.v3.RecognitionModelOptions recognition_model = 3;
* @return Whether the recognitionModel field is set.
*/
public boolean hasRecognitionModel() {
return recognitionModelBuilder_ != null || recognitionModel_ != null;
}
/**
*
* Configuration for speech analysis over speech recognition.
*
*
* .speechkit.stt.v3.SpeechAnalysisOptions speech_analysis = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.ai.stt.v3.Stt.SpeechAnalysisOptions, yandex.cloud.api.ai.stt.v3.Stt.SpeechAnalysisOptions.Builder, yandex.cloud.api.ai.stt.v3.Stt.SpeechAnalysisOptionsOrBuilder>
getSpeechAnalysisFieldBuilder() {
if (speechAnalysisBuilder_ == null) {
speechAnalysisBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.ai.stt.v3.Stt.SpeechAnalysisOptions, yandex.cloud.api.ai.stt.v3.Stt.SpeechAnalysisOptions.Builder, yandex.cloud.api.ai.stt.v3.Stt.SpeechAnalysisOptionsOrBuilder>(
getSpeechAnalysis(),
getParentForChildren(),
isClean());
speechAnalysis_ = null;
}
return speechAnalysisBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:speechkit.stt.v3.RecognizeFileRequest)
}
// @@protoc_insertion_point(class_scope:speechkit.stt.v3.RecognizeFileRequest)
private static final yandex.cloud.api.ai.stt.v3.Stt.RecognizeFileRequest DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.ai.stt.v3.Stt.RecognizeFileRequest();
}
public static yandex.cloud.api.ai.stt.v3.Stt.RecognizeFileRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public RecognizeFileRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new RecognizeFileRequest(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.RecognizeFileRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface WordOrBuilder extends
// @@protoc_insertion_point(interface_extends:speechkit.stt.v3.Word)
com.google.protobuf.MessageOrBuilder {
/**
*
* Word text.
*
*
* string text = 1;
* @return The text.
*/
java.lang.String getText();
/**
*
* Word text.
*
*
* string text = 1;
* @return The bytes for text.
*/
com.google.protobuf.ByteString
getTextBytes();
/**
*
* Estimation of word start time in ms.
*
*
* int64 start_time_ms = 2;
* @return The startTimeMs.
*/
long getStartTimeMs();
/**
*
* Estimation of word end time in ms.
*
*
* int64 end_time_ms = 3;
* @return The endTimeMs.
*/
long getEndTimeMs();
}
/**
*
* Recognized word.
*
*
* Protobuf type {@code speechkit.stt.v3.Word}
*/
public static final class Word extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:speechkit.stt.v3.Word)
WordOrBuilder {
private static final long serialVersionUID = 0L;
// Use Word.newBuilder() to construct.
private Word(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Word() {
text_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Word();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Word(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
text_ = s;
break;
}
case 16: {
startTimeMs_ = input.readInt64();
break;
}
case 24: {
endTimeMs_ = input.readInt64();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_Word_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_Word_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.ai.stt.v3.Stt.Word.class, yandex.cloud.api.ai.stt.v3.Stt.Word.Builder.class);
}
public static final int TEXT_FIELD_NUMBER = 1;
private volatile java.lang.Object text_;
/**
*
* Word text.
*
*
* string text = 1;
* @return The text.
*/
@java.lang.Override
public java.lang.String getText() {
java.lang.Object ref = text_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
text_ = s;
return s;
}
}
/**
*
* Word text.
*
*
* string text = 1;
* @return The bytes for text.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getTextBytes() {
java.lang.Object ref = text_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
text_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int START_TIME_MS_FIELD_NUMBER = 2;
private long startTimeMs_;
/**
*
* Estimation of word start time in ms.
*
*
* int64 start_time_ms = 2;
* @return The startTimeMs.
*/
@java.lang.Override
public long getStartTimeMs() {
return startTimeMs_;
}
public static final int END_TIME_MS_FIELD_NUMBER = 3;
private long endTimeMs_;
/**
*
*
* Protobuf type {@code speechkit.stt.v3.Word}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:speechkit.stt.v3.Word)
yandex.cloud.api.ai.stt.v3.Stt.WordOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_Word_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_Word_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.ai.stt.v3.Stt.Word.class, yandex.cloud.api.ai.stt.v3.Stt.Word.Builder.class);
}
// Construct using yandex.cloud.api.ai.stt.v3.Stt.Word.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
text_ = "";
startTimeMs_ = 0L;
endTimeMs_ = 0L;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_Word_descriptor;
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.Word getDefaultInstanceForType() {
return yandex.cloud.api.ai.stt.v3.Stt.Word.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.Word build() {
yandex.cloud.api.ai.stt.v3.Stt.Word result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.Word buildPartial() {
yandex.cloud.api.ai.stt.v3.Stt.Word result = new yandex.cloud.api.ai.stt.v3.Stt.Word(this);
result.text_ = text_;
result.startTimeMs_ = startTimeMs_;
result.endTimeMs_ = endTimeMs_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof yandex.cloud.api.ai.stt.v3.Stt.Word) {
return mergeFrom((yandex.cloud.api.ai.stt.v3.Stt.Word)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.ai.stt.v3.Stt.Word other) {
if (other == yandex.cloud.api.ai.stt.v3.Stt.Word.getDefaultInstance()) return this;
if (!other.getText().isEmpty()) {
text_ = other.text_;
onChanged();
}
if (other.getStartTimeMs() != 0L) {
setStartTimeMs(other.getStartTimeMs());
}
if (other.getEndTimeMs() != 0L) {
setEndTimeMs(other.getEndTimeMs());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
yandex.cloud.api.ai.stt.v3.Stt.Word parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.ai.stt.v3.Stt.Word) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object text_ = "";
/**
*
* Word text.
*
*
* string text = 1;
* @return The text.
*/
public java.lang.String getText() {
java.lang.Object ref = text_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
text_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Word text.
*
*
* string text = 1;
* @return The bytes for text.
*/
public com.google.protobuf.ByteString
getTextBytes() {
java.lang.Object ref = text_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
text_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Word text.
*
*
* string text = 1;
* @param value The text to set.
* @return This builder for chaining.
*/
public Builder setText(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
text_ = value;
onChanged();
return this;
}
/**
*
* Word text.
*
*
* string text = 1;
* @return This builder for chaining.
*/
public Builder clearText() {
text_ = getDefaultInstance().getText();
onChanged();
return this;
}
/**
*
* Word text.
*
*
* string text = 1;
* @param value The bytes for text to set.
* @return This builder for chaining.
*/
public Builder setTextBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
text_ = value;
onChanged();
return this;
}
private long startTimeMs_ ;
/**
*
* Estimation of word start time in ms.
*
*
* int64 start_time_ms = 2;
* @return The startTimeMs.
*/
@java.lang.Override
public long getStartTimeMs() {
return startTimeMs_;
}
/**
*
* Estimation of word start time in ms.
*
*
* int64 start_time_ms = 2;
* @param value The startTimeMs to set.
* @return This builder for chaining.
*/
public Builder setStartTimeMs(long value) {
startTimeMs_ = value;
onChanged();
return this;
}
/**
*
* Estimation of word start time in ms.
*
*
* int64 start_time_ms = 2;
* @return This builder for chaining.
*/
public Builder clearStartTimeMs() {
startTimeMs_ = 0L;
onChanged();
return this;
}
private long endTimeMs_ ;
/**
*
* Estimation of word end time in ms.
*
*
* int64 end_time_ms = 3;
* @return The endTimeMs.
*/
@java.lang.Override
public long getEndTimeMs() {
return endTimeMs_;
}
/**
*
* Estimation of word end time in ms.
*
*
* int64 end_time_ms = 3;
* @param value The endTimeMs to set.
* @return This builder for chaining.
*/
public Builder setEndTimeMs(long value) {
endTimeMs_ = value;
onChanged();
return this;
}
/**
*
* Estimation of word end time in ms.
*
*
* int64 end_time_ms = 3;
* @return This builder for chaining.
*/
public Builder clearEndTimeMs() {
endTimeMs_ = 0L;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:speechkit.stt.v3.Word)
}
// @@protoc_insertion_point(class_scope:speechkit.stt.v3.Word)
private static final yandex.cloud.api.ai.stt.v3.Stt.Word DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.ai.stt.v3.Stt.Word();
}
public static yandex.cloud.api.ai.stt.v3.Stt.Word getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Word parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Word(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.Word getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface LanguageEstimationOrBuilder extends
// @@protoc_insertion_point(interface_extends:speechkit.stt.v3.LanguageEstimation)
com.google.protobuf.MessageOrBuilder {
/**
*
*
* string language_code = 1;
* @return The bytes for languageCode.
*/
public com.google.protobuf.ByteString
getLanguageCodeBytes() {
java.lang.Object ref = languageCode_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
languageCode_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Language code in ISO 639-1 format.
*
*
* string language_code = 1;
* @param value The languageCode to set.
* @return This builder for chaining.
*/
public Builder setLanguageCode(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
languageCode_ = value;
onChanged();
return this;
}
/**
*
* Language code in ISO 639-1 format.
*
*
* string language_code = 1;
* @return This builder for chaining.
*/
public Builder clearLanguageCode() {
languageCode_ = getDefaultInstance().getLanguageCode();
onChanged();
return this;
}
/**
*
* Language code in ISO 639-1 format.
*
*
* string language_code = 1;
* @param value The bytes for languageCode to set.
* @return This builder for chaining.
*/
public Builder setLanguageCodeBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
languageCode_ = value;
onChanged();
return this;
}
private double probability_ ;
/**
*
* Estimation of language probability.
*
*
* double probability = 2;
* @return The probability.
*/
@java.lang.Override
public double getProbability() {
return probability_;
}
/**
*
* Estimation of language probability.
*
*
* double probability = 2;
* @param value The probability to set.
* @return This builder for chaining.
*/
public Builder setProbability(double value) {
probability_ = value;
onChanged();
return this;
}
/**
*
* Estimation of language probability.
*
*
* double probability = 2;
* @return This builder for chaining.
*/
public Builder clearProbability() {
probability_ = 0D;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:speechkit.stt.v3.LanguageEstimation)
}
// @@protoc_insertion_point(class_scope:speechkit.stt.v3.LanguageEstimation)
private static final yandex.cloud.api.ai.stt.v3.Stt.LanguageEstimation DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.ai.stt.v3.Stt.LanguageEstimation();
}
public static yandex.cloud.api.ai.stt.v3.Stt.LanguageEstimation getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public LanguageEstimation parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new LanguageEstimation(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.LanguageEstimation getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface AlternativeOrBuilder extends
// @@protoc_insertion_point(interface_extends:speechkit.stt.v3.Alternative)
com.google.protobuf.MessageOrBuilder {
/**
*
*
* repeated .speechkit.stt.v3.LanguageEstimation languages = 6;
*/
yandex.cloud.api.ai.stt.v3.Stt.LanguageEstimationOrBuilder getLanguagesOrBuilder(
int index);
}
/**
*
* Recognition of specific time frame.
*
*
* Protobuf type {@code speechkit.stt.v3.Alternative}
*/
public static final class Alternative extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:speechkit.stt.v3.Alternative)
AlternativeOrBuilder {
private static final long serialVersionUID = 0L;
// Use Alternative.newBuilder() to construct.
private Alternative(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Alternative() {
words_ = java.util.Collections.emptyList();
text_ = "";
languages_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Alternative();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Alternative(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
words_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
words_.add(
input.readMessage(yandex.cloud.api.ai.stt.v3.Stt.Word.parser(), extensionRegistry));
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
text_ = s;
break;
}
case 24: {
startTimeMs_ = input.readInt64();
break;
}
case 32: {
endTimeMs_ = input.readInt64();
break;
}
case 41: {
confidence_ = input.readDouble();
break;
}
case 50: {
if (!((mutable_bitField0_ & 0x00000002) != 0)) {
languages_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000002;
}
languages_.add(
input.readMessage(yandex.cloud.api.ai.stt.v3.Stt.LanguageEstimation.parser(), extensionRegistry));
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
words_ = java.util.Collections.unmodifiableList(words_);
}
if (((mutable_bitField0_ & 0x00000002) != 0)) {
languages_ = java.util.Collections.unmodifiableList(languages_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_Alternative_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_Alternative_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.ai.stt.v3.Stt.Alternative.class, yandex.cloud.api.ai.stt.v3.Stt.Alternative.Builder.class);
}
public static final int WORDS_FIELD_NUMBER = 1;
private java.util.List words_;
/**
*
* Words in time frame.
*
*
* repeated .speechkit.stt.v3.Word words = 1;
*/
@java.lang.Override
public java.util.List getWordsList() {
return words_;
}
/**
*
* Words in time frame.
*
*
* repeated .speechkit.stt.v3.Word words = 1;
*/
@java.lang.Override
public java.util.List extends yandex.cloud.api.ai.stt.v3.Stt.WordOrBuilder>
getWordsOrBuilderList() {
return words_;
}
/**
*
* Words in time frame.
*
*
* repeated .speechkit.stt.v3.Word words = 1;
*/
@java.lang.Override
public int getWordsCount() {
return words_.size();
}
/**
*
* Words in time frame.
*
*
* repeated .speechkit.stt.v3.Word words = 1;
*/
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.Word getWords(int index) {
return words_.get(index);
}
/**
*
* Words in time frame.
*
*
* repeated .speechkit.stt.v3.Word words = 1;
*/
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.WordOrBuilder getWordsOrBuilder(
int index) {
return words_.get(index);
}
public static final int TEXT_FIELD_NUMBER = 2;
private volatile java.lang.Object text_;
/**
*
* Text in time frame.
*
*
* string text = 2;
* @return The text.
*/
@java.lang.Override
public java.lang.String getText() {
java.lang.Object ref = text_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
text_ = s;
return s;
}
}
/**
*
* Text in time frame.
*
*
* string text = 2;
* @return The bytes for text.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getTextBytes() {
java.lang.Object ref = text_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
text_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int START_TIME_MS_FIELD_NUMBER = 3;
private long startTimeMs_;
/**
*
* Start of time frame.
*
*
* int64 start_time_ms = 3;
* @return The startTimeMs.
*/
@java.lang.Override
public long getStartTimeMs() {
return startTimeMs_;
}
public static final int END_TIME_MS_FIELD_NUMBER = 4;
private long endTimeMs_;
/**
*
* End of time frame.
*
*
* int64 end_time_ms = 4;
* @return The endTimeMs.
*/
@java.lang.Override
public long getEndTimeMs() {
return endTimeMs_;
}
public static final int CONFIDENCE_FIELD_NUMBER = 5;
private double confidence_;
/**
*
* The hypothesis confidence. Currently is not used.
*
*
* double confidence = 5;
* @return The confidence.
*/
@java.lang.Override
public double getConfidence() {
return confidence_;
}
public static final int LANGUAGES_FIELD_NUMBER = 6;
private java.util.List languages_;
/**
*
* Distribution over possible languages.
*
*
* repeated .speechkit.stt.v3.LanguageEstimation languages = 6;
*/
@java.lang.Override
public java.util.List getLanguagesList() {
return languages_;
}
/**
*
* Distribution over possible languages.
*
*
* repeated .speechkit.stt.v3.LanguageEstimation languages = 6;
*/
@java.lang.Override
public java.util.List extends yandex.cloud.api.ai.stt.v3.Stt.LanguageEstimationOrBuilder>
getLanguagesOrBuilderList() {
return languages_;
}
/**
*
* Distribution over possible languages.
*
*
* repeated .speechkit.stt.v3.LanguageEstimation languages = 6;
*/
@java.lang.Override
public int getLanguagesCount() {
return languages_.size();
}
/**
*
* Distribution over possible languages.
*
*
* repeated .speechkit.stt.v3.LanguageEstimation languages = 6;
*/
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.LanguageEstimation getLanguages(int index) {
return languages_.get(index);
}
/**
*
* Distribution over possible languages.
*
*
* repeated .speechkit.stt.v3.LanguageEstimation languages = 6;
*/
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.LanguageEstimationOrBuilder getLanguagesOrBuilder(
int index) {
return languages_.get(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
for (int i = 0; i < words_.size(); i++) {
output.writeMessage(1, words_.get(i));
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, text_);
}
if (startTimeMs_ != 0L) {
output.writeInt64(3, startTimeMs_);
}
if (endTimeMs_ != 0L) {
output.writeInt64(4, endTimeMs_);
}
if (java.lang.Double.doubleToRawLongBits(confidence_) != 0) {
output.writeDouble(5, confidence_);
}
for (int i = 0; i < languages_.size(); i++) {
output.writeMessage(6, languages_.get(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < words_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, words_.get(i));
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, text_);
}
if (startTimeMs_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(3, startTimeMs_);
}
if (endTimeMs_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(4, endTimeMs_);
}
if (java.lang.Double.doubleToRawLongBits(confidence_) != 0) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(5, confidence_);
}
for (int i = 0; i < languages_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, languages_.get(i));
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof yandex.cloud.api.ai.stt.v3.Stt.Alternative)) {
return super.equals(obj);
}
yandex.cloud.api.ai.stt.v3.Stt.Alternative other = (yandex.cloud.api.ai.stt.v3.Stt.Alternative) obj;
if (!getWordsList()
.equals(other.getWordsList())) return false;
if (!getText()
.equals(other.getText())) return false;
if (getStartTimeMs()
!= other.getStartTimeMs()) return false;
if (getEndTimeMs()
!= other.getEndTimeMs()) return false;
if (java.lang.Double.doubleToLongBits(getConfidence())
!= java.lang.Double.doubleToLongBits(
other.getConfidence())) return false;
if (!getLanguagesList()
.equals(other.getLanguagesList())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getWordsCount() > 0) {
hash = (37 * hash) + WORDS_FIELD_NUMBER;
hash = (53 * hash) + getWordsList().hashCode();
}
hash = (37 * hash) + TEXT_FIELD_NUMBER;
hash = (53 * hash) + getText().hashCode();
hash = (37 * hash) + START_TIME_MS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getStartTimeMs());
hash = (37 * hash) + END_TIME_MS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getEndTimeMs());
hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getConfidence()));
if (getLanguagesCount() > 0) {
hash = (37 * hash) + LANGUAGES_FIELD_NUMBER;
hash = (53 * hash) + getLanguagesList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.ai.stt.v3.Stt.Alternative parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.stt.v3.Stt.Alternative parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.Alternative parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.stt.v3.Stt.Alternative parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.Alternative parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.stt.v3.Stt.Alternative parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.Alternative parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.stt.v3.Stt.Alternative parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.Alternative parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.stt.v3.Stt.Alternative parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.Alternative parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.stt.v3.Stt.Alternative parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(yandex.cloud.api.ai.stt.v3.Stt.Alternative prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
* string text = 2;
* @return The text.
*/
public java.lang.String getText() {
java.lang.Object ref = text_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
text_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Text in time frame.
*
*
* string text = 2;
* @return The bytes for text.
*/
public com.google.protobuf.ByteString
getTextBytes() {
java.lang.Object ref = text_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
text_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Text in time frame.
*
*
* string text = 2;
* @param value The text to set.
* @return This builder for chaining.
*/
public Builder setText(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
text_ = value;
onChanged();
return this;
}
/**
*
* Text in time frame.
*
*
* string text = 2;
* @return This builder for chaining.
*/
public Builder clearText() {
text_ = getDefaultInstance().getText();
onChanged();
return this;
}
/**
*
* Text in time frame.
*
*
* string text = 2;
* @param value The bytes for text to set.
* @return This builder for chaining.
*/
public Builder setTextBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
text_ = value;
onChanged();
return this;
}
private long startTimeMs_ ;
/**
*
* Start of time frame.
*
*
* int64 start_time_ms = 3;
* @return The startTimeMs.
*/
@java.lang.Override
public long getStartTimeMs() {
return startTimeMs_;
}
/**
*
* Start of time frame.
*
*
* int64 start_time_ms = 3;
* @param value The startTimeMs to set.
* @return This builder for chaining.
*/
public Builder setStartTimeMs(long value) {
startTimeMs_ = value;
onChanged();
return this;
}
/**
*
* Start of time frame.
*
*
* int64 start_time_ms = 3;
* @return This builder for chaining.
*/
public Builder clearStartTimeMs() {
startTimeMs_ = 0L;
onChanged();
return this;
}
private long endTimeMs_ ;
/**
*
* End of time frame.
*
*
* int64 end_time_ms = 4;
* @return The endTimeMs.
*/
@java.lang.Override
public long getEndTimeMs() {
return endTimeMs_;
}
/**
*
* End of time frame.
*
*
* int64 end_time_ms = 4;
* @param value The endTimeMs to set.
* @return This builder for chaining.
*/
public Builder setEndTimeMs(long value) {
endTimeMs_ = value;
onChanged();
return this;
}
/**
*
* End of time frame.
*
*
* int64 end_time_ms = 4;
* @return This builder for chaining.
*/
public Builder clearEndTimeMs() {
endTimeMs_ = 0L;
onChanged();
return this;
}
private double confidence_ ;
/**
*
* The hypothesis confidence. Currently is not used.
*
*
* repeated .speechkit.stt.v3.Alternative alternatives = 1;
*/
public java.util.List
getAlternativesBuilderList() {
return getAlternativesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
yandex.cloud.api.ai.stt.v3.Stt.Alternative, yandex.cloud.api.ai.stt.v3.Stt.Alternative.Builder, yandex.cloud.api.ai.stt.v3.Stt.AlternativeOrBuilder>
getAlternativesFieldBuilder() {
if (alternativesBuilder_ == null) {
alternativesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
yandex.cloud.api.ai.stt.v3.Stt.Alternative, yandex.cloud.api.ai.stt.v3.Stt.Alternative.Builder, yandex.cloud.api.ai.stt.v3.Stt.AlternativeOrBuilder>(
alternatives_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
alternatives_ = null;
}
return alternativesBuilder_;
}
private java.lang.Object channelTag_ = "";
/**
* string channel_tag = 2 [deprecated = true];
* @deprecated
* @return The channelTag.
*/
@java.lang.Deprecated public java.lang.String getChannelTag() {
java.lang.Object ref = channelTag_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
channelTag_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string channel_tag = 2 [deprecated = true];
* @deprecated
* @return The bytes for channelTag.
*/
@java.lang.Deprecated public com.google.protobuf.ByteString
getChannelTagBytes() {
java.lang.Object ref = channelTag_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
channelTag_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string channel_tag = 2 [deprecated = true];
* @deprecated
* @param value The channelTag to set.
* @return This builder for chaining.
*/
@java.lang.Deprecated public Builder setChannelTag(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
channelTag_ = value;
onChanged();
return this;
}
/**
* string channel_tag = 2 [deprecated = true];
* @deprecated
* @return This builder for chaining.
*/
@java.lang.Deprecated public Builder clearChannelTag() {
channelTag_ = getDefaultInstance().getChannelTag();
onChanged();
return this;
}
/**
* string channel_tag = 2 [deprecated = true];
* @deprecated
* @param value The bytes for channelTag to set.
* @return This builder for chaining.
*/
@java.lang.Deprecated public Builder setChannelTagBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
channelTag_ = value;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:speechkit.stt.v3.AlternativeUpdate)
}
// @@protoc_insertion_point(class_scope:speechkit.stt.v3.AlternativeUpdate)
private static final yandex.cloud.api.ai.stt.v3.Stt.AlternativeUpdate DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.ai.stt.v3.Stt.AlternativeUpdate();
}
public static yandex.cloud.api.ai.stt.v3.Stt.AlternativeUpdate getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public AlternativeUpdate parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new AlternativeUpdate(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.AlternativeUpdate getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface AudioCursorsOrBuilder extends
// @@protoc_insertion_point(interface_extends:speechkit.stt.v3.AudioCursors)
com.google.protobuf.MessageOrBuilder {
/**
*
* Amount of audio chunks server received. This cursor is moved after each audio chunk was received by server.
*
*
* int64 received_data_ms = 1;
* @return The receivedDataMs.
*/
long getReceivedDataMs();
/**
*
* Input stream reset data.
*
*
* int64 reset_time_ms = 2;
* @return The resetTimeMs.
*/
long getResetTimeMs();
/**
*
* How much audio was processed. This time includes trimming silences as well. This cursor is moved after server received enough data
* to update recognition results (includes silence as well).
*
*
* int64 partial_time_ms = 3;
* @return The partialTimeMs.
*/
long getPartialTimeMs();
/**
*
* Time of last final. This cursor is moved when server decides that recognition from start of audio until final_time_ms will not change anymore
* usually this even is followed by EOU detection (but this could change in future).
*
*
* int64 final_time_ms = 4;
* @return The finalTimeMs.
*/
long getFinalTimeMs();
/**
*
* This is index of last final server send. Incremented after each new final.
*
*
* int64 final_index = 5;
* @return The finalIndex.
*/
long getFinalIndex();
/**
*
* Estimated time of EOU. Cursor is updated after each new EOU is sent.
* For external classifier this equals to received_data_ms at the moment EOU event arrives.
* For internal classifier this is estimation of time. The time is not exact and has the same guarantees as word timings.
*
*
* int64 eou_time_ms = 6;
* @return The eouTimeMs.
*/
long getEouTimeMs();
}
/**
*
* AudioCursors are state of ASR recognition stream.
*
*
* Protobuf type {@code speechkit.stt.v3.AudioCursors}
*/
public static final class AudioCursors extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:speechkit.stt.v3.AudioCursors)
AudioCursorsOrBuilder {
private static final long serialVersionUID = 0L;
// Use AudioCursors.newBuilder() to construct.
private AudioCursors(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private AudioCursors() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new AudioCursors();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private AudioCursors(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
receivedDataMs_ = input.readInt64();
break;
}
case 16: {
resetTimeMs_ = input.readInt64();
break;
}
case 24: {
partialTimeMs_ = input.readInt64();
break;
}
case 32: {
finalTimeMs_ = input.readInt64();
break;
}
case 40: {
finalIndex_ = input.readInt64();
break;
}
case 48: {
eouTimeMs_ = input.readInt64();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_AudioCursors_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_AudioCursors_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.ai.stt.v3.Stt.AudioCursors.class, yandex.cloud.api.ai.stt.v3.Stt.AudioCursors.Builder.class);
}
public static final int RECEIVED_DATA_MS_FIELD_NUMBER = 1;
private long receivedDataMs_;
/**
*
* Amount of audio chunks server received. This cursor is moved after each audio chunk was received by server.
*
*
* int64 received_data_ms = 1;
* @return The receivedDataMs.
*/
@java.lang.Override
public long getReceivedDataMs() {
return receivedDataMs_;
}
public static final int RESET_TIME_MS_FIELD_NUMBER = 2;
private long resetTimeMs_;
/**
*
* Input stream reset data.
*
*
* int64 reset_time_ms = 2;
* @return The resetTimeMs.
*/
@java.lang.Override
public long getResetTimeMs() {
return resetTimeMs_;
}
public static final int PARTIAL_TIME_MS_FIELD_NUMBER = 3;
private long partialTimeMs_;
/**
*
* How much audio was processed. This time includes trimming silences as well. This cursor is moved after server received enough data
* to update recognition results (includes silence as well).
*
*
* int64 partial_time_ms = 3;
* @return The partialTimeMs.
*/
@java.lang.Override
public long getPartialTimeMs() {
return partialTimeMs_;
}
public static final int FINAL_TIME_MS_FIELD_NUMBER = 4;
private long finalTimeMs_;
/**
*
* Time of last final. This cursor is moved when server decides that recognition from start of audio until final_time_ms will not change anymore
* usually this even is followed by EOU detection (but this could change in future).
*
*
* int64 final_time_ms = 4;
* @return The finalTimeMs.
*/
@java.lang.Override
public long getFinalTimeMs() {
return finalTimeMs_;
}
public static final int FINAL_INDEX_FIELD_NUMBER = 5;
private long finalIndex_;
/**
*
* This is index of last final server send. Incremented after each new final.
*
*
* int64 final_index = 5;
* @return The finalIndex.
*/
@java.lang.Override
public long getFinalIndex() {
return finalIndex_;
}
public static final int EOU_TIME_MS_FIELD_NUMBER = 6;
private long eouTimeMs_;
/**
*
* Estimated time of EOU. Cursor is updated after each new EOU is sent.
* For external classifier this equals to received_data_ms at the moment EOU event arrives.
* For internal classifier this is estimation of time. The time is not exact and has the same guarantees as word timings.
*
* AudioCursors are state of ASR recognition stream.
*
*
* Protobuf type {@code speechkit.stt.v3.AudioCursors}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:speechkit.stt.v3.AudioCursors)
yandex.cloud.api.ai.stt.v3.Stt.AudioCursorsOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_AudioCursors_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_AudioCursors_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.ai.stt.v3.Stt.AudioCursors.class, yandex.cloud.api.ai.stt.v3.Stt.AudioCursors.Builder.class);
}
// Construct using yandex.cloud.api.ai.stt.v3.Stt.AudioCursors.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
receivedDataMs_ = 0L;
resetTimeMs_ = 0L;
partialTimeMs_ = 0L;
finalTimeMs_ = 0L;
finalIndex_ = 0L;
eouTimeMs_ = 0L;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_AudioCursors_descriptor;
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.AudioCursors getDefaultInstanceForType() {
return yandex.cloud.api.ai.stt.v3.Stt.AudioCursors.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.AudioCursors build() {
yandex.cloud.api.ai.stt.v3.Stt.AudioCursors result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.AudioCursors buildPartial() {
yandex.cloud.api.ai.stt.v3.Stt.AudioCursors result = new yandex.cloud.api.ai.stt.v3.Stt.AudioCursors(this);
result.receivedDataMs_ = receivedDataMs_;
result.resetTimeMs_ = resetTimeMs_;
result.partialTimeMs_ = partialTimeMs_;
result.finalTimeMs_ = finalTimeMs_;
result.finalIndex_ = finalIndex_;
result.eouTimeMs_ = eouTimeMs_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof yandex.cloud.api.ai.stt.v3.Stt.AudioCursors) {
return mergeFrom((yandex.cloud.api.ai.stt.v3.Stt.AudioCursors)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.ai.stt.v3.Stt.AudioCursors other) {
if (other == yandex.cloud.api.ai.stt.v3.Stt.AudioCursors.getDefaultInstance()) return this;
if (other.getReceivedDataMs() != 0L) {
setReceivedDataMs(other.getReceivedDataMs());
}
if (other.getResetTimeMs() != 0L) {
setResetTimeMs(other.getResetTimeMs());
}
if (other.getPartialTimeMs() != 0L) {
setPartialTimeMs(other.getPartialTimeMs());
}
if (other.getFinalTimeMs() != 0L) {
setFinalTimeMs(other.getFinalTimeMs());
}
if (other.getFinalIndex() != 0L) {
setFinalIndex(other.getFinalIndex());
}
if (other.getEouTimeMs() != 0L) {
setEouTimeMs(other.getEouTimeMs());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
yandex.cloud.api.ai.stt.v3.Stt.AudioCursors parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.ai.stt.v3.Stt.AudioCursors) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private long receivedDataMs_ ;
/**
*
* Amount of audio chunks server received. This cursor is moved after each audio chunk was received by server.
*
*
* int64 received_data_ms = 1;
* @return The receivedDataMs.
*/
@java.lang.Override
public long getReceivedDataMs() {
return receivedDataMs_;
}
/**
*
* Amount of audio chunks server received. This cursor is moved after each audio chunk was received by server.
*
*
* int64 received_data_ms = 1;
* @param value The receivedDataMs to set.
* @return This builder for chaining.
*/
public Builder setReceivedDataMs(long value) {
receivedDataMs_ = value;
onChanged();
return this;
}
/**
*
* Amount of audio chunks server received. This cursor is moved after each audio chunk was received by server.
*
*
* int64 received_data_ms = 1;
* @return This builder for chaining.
*/
public Builder clearReceivedDataMs() {
receivedDataMs_ = 0L;
onChanged();
return this;
}
private long resetTimeMs_ ;
/**
*
* Input stream reset data.
*
*
* int64 reset_time_ms = 2;
* @return The resetTimeMs.
*/
@java.lang.Override
public long getResetTimeMs() {
return resetTimeMs_;
}
/**
*
* Input stream reset data.
*
*
* int64 reset_time_ms = 2;
* @param value The resetTimeMs to set.
* @return This builder for chaining.
*/
public Builder setResetTimeMs(long value) {
resetTimeMs_ = value;
onChanged();
return this;
}
/**
*
* Input stream reset data.
*
*
* int64 reset_time_ms = 2;
* @return This builder for chaining.
*/
public Builder clearResetTimeMs() {
resetTimeMs_ = 0L;
onChanged();
return this;
}
private long partialTimeMs_ ;
/**
*
* How much audio was processed. This time includes trimming silences as well. This cursor is moved after server received enough data
* to update recognition results (includes silence as well).
*
*
* int64 partial_time_ms = 3;
* @return The partialTimeMs.
*/
@java.lang.Override
public long getPartialTimeMs() {
return partialTimeMs_;
}
/**
*
* How much audio was processed. This time includes trimming silences as well. This cursor is moved after server received enough data
* to update recognition results (includes silence as well).
*
*
* int64 partial_time_ms = 3;
* @param value The partialTimeMs to set.
* @return This builder for chaining.
*/
public Builder setPartialTimeMs(long value) {
partialTimeMs_ = value;
onChanged();
return this;
}
/**
*
* How much audio was processed. This time includes trimming silences as well. This cursor is moved after server received enough data
* to update recognition results (includes silence as well).
*
*
* int64 partial_time_ms = 3;
* @return This builder for chaining.
*/
public Builder clearPartialTimeMs() {
partialTimeMs_ = 0L;
onChanged();
return this;
}
private long finalTimeMs_ ;
/**
*
* Time of last final. This cursor is moved when server decides that recognition from start of audio until final_time_ms will not change anymore
* usually this even is followed by EOU detection (but this could change in future).
*
*
* int64 final_time_ms = 4;
* @return The finalTimeMs.
*/
@java.lang.Override
public long getFinalTimeMs() {
return finalTimeMs_;
}
/**
*
* Time of last final. This cursor is moved when server decides that recognition from start of audio until final_time_ms will not change anymore
* usually this even is followed by EOU detection (but this could change in future).
*
*
* int64 final_time_ms = 4;
* @param value The finalTimeMs to set.
* @return This builder for chaining.
*/
public Builder setFinalTimeMs(long value) {
finalTimeMs_ = value;
onChanged();
return this;
}
/**
*
* Time of last final. This cursor is moved when server decides that recognition from start of audio until final_time_ms will not change anymore
* usually this even is followed by EOU detection (but this could change in future).
*
*
* int64 final_time_ms = 4;
* @return This builder for chaining.
*/
public Builder clearFinalTimeMs() {
finalTimeMs_ = 0L;
onChanged();
return this;
}
private long finalIndex_ ;
/**
*
* This is index of last final server send. Incremented after each new final.
*
*
* int64 final_index = 5;
* @return The finalIndex.
*/
@java.lang.Override
public long getFinalIndex() {
return finalIndex_;
}
/**
*
* This is index of last final server send. Incremented after each new final.
*
*
* int64 final_index = 5;
* @param value The finalIndex to set.
* @return This builder for chaining.
*/
public Builder setFinalIndex(long value) {
finalIndex_ = value;
onChanged();
return this;
}
/**
*
* This is index of last final server send. Incremented after each new final.
*
*
* int64 final_index = 5;
* @return This builder for chaining.
*/
public Builder clearFinalIndex() {
finalIndex_ = 0L;
onChanged();
return this;
}
private long eouTimeMs_ ;
/**
*
* Estimated time of EOU. Cursor is updated after each new EOU is sent.
* For external classifier this equals to received_data_ms at the moment EOU event arrives.
* For internal classifier this is estimation of time. The time is not exact and has the same guarantees as word timings.
*
*
* int64 eou_time_ms = 6;
* @return The eouTimeMs.
*/
@java.lang.Override
public long getEouTimeMs() {
return eouTimeMs_;
}
/**
*
* Estimated time of EOU. Cursor is updated after each new EOU is sent.
* For external classifier this equals to received_data_ms at the moment EOU event arrives.
* For internal classifier this is estimation of time. The time is not exact and has the same guarantees as word timings.
*
*
* int64 eou_time_ms = 6;
* @param value The eouTimeMs to set.
* @return This builder for chaining.
*/
public Builder setEouTimeMs(long value) {
eouTimeMs_ = value;
onChanged();
return this;
}
/**
*
* Estimated time of EOU. Cursor is updated after each new EOU is sent.
* For external classifier this equals to received_data_ms at the moment EOU event arrives.
* For internal classifier this is estimation of time. The time is not exact and has the same guarantees as word timings.
*
*
* int64 eou_time_ms = 6;
* @return This builder for chaining.
*/
public Builder clearEouTimeMs() {
eouTimeMs_ = 0L;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:speechkit.stt.v3.AudioCursors)
}
// @@protoc_insertion_point(class_scope:speechkit.stt.v3.AudioCursors)
private static final yandex.cloud.api.ai.stt.v3.Stt.AudioCursors DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.ai.stt.v3.Stt.AudioCursors();
}
public static yandex.cloud.api.ai.stt.v3.Stt.AudioCursors getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public AudioCursors parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new AudioCursors(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.AudioCursors getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface FinalRefinementOrBuilder extends
// @@protoc_insertion_point(interface_extends:speechkit.stt.v3.FinalRefinement)
com.google.protobuf.MessageOrBuilder {
/**
*
* Index of final for which server sends additional information.
*
*
* int64 final_index = 1;
* @return The finalIndex.
*/
long getFinalIndex();
/**
*
* Normalized text instead of raw one.
*
*
* .speechkit.stt.v3.AlternativeUpdate normalized_text = 2;
* @return Whether the normalizedText field is set.
*/
boolean hasNormalizedText();
/**
*
* Refinement for final hypo. For example, text normalization is refinement.
*
*
* Protobuf type {@code speechkit.stt.v3.FinalRefinement}
*/
public static final class FinalRefinement extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:speechkit.stt.v3.FinalRefinement)
FinalRefinementOrBuilder {
private static final long serialVersionUID = 0L;
// Use FinalRefinement.newBuilder() to construct.
private FinalRefinement(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private FinalRefinement() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new FinalRefinement();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private FinalRefinement(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
finalIndex_ = input.readInt64();
break;
}
case 18: {
yandex.cloud.api.ai.stt.v3.Stt.AlternativeUpdate.Builder subBuilder = null;
if (typeCase_ == 2) {
subBuilder = ((yandex.cloud.api.ai.stt.v3.Stt.AlternativeUpdate) type_).toBuilder();
}
type_ =
input.readMessage(yandex.cloud.api.ai.stt.v3.Stt.AlternativeUpdate.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((yandex.cloud.api.ai.stt.v3.Stt.AlternativeUpdate) type_);
type_ = subBuilder.buildPartial();
}
typeCase_ = 2;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_FinalRefinement_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_FinalRefinement_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.ai.stt.v3.Stt.FinalRefinement.class, yandex.cloud.api.ai.stt.v3.Stt.FinalRefinement.Builder.class);
}
private int typeCase_ = 0;
private java.lang.Object type_;
public enum TypeCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
NORMALIZED_TEXT(2),
TYPE_NOT_SET(0);
private final int value;
private TypeCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static TypeCase valueOf(int value) {
return forNumber(value);
}
public static TypeCase forNumber(int value) {
switch (value) {
case 2: return NORMALIZED_TEXT;
case 0: return TYPE_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public TypeCase
getTypeCase() {
return TypeCase.forNumber(
typeCase_);
}
public static final int FINAL_INDEX_FIELD_NUMBER = 1;
private long finalIndex_;
/**
*
* Index of final for which server sends additional information.
*
*
* int64 final_index = 1;
* @return The finalIndex.
*/
@java.lang.Override
public long getFinalIndex() {
return finalIndex_;
}
public static final int NORMALIZED_TEXT_FIELD_NUMBER = 2;
/**
*
* Normalized text instead of raw one.
*
*
* .speechkit.stt.v3.AlternativeUpdate normalized_text = 2;
* @return Whether the normalizedText field is set.
*/
@java.lang.Override
public boolean hasNormalizedText() {
return typeCase_ == 2;
}
/**
*
* Normalized text instead of raw one.
*
*
* .speechkit.stt.v3.AlternativeUpdate normalized_text = 2;
* @return The normalizedText.
*/
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.AlternativeUpdate getNormalizedText() {
if (typeCase_ == 2) {
return (yandex.cloud.api.ai.stt.v3.Stt.AlternativeUpdate) type_;
}
return yandex.cloud.api.ai.stt.v3.Stt.AlternativeUpdate.getDefaultInstance();
}
/**
*
* Normalized text instead of raw one.
*
*
* .speechkit.stt.v3.AlternativeUpdate normalized_text = 2;
*/
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.AlternativeUpdateOrBuilder getNormalizedTextOrBuilder() {
if (typeCase_ == 2) {
return (yandex.cloud.api.ai.stt.v3.Stt.AlternativeUpdate) type_;
}
return yandex.cloud.api.ai.stt.v3.Stt.AlternativeUpdate.getDefaultInstance();
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (finalIndex_ != 0L) {
output.writeInt64(1, finalIndex_);
}
if (typeCase_ == 2) {
output.writeMessage(2, (yandex.cloud.api.ai.stt.v3.Stt.AlternativeUpdate) type_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (finalIndex_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(1, finalIndex_);
}
if (typeCase_ == 2) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, (yandex.cloud.api.ai.stt.v3.Stt.AlternativeUpdate) type_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof yandex.cloud.api.ai.stt.v3.Stt.FinalRefinement)) {
return super.equals(obj);
}
yandex.cloud.api.ai.stt.v3.Stt.FinalRefinement other = (yandex.cloud.api.ai.stt.v3.Stt.FinalRefinement) obj;
if (getFinalIndex()
!= other.getFinalIndex()) return false;
if (!getTypeCase().equals(other.getTypeCase())) return false;
switch (typeCase_) {
case 2:
if (!getNormalizedText()
.equals(other.getNormalizedText())) return false;
break;
case 0:
default:
}
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + FINAL_INDEX_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getFinalIndex());
switch (typeCase_) {
case 2:
hash = (37 * hash) + NORMALIZED_TEXT_FIELD_NUMBER;
hash = (53 * hash) + getNormalizedText().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.ai.stt.v3.Stt.FinalRefinement parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.stt.v3.Stt.FinalRefinement parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.FinalRefinement parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.stt.v3.Stt.FinalRefinement parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.FinalRefinement parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.stt.v3.Stt.FinalRefinement parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.FinalRefinement parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.stt.v3.Stt.FinalRefinement parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.FinalRefinement parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.stt.v3.Stt.FinalRefinement parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.FinalRefinement parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.stt.v3.Stt.FinalRefinement parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(yandex.cloud.api.ai.stt.v3.Stt.FinalRefinement prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Refinement for final hypo. For example, text normalization is refinement.
*
*
* Protobuf type {@code speechkit.stt.v3.FinalRefinement}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:speechkit.stt.v3.FinalRefinement)
yandex.cloud.api.ai.stt.v3.Stt.FinalRefinementOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_FinalRefinement_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_FinalRefinement_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.ai.stt.v3.Stt.FinalRefinement.class, yandex.cloud.api.ai.stt.v3.Stt.FinalRefinement.Builder.class);
}
// Construct using yandex.cloud.api.ai.stt.v3.Stt.FinalRefinement.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
finalIndex_ = 0L;
typeCase_ = 0;
type_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_FinalRefinement_descriptor;
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.FinalRefinement getDefaultInstanceForType() {
return yandex.cloud.api.ai.stt.v3.Stt.FinalRefinement.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.FinalRefinement build() {
yandex.cloud.api.ai.stt.v3.Stt.FinalRefinement result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.FinalRefinement buildPartial() {
yandex.cloud.api.ai.stt.v3.Stt.FinalRefinement result = new yandex.cloud.api.ai.stt.v3.Stt.FinalRefinement(this);
result.finalIndex_ = finalIndex_;
if (typeCase_ == 2) {
if (normalizedTextBuilder_ == null) {
result.type_ = type_;
} else {
result.type_ = normalizedTextBuilder_.build();
}
}
result.typeCase_ = typeCase_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof yandex.cloud.api.ai.stt.v3.Stt.FinalRefinement) {
return mergeFrom((yandex.cloud.api.ai.stt.v3.Stt.FinalRefinement)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.ai.stt.v3.Stt.FinalRefinement other) {
if (other == yandex.cloud.api.ai.stt.v3.Stt.FinalRefinement.getDefaultInstance()) return this;
if (other.getFinalIndex() != 0L) {
setFinalIndex(other.getFinalIndex());
}
switch (other.getTypeCase()) {
case NORMALIZED_TEXT: {
mergeNormalizedText(other.getNormalizedText());
break;
}
case TYPE_NOT_SET: {
break;
}
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
yandex.cloud.api.ai.stt.v3.Stt.FinalRefinement parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.ai.stt.v3.Stt.FinalRefinement) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int typeCase_ = 0;
private java.lang.Object type_;
public TypeCase
getTypeCase() {
return TypeCase.forNumber(
typeCase_);
}
public Builder clearType() {
typeCase_ = 0;
type_ = null;
onChanged();
return this;
}
private long finalIndex_ ;
/**
*
* Index of final for which server sends additional information.
*
*
* int64 final_index = 1;
* @return The finalIndex.
*/
@java.lang.Override
public long getFinalIndex() {
return finalIndex_;
}
/**
*
* Index of final for which server sends additional information.
*
*
* int64 final_index = 1;
* @param value The finalIndex to set.
* @return This builder for chaining.
*/
public Builder setFinalIndex(long value) {
finalIndex_ = value;
onChanged();
return this;
}
/**
*
* Index of final for which server sends additional information.
*
*
* string message = 2;
* @return The bytes for message.
*/
com.google.protobuf.ByteString
getMessageBytes();
}
/**
*
* Status message
*
*
* Protobuf type {@code speechkit.stt.v3.StatusCode}
*/
public static final class StatusCode extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:speechkit.stt.v3.StatusCode)
StatusCodeOrBuilder {
private static final long serialVersionUID = 0L;
// Use StatusCode.newBuilder() to construct.
private StatusCode(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private StatusCode() {
codeType_ = 0;
message_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new StatusCode();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private StatusCode(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
int rawValue = input.readEnum();
codeType_ = rawValue;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
message_ = s;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_StatusCode_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_StatusCode_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.ai.stt.v3.Stt.StatusCode.class, yandex.cloud.api.ai.stt.v3.Stt.StatusCode.Builder.class);
}
public static final int CODE_TYPE_FIELD_NUMBER = 1;
private int codeType_;
/**
*
* Code type.
*
*
* .speechkit.stt.v3.CodeType code_type = 1;
* @return The enum numeric value on the wire for codeType.
*/
@java.lang.Override public int getCodeTypeValue() {
return codeType_;
}
/**
*
* Code type.
*
*
* .speechkit.stt.v3.CodeType code_type = 1;
* @return The codeType.
*/
@java.lang.Override public yandex.cloud.api.ai.stt.v3.Stt.CodeType getCodeType() {
@SuppressWarnings("deprecation")
yandex.cloud.api.ai.stt.v3.Stt.CodeType result = yandex.cloud.api.ai.stt.v3.Stt.CodeType.valueOf(codeType_);
return result == null ? yandex.cloud.api.ai.stt.v3.Stt.CodeType.UNRECOGNIZED : result;
}
public static final int MESSAGE_FIELD_NUMBER = 2;
private volatile java.lang.Object message_;
/**
*
*
* string message = 2;
* @return The bytes for message.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getMessageBytes() {
java.lang.Object ref = message_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
message_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (codeType_ != yandex.cloud.api.ai.stt.v3.Stt.CodeType.CODE_TYPE_UNSPECIFIED.getNumber()) {
output.writeEnum(1, codeType_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(message_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, message_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (codeType_ != yandex.cloud.api.ai.stt.v3.Stt.CodeType.CODE_TYPE_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, codeType_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(message_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, message_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof yandex.cloud.api.ai.stt.v3.Stt.StatusCode)) {
return super.equals(obj);
}
yandex.cloud.api.ai.stt.v3.Stt.StatusCode other = (yandex.cloud.api.ai.stt.v3.Stt.StatusCode) obj;
if (codeType_ != other.codeType_) return false;
if (!getMessage()
.equals(other.getMessage())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + CODE_TYPE_FIELD_NUMBER;
hash = (53 * hash) + codeType_;
hash = (37 * hash) + MESSAGE_FIELD_NUMBER;
hash = (53 * hash) + getMessage().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.ai.stt.v3.Stt.StatusCode parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.stt.v3.Stt.StatusCode parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.StatusCode parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.stt.v3.Stt.StatusCode parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.StatusCode parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.stt.v3.Stt.StatusCode parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.StatusCode parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.stt.v3.Stt.StatusCode parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.StatusCode parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.stt.v3.Stt.StatusCode parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.StatusCode parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.stt.v3.Stt.StatusCode parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(yandex.cloud.api.ai.stt.v3.Stt.StatusCode prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Status message
*
*
* Protobuf type {@code speechkit.stt.v3.StatusCode}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:speechkit.stt.v3.StatusCode)
yandex.cloud.api.ai.stt.v3.Stt.StatusCodeOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_StatusCode_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_StatusCode_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.ai.stt.v3.Stt.StatusCode.class, yandex.cloud.api.ai.stt.v3.Stt.StatusCode.Builder.class);
}
// Construct using yandex.cloud.api.ai.stt.v3.Stt.StatusCode.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
codeType_ = 0;
message_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_StatusCode_descriptor;
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.StatusCode getDefaultInstanceForType() {
return yandex.cloud.api.ai.stt.v3.Stt.StatusCode.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.StatusCode build() {
yandex.cloud.api.ai.stt.v3.Stt.StatusCode result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.StatusCode buildPartial() {
yandex.cloud.api.ai.stt.v3.Stt.StatusCode result = new yandex.cloud.api.ai.stt.v3.Stt.StatusCode(this);
result.codeType_ = codeType_;
result.message_ = message_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof yandex.cloud.api.ai.stt.v3.Stt.StatusCode) {
return mergeFrom((yandex.cloud.api.ai.stt.v3.Stt.StatusCode)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.ai.stt.v3.Stt.StatusCode other) {
if (other == yandex.cloud.api.ai.stt.v3.Stt.StatusCode.getDefaultInstance()) return this;
if (other.codeType_ != 0) {
setCodeTypeValue(other.getCodeTypeValue());
}
if (!other.getMessage().isEmpty()) {
message_ = other.message_;
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
yandex.cloud.api.ai.stt.v3.Stt.StatusCode parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.ai.stt.v3.Stt.StatusCode) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int codeType_ = 0;
/**
*
* Code type.
*
*
* .speechkit.stt.v3.CodeType code_type = 1;
* @return The enum numeric value on the wire for codeType.
*/
@java.lang.Override public int getCodeTypeValue() {
return codeType_;
}
/**
*
* Code type.
*
*
* .speechkit.stt.v3.CodeType code_type = 1;
* @param value The enum numeric value on the wire for codeType to set.
* @return This builder for chaining.
*/
public Builder setCodeTypeValue(int value) {
codeType_ = value;
onChanged();
return this;
}
/**
*
* Code type.
*
*
* .speechkit.stt.v3.CodeType code_type = 1;
* @return The codeType.
*/
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.CodeType getCodeType() {
@SuppressWarnings("deprecation")
yandex.cloud.api.ai.stt.v3.Stt.CodeType result = yandex.cloud.api.ai.stt.v3.Stt.CodeType.valueOf(codeType_);
return result == null ? yandex.cloud.api.ai.stt.v3.Stt.CodeType.UNRECOGNIZED : result;
}
/**
*
* Code type.
*
*
* .speechkit.stt.v3.CodeType code_type = 1;
* @param value The codeType to set.
* @return This builder for chaining.
*/
public Builder setCodeType(yandex.cloud.api.ai.stt.v3.Stt.CodeType value) {
if (value == null) {
throw new NullPointerException();
}
codeType_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
* string user_request_id = 2;
* @return The bytes for userRequestId.
*/
public com.google.protobuf.ByteString
getUserRequestIdBytes() {
java.lang.Object ref = userRequestId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
userRequestId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* User session identifier.
*
*
* string user_request_id = 2;
* @param value The userRequestId to set.
* @return This builder for chaining.
*/
public Builder setUserRequestId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
userRequestId_ = value;
onChanged();
return this;
}
/**
*
* User session identifier.
*
*
* string user_request_id = 2;
* @return This builder for chaining.
*/
public Builder clearUserRequestId() {
userRequestId_ = getDefaultInstance().getUserRequestId();
onChanged();
return this;
}
/**
*
* User session identifier.
*
*
* string user_request_id = 2;
* @param value The bytes for userRequestId to set.
* @return This builder for chaining.
*/
public Builder setUserRequestIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
userRequestId_ = value;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:speechkit.stt.v3.SessionUuid)
}
// @@protoc_insertion_point(class_scope:speechkit.stt.v3.SessionUuid)
private static final yandex.cloud.api.ai.stt.v3.Stt.SessionUuid DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.ai.stt.v3.Stt.SessionUuid();
}
public static yandex.cloud.api.ai.stt.v3.Stt.SessionUuid getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public SessionUuid parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new SessionUuid(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.SessionUuid getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface PhraseHighlightOrBuilder extends
// @@protoc_insertion_point(interface_extends:speechkit.stt.v3.PhraseHighlight)
com.google.protobuf.MessageOrBuilder {
/**
*
* Text transcription of the highlighted audio segment
*
*
* string text = 1;
* @return The text.
*/
java.lang.String getText();
/**
*
* Text transcription of the highlighted audio segment
*
*
* string text = 1;
* @return The bytes for text.
*/
com.google.protobuf.ByteString
getTextBytes();
/**
*
* Start time of the highlighted audio segment
*
*
* int64 start_time_ms = 2;
* @return The startTimeMs.
*/
long getStartTimeMs();
/**
*
* End time of the highlighted audio segment
*
*
* int64 end_time_ms = 3;
* @return The endTimeMs.
*/
long getEndTimeMs();
}
/**
* Protobuf type {@code speechkit.stt.v3.PhraseHighlight}
*/
public static final class PhraseHighlight extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:speechkit.stt.v3.PhraseHighlight)
PhraseHighlightOrBuilder {
private static final long serialVersionUID = 0L;
// Use PhraseHighlight.newBuilder() to construct.
private PhraseHighlight(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private PhraseHighlight() {
text_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new PhraseHighlight();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private PhraseHighlight(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
text_ = s;
break;
}
case 16: {
startTimeMs_ = input.readInt64();
break;
}
case 24: {
endTimeMs_ = input.readInt64();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_PhraseHighlight_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_PhraseHighlight_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.ai.stt.v3.Stt.PhraseHighlight.class, yandex.cloud.api.ai.stt.v3.Stt.PhraseHighlight.Builder.class);
}
public static final int TEXT_FIELD_NUMBER = 1;
private volatile java.lang.Object text_;
/**
*
* Text transcription of the highlighted audio segment
*
*
* string text = 1;
* @return The text.
*/
@java.lang.Override
public java.lang.String getText() {
java.lang.Object ref = text_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
text_ = s;
return s;
}
}
/**
*
* Text transcription of the highlighted audio segment
*
*
* string text = 1;
* @return The bytes for text.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getTextBytes() {
java.lang.Object ref = text_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
text_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int START_TIME_MS_FIELD_NUMBER = 2;
private long startTimeMs_;
/**
*
* Start time of the highlighted audio segment
*
*
* int64 start_time_ms = 2;
* @return The startTimeMs.
*/
@java.lang.Override
public long getStartTimeMs() {
return startTimeMs_;
}
public static final int END_TIME_MS_FIELD_NUMBER = 3;
private long endTimeMs_;
/**
*
* End time of the highlighted audio segment
*
*
* int64 end_time_ms = 3;
* @return The endTimeMs.
*/
@java.lang.Override
public long getEndTimeMs() {
return endTimeMs_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, text_);
}
if (startTimeMs_ != 0L) {
output.writeInt64(2, startTimeMs_);
}
if (endTimeMs_ != 0L) {
output.writeInt64(3, endTimeMs_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, text_);
}
if (startTimeMs_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(2, startTimeMs_);
}
if (endTimeMs_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(3, endTimeMs_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof yandex.cloud.api.ai.stt.v3.Stt.PhraseHighlight)) {
return super.equals(obj);
}
yandex.cloud.api.ai.stt.v3.Stt.PhraseHighlight other = (yandex.cloud.api.ai.stt.v3.Stt.PhraseHighlight) obj;
if (!getText()
.equals(other.getText())) return false;
if (getStartTimeMs()
!= other.getStartTimeMs()) return false;
if (getEndTimeMs()
!= other.getEndTimeMs()) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + TEXT_FIELD_NUMBER;
hash = (53 * hash) + getText().hashCode();
hash = (37 * hash) + START_TIME_MS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getStartTimeMs());
hash = (37 * hash) + END_TIME_MS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getEndTimeMs());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.ai.stt.v3.Stt.PhraseHighlight parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.stt.v3.Stt.PhraseHighlight parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.PhraseHighlight parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.stt.v3.Stt.PhraseHighlight parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.PhraseHighlight parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.stt.v3.Stt.PhraseHighlight parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.PhraseHighlight parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.stt.v3.Stt.PhraseHighlight parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.PhraseHighlight parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.stt.v3.Stt.PhraseHighlight parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.PhraseHighlight parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.stt.v3.Stt.PhraseHighlight parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(yandex.cloud.api.ai.stt.v3.Stt.PhraseHighlight prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code speechkit.stt.v3.PhraseHighlight}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:speechkit.stt.v3.PhraseHighlight)
yandex.cloud.api.ai.stt.v3.Stt.PhraseHighlightOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_PhraseHighlight_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_PhraseHighlight_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.ai.stt.v3.Stt.PhraseHighlight.class, yandex.cloud.api.ai.stt.v3.Stt.PhraseHighlight.Builder.class);
}
// Construct using yandex.cloud.api.ai.stt.v3.Stt.PhraseHighlight.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
text_ = "";
startTimeMs_ = 0L;
endTimeMs_ = 0L;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_PhraseHighlight_descriptor;
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.PhraseHighlight getDefaultInstanceForType() {
return yandex.cloud.api.ai.stt.v3.Stt.PhraseHighlight.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.PhraseHighlight build() {
yandex.cloud.api.ai.stt.v3.Stt.PhraseHighlight result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.PhraseHighlight buildPartial() {
yandex.cloud.api.ai.stt.v3.Stt.PhraseHighlight result = new yandex.cloud.api.ai.stt.v3.Stt.PhraseHighlight(this);
result.text_ = text_;
result.startTimeMs_ = startTimeMs_;
result.endTimeMs_ = endTimeMs_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof yandex.cloud.api.ai.stt.v3.Stt.PhraseHighlight) {
return mergeFrom((yandex.cloud.api.ai.stt.v3.Stt.PhraseHighlight)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.ai.stt.v3.Stt.PhraseHighlight other) {
if (other == yandex.cloud.api.ai.stt.v3.Stt.PhraseHighlight.getDefaultInstance()) return this;
if (!other.getText().isEmpty()) {
text_ = other.text_;
onChanged();
}
if (other.getStartTimeMs() != 0L) {
setStartTimeMs(other.getStartTimeMs());
}
if (other.getEndTimeMs() != 0L) {
setEndTimeMs(other.getEndTimeMs());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
yandex.cloud.api.ai.stt.v3.Stt.PhraseHighlight parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.ai.stt.v3.Stt.PhraseHighlight) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object text_ = "";
/**
*
* Text transcription of the highlighted audio segment
*
*
* string text = 1;
* @return The text.
*/
public java.lang.String getText() {
java.lang.Object ref = text_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
text_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Text transcription of the highlighted audio segment
*
*
* string text = 1;
* @return The bytes for text.
*/
public com.google.protobuf.ByteString
getTextBytes() {
java.lang.Object ref = text_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
text_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Text transcription of the highlighted audio segment
*
*
* string text = 1;
* @param value The text to set.
* @return This builder for chaining.
*/
public Builder setText(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
text_ = value;
onChanged();
return this;
}
/**
*
* Text transcription of the highlighted audio segment
*
*
* string text = 1;
* @return This builder for chaining.
*/
public Builder clearText() {
text_ = getDefaultInstance().getText();
onChanged();
return this;
}
/**
*
* Text transcription of the highlighted audio segment
*
*
* string text = 1;
* @param value The bytes for text to set.
* @return This builder for chaining.
*/
public Builder setTextBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
text_ = value;
onChanged();
return this;
}
private long startTimeMs_ ;
/**
*
* Start time of the highlighted audio segment
*
*
* int64 start_time_ms = 2;
* @return The startTimeMs.
*/
@java.lang.Override
public long getStartTimeMs() {
return startTimeMs_;
}
/**
*
* Start time of the highlighted audio segment
*
*
* int64 start_time_ms = 2;
* @param value The startTimeMs to set.
* @return This builder for chaining.
*/
public Builder setStartTimeMs(long value) {
startTimeMs_ = value;
onChanged();
return this;
}
/**
*
* Start time of the highlighted audio segment
*
*
* int64 start_time_ms = 2;
* @return This builder for chaining.
*/
public Builder clearStartTimeMs() {
startTimeMs_ = 0L;
onChanged();
return this;
}
private long endTimeMs_ ;
/**
*
* End time of the highlighted audio segment
*
*
* int64 end_time_ms = 3;
* @return The endTimeMs.
*/
@java.lang.Override
public long getEndTimeMs() {
return endTimeMs_;
}
/**
*
* End time of the highlighted audio segment
*
*
* int64 end_time_ms = 3;
* @param value The endTimeMs to set.
* @return This builder for chaining.
*/
public Builder setEndTimeMs(long value) {
endTimeMs_ = value;
onChanged();
return this;
}
/**
*
* End time of the highlighted audio segment
*
*
* int64 end_time_ms = 3;
* @return This builder for chaining.
*/
public Builder clearEndTimeMs() {
endTimeMs_ = 0L;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:speechkit.stt.v3.PhraseHighlight)
}
// @@protoc_insertion_point(class_scope:speechkit.stt.v3.PhraseHighlight)
private static final yandex.cloud.api.ai.stt.v3.Stt.PhraseHighlight DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.ai.stt.v3.Stt.PhraseHighlight();
}
public static yandex.cloud.api.ai.stt.v3.Stt.PhraseHighlight getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public PhraseHighlight parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new PhraseHighlight(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.PhraseHighlight getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface RecognitionClassifierLabelOrBuilder extends
// @@protoc_insertion_point(interface_extends:speechkit.stt.v3.RecognitionClassifierLabel)
com.google.protobuf.MessageOrBuilder {
/**
*
* The label of the class predicted by the classifier
*
*
* repeated .speechkit.stt.v3.RecognitionClassifierLabel labels = 3;
*/
public java.util.List
getLabelsBuilderList() {
return getLabelsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifierLabel, yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifierLabel.Builder, yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifierLabelOrBuilder>
getLabelsFieldBuilder() {
if (labelsBuilder_ == null) {
labelsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifierLabel, yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifierLabel.Builder, yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifierLabelOrBuilder>(
labels_,
((bitField0_ & 0x00000002) != 0),
getParentForChildren(),
isClean());
labels_ = null;
}
return labelsBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:speechkit.stt.v3.RecognitionClassifierResult)
}
// @@protoc_insertion_point(class_scope:speechkit.stt.v3.RecognitionClassifierResult)
private static final yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifierResult DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifierResult();
}
public static yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifierResult getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public RecognitionClassifierResult parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new RecognitionClassifierResult(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifierResult getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface RecognitionClassifierUpdateOrBuilder extends
// @@protoc_insertion_point(interface_extends:speechkit.stt.v3.RecognitionClassifierUpdate)
com.google.protobuf.MessageOrBuilder {
/**
*
* Response window type
*
*
* .speechkit.stt.v3.RecognitionClassifierUpdate.WindowType window_type = 1;
* @return The enum numeric value on the wire for windowType.
*/
int getWindowTypeValue();
/**
*
*
* WINDOW_TYPE_UNSPECIFIED = 0;
*/
public static final int WINDOW_TYPE_UNSPECIFIED_VALUE = 0;
/**
*
* The result of applying the classifier to the last utterance response
*
*
* LAST_UTTERANCE = 1;
*/
public static final int LAST_UTTERANCE_VALUE = 1;
/**
*
* The result of applying the classifier to the last final response
*
*
* LAST_FINAL = 2;
*/
public static final int LAST_FINAL_VALUE = 2;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static WindowType valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static WindowType forNumber(int value) {
switch (value) {
case 0: return WINDOW_TYPE_UNSPECIFIED;
case 1: return LAST_UTTERANCE;
case 2: return LAST_FINAL;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
WindowType> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public WindowType findValueByNumber(int number) {
return WindowType.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifierUpdate.getDescriptor().getEnumTypes().get(0);
}
private static final WindowType[] VALUES = values();
public static WindowType valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private WindowType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:speechkit.stt.v3.RecognitionClassifierUpdate.WindowType)
}
public static final int WINDOW_TYPE_FIELD_NUMBER = 1;
private int windowType_;
/**
*
* Response window type
*
*
* .speechkit.stt.v3.RecognitionClassifierUpdate.WindowType window_type = 1;
* @return The enum numeric value on the wire for windowType.
*/
@java.lang.Override public int getWindowTypeValue() {
return windowType_;
}
/**
*
* Response window type
*
*
* .speechkit.stt.v3.RecognitionClassifierUpdate.WindowType window_type = 1;
* @return The windowType.
*/
@java.lang.Override public yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifierUpdate.WindowType getWindowType() {
@SuppressWarnings("deprecation")
yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifierUpdate.WindowType result = yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifierUpdate.WindowType.valueOf(windowType_);
return result == null ? yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifierUpdate.WindowType.UNRECOGNIZED : result;
}
public static final int START_TIME_MS_FIELD_NUMBER = 2;
private long startTimeMs_;
/**
*
* Start time of the audio segment used for classification
*
*
* int64 start_time_ms = 2;
* @return The startTimeMs.
*/
@java.lang.Override
public long getStartTimeMs() {
return startTimeMs_;
}
public static final int END_TIME_MS_FIELD_NUMBER = 3;
private long endTimeMs_;
/**
*
* End time of the audio segment used for classification
*
*
* int64 end_time_ms = 3;
* @return The endTimeMs.
*/
@java.lang.Override
public long getEndTimeMs() {
return endTimeMs_;
}
public static final int CLASSIFIER_RESULT_FIELD_NUMBER = 4;
private yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifierResult classifierResult_;
/**
*
* Result for dictionary-based classifier
*
*
* .speechkit.stt.v3.RecognitionClassifierResult classifier_result = 4;
* @return Whether the classifierResult field is set.
*/
@java.lang.Override
public boolean hasClassifierResult() {
return classifierResult_ != null;
}
/**
*
*
* .speechkit.stt.v3.RecognitionClassifierResult classifier_result = 4;
*/
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifierResultOrBuilder getClassifierResultOrBuilder() {
return getClassifierResult();
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (windowType_ != yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifierUpdate.WindowType.WINDOW_TYPE_UNSPECIFIED.getNumber()) {
output.writeEnum(1, windowType_);
}
if (startTimeMs_ != 0L) {
output.writeInt64(2, startTimeMs_);
}
if (endTimeMs_ != 0L) {
output.writeInt64(3, endTimeMs_);
}
if (classifierResult_ != null) {
output.writeMessage(4, getClassifierResult());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (windowType_ != yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifierUpdate.WindowType.WINDOW_TYPE_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, windowType_);
}
if (startTimeMs_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(2, startTimeMs_);
}
if (endTimeMs_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(3, endTimeMs_);
}
if (classifierResult_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getClassifierResult());
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifierUpdate)) {
return super.equals(obj);
}
yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifierUpdate other = (yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifierUpdate) obj;
if (windowType_ != other.windowType_) return false;
if (getStartTimeMs()
!= other.getStartTimeMs()) return false;
if (getEndTimeMs()
!= other.getEndTimeMs()) return false;
if (hasClassifierResult() != other.hasClassifierResult()) return false;
if (hasClassifierResult()) {
if (!getClassifierResult()
.equals(other.getClassifierResult())) return false;
}
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + WINDOW_TYPE_FIELD_NUMBER;
hash = (53 * hash) + windowType_;
hash = (37 * hash) + START_TIME_MS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getStartTimeMs());
hash = (37 * hash) + END_TIME_MS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getEndTimeMs());
if (hasClassifierResult()) {
hash = (37 * hash) + CLASSIFIER_RESULT_FIELD_NUMBER;
hash = (53 * hash) + getClassifierResult().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifierUpdate parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifierUpdate parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifierUpdate parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifierUpdate parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifierUpdate parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifierUpdate parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifierUpdate parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifierUpdate parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifierUpdate parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifierUpdate parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifierUpdate parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifierUpdate parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifierUpdate prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code speechkit.stt.v3.RecognitionClassifierUpdate}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:speechkit.stt.v3.RecognitionClassifierUpdate)
yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifierUpdateOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_RecognitionClassifierUpdate_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_RecognitionClassifierUpdate_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifierUpdate.class, yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifierUpdate.Builder.class);
}
// Construct using yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifierUpdate.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
windowType_ = 0;
startTimeMs_ = 0L;
endTimeMs_ = 0L;
if (classifierResultBuilder_ == null) {
classifierResult_ = null;
} else {
classifierResult_ = null;
classifierResultBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.ai.stt.v3.Stt.internal_static_speechkit_stt_v3_RecognitionClassifierUpdate_descriptor;
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifierUpdate getDefaultInstanceForType() {
return yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifierUpdate.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifierUpdate build() {
yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifierUpdate result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifierUpdate buildPartial() {
yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifierUpdate result = new yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifierUpdate(this);
result.windowType_ = windowType_;
result.startTimeMs_ = startTimeMs_;
result.endTimeMs_ = endTimeMs_;
if (classifierResultBuilder_ == null) {
result.classifierResult_ = classifierResult_;
} else {
result.classifierResult_ = classifierResultBuilder_.build();
}
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifierUpdate) {
return mergeFrom((yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifierUpdate)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifierUpdate other) {
if (other == yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifierUpdate.getDefaultInstance()) return this;
if (other.windowType_ != 0) {
setWindowTypeValue(other.getWindowTypeValue());
}
if (other.getStartTimeMs() != 0L) {
setStartTimeMs(other.getStartTimeMs());
}
if (other.getEndTimeMs() != 0L) {
setEndTimeMs(other.getEndTimeMs());
}
if (other.hasClassifierResult()) {
mergeClassifierResult(other.getClassifierResult());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifierUpdate parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifierUpdate) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int windowType_ = 0;
/**
*
* Response window type
*
*
* .speechkit.stt.v3.RecognitionClassifierUpdate.WindowType window_type = 1;
* @return The enum numeric value on the wire for windowType.
*/
@java.lang.Override public int getWindowTypeValue() {
return windowType_;
}
/**
*
* Response window type
*
*
* .speechkit.stt.v3.RecognitionClassifierUpdate.WindowType window_type = 1;
* @param value The enum numeric value on the wire for windowType to set.
* @return This builder for chaining.
*/
public Builder setWindowTypeValue(int value) {
windowType_ = value;
onChanged();
return this;
}
/**
*
* Response window type
*
*
* .speechkit.stt.v3.RecognitionClassifierUpdate.WindowType window_type = 1;
* @return The windowType.
*/
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifierUpdate.WindowType getWindowType() {
@SuppressWarnings("deprecation")
yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifierUpdate.WindowType result = yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifierUpdate.WindowType.valueOf(windowType_);
return result == null ? yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifierUpdate.WindowType.UNRECOGNIZED : result;
}
/**
*
* Response window type
*
*
* .speechkit.stt.v3.RecognitionClassifierUpdate.WindowType window_type = 1;
* @param value The windowType to set.
* @return This builder for chaining.
*/
public Builder setWindowType(yandex.cloud.api.ai.stt.v3.Stt.RecognitionClassifierUpdate.WindowType value) {
if (value == null) {
throw new NullPointerException();
}
windowType_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Response window type
*
*
* .speechkit.stt.v3.RecognitionClassifierUpdate.WindowType window_type = 1;
* @return This builder for chaining.
*/
public Builder clearWindowType() {
windowType_ = 0;
onChanged();
return this;
}
private long startTimeMs_ ;
/**
*
* Start time of the audio segment used for classification
*
*
* int64 start_time_ms = 2;
* @return The startTimeMs.
*/
@java.lang.Override
public long getStartTimeMs() {
return startTimeMs_;
}
/**
*
* Start time of the audio segment used for classification
*
*
* int64 start_time_ms = 2;
* @param value The startTimeMs to set.
* @return This builder for chaining.
*/
public Builder setStartTimeMs(long value) {
startTimeMs_ = value;
onChanged();
return this;
}
/**
*
* Start time of the audio segment used for classification
*
*
* int64 start_time_ms = 2;
* @return This builder for chaining.
*/
public Builder clearStartTimeMs() {
startTimeMs_ = 0L;
onChanged();
return this;
}
private long endTimeMs_ ;
/**
*
* End time of the audio segment used for classification
*
*
* int64 end_time_ms = 3;
* @return The endTimeMs.
*/
@java.lang.Override
public long getEndTimeMs() {
return endTimeMs_;
}
/**
*
* End time of the audio segment used for classification
*
*
* int64 end_time_ms = 3;
* @param value The endTimeMs to set.
* @return This builder for chaining.
*/
public Builder setEndTimeMs(long value) {
endTimeMs_ = value;
onChanged();
return this;
}
/**
*
* End time of the audio segment used for classification
*
*
* double level = 1;
* @param value The level to set.
* @return This builder for chaining.
*/
public Builder setLevel(double value) {
level_ = value;
onChanged();
return this;
}
/**
*
* Quantile level in range (0, 1)
*
*
* double level = 1;
* @return This builder for chaining.
*/
public Builder clearLevel() {
level_ = 0D;
onChanged();
return this;
}
private double value_ ;
/**
*
* Quantile value
*
*
* double value = 2;
* @return The value.
*/
@java.lang.Override
public double getValue() {
return value_;
}
/**
*
* Quantile value
*
*
* double value = 2;
* @param value The value to set.
* @return This builder for chaining.
*/
public Builder setValue(double value) {
value_ = value;
onChanged();
return this;
}
/**
*
* Quantile value
*
*
* double value = 2;
* @return This builder for chaining.
*/
public Builder clearValue() {
value_ = 0D;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:speechkit.stt.v3.DescriptiveStatistics.Quantile)
}
// @@protoc_insertion_point(class_scope:speechkit.stt.v3.DescriptiveStatistics.Quantile)
private static final yandex.cloud.api.ai.stt.v3.Stt.DescriptiveStatistics.Quantile DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.ai.stt.v3.Stt.DescriptiveStatistics.Quantile();
}
public static yandex.cloud.api.ai.stt.v3.Stt.DescriptiveStatistics.Quantile getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Quantile parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Quantile(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public yandex.cloud.api.ai.stt.v3.Stt.DescriptiveStatistics.Quantile getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int MIN_FIELD_NUMBER = 1;
private double min_;
/**
*
* Minimum observed value
*
*
* double min = 1;
* @return The min.
*/
@java.lang.Override
public double getMin() {
return min_;
}
public static final int MAX_FIELD_NUMBER = 2;
private double max_;
/**
*
* Maximum observed value
*
*
* double max = 2;
* @return The max.
*/
@java.lang.Override
public double getMax() {
return max_;
}
public static final int MEAN_FIELD_NUMBER = 3;
private double mean_;
/**
*
* Estimated mean of distribution
*
*
* double mean = 3;
* @return The mean.
*/
@java.lang.Override
public double getMean() {
return mean_;
}
public static final int STD_FIELD_NUMBER = 4;
private double std_;
/**
*
* Estimated standard deviation of distribution
*
*
* double std = 4;
* @return The std.
*/
@java.lang.Override
public double getStd() {
return std_;
}
public static final int QUANTILES_FIELD_NUMBER = 5;
private java.util.List quantiles_;
/**
*