/** * * * <pre> * Output only. Sequential list of transcription results corresponding to * sequential portions of audio. * </pre> * * <code>repeated .google.cloud.speech.v1.SpeechRecognitionResult results = 2;</code> */ public Builder addResults( int index, com.google.cloud.speech.v1.SpeechRecognitionResult.Builder builderForValue) { if (resultsBuilder_ == null) { ensureResultsIsMutable(); results_.add(index, builderForValue.build()); onChanged(); } else { resultsBuilder_.addMessage(index, builderForValue.build()); } return this; } /**
bitField0_ = (bitField0_ & ~0x00000001); } else { ensureAlternativesIsMutable(); alternatives_.addAll(other.alternatives_); onChanged(); alternativesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getAlternativesFieldBuilder() : null; } else { setChannelTag(other.getChannelTag()); this.mergeUnknownFields(other.unknownFields); onChanged(); return this;
private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.speech.v1.SpeechRecognitionAlternative, com.google.cloud.speech.v1.SpeechRecognitionAlternative.Builder, com.google.cloud.speech.v1.SpeechRecognitionAlternativeOrBuilder> getAlternativesFieldBuilder() { if (alternativesBuilder_ == null) { alternativesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.speech.v1.SpeechRecognitionAlternative, com.google.cloud.speech.v1.SpeechRecognitionAlternative.Builder, com.google.cloud.speech.v1.SpeechRecognitionAlternativeOrBuilder>( alternatives_, ((bitField0_ & 0x00000001) == 0x00000001), getParentForChildren(), isClean()); alternatives_ = null; } return alternativesBuilder_; }
/** * * * <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 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 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 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 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 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; } /**
/** * * * <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; } /**
/** * * * <pre> * Output only. Sequential list of transcription results corresponding to * sequential portions of audio. * </pre> * * <code>repeated .google.cloud.speech.v1.SpeechRecognitionResult results = 2;</code> */ public Builder addResults( int index, com.google.cloud.speech.v1.SpeechRecognitionResult.Builder builderForValue) { if (resultsBuilder_ == null) { ensureResultsIsMutable(); results_.add(index, builderForValue.build()); onChanged(); } else { resultsBuilder_.addMessage(index, builderForValue.build()); } return this; } /**
/** * * * <pre> * Output only. Sequential list of transcription results corresponding to * sequential portions of audio. * </pre> * * <code>repeated .google.cloud.speech.v1.SpeechRecognitionResult results = 2;</code> */ public Builder addResults( com.google.cloud.speech.v1.SpeechRecognitionResult.Builder builderForValue) { if (resultsBuilder_ == null) { ensureResultsIsMutable(); results_.add(builderForValue.build()); onChanged(); } else { resultsBuilder_.addMessage(builderForValue.build()); } return this; } /**
/** * * * <pre> * Output only. Sequential list of transcription results corresponding to * sequential portions of audio. * </pre> * * <code>repeated .google.cloud.speech.v1.SpeechRecognitionResult results = 2;</code> */ public Builder setResults( int index, com.google.cloud.speech.v1.SpeechRecognitionResult.Builder builderForValue) { if (resultsBuilder_ == null) { ensureResultsIsMutable(); results_.set(index, builderForValue.build()); onChanged(); } else { resultsBuilder_.setMessage(index, builderForValue.build()); } return this; } /**
/** * * * <pre> * Output only. Sequential list of transcription results corresponding to * sequential portions of audio. * </pre> * * <code>repeated .google.cloud.speech.v1.SpeechRecognitionResult results = 2;</code> */ public Builder setResults( int index, com.google.cloud.speech.v1.SpeechRecognitionResult.Builder builderForValue) { if (resultsBuilder_ == null) { ensureResultsIsMutable(); results_.set(index, builderForValue.build()); onChanged(); } else { resultsBuilder_.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. Sequential list of transcription results corresponding to * sequential portions of audio. * </pre> * * <code>repeated .google.cloud.speech.v1.SpeechRecognitionResult results = 2;</code> */ public Builder addResults( com.google.cloud.speech.v1.SpeechRecognitionResult.Builder builderForValue) { if (resultsBuilder_ == null) { ensureResultsIsMutable(); results_.add(builderForValue.build()); onChanged(); } else { resultsBuilder_.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 com.google.cloud.speech.v1.SpeechRecognitionAlternative.Builder addAlternativesBuilder( int index) { return getAlternativesFieldBuilder() .addBuilder( index, com.google.cloud.speech.v1.SpeechRecognitionAlternative.getDefaultInstance()); } /**
@java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.google.cloud.speech.v1.SpeechRecognitionResult parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.cloud.speech.v1.SpeechRecognitionResult) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } 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 com.google.cloud.speech.v1.SpeechRecognitionAlternative.Builder getAlternativesBuilder( int index) { return getAlternativesFieldBuilder().getBuilder(index); } /**
/** * * * <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 java.util.List<com.google.cloud.speech.v1.SpeechRecognitionAlternative.Builder> getAlternativesBuilderList() { return getAlternativesFieldBuilder().getBuilderList(); }