All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.cloud.videointelligence.v1p1beta1.SpeechTranscriptionConfig Maven / Gradle / Ivy

There is a newer version: 0.143.0
Show newest version
/*
 * Copyright 2024 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/cloud/videointelligence/v1p1beta1/video_intelligence.proto

// Protobuf Java Version: 3.25.5
package com.google.cloud.videointelligence.v1p1beta1;

/**
 *
 *
 * 
 * Config for SPEECH_TRANSCRIPTION.
 * 
* * Protobuf type {@code google.cloud.videointelligence.v1p1beta1.SpeechTranscriptionConfig} */ public final class SpeechTranscriptionConfig extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.videointelligence.v1p1beta1.SpeechTranscriptionConfig) SpeechTranscriptionConfigOrBuilder { private static final long serialVersionUID = 0L; // Use SpeechTranscriptionConfig.newBuilder() to construct. private SpeechTranscriptionConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private SpeechTranscriptionConfig() { languageCode_ = ""; speechContexts_ = java.util.Collections.emptyList(); audioTracks_ = emptyIntList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new SpeechTranscriptionConfig(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.videointelligence.v1p1beta1.VideoIntelligenceServiceProto .internal_static_google_cloud_videointelligence_v1p1beta1_SpeechTranscriptionConfig_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.videointelligence.v1p1beta1.VideoIntelligenceServiceProto .internal_static_google_cloud_videointelligence_v1p1beta1_SpeechTranscriptionConfig_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.videointelligence.v1p1beta1.SpeechTranscriptionConfig.class, com.google.cloud.videointelligence.v1p1beta1.SpeechTranscriptionConfig.Builder.class); } public static final int LANGUAGE_CODE_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object languageCode_ = ""; /** * * *
   * Required. *Required* The language of the supplied audio as a
   * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
   * Example: "en-US".
   * See [Language Support](https://cloud.google.com/speech/docs/languages)
   * for a list of the currently supported language codes.
   * 
* * string language_code = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The languageCode. */ @java.lang.Override public java.lang.String getLanguageCode() { java.lang.Object ref = languageCode_; 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(); languageCode_ = s; return s; } } /** * * *
   * Required. *Required* The language of the supplied audio as a
   * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
   * Example: "en-US".
   * See [Language Support](https://cloud.google.com/speech/docs/languages)
   * for a list of the currently supported language codes.
   * 
* * string language_code = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for languageCode. */ @java.lang.Override public com.google.protobuf.ByteString getLanguageCodeBytes() { java.lang.Object ref = languageCode_; if (ref instanceof java.lang.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; } } public static final int MAX_ALTERNATIVES_FIELD_NUMBER = 2; private int maxAlternatives_ = 0; /** * * *
   * Optional. Maximum number of recognition hypotheses to be returned.
   * Specifically, the maximum number of `SpeechRecognitionAlternative` messages
   * within each `SpeechTranscription`. The server may return fewer than
   * `max_alternatives`. Valid values are `0`-`30`. A value of `0` or `1` will
   * return a maximum of one. If omitted, will return a maximum of one.
   * 
* * int32 max_alternatives = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The maxAlternatives. */ @java.lang.Override public int getMaxAlternatives() { return maxAlternatives_; } public static final int FILTER_PROFANITY_FIELD_NUMBER = 3; private boolean filterProfanity_ = false; /** * * *
   * Optional. If set to `true`, the server will attempt to filter out
   * profanities, replacing all but the initial character in each filtered word
   * with asterisks, e.g. "f***". If set to `false` or omitted, profanities
   * won't be filtered out.
   * 
* * bool filter_profanity = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The filterProfanity. */ @java.lang.Override public boolean getFilterProfanity() { return filterProfanity_; } public static final int SPEECH_CONTEXTS_FIELD_NUMBER = 4; @SuppressWarnings("serial") private java.util.List speechContexts_; /** * * *
   * Optional. A means to provide context to assist the speech recognition.
   * 
* * * repeated .google.cloud.videointelligence.v1p1beta1.SpeechContext speech_contexts = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override public java.util.List getSpeechContextsList() { return speechContexts_; } /** * * *
   * Optional. A means to provide context to assist the speech recognition.
   * 
* * * repeated .google.cloud.videointelligence.v1p1beta1.SpeechContext speech_contexts = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override public java.util.List< ? extends com.google.cloud.videointelligence.v1p1beta1.SpeechContextOrBuilder> getSpeechContextsOrBuilderList() { return speechContexts_; } /** * * *
   * Optional. A means to provide context to assist the speech recognition.
   * 
* * * repeated .google.cloud.videointelligence.v1p1beta1.SpeechContext speech_contexts = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override public int getSpeechContextsCount() { return speechContexts_.size(); } /** * * *
   * Optional. A means to provide context to assist the speech recognition.
   * 
* * * repeated .google.cloud.videointelligence.v1p1beta1.SpeechContext speech_contexts = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override public com.google.cloud.videointelligence.v1p1beta1.SpeechContext getSpeechContexts(int index) { return speechContexts_.get(index); } /** * * *
   * Optional. A means to provide context to assist the speech recognition.
   * 
* * * repeated .google.cloud.videointelligence.v1p1beta1.SpeechContext speech_contexts = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override public com.google.cloud.videointelligence.v1p1beta1.SpeechContextOrBuilder getSpeechContextsOrBuilder(int index) { return speechContexts_.get(index); } public static final int ENABLE_AUTOMATIC_PUNCTUATION_FIELD_NUMBER = 5; private boolean enableAutomaticPunctuation_ = false; /** * * *
   * Optional. If 'true', adds punctuation to recognition result hypotheses.
   * This feature is only available in select languages. Setting this for
   * requests in other languages has no effect at all. The default 'false' value
   * does not add punctuation to result hypotheses. NOTE: "This is currently
   * offered as an experimental service, complimentary to all users. In the
   * future this may be exclusively available as a premium feature."
   * 
* * bool enable_automatic_punctuation = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return The enableAutomaticPunctuation. */ @java.lang.Override public boolean getEnableAutomaticPunctuation() { return enableAutomaticPunctuation_; } public static final int AUDIO_TRACKS_FIELD_NUMBER = 6; @SuppressWarnings("serial") private com.google.protobuf.Internal.IntList audioTracks_ = emptyIntList(); /** * * *
   * Optional. For file formats, such as MXF or MKV, supporting multiple audio
   * tracks, specify up to two tracks. Default: track 0.
   * 
* * repeated int32 audio_tracks = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @return A list containing the audioTracks. */ @java.lang.Override public java.util.List getAudioTracksList() { return audioTracks_; } /** * * *
   * Optional. For file formats, such as MXF or MKV, supporting multiple audio
   * tracks, specify up to two tracks. Default: track 0.
   * 
* * repeated int32 audio_tracks = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @return The count of audioTracks. */ public int getAudioTracksCount() { return audioTracks_.size(); } /** * * *
   * Optional. For file formats, such as MXF or MKV, supporting multiple audio
   * tracks, specify up to two tracks. Default: track 0.
   * 
* * repeated int32 audio_tracks = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index of the element to return. * @return The audioTracks at the given index. */ public int getAudioTracks(int index) { return audioTracks_.getInt(index); } private int audioTracksMemoizedSerializedSize = -1; 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(languageCode_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, languageCode_); } if (maxAlternatives_ != 0) { output.writeInt32(2, maxAlternatives_); } if (filterProfanity_ != false) { output.writeBool(3, filterProfanity_); } for (int i = 0; i < speechContexts_.size(); i++) { output.writeMessage(4, speechContexts_.get(i)); } if (enableAutomaticPunctuation_ != false) { output.writeBool(5, enableAutomaticPunctuation_); } if (getAudioTracksList().size() > 0) { output.writeUInt32NoTag(50); output.writeUInt32NoTag(audioTracksMemoizedSerializedSize); } for (int i = 0; i < audioTracks_.size(); i++) { output.writeInt32NoTag(audioTracks_.getInt(i)); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, languageCode_); } if (maxAlternatives_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, maxAlternatives_); } if (filterProfanity_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, filterProfanity_); } for (int i = 0; i < speechContexts_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, speechContexts_.get(i)); } if (enableAutomaticPunctuation_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, enableAutomaticPunctuation_); } { int dataSize = 0; for (int i = 0; i < audioTracks_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(audioTracks_.getInt(i)); } size += dataSize; if (!getAudioTracksList().isEmpty()) { size += 1; size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); } audioTracksMemoizedSerializedSize = dataSize; } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.cloud.videointelligence.v1p1beta1.SpeechTranscriptionConfig)) { return super.equals(obj); } com.google.cloud.videointelligence.v1p1beta1.SpeechTranscriptionConfig other = (com.google.cloud.videointelligence.v1p1beta1.SpeechTranscriptionConfig) obj; if (!getLanguageCode().equals(other.getLanguageCode())) return false; if (getMaxAlternatives() != other.getMaxAlternatives()) return false; if (getFilterProfanity() != other.getFilterProfanity()) return false; if (!getSpeechContextsList().equals(other.getSpeechContextsList())) return false; if (getEnableAutomaticPunctuation() != other.getEnableAutomaticPunctuation()) return false; if (!getAudioTracksList().equals(other.getAudioTracksList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) 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) + LANGUAGE_CODE_FIELD_NUMBER; hash = (53 * hash) + getLanguageCode().hashCode(); hash = (37 * hash) + MAX_ALTERNATIVES_FIELD_NUMBER; hash = (53 * hash) + getMaxAlternatives(); hash = (37 * hash) + FILTER_PROFANITY_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getFilterProfanity()); if (getSpeechContextsCount() > 0) { hash = (37 * hash) + SPEECH_CONTEXTS_FIELD_NUMBER; hash = (53 * hash) + getSpeechContextsList().hashCode(); } hash = (37 * hash) + ENABLE_AUTOMATIC_PUNCTUATION_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableAutomaticPunctuation()); if (getAudioTracksCount() > 0) { hash = (37 * hash) + AUDIO_TRACKS_FIELD_NUMBER; hash = (53 * hash) + getAudioTracksList().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.videointelligence.v1p1beta1.SpeechTranscriptionConfig parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.videointelligence.v1p1beta1.SpeechTranscriptionConfig parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.videointelligence.v1p1beta1.SpeechTranscriptionConfig parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.videointelligence.v1p1beta1.SpeechTranscriptionConfig parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.videointelligence.v1p1beta1.SpeechTranscriptionConfig parseFrom( byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.videointelligence.v1p1beta1.SpeechTranscriptionConfig parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.videointelligence.v1p1beta1.SpeechTranscriptionConfig parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.videointelligence.v1p1beta1.SpeechTranscriptionConfig 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 com.google.cloud.videointelligence.v1p1beta1.SpeechTranscriptionConfig parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.videointelligence.v1p1beta1.SpeechTranscriptionConfig 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 com.google.cloud.videointelligence.v1p1beta1.SpeechTranscriptionConfig parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.videointelligence.v1p1beta1.SpeechTranscriptionConfig 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( com.google.cloud.videointelligence.v1p1beta1.SpeechTranscriptionConfig 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; } /** * * *
   * Config for SPEECH_TRANSCRIPTION.
   * 
* * Protobuf type {@code google.cloud.videointelligence.v1p1beta1.SpeechTranscriptionConfig} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.videointelligence.v1p1beta1.SpeechTranscriptionConfig) com.google.cloud.videointelligence.v1p1beta1.SpeechTranscriptionConfigOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.videointelligence.v1p1beta1.VideoIntelligenceServiceProto .internal_static_google_cloud_videointelligence_v1p1beta1_SpeechTranscriptionConfig_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.videointelligence.v1p1beta1.VideoIntelligenceServiceProto .internal_static_google_cloud_videointelligence_v1p1beta1_SpeechTranscriptionConfig_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.videointelligence.v1p1beta1.SpeechTranscriptionConfig.class, com.google.cloud.videointelligence.v1p1beta1.SpeechTranscriptionConfig.Builder.class); } // Construct using // com.google.cloud.videointelligence.v1p1beta1.SpeechTranscriptionConfig.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; languageCode_ = ""; maxAlternatives_ = 0; filterProfanity_ = false; if (speechContextsBuilder_ == null) { speechContexts_ = java.util.Collections.emptyList(); } else { speechContexts_ = null; speechContextsBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000008); enableAutomaticPunctuation_ = false; audioTracks_ = emptyIntList(); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.videointelligence.v1p1beta1.VideoIntelligenceServiceProto .internal_static_google_cloud_videointelligence_v1p1beta1_SpeechTranscriptionConfig_descriptor; } @java.lang.Override public com.google.cloud.videointelligence.v1p1beta1.SpeechTranscriptionConfig getDefaultInstanceForType() { return com.google.cloud.videointelligence.v1p1beta1.SpeechTranscriptionConfig .getDefaultInstance(); } @java.lang.Override public com.google.cloud.videointelligence.v1p1beta1.SpeechTranscriptionConfig build() { com.google.cloud.videointelligence.v1p1beta1.SpeechTranscriptionConfig result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.videointelligence.v1p1beta1.SpeechTranscriptionConfig buildPartial() { com.google.cloud.videointelligence.v1p1beta1.SpeechTranscriptionConfig result = new com.google.cloud.videointelligence.v1p1beta1.SpeechTranscriptionConfig(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartialRepeatedFields( com.google.cloud.videointelligence.v1p1beta1.SpeechTranscriptionConfig result) { if (speechContextsBuilder_ == null) { if (((bitField0_ & 0x00000008) != 0)) { speechContexts_ = java.util.Collections.unmodifiableList(speechContexts_); bitField0_ = (bitField0_ & ~0x00000008); } result.speechContexts_ = speechContexts_; } else { result.speechContexts_ = speechContextsBuilder_.build(); } } private void buildPartial0( com.google.cloud.videointelligence.v1p1beta1.SpeechTranscriptionConfig result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.languageCode_ = languageCode_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.maxAlternatives_ = maxAlternatives_; } if (((from_bitField0_ & 0x00000004) != 0)) { result.filterProfanity_ = filterProfanity_; } if (((from_bitField0_ & 0x00000010) != 0)) { result.enableAutomaticPunctuation_ = enableAutomaticPunctuation_; } if (((from_bitField0_ & 0x00000020) != 0)) { audioTracks_.makeImmutable(); result.audioTracks_ = audioTracks_; } } @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 com.google.cloud.videointelligence.v1p1beta1.SpeechTranscriptionConfig) { return mergeFrom( (com.google.cloud.videointelligence.v1p1beta1.SpeechTranscriptionConfig) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom( com.google.cloud.videointelligence.v1p1beta1.SpeechTranscriptionConfig other) { if (other == com.google.cloud.videointelligence.v1p1beta1.SpeechTranscriptionConfig .getDefaultInstance()) return this; if (!other.getLanguageCode().isEmpty()) { languageCode_ = other.languageCode_; bitField0_ |= 0x00000001; onChanged(); } if (other.getMaxAlternatives() != 0) { setMaxAlternatives(other.getMaxAlternatives()); } if (other.getFilterProfanity() != false) { setFilterProfanity(other.getFilterProfanity()); } if (speechContextsBuilder_ == null) { if (!other.speechContexts_.isEmpty()) { if (speechContexts_.isEmpty()) { speechContexts_ = other.speechContexts_; bitField0_ = (bitField0_ & ~0x00000008); } else { ensureSpeechContextsIsMutable(); speechContexts_.addAll(other.speechContexts_); } onChanged(); } } else { if (!other.speechContexts_.isEmpty()) { if (speechContextsBuilder_.isEmpty()) { speechContextsBuilder_.dispose(); speechContextsBuilder_ = null; speechContexts_ = other.speechContexts_; bitField0_ = (bitField0_ & ~0x00000008); speechContextsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getSpeechContextsFieldBuilder() : null; } else { speechContextsBuilder_.addAllMessages(other.speechContexts_); } } } if (other.getEnableAutomaticPunctuation() != false) { setEnableAutomaticPunctuation(other.getEnableAutomaticPunctuation()); } if (!other.audioTracks_.isEmpty()) { if (audioTracks_.isEmpty()) { audioTracks_ = other.audioTracks_; audioTracks_.makeImmutable(); bitField0_ |= 0x00000020; } else { ensureAudioTracksIsMutable(); audioTracks_.addAll(other.audioTracks_); } onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); 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 { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { languageCode_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 case 16: { maxAlternatives_ = input.readInt32(); bitField0_ |= 0x00000002; break; } // case 16 case 24: { filterProfanity_ = input.readBool(); bitField0_ |= 0x00000004; break; } // case 24 case 34: { com.google.cloud.videointelligence.v1p1beta1.SpeechContext m = input.readMessage( com.google.cloud.videointelligence.v1p1beta1.SpeechContext.parser(), extensionRegistry); if (speechContextsBuilder_ == null) { ensureSpeechContextsIsMutable(); speechContexts_.add(m); } else { speechContextsBuilder_.addMessage(m); } break; } // case 34 case 40: { enableAutomaticPunctuation_ = input.readBool(); bitField0_ |= 0x00000010; break; } // case 40 case 48: { int v = input.readInt32(); ensureAudioTracksIsMutable(); audioTracks_.addInt(v); break; } // case 48 case 50: { int length = input.readRawVarint32(); int limit = input.pushLimit(length); ensureAudioTracksIsMutable(); while (input.getBytesUntilLimit() > 0) { audioTracks_.addInt(input.readInt32()); } input.popLimit(limit); break; } // case 50 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private java.lang.Object languageCode_ = ""; /** * * *
     * Required. *Required* The language of the supplied audio as a
     * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
     * Example: "en-US".
     * See [Language Support](https://cloud.google.com/speech/docs/languages)
     * for a list of the currently supported language codes.
     * 
* * string language_code = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The languageCode. */ public java.lang.String getLanguageCode() { java.lang.Object ref = languageCode_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); languageCode_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * Required. *Required* The language of the supplied audio as a
     * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
     * Example: "en-US".
     * See [Language Support](https://cloud.google.com/speech/docs/languages)
     * for a list of the currently supported language codes.
     * 
* * string language_code = 1 [(.google.api.field_behavior) = REQUIRED]; * * @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; } } /** * * *
     * Required. *Required* The language of the supplied audio as a
     * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
     * Example: "en-US".
     * See [Language Support](https://cloud.google.com/speech/docs/languages)
     * for a list of the currently supported language codes.
     * 
* * string language_code = 1 [(.google.api.field_behavior) = REQUIRED]; * * @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; bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
     * Required. *Required* The language of the supplied audio as a
     * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
     * Example: "en-US".
     * See [Language Support](https://cloud.google.com/speech/docs/languages)
     * for a list of the currently supported language codes.
     * 
* * string language_code = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return This builder for chaining. */ public Builder clearLanguageCode() { languageCode_ = getDefaultInstance().getLanguageCode(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * * *
     * Required. *Required* The language of the supplied audio as a
     * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
     * Example: "en-US".
     * See [Language Support](https://cloud.google.com/speech/docs/languages)
     * for a list of the currently supported language codes.
     * 
* * string language_code = 1 [(.google.api.field_behavior) = REQUIRED]; * * @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; bitField0_ |= 0x00000001; onChanged(); return this; } private int maxAlternatives_; /** * * *
     * Optional. Maximum number of recognition hypotheses to be returned.
     * Specifically, the maximum number of `SpeechRecognitionAlternative` messages
     * within each `SpeechTranscription`. The server may return fewer than
     * `max_alternatives`. Valid values are `0`-`30`. A value of `0` or `1` will
     * return a maximum of one. If omitted, will return a maximum of one.
     * 
* * int32 max_alternatives = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The maxAlternatives. */ @java.lang.Override public int getMaxAlternatives() { return maxAlternatives_; } /** * * *
     * Optional. Maximum number of recognition hypotheses to be returned.
     * Specifically, the maximum number of `SpeechRecognitionAlternative` messages
     * within each `SpeechTranscription`. The server may return fewer than
     * `max_alternatives`. Valid values are `0`-`30`. A value of `0` or `1` will
     * return a maximum of one. If omitted, will return a maximum of one.
     * 
* * int32 max_alternatives = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The maxAlternatives to set. * @return This builder for chaining. */ public Builder setMaxAlternatives(int value) { maxAlternatives_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
     * Optional. Maximum number of recognition hypotheses to be returned.
     * Specifically, the maximum number of `SpeechRecognitionAlternative` messages
     * within each `SpeechTranscription`. The server may return fewer than
     * `max_alternatives`. Valid values are `0`-`30`. A value of `0` or `1` will
     * return a maximum of one. If omitted, will return a maximum of one.
     * 
* * int32 max_alternatives = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ public Builder clearMaxAlternatives() { bitField0_ = (bitField0_ & ~0x00000002); maxAlternatives_ = 0; onChanged(); return this; } private boolean filterProfanity_; /** * * *
     * Optional. If set to `true`, the server will attempt to filter out
     * profanities, replacing all but the initial character in each filtered word
     * with asterisks, e.g. "f***". If set to `false` or omitted, profanities
     * won't be filtered out.
     * 
* * bool filter_profanity = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The filterProfanity. */ @java.lang.Override public boolean getFilterProfanity() { return filterProfanity_; } /** * * *
     * Optional. If set to `true`, the server will attempt to filter out
     * profanities, replacing all but the initial character in each filtered word
     * with asterisks, e.g. "f***". If set to `false` or omitted, profanities
     * won't be filtered out.
     * 
* * bool filter_profanity = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The filterProfanity to set. * @return This builder for chaining. */ public Builder setFilterProfanity(boolean value) { filterProfanity_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
     * Optional. If set to `true`, the server will attempt to filter out
     * profanities, replacing all but the initial character in each filtered word
     * with asterisks, e.g. "f***". If set to `false` or omitted, profanities
     * won't be filtered out.
     * 
* * bool filter_profanity = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ public Builder clearFilterProfanity() { bitField0_ = (bitField0_ & ~0x00000004); filterProfanity_ = false; onChanged(); return this; } private java.util.List speechContexts_ = java.util.Collections.emptyList(); private void ensureSpeechContextsIsMutable() { if (!((bitField0_ & 0x00000008) != 0)) { speechContexts_ = new java.util.ArrayList( speechContexts_); bitField0_ |= 0x00000008; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.videointelligence.v1p1beta1.SpeechContext, com.google.cloud.videointelligence.v1p1beta1.SpeechContext.Builder, com.google.cloud.videointelligence.v1p1beta1.SpeechContextOrBuilder> speechContextsBuilder_; /** * * *
     * Optional. A means to provide context to assist the speech recognition.
     * 
* * * repeated .google.cloud.videointelligence.v1p1beta1.SpeechContext speech_contexts = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ public java.util.List getSpeechContextsList() { if (speechContextsBuilder_ == null) { return java.util.Collections.unmodifiableList(speechContexts_); } else { return speechContextsBuilder_.getMessageList(); } } /** * * *
     * Optional. A means to provide context to assist the speech recognition.
     * 
* * * repeated .google.cloud.videointelligence.v1p1beta1.SpeechContext speech_contexts = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ public int getSpeechContextsCount() { if (speechContextsBuilder_ == null) { return speechContexts_.size(); } else { return speechContextsBuilder_.getCount(); } } /** * * *
     * Optional. A means to provide context to assist the speech recognition.
     * 
* * * repeated .google.cloud.videointelligence.v1p1beta1.SpeechContext speech_contexts = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.cloud.videointelligence.v1p1beta1.SpeechContext getSpeechContexts(int index) { if (speechContextsBuilder_ == null) { return speechContexts_.get(index); } else { return speechContextsBuilder_.getMessage(index); } } /** * * *
     * Optional. A means to provide context to assist the speech recognition.
     * 
* * * repeated .google.cloud.videointelligence.v1p1beta1.SpeechContext speech_contexts = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder setSpeechContexts( int index, com.google.cloud.videointelligence.v1p1beta1.SpeechContext value) { if (speechContextsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureSpeechContextsIsMutable(); speechContexts_.set(index, value); onChanged(); } else { speechContextsBuilder_.setMessage(index, value); } return this; } /** * * *
     * Optional. A means to provide context to assist the speech recognition.
     * 
* * * repeated .google.cloud.videointelligence.v1p1beta1.SpeechContext speech_contexts = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder setSpeechContexts( int index, com.google.cloud.videointelligence.v1p1beta1.SpeechContext.Builder builderForValue) { if (speechContextsBuilder_ == null) { ensureSpeechContextsIsMutable(); speechContexts_.set(index, builderForValue.build()); onChanged(); } else { speechContextsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * * *
     * Optional. A means to provide context to assist the speech recognition.
     * 
* * * repeated .google.cloud.videointelligence.v1p1beta1.SpeechContext speech_contexts = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder addSpeechContexts( com.google.cloud.videointelligence.v1p1beta1.SpeechContext value) { if (speechContextsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureSpeechContextsIsMutable(); speechContexts_.add(value); onChanged(); } else { speechContextsBuilder_.addMessage(value); } return this; } /** * * *
     * Optional. A means to provide context to assist the speech recognition.
     * 
* * * repeated .google.cloud.videointelligence.v1p1beta1.SpeechContext speech_contexts = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder addSpeechContexts( int index, com.google.cloud.videointelligence.v1p1beta1.SpeechContext value) { if (speechContextsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureSpeechContextsIsMutable(); speechContexts_.add(index, value); onChanged(); } else { speechContextsBuilder_.addMessage(index, value); } return this; } /** * * *
     * Optional. A means to provide context to assist the speech recognition.
     * 
* * * repeated .google.cloud.videointelligence.v1p1beta1.SpeechContext speech_contexts = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder addSpeechContexts( com.google.cloud.videointelligence.v1p1beta1.SpeechContext.Builder builderForValue) { if (speechContextsBuilder_ == null) { ensureSpeechContextsIsMutable(); speechContexts_.add(builderForValue.build()); onChanged(); } else { speechContextsBuilder_.addMessage(builderForValue.build()); } return this; } /** * * *
     * Optional. A means to provide context to assist the speech recognition.
     * 
* * * repeated .google.cloud.videointelligence.v1p1beta1.SpeechContext speech_contexts = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder addSpeechContexts( int index, com.google.cloud.videointelligence.v1p1beta1.SpeechContext.Builder builderForValue) { if (speechContextsBuilder_ == null) { ensureSpeechContextsIsMutable(); speechContexts_.add(index, builderForValue.build()); onChanged(); } else { speechContextsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * * *
     * Optional. A means to provide context to assist the speech recognition.
     * 
* * * repeated .google.cloud.videointelligence.v1p1beta1.SpeechContext speech_contexts = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder addAllSpeechContexts( java.lang.Iterable values) { if (speechContextsBuilder_ == null) { ensureSpeechContextsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, speechContexts_); onChanged(); } else { speechContextsBuilder_.addAllMessages(values); } return this; } /** * * *
     * Optional. A means to provide context to assist the speech recognition.
     * 
* * * repeated .google.cloud.videointelligence.v1p1beta1.SpeechContext speech_contexts = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder clearSpeechContexts() { if (speechContextsBuilder_ == null) { speechContexts_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000008); onChanged(); } else { speechContextsBuilder_.clear(); } return this; } /** * * *
     * Optional. A means to provide context to assist the speech recognition.
     * 
* * * repeated .google.cloud.videointelligence.v1p1beta1.SpeechContext speech_contexts = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder removeSpeechContexts(int index) { if (speechContextsBuilder_ == null) { ensureSpeechContextsIsMutable(); speechContexts_.remove(index); onChanged(); } else { speechContextsBuilder_.remove(index); } return this; } /** * * *
     * Optional. A means to provide context to assist the speech recognition.
     * 
* * * repeated .google.cloud.videointelligence.v1p1beta1.SpeechContext speech_contexts = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.cloud.videointelligence.v1p1beta1.SpeechContext.Builder getSpeechContextsBuilder(int index) { return getSpeechContextsFieldBuilder().getBuilder(index); } /** * * *
     * Optional. A means to provide context to assist the speech recognition.
     * 
* * * repeated .google.cloud.videointelligence.v1p1beta1.SpeechContext speech_contexts = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.cloud.videointelligence.v1p1beta1.SpeechContextOrBuilder getSpeechContextsOrBuilder(int index) { if (speechContextsBuilder_ == null) { return speechContexts_.get(index); } else { return speechContextsBuilder_.getMessageOrBuilder(index); } } /** * * *
     * Optional. A means to provide context to assist the speech recognition.
     * 
* * * repeated .google.cloud.videointelligence.v1p1beta1.SpeechContext speech_contexts = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ public java.util.List< ? extends com.google.cloud.videointelligence.v1p1beta1.SpeechContextOrBuilder> getSpeechContextsOrBuilderList() { if (speechContextsBuilder_ != null) { return speechContextsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(speechContexts_); } } /** * * *
     * Optional. A means to provide context to assist the speech recognition.
     * 
* * * repeated .google.cloud.videointelligence.v1p1beta1.SpeechContext speech_contexts = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.cloud.videointelligence.v1p1beta1.SpeechContext.Builder addSpeechContextsBuilder() { return getSpeechContextsFieldBuilder() .addBuilder( com.google.cloud.videointelligence.v1p1beta1.SpeechContext.getDefaultInstance()); } /** * * *
     * Optional. A means to provide context to assist the speech recognition.
     * 
* * * repeated .google.cloud.videointelligence.v1p1beta1.SpeechContext speech_contexts = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.cloud.videointelligence.v1p1beta1.SpeechContext.Builder addSpeechContextsBuilder(int index) { return getSpeechContextsFieldBuilder() .addBuilder( index, com.google.cloud.videointelligence.v1p1beta1.SpeechContext.getDefaultInstance()); } /** * * *
     * Optional. A means to provide context to assist the speech recognition.
     * 
* * * repeated .google.cloud.videointelligence.v1p1beta1.SpeechContext speech_contexts = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ public java.util.List getSpeechContextsBuilderList() { return getSpeechContextsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.videointelligence.v1p1beta1.SpeechContext, com.google.cloud.videointelligence.v1p1beta1.SpeechContext.Builder, com.google.cloud.videointelligence.v1p1beta1.SpeechContextOrBuilder> getSpeechContextsFieldBuilder() { if (speechContextsBuilder_ == null) { speechContextsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.videointelligence.v1p1beta1.SpeechContext, com.google.cloud.videointelligence.v1p1beta1.SpeechContext.Builder, com.google.cloud.videointelligence.v1p1beta1.SpeechContextOrBuilder>( speechContexts_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); speechContexts_ = null; } return speechContextsBuilder_; } private boolean enableAutomaticPunctuation_; /** * * *
     * Optional. If 'true', adds punctuation to recognition result hypotheses.
     * This feature is only available in select languages. Setting this for
     * requests in other languages has no effect at all. The default 'false' value
     * does not add punctuation to result hypotheses. NOTE: "This is currently
     * offered as an experimental service, complimentary to all users. In the
     * future this may be exclusively available as a premium feature."
     * 
* * bool enable_automatic_punctuation = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return The enableAutomaticPunctuation. */ @java.lang.Override public boolean getEnableAutomaticPunctuation() { return enableAutomaticPunctuation_; } /** * * *
     * Optional. If 'true', adds punctuation to recognition result hypotheses.
     * This feature is only available in select languages. Setting this for
     * requests in other languages has no effect at all. The default 'false' value
     * does not add punctuation to result hypotheses. NOTE: "This is currently
     * offered as an experimental service, complimentary to all users. In the
     * future this may be exclusively available as a premium feature."
     * 
* * bool enable_automatic_punctuation = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The enableAutomaticPunctuation to set. * @return This builder for chaining. */ public Builder setEnableAutomaticPunctuation(boolean value) { enableAutomaticPunctuation_ = value; bitField0_ |= 0x00000010; onChanged(); return this; } /** * * *
     * Optional. If 'true', adds punctuation to recognition result hypotheses.
     * This feature is only available in select languages. Setting this for
     * requests in other languages has no effect at all. The default 'false' value
     * does not add punctuation to result hypotheses. NOTE: "This is currently
     * offered as an experimental service, complimentary to all users. In the
     * future this may be exclusively available as a premium feature."
     * 
* * bool enable_automatic_punctuation = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ public Builder clearEnableAutomaticPunctuation() { bitField0_ = (bitField0_ & ~0x00000010); enableAutomaticPunctuation_ = false; onChanged(); return this; } private com.google.protobuf.Internal.IntList audioTracks_ = emptyIntList(); private void ensureAudioTracksIsMutable() { if (!audioTracks_.isModifiable()) { audioTracks_ = makeMutableCopy(audioTracks_); } bitField0_ |= 0x00000020; } /** * * *
     * Optional. For file formats, such as MXF or MKV, supporting multiple audio
     * tracks, specify up to two tracks. Default: track 0.
     * 
* * repeated int32 audio_tracks = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @return A list containing the audioTracks. */ public java.util.List getAudioTracksList() { audioTracks_.makeImmutable(); return audioTracks_; } /** * * *
     * Optional. For file formats, such as MXF or MKV, supporting multiple audio
     * tracks, specify up to two tracks. Default: track 0.
     * 
* * repeated int32 audio_tracks = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @return The count of audioTracks. */ public int getAudioTracksCount() { return audioTracks_.size(); } /** * * *
     * Optional. For file formats, such as MXF or MKV, supporting multiple audio
     * tracks, specify up to two tracks. Default: track 0.
     * 
* * repeated int32 audio_tracks = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index of the element to return. * @return The audioTracks at the given index. */ public int getAudioTracks(int index) { return audioTracks_.getInt(index); } /** * * *
     * Optional. For file formats, such as MXF or MKV, supporting multiple audio
     * tracks, specify up to two tracks. Default: track 0.
     * 
* * repeated int32 audio_tracks = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index to set the value at. * @param value The audioTracks to set. * @return This builder for chaining. */ public Builder setAudioTracks(int index, int value) { ensureAudioTracksIsMutable(); audioTracks_.setInt(index, value); bitField0_ |= 0x00000020; onChanged(); return this; } /** * * *
     * Optional. For file formats, such as MXF or MKV, supporting multiple audio
     * tracks, specify up to two tracks. Default: track 0.
     * 
* * repeated int32 audio_tracks = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The audioTracks to add. * @return This builder for chaining. */ public Builder addAudioTracks(int value) { ensureAudioTracksIsMutable(); audioTracks_.addInt(value); bitField0_ |= 0x00000020; onChanged(); return this; } /** * * *
     * Optional. For file formats, such as MXF or MKV, supporting multiple audio
     * tracks, specify up to two tracks. Default: track 0.
     * 
* * repeated int32 audio_tracks = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @param values The audioTracks to add. * @return This builder for chaining. */ public Builder addAllAudioTracks(java.lang.Iterable values) { ensureAudioTracksIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, audioTracks_); bitField0_ |= 0x00000020; onChanged(); return this; } /** * * *
     * Optional. For file formats, such as MXF or MKV, supporting multiple audio
     * tracks, specify up to two tracks. Default: track 0.
     * 
* * repeated int32 audio_tracks = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ public Builder clearAudioTracks() { audioTracks_ = emptyIntList(); bitField0_ = (bitField0_ & ~0x00000020); 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:google.cloud.videointelligence.v1p1beta1.SpeechTranscriptionConfig) } // @@protoc_insertion_point(class_scope:google.cloud.videointelligence.v1p1beta1.SpeechTranscriptionConfig) private static final com.google.cloud.videointelligence.v1p1beta1.SpeechTranscriptionConfig DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.videointelligence.v1p1beta1.SpeechTranscriptionConfig(); } public static com.google.cloud.videointelligence.v1p1beta1.SpeechTranscriptionConfig getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public SpeechTranscriptionConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.google.cloud.videointelligence.v1p1beta1.SpeechTranscriptionConfig getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy