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

com.google.cloud.speech.v1.TranscriptNormalization Maven / Gradle / Ivy

There is a newer version: 4.49.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/speech/v1/resource.proto

// Protobuf Java Version: 3.25.3
package com.google.cloud.speech.v1;

/**
 *
 *
 * 
 * Transcription normalization configuration. Use transcription normalization
 * to automatically replace parts of the transcript with phrases of your
 * choosing. For StreamingRecognize, this normalization only applies to stable
 * partial transcripts (stability > 0.8) and final transcripts.
 * 
* * Protobuf type {@code google.cloud.speech.v1.TranscriptNormalization} */ public final class TranscriptNormalization extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.speech.v1.TranscriptNormalization) TranscriptNormalizationOrBuilder { private static final long serialVersionUID = 0L; // Use TranscriptNormalization.newBuilder() to construct. private TranscriptNormalization(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private TranscriptNormalization() { entries_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new TranscriptNormalization(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.speech.v1.SpeechResourceProto .internal_static_google_cloud_speech_v1_TranscriptNormalization_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.speech.v1.SpeechResourceProto .internal_static_google_cloud_speech_v1_TranscriptNormalization_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.speech.v1.TranscriptNormalization.class, com.google.cloud.speech.v1.TranscriptNormalization.Builder.class); } public interface EntryOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.speech.v1.TranscriptNormalization.Entry) com.google.protobuf.MessageOrBuilder { /** * * *
     * What to replace. Max length is 100 characters.
     * 
* * string search = 1; * * @return The search. */ java.lang.String getSearch(); /** * * *
     * What to replace. Max length is 100 characters.
     * 
* * string search = 1; * * @return The bytes for search. */ com.google.protobuf.ByteString getSearchBytes(); /** * * *
     * What to replace with. Max length is 100 characters.
     * 
* * string replace = 2; * * @return The replace. */ java.lang.String getReplace(); /** * * *
     * What to replace with. Max length is 100 characters.
     * 
* * string replace = 2; * * @return The bytes for replace. */ com.google.protobuf.ByteString getReplaceBytes(); /** * * *
     * Whether the search is case sensitive.
     * 
* * bool case_sensitive = 3; * * @return The caseSensitive. */ boolean getCaseSensitive(); } /** * * *
   * A single replacement configuration.
   * 
* * Protobuf type {@code google.cloud.speech.v1.TranscriptNormalization.Entry} */ public static final class Entry extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.speech.v1.TranscriptNormalization.Entry) EntryOrBuilder { private static final long serialVersionUID = 0L; // Use Entry.newBuilder() to construct. private Entry(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Entry() { search_ = ""; replace_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new Entry(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.speech.v1.SpeechResourceProto .internal_static_google_cloud_speech_v1_TranscriptNormalization_Entry_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.speech.v1.SpeechResourceProto .internal_static_google_cloud_speech_v1_TranscriptNormalization_Entry_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.speech.v1.TranscriptNormalization.Entry.class, com.google.cloud.speech.v1.TranscriptNormalization.Entry.Builder.class); } public static final int SEARCH_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object search_ = ""; /** * * *
     * What to replace. Max length is 100 characters.
     * 
* * string search = 1; * * @return The search. */ @java.lang.Override public java.lang.String getSearch() { java.lang.Object ref = search_; 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(); search_ = s; return s; } } /** * * *
     * What to replace. Max length is 100 characters.
     * 
* * string search = 1; * * @return The bytes for search. */ @java.lang.Override public com.google.protobuf.ByteString getSearchBytes() { java.lang.Object ref = search_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); search_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int REPLACE_FIELD_NUMBER = 2; @SuppressWarnings("serial") private volatile java.lang.Object replace_ = ""; /** * * *
     * What to replace with. Max length is 100 characters.
     * 
* * string replace = 2; * * @return The replace. */ @java.lang.Override public java.lang.String getReplace() { java.lang.Object ref = replace_; 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(); replace_ = s; return s; } } /** * * *
     * What to replace with. Max length is 100 characters.
     * 
* * string replace = 2; * * @return The bytes for replace. */ @java.lang.Override public com.google.protobuf.ByteString getReplaceBytes() { java.lang.Object ref = replace_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); replace_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int CASE_SENSITIVE_FIELD_NUMBER = 3; private boolean caseSensitive_ = false; /** * * *
     * Whether the search is case sensitive.
     * 
* * bool case_sensitive = 3; * * @return The caseSensitive. */ @java.lang.Override public boolean getCaseSensitive() { return caseSensitive_; } 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(search_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, search_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(replace_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, replace_); } if (caseSensitive_ != false) { output.writeBool(3, caseSensitive_); } 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(search_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, search_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(replace_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, replace_); } if (caseSensitive_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, caseSensitive_); } 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.speech.v1.TranscriptNormalization.Entry)) { return super.equals(obj); } com.google.cloud.speech.v1.TranscriptNormalization.Entry other = (com.google.cloud.speech.v1.TranscriptNormalization.Entry) obj; if (!getSearch().equals(other.getSearch())) return false; if (!getReplace().equals(other.getReplace())) return false; if (getCaseSensitive() != other.getCaseSensitive()) 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) + SEARCH_FIELD_NUMBER; hash = (53 * hash) + getSearch().hashCode(); hash = (37 * hash) + REPLACE_FIELD_NUMBER; hash = (53 * hash) + getReplace().hashCode(); hash = (37 * hash) + CASE_SENSITIVE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getCaseSensitive()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.speech.v1.TranscriptNormalization.Entry parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.speech.v1.TranscriptNormalization.Entry 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.speech.v1.TranscriptNormalization.Entry parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.speech.v1.TranscriptNormalization.Entry 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.speech.v1.TranscriptNormalization.Entry parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.speech.v1.TranscriptNormalization.Entry parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.speech.v1.TranscriptNormalization.Entry parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.speech.v1.TranscriptNormalization.Entry 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.speech.v1.TranscriptNormalization.Entry parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.speech.v1.TranscriptNormalization.Entry 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.speech.v1.TranscriptNormalization.Entry parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.speech.v1.TranscriptNormalization.Entry 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.speech.v1.TranscriptNormalization.Entry 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; } /** * * *
     * A single replacement configuration.
     * 
* * Protobuf type {@code google.cloud.speech.v1.TranscriptNormalization.Entry} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.speech.v1.TranscriptNormalization.Entry) com.google.cloud.speech.v1.TranscriptNormalization.EntryOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.speech.v1.SpeechResourceProto .internal_static_google_cloud_speech_v1_TranscriptNormalization_Entry_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.speech.v1.SpeechResourceProto .internal_static_google_cloud_speech_v1_TranscriptNormalization_Entry_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.speech.v1.TranscriptNormalization.Entry.class, com.google.cloud.speech.v1.TranscriptNormalization.Entry.Builder.class); } // Construct using com.google.cloud.speech.v1.TranscriptNormalization.Entry.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; search_ = ""; replace_ = ""; caseSensitive_ = false; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.speech.v1.SpeechResourceProto .internal_static_google_cloud_speech_v1_TranscriptNormalization_Entry_descriptor; } @java.lang.Override public com.google.cloud.speech.v1.TranscriptNormalization.Entry getDefaultInstanceForType() { return com.google.cloud.speech.v1.TranscriptNormalization.Entry.getDefaultInstance(); } @java.lang.Override public com.google.cloud.speech.v1.TranscriptNormalization.Entry build() { com.google.cloud.speech.v1.TranscriptNormalization.Entry result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.speech.v1.TranscriptNormalization.Entry buildPartial() { com.google.cloud.speech.v1.TranscriptNormalization.Entry result = new com.google.cloud.speech.v1.TranscriptNormalization.Entry(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(com.google.cloud.speech.v1.TranscriptNormalization.Entry result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.search_ = search_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.replace_ = replace_; } if (((from_bitField0_ & 0x00000004) != 0)) { result.caseSensitive_ = caseSensitive_; } } @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.speech.v1.TranscriptNormalization.Entry) { return mergeFrom((com.google.cloud.speech.v1.TranscriptNormalization.Entry) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.speech.v1.TranscriptNormalization.Entry other) { if (other == com.google.cloud.speech.v1.TranscriptNormalization.Entry.getDefaultInstance()) return this; if (!other.getSearch().isEmpty()) { search_ = other.search_; bitField0_ |= 0x00000001; onChanged(); } if (!other.getReplace().isEmpty()) { replace_ = other.replace_; bitField0_ |= 0x00000002; onChanged(); } if (other.getCaseSensitive() != false) { setCaseSensitive(other.getCaseSensitive()); } 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: { search_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 case 18: { replace_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000002; break; } // case 18 case 24: { caseSensitive_ = input.readBool(); bitField0_ |= 0x00000004; break; } // case 24 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 search_ = ""; /** * * *
       * What to replace. Max length is 100 characters.
       * 
* * string search = 1; * * @return The search. */ public java.lang.String getSearch() { java.lang.Object ref = search_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); search_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
       * What to replace. Max length is 100 characters.
       * 
* * string search = 1; * * @return The bytes for search. */ public com.google.protobuf.ByteString getSearchBytes() { java.lang.Object ref = search_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); search_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
       * What to replace. Max length is 100 characters.
       * 
* * string search = 1; * * @param value The search to set. * @return This builder for chaining. */ public Builder setSearch(java.lang.String value) { if (value == null) { throw new NullPointerException(); } search_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
       * What to replace. Max length is 100 characters.
       * 
* * string search = 1; * * @return This builder for chaining. */ public Builder clearSearch() { search_ = getDefaultInstance().getSearch(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * * *
       * What to replace. Max length is 100 characters.
       * 
* * string search = 1; * * @param value The bytes for search to set. * @return This builder for chaining. */ public Builder setSearchBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); search_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } private java.lang.Object replace_ = ""; /** * * *
       * What to replace with. Max length is 100 characters.
       * 
* * string replace = 2; * * @return The replace. */ public java.lang.String getReplace() { java.lang.Object ref = replace_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); replace_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
       * What to replace with. Max length is 100 characters.
       * 
* * string replace = 2; * * @return The bytes for replace. */ public com.google.protobuf.ByteString getReplaceBytes() { java.lang.Object ref = replace_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); replace_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
       * What to replace with. Max length is 100 characters.
       * 
* * string replace = 2; * * @param value The replace to set. * @return This builder for chaining. */ public Builder setReplace(java.lang.String value) { if (value == null) { throw new NullPointerException(); } replace_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
       * What to replace with. Max length is 100 characters.
       * 
* * string replace = 2; * * @return This builder for chaining. */ public Builder clearReplace() { replace_ = getDefaultInstance().getReplace(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** * * *
       * What to replace with. Max length is 100 characters.
       * 
* * string replace = 2; * * @param value The bytes for replace to set. * @return This builder for chaining. */ public Builder setReplaceBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); replace_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } private boolean caseSensitive_; /** * * *
       * Whether the search is case sensitive.
       * 
* * bool case_sensitive = 3; * * @return The caseSensitive. */ @java.lang.Override public boolean getCaseSensitive() { return caseSensitive_; } /** * * *
       * Whether the search is case sensitive.
       * 
* * bool case_sensitive = 3; * * @param value The caseSensitive to set. * @return This builder for chaining. */ public Builder setCaseSensitive(boolean value) { caseSensitive_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
       * Whether the search is case sensitive.
       * 
* * bool case_sensitive = 3; * * @return This builder for chaining. */ public Builder clearCaseSensitive() { bitField0_ = (bitField0_ & ~0x00000004); caseSensitive_ = false; 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.speech.v1.TranscriptNormalization.Entry) } // @@protoc_insertion_point(class_scope:google.cloud.speech.v1.TranscriptNormalization.Entry) private static final com.google.cloud.speech.v1.TranscriptNormalization.Entry DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.speech.v1.TranscriptNormalization.Entry(); } public static com.google.cloud.speech.v1.TranscriptNormalization.Entry getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Entry 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.speech.v1.TranscriptNormalization.Entry getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public static final int ENTRIES_FIELD_NUMBER = 1; @SuppressWarnings("serial") private java.util.List entries_; /** * * *
   * A list of replacement entries. We will perform replacement with one entry
   * at a time. For example, the second entry in ["cat" => "dog", "mountain cat"
   * => "mountain dog"] will never be applied because we will always process the
   * first entry before it. At most 100 entries.
   * 
* * repeated .google.cloud.speech.v1.TranscriptNormalization.Entry entries = 1; */ @java.lang.Override public java.util.List getEntriesList() { return entries_; } /** * * *
   * A list of replacement entries. We will perform replacement with one entry
   * at a time. For example, the second entry in ["cat" => "dog", "mountain cat"
   * => "mountain dog"] will never be applied because we will always process the
   * first entry before it. At most 100 entries.
   * 
* * repeated .google.cloud.speech.v1.TranscriptNormalization.Entry entries = 1; */ @java.lang.Override public java.util.List getEntriesOrBuilderList() { return entries_; } /** * * *
   * A list of replacement entries. We will perform replacement with one entry
   * at a time. For example, the second entry in ["cat" => "dog", "mountain cat"
   * => "mountain dog"] will never be applied because we will always process the
   * first entry before it. At most 100 entries.
   * 
* * repeated .google.cloud.speech.v1.TranscriptNormalization.Entry entries = 1; */ @java.lang.Override public int getEntriesCount() { return entries_.size(); } /** * * *
   * A list of replacement entries. We will perform replacement with one entry
   * at a time. For example, the second entry in ["cat" => "dog", "mountain cat"
   * => "mountain dog"] will never be applied because we will always process the
   * first entry before it. At most 100 entries.
   * 
* * repeated .google.cloud.speech.v1.TranscriptNormalization.Entry entries = 1; */ @java.lang.Override public com.google.cloud.speech.v1.TranscriptNormalization.Entry getEntries(int index) { return entries_.get(index); } /** * * *
   * A list of replacement entries. We will perform replacement with one entry
   * at a time. For example, the second entry in ["cat" => "dog", "mountain cat"
   * => "mountain dog"] will never be applied because we will always process the
   * first entry before it. At most 100 entries.
   * 
* * repeated .google.cloud.speech.v1.TranscriptNormalization.Entry entries = 1; */ @java.lang.Override public com.google.cloud.speech.v1.TranscriptNormalization.EntryOrBuilder getEntriesOrBuilder( int index) { return entries_.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 < entries_.size(); i++) { output.writeMessage(1, entries_.get(i)); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; for (int i = 0; i < entries_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, entries_.get(i)); } 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.speech.v1.TranscriptNormalization)) { return super.equals(obj); } com.google.cloud.speech.v1.TranscriptNormalization other = (com.google.cloud.speech.v1.TranscriptNormalization) obj; if (!getEntriesList().equals(other.getEntriesList())) 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(); if (getEntriesCount() > 0) { hash = (37 * hash) + ENTRIES_FIELD_NUMBER; hash = (53 * hash) + getEntriesList().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.speech.v1.TranscriptNormalization parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.speech.v1.TranscriptNormalization 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.speech.v1.TranscriptNormalization parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.speech.v1.TranscriptNormalization 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.speech.v1.TranscriptNormalization parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.speech.v1.TranscriptNormalization parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.speech.v1.TranscriptNormalization parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.speech.v1.TranscriptNormalization 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.speech.v1.TranscriptNormalization parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.speech.v1.TranscriptNormalization 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.speech.v1.TranscriptNormalization parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.speech.v1.TranscriptNormalization 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.speech.v1.TranscriptNormalization 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; } /** * * *
   * Transcription normalization configuration. Use transcription normalization
   * to automatically replace parts of the transcript with phrases of your
   * choosing. For StreamingRecognize, this normalization only applies to stable
   * partial transcripts (stability > 0.8) and final transcripts.
   * 
* * Protobuf type {@code google.cloud.speech.v1.TranscriptNormalization} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.speech.v1.TranscriptNormalization) com.google.cloud.speech.v1.TranscriptNormalizationOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.speech.v1.SpeechResourceProto .internal_static_google_cloud_speech_v1_TranscriptNormalization_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.speech.v1.SpeechResourceProto .internal_static_google_cloud_speech_v1_TranscriptNormalization_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.speech.v1.TranscriptNormalization.class, com.google.cloud.speech.v1.TranscriptNormalization.Builder.class); } // Construct using com.google.cloud.speech.v1.TranscriptNormalization.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; if (entriesBuilder_ == null) { entries_ = java.util.Collections.emptyList(); } else { entries_ = null; entriesBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000001); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.speech.v1.SpeechResourceProto .internal_static_google_cloud_speech_v1_TranscriptNormalization_descriptor; } @java.lang.Override public com.google.cloud.speech.v1.TranscriptNormalization getDefaultInstanceForType() { return com.google.cloud.speech.v1.TranscriptNormalization.getDefaultInstance(); } @java.lang.Override public com.google.cloud.speech.v1.TranscriptNormalization build() { com.google.cloud.speech.v1.TranscriptNormalization result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.speech.v1.TranscriptNormalization buildPartial() { com.google.cloud.speech.v1.TranscriptNormalization result = new com.google.cloud.speech.v1.TranscriptNormalization(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartialRepeatedFields( com.google.cloud.speech.v1.TranscriptNormalization result) { if (entriesBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { entries_ = java.util.Collections.unmodifiableList(entries_); bitField0_ = (bitField0_ & ~0x00000001); } result.entries_ = entries_; } else { result.entries_ = entriesBuilder_.build(); } } private void buildPartial0(com.google.cloud.speech.v1.TranscriptNormalization result) { int from_bitField0_ = bitField0_; } @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.speech.v1.TranscriptNormalization) { return mergeFrom((com.google.cloud.speech.v1.TranscriptNormalization) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.speech.v1.TranscriptNormalization other) { if (other == com.google.cloud.speech.v1.TranscriptNormalization.getDefaultInstance()) return this; if (entriesBuilder_ == null) { if (!other.entries_.isEmpty()) { if (entries_.isEmpty()) { entries_ = other.entries_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureEntriesIsMutable(); entries_.addAll(other.entries_); } onChanged(); } } else { if (!other.entries_.isEmpty()) { if (entriesBuilder_.isEmpty()) { entriesBuilder_.dispose(); entriesBuilder_ = null; entries_ = other.entries_; bitField0_ = (bitField0_ & ~0x00000001); entriesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getEntriesFieldBuilder() : null; } else { entriesBuilder_.addAllMessages(other.entries_); } } } 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: { com.google.cloud.speech.v1.TranscriptNormalization.Entry m = input.readMessage( com.google.cloud.speech.v1.TranscriptNormalization.Entry.parser(), extensionRegistry); if (entriesBuilder_ == null) { ensureEntriesIsMutable(); entries_.add(m); } else { entriesBuilder_.addMessage(m); } break; } // case 10 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.util.List entries_ = java.util.Collections.emptyList(); private void ensureEntriesIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { entries_ = new java.util.ArrayList( entries_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.speech.v1.TranscriptNormalization.Entry, com.google.cloud.speech.v1.TranscriptNormalization.Entry.Builder, com.google.cloud.speech.v1.TranscriptNormalization.EntryOrBuilder> entriesBuilder_; /** * * *
     * A list of replacement entries. We will perform replacement with one entry
     * at a time. For example, the second entry in ["cat" => "dog", "mountain cat"
     * => "mountain dog"] will never be applied because we will always process the
     * first entry before it. At most 100 entries.
     * 
* * repeated .google.cloud.speech.v1.TranscriptNormalization.Entry entries = 1; */ public java.util.List getEntriesList() { if (entriesBuilder_ == null) { return java.util.Collections.unmodifiableList(entries_); } else { return entriesBuilder_.getMessageList(); } } /** * * *
     * A list of replacement entries. We will perform replacement with one entry
     * at a time. For example, the second entry in ["cat" => "dog", "mountain cat"
     * => "mountain dog"] will never be applied because we will always process the
     * first entry before it. At most 100 entries.
     * 
* * repeated .google.cloud.speech.v1.TranscriptNormalization.Entry entries = 1; */ public int getEntriesCount() { if (entriesBuilder_ == null) { return entries_.size(); } else { return entriesBuilder_.getCount(); } } /** * * *
     * A list of replacement entries. We will perform replacement with one entry
     * at a time. For example, the second entry in ["cat" => "dog", "mountain cat"
     * => "mountain dog"] will never be applied because we will always process the
     * first entry before it. At most 100 entries.
     * 
* * repeated .google.cloud.speech.v1.TranscriptNormalization.Entry entries = 1; */ public com.google.cloud.speech.v1.TranscriptNormalization.Entry getEntries(int index) { if (entriesBuilder_ == null) { return entries_.get(index); } else { return entriesBuilder_.getMessage(index); } } /** * * *
     * A list of replacement entries. We will perform replacement with one entry
     * at a time. For example, the second entry in ["cat" => "dog", "mountain cat"
     * => "mountain dog"] will never be applied because we will always process the
     * first entry before it. At most 100 entries.
     * 
* * repeated .google.cloud.speech.v1.TranscriptNormalization.Entry entries = 1; */ public Builder setEntries( int index, com.google.cloud.speech.v1.TranscriptNormalization.Entry value) { if (entriesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureEntriesIsMutable(); entries_.set(index, value); onChanged(); } else { entriesBuilder_.setMessage(index, value); } return this; } /** * * *
     * A list of replacement entries. We will perform replacement with one entry
     * at a time. For example, the second entry in ["cat" => "dog", "mountain cat"
     * => "mountain dog"] will never be applied because we will always process the
     * first entry before it. At most 100 entries.
     * 
* * repeated .google.cloud.speech.v1.TranscriptNormalization.Entry entries = 1; */ public Builder setEntries( int index, com.google.cloud.speech.v1.TranscriptNormalization.Entry.Builder builderForValue) { if (entriesBuilder_ == null) { ensureEntriesIsMutable(); entries_.set(index, builderForValue.build()); onChanged(); } else { entriesBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * * *
     * A list of replacement entries. We will perform replacement with one entry
     * at a time. For example, the second entry in ["cat" => "dog", "mountain cat"
     * => "mountain dog"] will never be applied because we will always process the
     * first entry before it. At most 100 entries.
     * 
* * repeated .google.cloud.speech.v1.TranscriptNormalization.Entry entries = 1; */ public Builder addEntries(com.google.cloud.speech.v1.TranscriptNormalization.Entry value) { if (entriesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureEntriesIsMutable(); entries_.add(value); onChanged(); } else { entriesBuilder_.addMessage(value); } return this; } /** * * *
     * A list of replacement entries. We will perform replacement with one entry
     * at a time. For example, the second entry in ["cat" => "dog", "mountain cat"
     * => "mountain dog"] will never be applied because we will always process the
     * first entry before it. At most 100 entries.
     * 
* * repeated .google.cloud.speech.v1.TranscriptNormalization.Entry entries = 1; */ public Builder addEntries( int index, com.google.cloud.speech.v1.TranscriptNormalization.Entry value) { if (entriesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureEntriesIsMutable(); entries_.add(index, value); onChanged(); } else { entriesBuilder_.addMessage(index, value); } return this; } /** * * *
     * A list of replacement entries. We will perform replacement with one entry
     * at a time. For example, the second entry in ["cat" => "dog", "mountain cat"
     * => "mountain dog"] will never be applied because we will always process the
     * first entry before it. At most 100 entries.
     * 
* * repeated .google.cloud.speech.v1.TranscriptNormalization.Entry entries = 1; */ public Builder addEntries( com.google.cloud.speech.v1.TranscriptNormalization.Entry.Builder builderForValue) { if (entriesBuilder_ == null) { ensureEntriesIsMutable(); entries_.add(builderForValue.build()); onChanged(); } else { entriesBuilder_.addMessage(builderForValue.build()); } return this; } /** * * *
     * A list of replacement entries. We will perform replacement with one entry
     * at a time. For example, the second entry in ["cat" => "dog", "mountain cat"
     * => "mountain dog"] will never be applied because we will always process the
     * first entry before it. At most 100 entries.
     * 
* * repeated .google.cloud.speech.v1.TranscriptNormalization.Entry entries = 1; */ public Builder addEntries( int index, com.google.cloud.speech.v1.TranscriptNormalization.Entry.Builder builderForValue) { if (entriesBuilder_ == null) { ensureEntriesIsMutable(); entries_.add(index, builderForValue.build()); onChanged(); } else { entriesBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * * *
     * A list of replacement entries. We will perform replacement with one entry
     * at a time. For example, the second entry in ["cat" => "dog", "mountain cat"
     * => "mountain dog"] will never be applied because we will always process the
     * first entry before it. At most 100 entries.
     * 
* * repeated .google.cloud.speech.v1.TranscriptNormalization.Entry entries = 1; */ public Builder addAllEntries( java.lang.Iterable values) { if (entriesBuilder_ == null) { ensureEntriesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, entries_); onChanged(); } else { entriesBuilder_.addAllMessages(values); } return this; } /** * * *
     * A list of replacement entries. We will perform replacement with one entry
     * at a time. For example, the second entry in ["cat" => "dog", "mountain cat"
     * => "mountain dog"] will never be applied because we will always process the
     * first entry before it. At most 100 entries.
     * 
* * repeated .google.cloud.speech.v1.TranscriptNormalization.Entry entries = 1; */ public Builder clearEntries() { if (entriesBuilder_ == null) { entries_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { entriesBuilder_.clear(); } return this; } /** * * *
     * A list of replacement entries. We will perform replacement with one entry
     * at a time. For example, the second entry in ["cat" => "dog", "mountain cat"
     * => "mountain dog"] will never be applied because we will always process the
     * first entry before it. At most 100 entries.
     * 
* * repeated .google.cloud.speech.v1.TranscriptNormalization.Entry entries = 1; */ public Builder removeEntries(int index) { if (entriesBuilder_ == null) { ensureEntriesIsMutable(); entries_.remove(index); onChanged(); } else { entriesBuilder_.remove(index); } return this; } /** * * *
     * A list of replacement entries. We will perform replacement with one entry
     * at a time. For example, the second entry in ["cat" => "dog", "mountain cat"
     * => "mountain dog"] will never be applied because we will always process the
     * first entry before it. At most 100 entries.
     * 
* * repeated .google.cloud.speech.v1.TranscriptNormalization.Entry entries = 1; */ public com.google.cloud.speech.v1.TranscriptNormalization.Entry.Builder getEntriesBuilder( int index) { return getEntriesFieldBuilder().getBuilder(index); } /** * * *
     * A list of replacement entries. We will perform replacement with one entry
     * at a time. For example, the second entry in ["cat" => "dog", "mountain cat"
     * => "mountain dog"] will never be applied because we will always process the
     * first entry before it. At most 100 entries.
     * 
* * repeated .google.cloud.speech.v1.TranscriptNormalization.Entry entries = 1; */ public com.google.cloud.speech.v1.TranscriptNormalization.EntryOrBuilder getEntriesOrBuilder( int index) { if (entriesBuilder_ == null) { return entries_.get(index); } else { return entriesBuilder_.getMessageOrBuilder(index); } } /** * * *
     * A list of replacement entries. We will perform replacement with one entry
     * at a time. For example, the second entry in ["cat" => "dog", "mountain cat"
     * => "mountain dog"] will never be applied because we will always process the
     * first entry before it. At most 100 entries.
     * 
* * repeated .google.cloud.speech.v1.TranscriptNormalization.Entry entries = 1; */ public java.util.List< ? extends com.google.cloud.speech.v1.TranscriptNormalization.EntryOrBuilder> getEntriesOrBuilderList() { if (entriesBuilder_ != null) { return entriesBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(entries_); } } /** * * *
     * A list of replacement entries. We will perform replacement with one entry
     * at a time. For example, the second entry in ["cat" => "dog", "mountain cat"
     * => "mountain dog"] will never be applied because we will always process the
     * first entry before it. At most 100 entries.
     * 
* * repeated .google.cloud.speech.v1.TranscriptNormalization.Entry entries = 1; */ public com.google.cloud.speech.v1.TranscriptNormalization.Entry.Builder addEntriesBuilder() { return getEntriesFieldBuilder() .addBuilder( com.google.cloud.speech.v1.TranscriptNormalization.Entry.getDefaultInstance()); } /** * * *
     * A list of replacement entries. We will perform replacement with one entry
     * at a time. For example, the second entry in ["cat" => "dog", "mountain cat"
     * => "mountain dog"] will never be applied because we will always process the
     * first entry before it. At most 100 entries.
     * 
* * repeated .google.cloud.speech.v1.TranscriptNormalization.Entry entries = 1; */ public com.google.cloud.speech.v1.TranscriptNormalization.Entry.Builder addEntriesBuilder( int index) { return getEntriesFieldBuilder() .addBuilder( index, com.google.cloud.speech.v1.TranscriptNormalization.Entry.getDefaultInstance()); } /** * * *
     * A list of replacement entries. We will perform replacement with one entry
     * at a time. For example, the second entry in ["cat" => "dog", "mountain cat"
     * => "mountain dog"] will never be applied because we will always process the
     * first entry before it. At most 100 entries.
     * 
* * repeated .google.cloud.speech.v1.TranscriptNormalization.Entry entries = 1; */ public java.util.List getEntriesBuilderList() { return getEntriesFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.speech.v1.TranscriptNormalization.Entry, com.google.cloud.speech.v1.TranscriptNormalization.Entry.Builder, com.google.cloud.speech.v1.TranscriptNormalization.EntryOrBuilder> getEntriesFieldBuilder() { if (entriesBuilder_ == null) { entriesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.speech.v1.TranscriptNormalization.Entry, com.google.cloud.speech.v1.TranscriptNormalization.Entry.Builder, com.google.cloud.speech.v1.TranscriptNormalization.EntryOrBuilder>( entries_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); entries_ = null; } return entriesBuilder_; } @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.speech.v1.TranscriptNormalization) } // @@protoc_insertion_point(class_scope:google.cloud.speech.v1.TranscriptNormalization) private static final com.google.cloud.speech.v1.TranscriptNormalization DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.speech.v1.TranscriptNormalization(); } public static com.google.cloud.speech.v1.TranscriptNormalization getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public TranscriptNormalization 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.speech.v1.TranscriptNormalization getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy