/** * * * <pre> * Output only. May contain one or more recognition hypotheses (up to the * maximum specified in `max_alternatives`). * These alternatives are ordered in terms of accuracy, with the top (first) * alternative being the most probable, as ranked by the recognizer. * </pre> * * <code>repeated .google.cloud.speech.v1.SpeechRecognitionAlternative alternatives = 1;</code> */ public Builder addAlternatives(com.google.cloud.speech.v1.SpeechRecognitionAlternative value) { if (alternativesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureAlternativesIsMutable(); alternatives_.add(value); onChanged(); } else { alternativesBuilder_.addMessage(value); } return this; } /**
/** * * * <pre> * Output only. May contain one or more recognition hypotheses (up to the * maximum specified in `max_alternatives`). * These alternatives are ordered in terms of accuracy, with the top (first) * alternative being the most probable, as ranked by the recognizer. * </pre> * * <code>repeated .google.cloud.speech.v1.SpeechRecognitionAlternative alternatives = 1;</code> */ public Builder addAlternatives( int index, com.google.cloud.speech.v1.SpeechRecognitionAlternative value) { if (alternativesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureAlternativesIsMutable(); alternatives_.add(index, value); onChanged(); } else { alternativesBuilder_.addMessage(index, value); } return this; } /**
/** * * * <pre> * Output only. May contain one or more recognition hypotheses (up to the * maximum specified in `max_alternatives`). * These alternatives are ordered in terms of accuracy, with the top (first) * alternative being the most probable, as ranked by the recognizer. * </pre> * * <code>repeated .google.cloud.speech.v1.SpeechRecognitionAlternative alternatives = 1;</code> */ public Builder setAlternatives( int index, com.google.cloud.speech.v1.SpeechRecognitionAlternative value) { if (alternativesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureAlternativesIsMutable(); alternatives_.set(index, value); onChanged(); } else { alternativesBuilder_.setMessage(index, value); } return this; } /**
bitField0_ = (bitField0_ & ~0x00000001); } else { ensureAlternativesIsMutable(); alternatives_.addAll(other.alternatives_);
/** * * * <pre> * Output only. May contain one or more recognition hypotheses (up to the * maximum specified in `max_alternatives`). * These alternatives are ordered in terms of accuracy, with the top (first) * alternative being the most probable, as ranked by the recognizer. * </pre> * * <code>repeated .google.cloud.speech.v1.SpeechRecognitionAlternative alternatives = 1;</code> */ public Builder setAlternatives( int index, com.google.cloud.speech.v1.SpeechRecognitionAlternative.Builder builderForValue) { if (alternativesBuilder_ == null) { ensureAlternativesIsMutable(); alternatives_.set(index, builderForValue.build()); onChanged(); } else { alternativesBuilder_.setMessage(index, builderForValue.build()); } return this; } /**
/** * * * <pre> * Output only. May contain one or more recognition hypotheses (up to the * maximum specified in `max_alternatives`). * These alternatives are ordered in terms of accuracy, with the top (first) * alternative being the most probable, as ranked by the recognizer. * </pre> * * <code>repeated .google.cloud.speech.v1.SpeechRecognitionAlternative alternatives = 1;</code> */ public Builder addAlternatives( com.google.cloud.speech.v1.SpeechRecognitionAlternative.Builder builderForValue) { if (alternativesBuilder_ == null) { ensureAlternativesIsMutable(); alternatives_.add(builderForValue.build()); onChanged(); } else { alternativesBuilder_.addMessage(builderForValue.build()); } return this; } /**
/** * * * <pre> * Output only. May contain one or more recognition hypotheses (up to the * maximum specified in `max_alternatives`). * These alternatives are ordered in terms of accuracy, with the top (first) * alternative being the most probable, as ranked by the recognizer. * </pre> * * <code>repeated .google.cloud.speech.v1.SpeechRecognitionAlternative alternatives = 1;</code> */ public Builder removeAlternatives(int index) { if (alternativesBuilder_ == null) { ensureAlternativesIsMutable(); alternatives_.remove(index); onChanged(); } else { alternativesBuilder_.remove(index); } return this; } /**
/** * * * <pre> * Output only. May contain one or more recognition hypotheses (up to the * maximum specified in `max_alternatives`). * These alternatives are ordered in terms of accuracy, with the top (first) * alternative being the most probable, as ranked by the recognizer. * </pre> * * <code>repeated .google.cloud.speech.v1.SpeechRecognitionAlternative alternatives = 1;</code> */ public Builder addAllAlternatives( java.lang.Iterable<? extends com.google.cloud.speech.v1.SpeechRecognitionAlternative> values) { if (alternativesBuilder_ == null) { ensureAlternativesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, alternatives_); onChanged(); } else { alternativesBuilder_.addAllMessages(values); } return this; } /**
/** * * * <pre> * Output only. May contain one or more recognition hypotheses (up to the * maximum specified in `max_alternatives`). * These alternatives are ordered in terms of accuracy, with the top (first) * alternative being the most probable, as ranked by the recognizer. * </pre> * * <code>repeated .google.cloud.speech.v1.SpeechRecognitionAlternative alternatives = 1;</code> */ public Builder addAlternatives( int index, com.google.cloud.speech.v1.SpeechRecognitionAlternative.Builder builderForValue) { if (alternativesBuilder_ == null) { ensureAlternativesIsMutable(); alternatives_.add(index, builderForValue.build()); onChanged(); } else { alternativesBuilder_.addMessage(index, builderForValue.build()); } return this; } /**