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

com.google.cloud.speech.v1.SpeechAdaptation 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;

/**
 *
 *
 * 
 * Speech adaptation configuration.
 * 
* * Protobuf type {@code google.cloud.speech.v1.SpeechAdaptation} */ public final class SpeechAdaptation extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.speech.v1.SpeechAdaptation) SpeechAdaptationOrBuilder { private static final long serialVersionUID = 0L; // Use SpeechAdaptation.newBuilder() to construct. private SpeechAdaptation(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private SpeechAdaptation() { phraseSets_ = java.util.Collections.emptyList(); phraseSetReferences_ = com.google.protobuf.LazyStringArrayList.emptyList(); customClasses_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new SpeechAdaptation(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.speech.v1.SpeechResourceProto .internal_static_google_cloud_speech_v1_SpeechAdaptation_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.speech.v1.SpeechResourceProto .internal_static_google_cloud_speech_v1_SpeechAdaptation_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.speech.v1.SpeechAdaptation.class, com.google.cloud.speech.v1.SpeechAdaptation.Builder.class); } public interface ABNFGrammarOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar) com.google.protobuf.MessageOrBuilder { /** * * *
     * All declarations and rules of an ABNF grammar broken up into multiple
     * strings that will end up concatenated.
     * 
* * repeated string abnf_strings = 1; * * @return A list containing the abnfStrings. */ java.util.List getAbnfStringsList(); /** * * *
     * All declarations and rules of an ABNF grammar broken up into multiple
     * strings that will end up concatenated.
     * 
* * repeated string abnf_strings = 1; * * @return The count of abnfStrings. */ int getAbnfStringsCount(); /** * * *
     * All declarations and rules of an ABNF grammar broken up into multiple
     * strings that will end up concatenated.
     * 
* * repeated string abnf_strings = 1; * * @param index The index of the element to return. * @return The abnfStrings at the given index. */ java.lang.String getAbnfStrings(int index); /** * * *
     * All declarations and rules of an ABNF grammar broken up into multiple
     * strings that will end up concatenated.
     * 
* * repeated string abnf_strings = 1; * * @param index The index of the value to return. * @return The bytes of the abnfStrings at the given index. */ com.google.protobuf.ByteString getAbnfStringsBytes(int index); } /** Protobuf type {@code google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar} */ public static final class ABNFGrammar extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar) ABNFGrammarOrBuilder { private static final long serialVersionUID = 0L; // Use ABNFGrammar.newBuilder() to construct. private ABNFGrammar(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private ABNFGrammar() { abnfStrings_ = com.google.protobuf.LazyStringArrayList.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new ABNFGrammar(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.speech.v1.SpeechResourceProto .internal_static_google_cloud_speech_v1_SpeechAdaptation_ABNFGrammar_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.speech.v1.SpeechResourceProto .internal_static_google_cloud_speech_v1_SpeechAdaptation_ABNFGrammar_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar.class, com.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar.Builder.class); } public static final int ABNF_STRINGS_FIELD_NUMBER = 1; @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList abnfStrings_ = com.google.protobuf.LazyStringArrayList.emptyList(); /** * * *
     * All declarations and rules of an ABNF grammar broken up into multiple
     * strings that will end up concatenated.
     * 
* * repeated string abnf_strings = 1; * * @return A list containing the abnfStrings. */ public com.google.protobuf.ProtocolStringList getAbnfStringsList() { return abnfStrings_; } /** * * *
     * All declarations and rules of an ABNF grammar broken up into multiple
     * strings that will end up concatenated.
     * 
* * repeated string abnf_strings = 1; * * @return The count of abnfStrings. */ public int getAbnfStringsCount() { return abnfStrings_.size(); } /** * * *
     * All declarations and rules of an ABNF grammar broken up into multiple
     * strings that will end up concatenated.
     * 
* * repeated string abnf_strings = 1; * * @param index The index of the element to return. * @return The abnfStrings at the given index. */ public java.lang.String getAbnfStrings(int index) { return abnfStrings_.get(index); } /** * * *
     * All declarations and rules of an ABNF grammar broken up into multiple
     * strings that will end up concatenated.
     * 
* * repeated string abnf_strings = 1; * * @param index The index of the value to return. * @return The bytes of the abnfStrings at the given index. */ public com.google.protobuf.ByteString getAbnfStringsBytes(int index) { return abnfStrings_.getByteString(index); } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { for (int i = 0; i < abnfStrings_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, abnfStrings_.getRaw(i)); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; { int dataSize = 0; for (int i = 0; i < abnfStrings_.size(); i++) { dataSize += computeStringSizeNoTag(abnfStrings_.getRaw(i)); } size += dataSize; size += 1 * getAbnfStringsList().size(); } 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.SpeechAdaptation.ABNFGrammar)) { return super.equals(obj); } com.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar other = (com.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar) obj; if (!getAbnfStringsList().equals(other.getAbnfStringsList())) 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 (getAbnfStringsCount() > 0) { hash = (37 * hash) + ABNF_STRINGS_FIELD_NUMBER; hash = (53 * hash) + getAbnfStringsList().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar 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.SpeechAdaptation.ABNFGrammar parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar 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.SpeechAdaptation.ABNFGrammar parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar 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.SpeechAdaptation.ABNFGrammar parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar 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.SpeechAdaptation.ABNFGrammar parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar 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.SpeechAdaptation.ABNFGrammar 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.SpeechAdaptation.ABNFGrammar 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.SpeechAdaptation.ABNFGrammar prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** Protobuf type {@code google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar) com.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammarOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.speech.v1.SpeechResourceProto .internal_static_google_cloud_speech_v1_SpeechAdaptation_ABNFGrammar_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.speech.v1.SpeechResourceProto .internal_static_google_cloud_speech_v1_SpeechAdaptation_ABNFGrammar_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar.class, com.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar.Builder.class); } // Construct using com.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; abnfStrings_ = com.google.protobuf.LazyStringArrayList.emptyList(); 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_SpeechAdaptation_ABNFGrammar_descriptor; } @java.lang.Override public com.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar getDefaultInstanceForType() { return com.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar.getDefaultInstance(); } @java.lang.Override public com.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar build() { com.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar buildPartial() { com.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar result = new com.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(com.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { abnfStrings_.makeImmutable(); result.abnfStrings_ = abnfStrings_; } } @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.SpeechAdaptation.ABNFGrammar) { return mergeFrom((com.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar other) { if (other == com.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar.getDefaultInstance()) return this; if (!other.abnfStrings_.isEmpty()) { if (abnfStrings_.isEmpty()) { abnfStrings_ = other.abnfStrings_; bitField0_ |= 0x00000001; } else { ensureAbnfStringsIsMutable(); abnfStrings_.addAll(other.abnfStrings_); } 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: { java.lang.String s = input.readStringRequireUtf8(); ensureAbnfStringsIsMutable(); abnfStrings_.add(s); 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 com.google.protobuf.LazyStringArrayList abnfStrings_ = com.google.protobuf.LazyStringArrayList.emptyList(); private void ensureAbnfStringsIsMutable() { if (!abnfStrings_.isModifiable()) { abnfStrings_ = new com.google.protobuf.LazyStringArrayList(abnfStrings_); } bitField0_ |= 0x00000001; } /** * * *
       * All declarations and rules of an ABNF grammar broken up into multiple
       * strings that will end up concatenated.
       * 
* * repeated string abnf_strings = 1; * * @return A list containing the abnfStrings. */ public com.google.protobuf.ProtocolStringList getAbnfStringsList() { abnfStrings_.makeImmutable(); return abnfStrings_; } /** * * *
       * All declarations and rules of an ABNF grammar broken up into multiple
       * strings that will end up concatenated.
       * 
* * repeated string abnf_strings = 1; * * @return The count of abnfStrings. */ public int getAbnfStringsCount() { return abnfStrings_.size(); } /** * * *
       * All declarations and rules of an ABNF grammar broken up into multiple
       * strings that will end up concatenated.
       * 
* * repeated string abnf_strings = 1; * * @param index The index of the element to return. * @return The abnfStrings at the given index. */ public java.lang.String getAbnfStrings(int index) { return abnfStrings_.get(index); } /** * * *
       * All declarations and rules of an ABNF grammar broken up into multiple
       * strings that will end up concatenated.
       * 
* * repeated string abnf_strings = 1; * * @param index The index of the value to return. * @return The bytes of the abnfStrings at the given index. */ public com.google.protobuf.ByteString getAbnfStringsBytes(int index) { return abnfStrings_.getByteString(index); } /** * * *
       * All declarations and rules of an ABNF grammar broken up into multiple
       * strings that will end up concatenated.
       * 
* * repeated string abnf_strings = 1; * * @param index The index to set the value at. * @param value The abnfStrings to set. * @return This builder for chaining. */ public Builder setAbnfStrings(int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureAbnfStringsIsMutable(); abnfStrings_.set(index, value); bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
       * All declarations and rules of an ABNF grammar broken up into multiple
       * strings that will end up concatenated.
       * 
* * repeated string abnf_strings = 1; * * @param value The abnfStrings to add. * @return This builder for chaining. */ public Builder addAbnfStrings(java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureAbnfStringsIsMutable(); abnfStrings_.add(value); bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
       * All declarations and rules of an ABNF grammar broken up into multiple
       * strings that will end up concatenated.
       * 
* * repeated string abnf_strings = 1; * * @param values The abnfStrings to add. * @return This builder for chaining. */ public Builder addAllAbnfStrings(java.lang.Iterable values) { ensureAbnfStringsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, abnfStrings_); bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
       * All declarations and rules of an ABNF grammar broken up into multiple
       * strings that will end up concatenated.
       * 
* * repeated string abnf_strings = 1; * * @return This builder for chaining. */ public Builder clearAbnfStrings() { abnfStrings_ = com.google.protobuf.LazyStringArrayList.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); ; onChanged(); return this; } /** * * *
       * All declarations and rules of an ABNF grammar broken up into multiple
       * strings that will end up concatenated.
       * 
* * repeated string abnf_strings = 1; * * @param value The bytes of the abnfStrings to add. * @return This builder for chaining. */ public Builder addAbnfStringsBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); ensureAbnfStringsIsMutable(); abnfStrings_.add(value); bitField0_ |= 0x00000001; onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar) } // @@protoc_insertion_point(class_scope:google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar) private static final com.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar(); } public static com.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public ABNFGrammar 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.SpeechAdaptation.ABNFGrammar getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } private int bitField0_; public static final int PHRASE_SETS_FIELD_NUMBER = 1; @SuppressWarnings("serial") private java.util.List phraseSets_; /** * * *
   * A collection of phrase sets. To specify the hints inline, leave the
   * phrase set's `name` blank and fill in the rest of its fields. Any
   * phrase set can use any custom class.
   * 
* * repeated .google.cloud.speech.v1.PhraseSet phrase_sets = 1; */ @java.lang.Override public java.util.List getPhraseSetsList() { return phraseSets_; } /** * * *
   * A collection of phrase sets. To specify the hints inline, leave the
   * phrase set's `name` blank and fill in the rest of its fields. Any
   * phrase set can use any custom class.
   * 
* * repeated .google.cloud.speech.v1.PhraseSet phrase_sets = 1; */ @java.lang.Override public java.util.List getPhraseSetsOrBuilderList() { return phraseSets_; } /** * * *
   * A collection of phrase sets. To specify the hints inline, leave the
   * phrase set's `name` blank and fill in the rest of its fields. Any
   * phrase set can use any custom class.
   * 
* * repeated .google.cloud.speech.v1.PhraseSet phrase_sets = 1; */ @java.lang.Override public int getPhraseSetsCount() { return phraseSets_.size(); } /** * * *
   * A collection of phrase sets. To specify the hints inline, leave the
   * phrase set's `name` blank and fill in the rest of its fields. Any
   * phrase set can use any custom class.
   * 
* * repeated .google.cloud.speech.v1.PhraseSet phrase_sets = 1; */ @java.lang.Override public com.google.cloud.speech.v1.PhraseSet getPhraseSets(int index) { return phraseSets_.get(index); } /** * * *
   * A collection of phrase sets. To specify the hints inline, leave the
   * phrase set's `name` blank and fill in the rest of its fields. Any
   * phrase set can use any custom class.
   * 
* * repeated .google.cloud.speech.v1.PhraseSet phrase_sets = 1; */ @java.lang.Override public com.google.cloud.speech.v1.PhraseSetOrBuilder getPhraseSetsOrBuilder(int index) { return phraseSets_.get(index); } public static final int PHRASE_SET_REFERENCES_FIELD_NUMBER = 2; @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList phraseSetReferences_ = com.google.protobuf.LazyStringArrayList.emptyList(); /** * * *
   * A collection of phrase set resource names to use.
   * 
* * repeated string phrase_set_references = 2 [(.google.api.resource_reference) = { ... } * * * @return A list containing the phraseSetReferences. */ public com.google.protobuf.ProtocolStringList getPhraseSetReferencesList() { return phraseSetReferences_; } /** * * *
   * A collection of phrase set resource names to use.
   * 
* * repeated string phrase_set_references = 2 [(.google.api.resource_reference) = { ... } * * * @return The count of phraseSetReferences. */ public int getPhraseSetReferencesCount() { return phraseSetReferences_.size(); } /** * * *
   * A collection of phrase set resource names to use.
   * 
* * repeated string phrase_set_references = 2 [(.google.api.resource_reference) = { ... } * * * @param index The index of the element to return. * @return The phraseSetReferences at the given index. */ public java.lang.String getPhraseSetReferences(int index) { return phraseSetReferences_.get(index); } /** * * *
   * A collection of phrase set resource names to use.
   * 
* * repeated string phrase_set_references = 2 [(.google.api.resource_reference) = { ... } * * * @param index The index of the value to return. * @return The bytes of the phraseSetReferences at the given index. */ public com.google.protobuf.ByteString getPhraseSetReferencesBytes(int index) { return phraseSetReferences_.getByteString(index); } public static final int CUSTOM_CLASSES_FIELD_NUMBER = 3; @SuppressWarnings("serial") private java.util.List customClasses_; /** * * *
   * A collection of custom classes. To specify the classes inline, leave the
   * class' `name` blank and fill in the rest of its fields, giving it a unique
   * `custom_class_id`. Refer to the inline defined class in phrase hints by its
   * `custom_class_id`.
   * 
* * repeated .google.cloud.speech.v1.CustomClass custom_classes = 3; */ @java.lang.Override public java.util.List getCustomClassesList() { return customClasses_; } /** * * *
   * A collection of custom classes. To specify the classes inline, leave the
   * class' `name` blank and fill in the rest of its fields, giving it a unique
   * `custom_class_id`. Refer to the inline defined class in phrase hints by its
   * `custom_class_id`.
   * 
* * repeated .google.cloud.speech.v1.CustomClass custom_classes = 3; */ @java.lang.Override public java.util.List getCustomClassesOrBuilderList() { return customClasses_; } /** * * *
   * A collection of custom classes. To specify the classes inline, leave the
   * class' `name` blank and fill in the rest of its fields, giving it a unique
   * `custom_class_id`. Refer to the inline defined class in phrase hints by its
   * `custom_class_id`.
   * 
* * repeated .google.cloud.speech.v1.CustomClass custom_classes = 3; */ @java.lang.Override public int getCustomClassesCount() { return customClasses_.size(); } /** * * *
   * A collection of custom classes. To specify the classes inline, leave the
   * class' `name` blank and fill in the rest of its fields, giving it a unique
   * `custom_class_id`. Refer to the inline defined class in phrase hints by its
   * `custom_class_id`.
   * 
* * repeated .google.cloud.speech.v1.CustomClass custom_classes = 3; */ @java.lang.Override public com.google.cloud.speech.v1.CustomClass getCustomClasses(int index) { return customClasses_.get(index); } /** * * *
   * A collection of custom classes. To specify the classes inline, leave the
   * class' `name` blank and fill in the rest of its fields, giving it a unique
   * `custom_class_id`. Refer to the inline defined class in phrase hints by its
   * `custom_class_id`.
   * 
* * repeated .google.cloud.speech.v1.CustomClass custom_classes = 3; */ @java.lang.Override public com.google.cloud.speech.v1.CustomClassOrBuilder getCustomClassesOrBuilder(int index) { return customClasses_.get(index); } public static final int ABNF_GRAMMAR_FIELD_NUMBER = 4; private com.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar abnfGrammar_; /** * * *
   * Augmented Backus-Naur form (ABNF) is a standardized grammar notation
   * comprised by a set of derivation rules.
   * See specifications: https://www.w3.org/TR/speech-grammar
   * 
* * .google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar abnf_grammar = 4; * * @return Whether the abnfGrammar field is set. */ @java.lang.Override public boolean hasAbnfGrammar() { return ((bitField0_ & 0x00000001) != 0); } /** * * *
   * Augmented Backus-Naur form (ABNF) is a standardized grammar notation
   * comprised by a set of derivation rules.
   * See specifications: https://www.w3.org/TR/speech-grammar
   * 
* * .google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar abnf_grammar = 4; * * @return The abnfGrammar. */ @java.lang.Override public com.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar getAbnfGrammar() { return abnfGrammar_ == null ? com.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar.getDefaultInstance() : abnfGrammar_; } /** * * *
   * Augmented Backus-Naur form (ABNF) is a standardized grammar notation
   * comprised by a set of derivation rules.
   * See specifications: https://www.w3.org/TR/speech-grammar
   * 
* * .google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar abnf_grammar = 4; */ @java.lang.Override public com.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammarOrBuilder getAbnfGrammarOrBuilder() { return abnfGrammar_ == null ? com.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar.getDefaultInstance() : abnfGrammar_; } 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 < phraseSets_.size(); i++) { output.writeMessage(1, phraseSets_.get(i)); } for (int i = 0; i < phraseSetReferences_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, phraseSetReferences_.getRaw(i)); } for (int i = 0; i < customClasses_.size(); i++) { output.writeMessage(3, customClasses_.get(i)); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(4, getAbnfGrammar()); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; for (int i = 0; i < phraseSets_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, phraseSets_.get(i)); } { int dataSize = 0; for (int i = 0; i < phraseSetReferences_.size(); i++) { dataSize += computeStringSizeNoTag(phraseSetReferences_.getRaw(i)); } size += dataSize; size += 1 * getPhraseSetReferencesList().size(); } for (int i = 0; i < customClasses_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, customClasses_.get(i)); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getAbnfGrammar()); } 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.SpeechAdaptation)) { return super.equals(obj); } com.google.cloud.speech.v1.SpeechAdaptation other = (com.google.cloud.speech.v1.SpeechAdaptation) obj; if (!getPhraseSetsList().equals(other.getPhraseSetsList())) return false; if (!getPhraseSetReferencesList().equals(other.getPhraseSetReferencesList())) return false; if (!getCustomClassesList().equals(other.getCustomClassesList())) return false; if (hasAbnfGrammar() != other.hasAbnfGrammar()) return false; if (hasAbnfGrammar()) { if (!getAbnfGrammar().equals(other.getAbnfGrammar())) 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 (getPhraseSetsCount() > 0) { hash = (37 * hash) + PHRASE_SETS_FIELD_NUMBER; hash = (53 * hash) + getPhraseSetsList().hashCode(); } if (getPhraseSetReferencesCount() > 0) { hash = (37 * hash) + PHRASE_SET_REFERENCES_FIELD_NUMBER; hash = (53 * hash) + getPhraseSetReferencesList().hashCode(); } if (getCustomClassesCount() > 0) { hash = (37 * hash) + CUSTOM_CLASSES_FIELD_NUMBER; hash = (53 * hash) + getCustomClassesList().hashCode(); } if (hasAbnfGrammar()) { hash = (37 * hash) + ABNF_GRAMMAR_FIELD_NUMBER; hash = (53 * hash) + getAbnfGrammar().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.speech.v1.SpeechAdaptation parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.speech.v1.SpeechAdaptation 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.SpeechAdaptation parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.speech.v1.SpeechAdaptation 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.SpeechAdaptation parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.speech.v1.SpeechAdaptation 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.SpeechAdaptation parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.speech.v1.SpeechAdaptation 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.SpeechAdaptation parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.speech.v1.SpeechAdaptation 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.SpeechAdaptation 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.SpeechAdaptation 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.SpeechAdaptation 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; } /** * * *
   * Speech adaptation configuration.
   * 
* * Protobuf type {@code google.cloud.speech.v1.SpeechAdaptation} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.speech.v1.SpeechAdaptation) com.google.cloud.speech.v1.SpeechAdaptationOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.speech.v1.SpeechResourceProto .internal_static_google_cloud_speech_v1_SpeechAdaptation_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.speech.v1.SpeechResourceProto .internal_static_google_cloud_speech_v1_SpeechAdaptation_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.speech.v1.SpeechAdaptation.class, com.google.cloud.speech.v1.SpeechAdaptation.Builder.class); } // Construct using com.google.cloud.speech.v1.SpeechAdaptation.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { getPhraseSetsFieldBuilder(); getCustomClassesFieldBuilder(); getAbnfGrammarFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; if (phraseSetsBuilder_ == null) { phraseSets_ = java.util.Collections.emptyList(); } else { phraseSets_ = null; phraseSetsBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000001); phraseSetReferences_ = com.google.protobuf.LazyStringArrayList.emptyList(); if (customClassesBuilder_ == null) { customClasses_ = java.util.Collections.emptyList(); } else { customClasses_ = null; customClassesBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000004); abnfGrammar_ = null; if (abnfGrammarBuilder_ != null) { abnfGrammarBuilder_.dispose(); abnfGrammarBuilder_ = null; } 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_SpeechAdaptation_descriptor; } @java.lang.Override public com.google.cloud.speech.v1.SpeechAdaptation getDefaultInstanceForType() { return com.google.cloud.speech.v1.SpeechAdaptation.getDefaultInstance(); } @java.lang.Override public com.google.cloud.speech.v1.SpeechAdaptation build() { com.google.cloud.speech.v1.SpeechAdaptation result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.speech.v1.SpeechAdaptation buildPartial() { com.google.cloud.speech.v1.SpeechAdaptation result = new com.google.cloud.speech.v1.SpeechAdaptation(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartialRepeatedFields(com.google.cloud.speech.v1.SpeechAdaptation result) { if (phraseSetsBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { phraseSets_ = java.util.Collections.unmodifiableList(phraseSets_); bitField0_ = (bitField0_ & ~0x00000001); } result.phraseSets_ = phraseSets_; } else { result.phraseSets_ = phraseSetsBuilder_.build(); } if (customClassesBuilder_ == null) { if (((bitField0_ & 0x00000004) != 0)) { customClasses_ = java.util.Collections.unmodifiableList(customClasses_); bitField0_ = (bitField0_ & ~0x00000004); } result.customClasses_ = customClasses_; } else { result.customClasses_ = customClassesBuilder_.build(); } } private void buildPartial0(com.google.cloud.speech.v1.SpeechAdaptation result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000002) != 0)) { phraseSetReferences_.makeImmutable(); result.phraseSetReferences_ = phraseSetReferences_; } int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000008) != 0)) { result.abnfGrammar_ = abnfGrammarBuilder_ == null ? abnfGrammar_ : abnfGrammarBuilder_.build(); to_bitField0_ |= 0x00000001; } result.bitField0_ |= to_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.SpeechAdaptation) { return mergeFrom((com.google.cloud.speech.v1.SpeechAdaptation) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.speech.v1.SpeechAdaptation other) { if (other == com.google.cloud.speech.v1.SpeechAdaptation.getDefaultInstance()) return this; if (phraseSetsBuilder_ == null) { if (!other.phraseSets_.isEmpty()) { if (phraseSets_.isEmpty()) { phraseSets_ = other.phraseSets_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensurePhraseSetsIsMutable(); phraseSets_.addAll(other.phraseSets_); } onChanged(); } } else { if (!other.phraseSets_.isEmpty()) { if (phraseSetsBuilder_.isEmpty()) { phraseSetsBuilder_.dispose(); phraseSetsBuilder_ = null; phraseSets_ = other.phraseSets_; bitField0_ = (bitField0_ & ~0x00000001); phraseSetsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getPhraseSetsFieldBuilder() : null; } else { phraseSetsBuilder_.addAllMessages(other.phraseSets_); } } } if (!other.phraseSetReferences_.isEmpty()) { if (phraseSetReferences_.isEmpty()) { phraseSetReferences_ = other.phraseSetReferences_; bitField0_ |= 0x00000002; } else { ensurePhraseSetReferencesIsMutable(); phraseSetReferences_.addAll(other.phraseSetReferences_); } onChanged(); } if (customClassesBuilder_ == null) { if (!other.customClasses_.isEmpty()) { if (customClasses_.isEmpty()) { customClasses_ = other.customClasses_; bitField0_ = (bitField0_ & ~0x00000004); } else { ensureCustomClassesIsMutable(); customClasses_.addAll(other.customClasses_); } onChanged(); } } else { if (!other.customClasses_.isEmpty()) { if (customClassesBuilder_.isEmpty()) { customClassesBuilder_.dispose(); customClassesBuilder_ = null; customClasses_ = other.customClasses_; bitField0_ = (bitField0_ & ~0x00000004); customClassesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getCustomClassesFieldBuilder() : null; } else { customClassesBuilder_.addAllMessages(other.customClasses_); } } } if (other.hasAbnfGrammar()) { mergeAbnfGrammar(other.getAbnfGrammar()); } 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.PhraseSet m = input.readMessage( com.google.cloud.speech.v1.PhraseSet.parser(), extensionRegistry); if (phraseSetsBuilder_ == null) { ensurePhraseSetsIsMutable(); phraseSets_.add(m); } else { phraseSetsBuilder_.addMessage(m); } break; } // case 10 case 18: { java.lang.String s = input.readStringRequireUtf8(); ensurePhraseSetReferencesIsMutable(); phraseSetReferences_.add(s); break; } // case 18 case 26: { com.google.cloud.speech.v1.CustomClass m = input.readMessage( com.google.cloud.speech.v1.CustomClass.parser(), extensionRegistry); if (customClassesBuilder_ == null) { ensureCustomClassesIsMutable(); customClasses_.add(m); } else { customClassesBuilder_.addMessage(m); } break; } // case 26 case 34: { input.readMessage(getAbnfGrammarFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000008; break; } // case 34 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 phraseSets_ = java.util.Collections.emptyList(); private void ensurePhraseSetsIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { phraseSets_ = new java.util.ArrayList(phraseSets_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.speech.v1.PhraseSet, com.google.cloud.speech.v1.PhraseSet.Builder, com.google.cloud.speech.v1.PhraseSetOrBuilder> phraseSetsBuilder_; /** * * *
     * A collection of phrase sets. To specify the hints inline, leave the
     * phrase set's `name` blank and fill in the rest of its fields. Any
     * phrase set can use any custom class.
     * 
* * repeated .google.cloud.speech.v1.PhraseSet phrase_sets = 1; */ public java.util.List getPhraseSetsList() { if (phraseSetsBuilder_ == null) { return java.util.Collections.unmodifiableList(phraseSets_); } else { return phraseSetsBuilder_.getMessageList(); } } /** * * *
     * A collection of phrase sets. To specify the hints inline, leave the
     * phrase set's `name` blank and fill in the rest of its fields. Any
     * phrase set can use any custom class.
     * 
* * repeated .google.cloud.speech.v1.PhraseSet phrase_sets = 1; */ public int getPhraseSetsCount() { if (phraseSetsBuilder_ == null) { return phraseSets_.size(); } else { return phraseSetsBuilder_.getCount(); } } /** * * *
     * A collection of phrase sets. To specify the hints inline, leave the
     * phrase set's `name` blank and fill in the rest of its fields. Any
     * phrase set can use any custom class.
     * 
* * repeated .google.cloud.speech.v1.PhraseSet phrase_sets = 1; */ public com.google.cloud.speech.v1.PhraseSet getPhraseSets(int index) { if (phraseSetsBuilder_ == null) { return phraseSets_.get(index); } else { return phraseSetsBuilder_.getMessage(index); } } /** * * *
     * A collection of phrase sets. To specify the hints inline, leave the
     * phrase set's `name` blank and fill in the rest of its fields. Any
     * phrase set can use any custom class.
     * 
* * repeated .google.cloud.speech.v1.PhraseSet phrase_sets = 1; */ public Builder setPhraseSets(int index, com.google.cloud.speech.v1.PhraseSet value) { if (phraseSetsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensurePhraseSetsIsMutable(); phraseSets_.set(index, value); onChanged(); } else { phraseSetsBuilder_.setMessage(index, value); } return this; } /** * * *
     * A collection of phrase sets. To specify the hints inline, leave the
     * phrase set's `name` blank and fill in the rest of its fields. Any
     * phrase set can use any custom class.
     * 
* * repeated .google.cloud.speech.v1.PhraseSet phrase_sets = 1; */ public Builder setPhraseSets( int index, com.google.cloud.speech.v1.PhraseSet.Builder builderForValue) { if (phraseSetsBuilder_ == null) { ensurePhraseSetsIsMutable(); phraseSets_.set(index, builderForValue.build()); onChanged(); } else { phraseSetsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * * *
     * A collection of phrase sets. To specify the hints inline, leave the
     * phrase set's `name` blank and fill in the rest of its fields. Any
     * phrase set can use any custom class.
     * 
* * repeated .google.cloud.speech.v1.PhraseSet phrase_sets = 1; */ public Builder addPhraseSets(com.google.cloud.speech.v1.PhraseSet value) { if (phraseSetsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensurePhraseSetsIsMutable(); phraseSets_.add(value); onChanged(); } else { phraseSetsBuilder_.addMessage(value); } return this; } /** * * *
     * A collection of phrase sets. To specify the hints inline, leave the
     * phrase set's `name` blank and fill in the rest of its fields. Any
     * phrase set can use any custom class.
     * 
* * repeated .google.cloud.speech.v1.PhraseSet phrase_sets = 1; */ public Builder addPhraseSets(int index, com.google.cloud.speech.v1.PhraseSet value) { if (phraseSetsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensurePhraseSetsIsMutable(); phraseSets_.add(index, value); onChanged(); } else { phraseSetsBuilder_.addMessage(index, value); } return this; } /** * * *
     * A collection of phrase sets. To specify the hints inline, leave the
     * phrase set's `name` blank and fill in the rest of its fields. Any
     * phrase set can use any custom class.
     * 
* * repeated .google.cloud.speech.v1.PhraseSet phrase_sets = 1; */ public Builder addPhraseSets(com.google.cloud.speech.v1.PhraseSet.Builder builderForValue) { if (phraseSetsBuilder_ == null) { ensurePhraseSetsIsMutable(); phraseSets_.add(builderForValue.build()); onChanged(); } else { phraseSetsBuilder_.addMessage(builderForValue.build()); } return this; } /** * * *
     * A collection of phrase sets. To specify the hints inline, leave the
     * phrase set's `name` blank and fill in the rest of its fields. Any
     * phrase set can use any custom class.
     * 
* * repeated .google.cloud.speech.v1.PhraseSet phrase_sets = 1; */ public Builder addPhraseSets( int index, com.google.cloud.speech.v1.PhraseSet.Builder builderForValue) { if (phraseSetsBuilder_ == null) { ensurePhraseSetsIsMutable(); phraseSets_.add(index, builderForValue.build()); onChanged(); } else { phraseSetsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * * *
     * A collection of phrase sets. To specify the hints inline, leave the
     * phrase set's `name` blank and fill in the rest of its fields. Any
     * phrase set can use any custom class.
     * 
* * repeated .google.cloud.speech.v1.PhraseSet phrase_sets = 1; */ public Builder addAllPhraseSets( java.lang.Iterable values) { if (phraseSetsBuilder_ == null) { ensurePhraseSetsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, phraseSets_); onChanged(); } else { phraseSetsBuilder_.addAllMessages(values); } return this; } /** * * *
     * A collection of phrase sets. To specify the hints inline, leave the
     * phrase set's `name` blank and fill in the rest of its fields. Any
     * phrase set can use any custom class.
     * 
* * repeated .google.cloud.speech.v1.PhraseSet phrase_sets = 1; */ public Builder clearPhraseSets() { if (phraseSetsBuilder_ == null) { phraseSets_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { phraseSetsBuilder_.clear(); } return this; } /** * * *
     * A collection of phrase sets. To specify the hints inline, leave the
     * phrase set's `name` blank and fill in the rest of its fields. Any
     * phrase set can use any custom class.
     * 
* * repeated .google.cloud.speech.v1.PhraseSet phrase_sets = 1; */ public Builder removePhraseSets(int index) { if (phraseSetsBuilder_ == null) { ensurePhraseSetsIsMutable(); phraseSets_.remove(index); onChanged(); } else { phraseSetsBuilder_.remove(index); } return this; } /** * * *
     * A collection of phrase sets. To specify the hints inline, leave the
     * phrase set's `name` blank and fill in the rest of its fields. Any
     * phrase set can use any custom class.
     * 
* * repeated .google.cloud.speech.v1.PhraseSet phrase_sets = 1; */ public com.google.cloud.speech.v1.PhraseSet.Builder getPhraseSetsBuilder(int index) { return getPhraseSetsFieldBuilder().getBuilder(index); } /** * * *
     * A collection of phrase sets. To specify the hints inline, leave the
     * phrase set's `name` blank and fill in the rest of its fields. Any
     * phrase set can use any custom class.
     * 
* * repeated .google.cloud.speech.v1.PhraseSet phrase_sets = 1; */ public com.google.cloud.speech.v1.PhraseSetOrBuilder getPhraseSetsOrBuilder(int index) { if (phraseSetsBuilder_ == null) { return phraseSets_.get(index); } else { return phraseSetsBuilder_.getMessageOrBuilder(index); } } /** * * *
     * A collection of phrase sets. To specify the hints inline, leave the
     * phrase set's `name` blank and fill in the rest of its fields. Any
     * phrase set can use any custom class.
     * 
* * repeated .google.cloud.speech.v1.PhraseSet phrase_sets = 1; */ public java.util.List getPhraseSetsOrBuilderList() { if (phraseSetsBuilder_ != null) { return phraseSetsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(phraseSets_); } } /** * * *
     * A collection of phrase sets. To specify the hints inline, leave the
     * phrase set's `name` blank and fill in the rest of its fields. Any
     * phrase set can use any custom class.
     * 
* * repeated .google.cloud.speech.v1.PhraseSet phrase_sets = 1; */ public com.google.cloud.speech.v1.PhraseSet.Builder addPhraseSetsBuilder() { return getPhraseSetsFieldBuilder() .addBuilder(com.google.cloud.speech.v1.PhraseSet.getDefaultInstance()); } /** * * *
     * A collection of phrase sets. To specify the hints inline, leave the
     * phrase set's `name` blank and fill in the rest of its fields. Any
     * phrase set can use any custom class.
     * 
* * repeated .google.cloud.speech.v1.PhraseSet phrase_sets = 1; */ public com.google.cloud.speech.v1.PhraseSet.Builder addPhraseSetsBuilder(int index) { return getPhraseSetsFieldBuilder() .addBuilder(index, com.google.cloud.speech.v1.PhraseSet.getDefaultInstance()); } /** * * *
     * A collection of phrase sets. To specify the hints inline, leave the
     * phrase set's `name` blank and fill in the rest of its fields. Any
     * phrase set can use any custom class.
     * 
* * repeated .google.cloud.speech.v1.PhraseSet phrase_sets = 1; */ public java.util.List getPhraseSetsBuilderList() { return getPhraseSetsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.speech.v1.PhraseSet, com.google.cloud.speech.v1.PhraseSet.Builder, com.google.cloud.speech.v1.PhraseSetOrBuilder> getPhraseSetsFieldBuilder() { if (phraseSetsBuilder_ == null) { phraseSetsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.speech.v1.PhraseSet, com.google.cloud.speech.v1.PhraseSet.Builder, com.google.cloud.speech.v1.PhraseSetOrBuilder>( phraseSets_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); phraseSets_ = null; } return phraseSetsBuilder_; } private com.google.protobuf.LazyStringArrayList phraseSetReferences_ = com.google.protobuf.LazyStringArrayList.emptyList(); private void ensurePhraseSetReferencesIsMutable() { if (!phraseSetReferences_.isModifiable()) { phraseSetReferences_ = new com.google.protobuf.LazyStringArrayList(phraseSetReferences_); } bitField0_ |= 0x00000002; } /** * * *
     * A collection of phrase set resource names to use.
     * 
* * repeated string phrase_set_references = 2 [(.google.api.resource_reference) = { ... } * * * @return A list containing the phraseSetReferences. */ public com.google.protobuf.ProtocolStringList getPhraseSetReferencesList() { phraseSetReferences_.makeImmutable(); return phraseSetReferences_; } /** * * *
     * A collection of phrase set resource names to use.
     * 
* * repeated string phrase_set_references = 2 [(.google.api.resource_reference) = { ... } * * * @return The count of phraseSetReferences. */ public int getPhraseSetReferencesCount() { return phraseSetReferences_.size(); } /** * * *
     * A collection of phrase set resource names to use.
     * 
* * repeated string phrase_set_references = 2 [(.google.api.resource_reference) = { ... } * * * @param index The index of the element to return. * @return The phraseSetReferences at the given index. */ public java.lang.String getPhraseSetReferences(int index) { return phraseSetReferences_.get(index); } /** * * *
     * A collection of phrase set resource names to use.
     * 
* * repeated string phrase_set_references = 2 [(.google.api.resource_reference) = { ... } * * * @param index The index of the value to return. * @return The bytes of the phraseSetReferences at the given index. */ public com.google.protobuf.ByteString getPhraseSetReferencesBytes(int index) { return phraseSetReferences_.getByteString(index); } /** * * *
     * A collection of phrase set resource names to use.
     * 
* * repeated string phrase_set_references = 2 [(.google.api.resource_reference) = { ... } * * * @param index The index to set the value at. * @param value The phraseSetReferences to set. * @return This builder for chaining. */ public Builder setPhraseSetReferences(int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensurePhraseSetReferencesIsMutable(); phraseSetReferences_.set(index, value); bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
     * A collection of phrase set resource names to use.
     * 
* * repeated string phrase_set_references = 2 [(.google.api.resource_reference) = { ... } * * * @param value The phraseSetReferences to add. * @return This builder for chaining. */ public Builder addPhraseSetReferences(java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensurePhraseSetReferencesIsMutable(); phraseSetReferences_.add(value); bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
     * A collection of phrase set resource names to use.
     * 
* * repeated string phrase_set_references = 2 [(.google.api.resource_reference) = { ... } * * * @param values The phraseSetReferences to add. * @return This builder for chaining. */ public Builder addAllPhraseSetReferences(java.lang.Iterable values) { ensurePhraseSetReferencesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, phraseSetReferences_); bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
     * A collection of phrase set resource names to use.
     * 
* * repeated string phrase_set_references = 2 [(.google.api.resource_reference) = { ... } * * * @return This builder for chaining. */ public Builder clearPhraseSetReferences() { phraseSetReferences_ = com.google.protobuf.LazyStringArrayList.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); ; onChanged(); return this; } /** * * *
     * A collection of phrase set resource names to use.
     * 
* * repeated string phrase_set_references = 2 [(.google.api.resource_reference) = { ... } * * * @param value The bytes of the phraseSetReferences to add. * @return This builder for chaining. */ public Builder addPhraseSetReferencesBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); ensurePhraseSetReferencesIsMutable(); phraseSetReferences_.add(value); bitField0_ |= 0x00000002; onChanged(); return this; } private java.util.List customClasses_ = java.util.Collections.emptyList(); private void ensureCustomClassesIsMutable() { if (!((bitField0_ & 0x00000004) != 0)) { customClasses_ = new java.util.ArrayList(customClasses_); bitField0_ |= 0x00000004; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.speech.v1.CustomClass, com.google.cloud.speech.v1.CustomClass.Builder, com.google.cloud.speech.v1.CustomClassOrBuilder> customClassesBuilder_; /** * * *
     * A collection of custom classes. To specify the classes inline, leave the
     * class' `name` blank and fill in the rest of its fields, giving it a unique
     * `custom_class_id`. Refer to the inline defined class in phrase hints by its
     * `custom_class_id`.
     * 
* * repeated .google.cloud.speech.v1.CustomClass custom_classes = 3; */ public java.util.List getCustomClassesList() { if (customClassesBuilder_ == null) { return java.util.Collections.unmodifiableList(customClasses_); } else { return customClassesBuilder_.getMessageList(); } } /** * * *
     * A collection of custom classes. To specify the classes inline, leave the
     * class' `name` blank and fill in the rest of its fields, giving it a unique
     * `custom_class_id`. Refer to the inline defined class in phrase hints by its
     * `custom_class_id`.
     * 
* * repeated .google.cloud.speech.v1.CustomClass custom_classes = 3; */ public int getCustomClassesCount() { if (customClassesBuilder_ == null) { return customClasses_.size(); } else { return customClassesBuilder_.getCount(); } } /** * * *
     * A collection of custom classes. To specify the classes inline, leave the
     * class' `name` blank and fill in the rest of its fields, giving it a unique
     * `custom_class_id`. Refer to the inline defined class in phrase hints by its
     * `custom_class_id`.
     * 
* * repeated .google.cloud.speech.v1.CustomClass custom_classes = 3; */ public com.google.cloud.speech.v1.CustomClass getCustomClasses(int index) { if (customClassesBuilder_ == null) { return customClasses_.get(index); } else { return customClassesBuilder_.getMessage(index); } } /** * * *
     * A collection of custom classes. To specify the classes inline, leave the
     * class' `name` blank and fill in the rest of its fields, giving it a unique
     * `custom_class_id`. Refer to the inline defined class in phrase hints by its
     * `custom_class_id`.
     * 
* * repeated .google.cloud.speech.v1.CustomClass custom_classes = 3; */ public Builder setCustomClasses(int index, com.google.cloud.speech.v1.CustomClass value) { if (customClassesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureCustomClassesIsMutable(); customClasses_.set(index, value); onChanged(); } else { customClassesBuilder_.setMessage(index, value); } return this; } /** * * *
     * A collection of custom classes. To specify the classes inline, leave the
     * class' `name` blank and fill in the rest of its fields, giving it a unique
     * `custom_class_id`. Refer to the inline defined class in phrase hints by its
     * `custom_class_id`.
     * 
* * repeated .google.cloud.speech.v1.CustomClass custom_classes = 3; */ public Builder setCustomClasses( int index, com.google.cloud.speech.v1.CustomClass.Builder builderForValue) { if (customClassesBuilder_ == null) { ensureCustomClassesIsMutable(); customClasses_.set(index, builderForValue.build()); onChanged(); } else { customClassesBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * * *
     * A collection of custom classes. To specify the classes inline, leave the
     * class' `name` blank and fill in the rest of its fields, giving it a unique
     * `custom_class_id`. Refer to the inline defined class in phrase hints by its
     * `custom_class_id`.
     * 
* * repeated .google.cloud.speech.v1.CustomClass custom_classes = 3; */ public Builder addCustomClasses(com.google.cloud.speech.v1.CustomClass value) { if (customClassesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureCustomClassesIsMutable(); customClasses_.add(value); onChanged(); } else { customClassesBuilder_.addMessage(value); } return this; } /** * * *
     * A collection of custom classes. To specify the classes inline, leave the
     * class' `name` blank and fill in the rest of its fields, giving it a unique
     * `custom_class_id`. Refer to the inline defined class in phrase hints by its
     * `custom_class_id`.
     * 
* * repeated .google.cloud.speech.v1.CustomClass custom_classes = 3; */ public Builder addCustomClasses(int index, com.google.cloud.speech.v1.CustomClass value) { if (customClassesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureCustomClassesIsMutable(); customClasses_.add(index, value); onChanged(); } else { customClassesBuilder_.addMessage(index, value); } return this; } /** * * *
     * A collection of custom classes. To specify the classes inline, leave the
     * class' `name` blank and fill in the rest of its fields, giving it a unique
     * `custom_class_id`. Refer to the inline defined class in phrase hints by its
     * `custom_class_id`.
     * 
* * repeated .google.cloud.speech.v1.CustomClass custom_classes = 3; */ public Builder addCustomClasses( com.google.cloud.speech.v1.CustomClass.Builder builderForValue) { if (customClassesBuilder_ == null) { ensureCustomClassesIsMutable(); customClasses_.add(builderForValue.build()); onChanged(); } else { customClassesBuilder_.addMessage(builderForValue.build()); } return this; } /** * * *
     * A collection of custom classes. To specify the classes inline, leave the
     * class' `name` blank and fill in the rest of its fields, giving it a unique
     * `custom_class_id`. Refer to the inline defined class in phrase hints by its
     * `custom_class_id`.
     * 
* * repeated .google.cloud.speech.v1.CustomClass custom_classes = 3; */ public Builder addCustomClasses( int index, com.google.cloud.speech.v1.CustomClass.Builder builderForValue) { if (customClassesBuilder_ == null) { ensureCustomClassesIsMutable(); customClasses_.add(index, builderForValue.build()); onChanged(); } else { customClassesBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * * *
     * A collection of custom classes. To specify the classes inline, leave the
     * class' `name` blank and fill in the rest of its fields, giving it a unique
     * `custom_class_id`. Refer to the inline defined class in phrase hints by its
     * `custom_class_id`.
     * 
* * repeated .google.cloud.speech.v1.CustomClass custom_classes = 3; */ public Builder addAllCustomClasses( java.lang.Iterable values) { if (customClassesBuilder_ == null) { ensureCustomClassesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, customClasses_); onChanged(); } else { customClassesBuilder_.addAllMessages(values); } return this; } /** * * *
     * A collection of custom classes. To specify the classes inline, leave the
     * class' `name` blank and fill in the rest of its fields, giving it a unique
     * `custom_class_id`. Refer to the inline defined class in phrase hints by its
     * `custom_class_id`.
     * 
* * repeated .google.cloud.speech.v1.CustomClass custom_classes = 3; */ public Builder clearCustomClasses() { if (customClassesBuilder_ == null) { customClasses_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000004); onChanged(); } else { customClassesBuilder_.clear(); } return this; } /** * * *
     * A collection of custom classes. To specify the classes inline, leave the
     * class' `name` blank and fill in the rest of its fields, giving it a unique
     * `custom_class_id`. Refer to the inline defined class in phrase hints by its
     * `custom_class_id`.
     * 
* * repeated .google.cloud.speech.v1.CustomClass custom_classes = 3; */ public Builder removeCustomClasses(int index) { if (customClassesBuilder_ == null) { ensureCustomClassesIsMutable(); customClasses_.remove(index); onChanged(); } else { customClassesBuilder_.remove(index); } return this; } /** * * *
     * A collection of custom classes. To specify the classes inline, leave the
     * class' `name` blank and fill in the rest of its fields, giving it a unique
     * `custom_class_id`. Refer to the inline defined class in phrase hints by its
     * `custom_class_id`.
     * 
* * repeated .google.cloud.speech.v1.CustomClass custom_classes = 3; */ public com.google.cloud.speech.v1.CustomClass.Builder getCustomClassesBuilder(int index) { return getCustomClassesFieldBuilder().getBuilder(index); } /** * * *
     * A collection of custom classes. To specify the classes inline, leave the
     * class' `name` blank and fill in the rest of its fields, giving it a unique
     * `custom_class_id`. Refer to the inline defined class in phrase hints by its
     * `custom_class_id`.
     * 
* * repeated .google.cloud.speech.v1.CustomClass custom_classes = 3; */ public com.google.cloud.speech.v1.CustomClassOrBuilder getCustomClassesOrBuilder(int index) { if (customClassesBuilder_ == null) { return customClasses_.get(index); } else { return customClassesBuilder_.getMessageOrBuilder(index); } } /** * * *
     * A collection of custom classes. To specify the classes inline, leave the
     * class' `name` blank and fill in the rest of its fields, giving it a unique
     * `custom_class_id`. Refer to the inline defined class in phrase hints by its
     * `custom_class_id`.
     * 
* * repeated .google.cloud.speech.v1.CustomClass custom_classes = 3; */ public java.util.List getCustomClassesOrBuilderList() { if (customClassesBuilder_ != null) { return customClassesBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(customClasses_); } } /** * * *
     * A collection of custom classes. To specify the classes inline, leave the
     * class' `name` blank and fill in the rest of its fields, giving it a unique
     * `custom_class_id`. Refer to the inline defined class in phrase hints by its
     * `custom_class_id`.
     * 
* * repeated .google.cloud.speech.v1.CustomClass custom_classes = 3; */ public com.google.cloud.speech.v1.CustomClass.Builder addCustomClassesBuilder() { return getCustomClassesFieldBuilder() .addBuilder(com.google.cloud.speech.v1.CustomClass.getDefaultInstance()); } /** * * *
     * A collection of custom classes. To specify the classes inline, leave the
     * class' `name` blank and fill in the rest of its fields, giving it a unique
     * `custom_class_id`. Refer to the inline defined class in phrase hints by its
     * `custom_class_id`.
     * 
* * repeated .google.cloud.speech.v1.CustomClass custom_classes = 3; */ public com.google.cloud.speech.v1.CustomClass.Builder addCustomClassesBuilder(int index) { return getCustomClassesFieldBuilder() .addBuilder(index, com.google.cloud.speech.v1.CustomClass.getDefaultInstance()); } /** * * *
     * A collection of custom classes. To specify the classes inline, leave the
     * class' `name` blank and fill in the rest of its fields, giving it a unique
     * `custom_class_id`. Refer to the inline defined class in phrase hints by its
     * `custom_class_id`.
     * 
* * repeated .google.cloud.speech.v1.CustomClass custom_classes = 3; */ public java.util.List getCustomClassesBuilderList() { return getCustomClassesFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.speech.v1.CustomClass, com.google.cloud.speech.v1.CustomClass.Builder, com.google.cloud.speech.v1.CustomClassOrBuilder> getCustomClassesFieldBuilder() { if (customClassesBuilder_ == null) { customClassesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.speech.v1.CustomClass, com.google.cloud.speech.v1.CustomClass.Builder, com.google.cloud.speech.v1.CustomClassOrBuilder>( customClasses_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); customClasses_ = null; } return customClassesBuilder_; } private com.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar abnfGrammar_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar, com.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar.Builder, com.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammarOrBuilder> abnfGrammarBuilder_; /** * * *
     * Augmented Backus-Naur form (ABNF) is a standardized grammar notation
     * comprised by a set of derivation rules.
     * See specifications: https://www.w3.org/TR/speech-grammar
     * 
* * .google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar abnf_grammar = 4; * * @return Whether the abnfGrammar field is set. */ public boolean hasAbnfGrammar() { return ((bitField0_ & 0x00000008) != 0); } /** * * *
     * Augmented Backus-Naur form (ABNF) is a standardized grammar notation
     * comprised by a set of derivation rules.
     * See specifications: https://www.w3.org/TR/speech-grammar
     * 
* * .google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar abnf_grammar = 4; * * @return The abnfGrammar. */ public com.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar getAbnfGrammar() { if (abnfGrammarBuilder_ == null) { return abnfGrammar_ == null ? com.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar.getDefaultInstance() : abnfGrammar_; } else { return abnfGrammarBuilder_.getMessage(); } } /** * * *
     * Augmented Backus-Naur form (ABNF) is a standardized grammar notation
     * comprised by a set of derivation rules.
     * See specifications: https://www.w3.org/TR/speech-grammar
     * 
* * .google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar abnf_grammar = 4; */ public Builder setAbnfGrammar(com.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar value) { if (abnfGrammarBuilder_ == null) { if (value == null) { throw new NullPointerException(); } abnfGrammar_ = value; } else { abnfGrammarBuilder_.setMessage(value); } bitField0_ |= 0x00000008; onChanged(); return this; } /** * * *
     * Augmented Backus-Naur form (ABNF) is a standardized grammar notation
     * comprised by a set of derivation rules.
     * See specifications: https://www.w3.org/TR/speech-grammar
     * 
* * .google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar abnf_grammar = 4; */ public Builder setAbnfGrammar( com.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar.Builder builderForValue) { if (abnfGrammarBuilder_ == null) { abnfGrammar_ = builderForValue.build(); } else { abnfGrammarBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000008; onChanged(); return this; } /** * * *
     * Augmented Backus-Naur form (ABNF) is a standardized grammar notation
     * comprised by a set of derivation rules.
     * See specifications: https://www.w3.org/TR/speech-grammar
     * 
* * .google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar abnf_grammar = 4; */ public Builder mergeAbnfGrammar(com.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar value) { if (abnfGrammarBuilder_ == null) { if (((bitField0_ & 0x00000008) != 0) && abnfGrammar_ != null && abnfGrammar_ != com.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar.getDefaultInstance()) { getAbnfGrammarBuilder().mergeFrom(value); } else { abnfGrammar_ = value; } } else { abnfGrammarBuilder_.mergeFrom(value); } if (abnfGrammar_ != null) { bitField0_ |= 0x00000008; onChanged(); } return this; } /** * * *
     * Augmented Backus-Naur form (ABNF) is a standardized grammar notation
     * comprised by a set of derivation rules.
     * See specifications: https://www.w3.org/TR/speech-grammar
     * 
* * .google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar abnf_grammar = 4; */ public Builder clearAbnfGrammar() { bitField0_ = (bitField0_ & ~0x00000008); abnfGrammar_ = null; if (abnfGrammarBuilder_ != null) { abnfGrammarBuilder_.dispose(); abnfGrammarBuilder_ = null; } onChanged(); return this; } /** * * *
     * Augmented Backus-Naur form (ABNF) is a standardized grammar notation
     * comprised by a set of derivation rules.
     * See specifications: https://www.w3.org/TR/speech-grammar
     * 
* * .google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar abnf_grammar = 4; */ public com.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar.Builder getAbnfGrammarBuilder() { bitField0_ |= 0x00000008; onChanged(); return getAbnfGrammarFieldBuilder().getBuilder(); } /** * * *
     * Augmented Backus-Naur form (ABNF) is a standardized grammar notation
     * comprised by a set of derivation rules.
     * See specifications: https://www.w3.org/TR/speech-grammar
     * 
* * .google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar abnf_grammar = 4; */ public com.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammarOrBuilder getAbnfGrammarOrBuilder() { if (abnfGrammarBuilder_ != null) { return abnfGrammarBuilder_.getMessageOrBuilder(); } else { return abnfGrammar_ == null ? com.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar.getDefaultInstance() : abnfGrammar_; } } /** * * *
     * Augmented Backus-Naur form (ABNF) is a standardized grammar notation
     * comprised by a set of derivation rules.
     * See specifications: https://www.w3.org/TR/speech-grammar
     * 
* * .google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar abnf_grammar = 4; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar, com.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar.Builder, com.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammarOrBuilder> getAbnfGrammarFieldBuilder() { if (abnfGrammarBuilder_ == null) { abnfGrammarBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar, com.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar.Builder, com.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammarOrBuilder>( getAbnfGrammar(), getParentForChildren(), isClean()); abnfGrammar_ = null; } return abnfGrammarBuilder_; } @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.SpeechAdaptation) } // @@protoc_insertion_point(class_scope:google.cloud.speech.v1.SpeechAdaptation) private static final com.google.cloud.speech.v1.SpeechAdaptation DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.speech.v1.SpeechAdaptation(); } public static com.google.cloud.speech.v1.SpeechAdaptation getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public SpeechAdaptation 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.SpeechAdaptation getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy