diff --git a/google-cloud-speech-bom/pom.xml b/google-cloud-speech-bom/pom.xml index f5f1fc9af..f720fc769 100644 --- a/google-cloud-speech-bom/pom.xml +++ b/google-cloud-speech-bom/pom.xml @@ -11,7 +11,7 @@ 0.5.0 - Google Cloud speech BOM + Google Cloud Speech BOM https://github.com/googleapis/java-speech BOM for Google Cloud Speech diff --git a/proto-google-cloud-speech-v1p1beta1/clirr-ignored-differences.xml b/proto-google-cloud-speech-v1p1beta1/clirr-ignored-differences.xml new file mode 100644 index 000000000..32245c4f8 --- /dev/null +++ b/proto-google-cloud-speech-v1p1beta1/clirr-ignored-differences.xml @@ -0,0 +1,19 @@ + + + + + 7012 + com/google/cloud/speech/v1p1beta1/*OrBuilder + * get*(*) + + + 7012 + com/google/cloud/speech/v1p1beta1/*OrBuilder + boolean contains*(*) + + + 7012 + com/google/cloud/speech/v1p1beta1/*OrBuilder + boolean has*(*) + + diff --git a/proto-google-cloud-speech-v1p1beta1/pom.xml b/proto-google-cloud-speech-v1p1beta1/pom.xml index 948639487..30d40247f 100644 --- a/proto-google-cloud-speech-v1p1beta1/pom.xml +++ b/proto-google-cloud-speech-v1p1beta1/pom.xml @@ -23,5 +23,13 @@ proto-google-common-protos compile + + com.google.guava + guava + + + com.google.api + api-common + \ No newline at end of file diff --git a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/CustomClass.java b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/CustomClass.java new file mode 100644 index 000000000..83194191b --- /dev/null +++ b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/CustomClass.java @@ -0,0 +1,1975 @@ +/* + * Copyright 2020 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/v1p1beta1/resource.proto + +package com.google.cloud.speech.v1p1beta1; + +/** + * + * + *
+ * A set of words or phrases that represents a common concept likely to appear
+ * in your audio, for example a list of passenger ship names. CustomClass items
+ * can be substituted into placeholders that you set in PhraseSet phrases.
+ * 
+ * + * Protobuf type {@code google.cloud.speech.v1p1beta1.CustomClass} + */ +public final class CustomClass extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.speech.v1p1beta1.CustomClass) + CustomClassOrBuilder { + private static final long serialVersionUID = 0L; + // Use CustomClass.newBuilder() to construct. + private CustomClass(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CustomClass() { + name_ = ""; + customClassId_ = ""; + items_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CustomClass(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CustomClass( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + 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(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + customClassId_ = s; + break; + } + case 26: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + items_ = + new java.util.ArrayList< + com.google.cloud.speech.v1p1beta1.CustomClass.ClassItem>(); + mutable_bitField0_ |= 0x00000001; + } + items_.add( + input.readMessage( + com.google.cloud.speech.v1p1beta1.CustomClass.ClassItem.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + items_ = java.util.Collections.unmodifiableList(items_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.speech.v1p1beta1.SpeechResourceProto + .internal_static_google_cloud_speech_v1p1beta1_CustomClass_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.speech.v1p1beta1.SpeechResourceProto + .internal_static_google_cloud_speech_v1p1beta1_CustomClass_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.speech.v1p1beta1.CustomClass.class, + com.google.cloud.speech.v1p1beta1.CustomClass.Builder.class); + } + + public interface ClassItemOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.speech.v1p1beta1.CustomClass.ClassItem) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The class item's value.
+     * 
+ * + * string value = 1; + * + * @return The value. + */ + java.lang.String getValue(); + /** + * + * + *
+     * The class item's value.
+     * 
+ * + * string value = 1; + * + * @return The bytes for value. + */ + com.google.protobuf.ByteString getValueBytes(); + } + /** + * + * + *
+   * An item of the class.
+   * 
+ * + * Protobuf type {@code google.cloud.speech.v1p1beta1.CustomClass.ClassItem} + */ + public static final class ClassItem extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.speech.v1p1beta1.CustomClass.ClassItem) + ClassItemOrBuilder { + private static final long serialVersionUID = 0L; + // Use ClassItem.newBuilder() to construct. + private ClassItem(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ClassItem() { + value_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ClassItem(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ClassItem( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + 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(); + + value_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.speech.v1p1beta1.SpeechResourceProto + .internal_static_google_cloud_speech_v1p1beta1_CustomClass_ClassItem_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.speech.v1p1beta1.SpeechResourceProto + .internal_static_google_cloud_speech_v1p1beta1_CustomClass_ClassItem_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.speech.v1p1beta1.CustomClass.ClassItem.class, + com.google.cloud.speech.v1p1beta1.CustomClass.ClassItem.Builder.class); + } + + public static final int VALUE_FIELD_NUMBER = 1; + private volatile java.lang.Object value_; + /** + * + * + *
+     * The class item's value.
+     * 
+ * + * string value = 1; + * + * @return The value. + */ + public java.lang.String getValue() { + java.lang.Object ref = value_; + 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(); + value_ = s; + return s; + } + } + /** + * + * + *
+     * The class item's value.
+     * 
+ * + * string value = 1; + * + * @return The bytes for value. + */ + public com.google.protobuf.ByteString getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 (!getValueBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, value_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getValueBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, value_); + } + size += unknownFields.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.v1p1beta1.CustomClass.ClassItem)) { + return super.equals(obj); + } + com.google.cloud.speech.v1p1beta1.CustomClass.ClassItem other = + (com.google.cloud.speech.v1p1beta1.CustomClass.ClassItem) obj; + + if (!getValue().equals(other.getValue())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.speech.v1p1beta1.CustomClass.ClassItem parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.speech.v1p1beta1.CustomClass.ClassItem 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.v1p1beta1.CustomClass.ClassItem parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.speech.v1p1beta1.CustomClass.ClassItem 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.v1p1beta1.CustomClass.ClassItem parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.speech.v1p1beta1.CustomClass.ClassItem parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.speech.v1p1beta1.CustomClass.ClassItem parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.speech.v1p1beta1.CustomClass.ClassItem 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.v1p1beta1.CustomClass.ClassItem parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.speech.v1p1beta1.CustomClass.ClassItem 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.v1p1beta1.CustomClass.ClassItem parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.speech.v1p1beta1.CustomClass.ClassItem 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.v1p1beta1.CustomClass.ClassItem 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; + } + /** + * + * + *
+     * An item of the class.
+     * 
+ * + * Protobuf type {@code google.cloud.speech.v1p1beta1.CustomClass.ClassItem} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.speech.v1p1beta1.CustomClass.ClassItem) + com.google.cloud.speech.v1p1beta1.CustomClass.ClassItemOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.speech.v1p1beta1.SpeechResourceProto + .internal_static_google_cloud_speech_v1p1beta1_CustomClass_ClassItem_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.speech.v1p1beta1.SpeechResourceProto + .internal_static_google_cloud_speech_v1p1beta1_CustomClass_ClassItem_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.speech.v1p1beta1.CustomClass.ClassItem.class, + com.google.cloud.speech.v1p1beta1.CustomClass.ClassItem.Builder.class); + } + + // Construct using com.google.cloud.speech.v1p1beta1.CustomClass.ClassItem.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + value_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.speech.v1p1beta1.SpeechResourceProto + .internal_static_google_cloud_speech_v1p1beta1_CustomClass_ClassItem_descriptor; + } + + @java.lang.Override + public com.google.cloud.speech.v1p1beta1.CustomClass.ClassItem getDefaultInstanceForType() { + return com.google.cloud.speech.v1p1beta1.CustomClass.ClassItem.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.speech.v1p1beta1.CustomClass.ClassItem build() { + com.google.cloud.speech.v1p1beta1.CustomClass.ClassItem result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.speech.v1p1beta1.CustomClass.ClassItem buildPartial() { + com.google.cloud.speech.v1p1beta1.CustomClass.ClassItem result = + new com.google.cloud.speech.v1p1beta1.CustomClass.ClassItem(this); + result.value_ = value_; + onBuilt(); + return result; + } + + @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.v1p1beta1.CustomClass.ClassItem) { + return mergeFrom((com.google.cloud.speech.v1p1beta1.CustomClass.ClassItem) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.speech.v1p1beta1.CustomClass.ClassItem other) { + if (other == com.google.cloud.speech.v1p1beta1.CustomClass.ClassItem.getDefaultInstance()) + return this; + if (!other.getValue().isEmpty()) { + value_ = other.value_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.speech.v1p1beta1.CustomClass.ClassItem parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.speech.v1p1beta1.CustomClass.ClassItem) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object value_ = ""; + /** + * + * + *
+       * The class item's value.
+       * 
+ * + * string value = 1; + * + * @return The value. + */ + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The class item's value.
+       * 
+ * + * string value = 1; + * + * @return The bytes for value. + */ + public com.google.protobuf.ByteString getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The class item's value.
+       * 
+ * + * string value = 1; + * + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + value_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The class item's value.
+       * 
+ * + * string value = 1; + * + * @return This builder for chaining. + */ + public Builder clearValue() { + + value_ = getDefaultInstance().getValue(); + onChanged(); + return this; + } + /** + * + * + *
+       * The class item's value.
+       * 
+ * + * string value = 1; + * + * @param value The bytes for value to set. + * @return This builder for chaining. + */ + public Builder setValueBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + value_ = value; + 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.v1p1beta1.CustomClass.ClassItem) + } + + // @@protoc_insertion_point(class_scope:google.cloud.speech.v1p1beta1.CustomClass.ClassItem) + private static final com.google.cloud.speech.v1p1beta1.CustomClass.ClassItem DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.speech.v1p1beta1.CustomClass.ClassItem(); + } + + public static com.google.cloud.speech.v1p1beta1.CustomClass.ClassItem getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ClassItem parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ClassItem(input, extensionRegistry); + } + }; + + 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.v1p1beta1.CustomClass.ClassItem getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * The resource name of the custom class.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * The resource name of the custom class.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CUSTOM_CLASS_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object customClassId_; + /** + * + * + *
+   * If this custom class is a resource, the custom_class_id is the resource id
+   * of the CustomClass.
+   * 
+ * + * string custom_class_id = 2; + * + * @return The customClassId. + */ + public java.lang.String getCustomClassId() { + java.lang.Object ref = customClassId_; + 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(); + customClassId_ = s; + return s; + } + } + /** + * + * + *
+   * If this custom class is a resource, the custom_class_id is the resource id
+   * of the CustomClass.
+   * 
+ * + * string custom_class_id = 2; + * + * @return The bytes for customClassId. + */ + public com.google.protobuf.ByteString getCustomClassIdBytes() { + java.lang.Object ref = customClassId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + customClassId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ITEMS_FIELD_NUMBER = 3; + private java.util.List items_; + /** + * + * + *
+   * A collection of class items.
+   * 
+ * + * repeated .google.cloud.speech.v1p1beta1.CustomClass.ClassItem items = 3; + */ + public java.util.List getItemsList() { + return items_; + } + /** + * + * + *
+   * A collection of class items.
+   * 
+ * + * repeated .google.cloud.speech.v1p1beta1.CustomClass.ClassItem items = 3; + */ + public java.util.List + getItemsOrBuilderList() { + return items_; + } + /** + * + * + *
+   * A collection of class items.
+   * 
+ * + * repeated .google.cloud.speech.v1p1beta1.CustomClass.ClassItem items = 3; + */ + public int getItemsCount() { + return items_.size(); + } + /** + * + * + *
+   * A collection of class items.
+   * 
+ * + * repeated .google.cloud.speech.v1p1beta1.CustomClass.ClassItem items = 3; + */ + public com.google.cloud.speech.v1p1beta1.CustomClass.ClassItem getItems(int index) { + return items_.get(index); + } + /** + * + * + *
+   * A collection of class items.
+   * 
+ * + * repeated .google.cloud.speech.v1p1beta1.CustomClass.ClassItem items = 3; + */ + public com.google.cloud.speech.v1p1beta1.CustomClass.ClassItemOrBuilder getItemsOrBuilder( + int index) { + return items_.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 { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getCustomClassIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, customClassId_); + } + for (int i = 0; i < items_.size(); i++) { + output.writeMessage(3, items_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getCustomClassIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, customClassId_); + } + for (int i = 0; i < items_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, items_.get(i)); + } + size += unknownFields.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.v1p1beta1.CustomClass)) { + return super.equals(obj); + } + com.google.cloud.speech.v1p1beta1.CustomClass other = + (com.google.cloud.speech.v1p1beta1.CustomClass) obj; + + if (!getName().equals(other.getName())) return false; + if (!getCustomClassId().equals(other.getCustomClassId())) return false; + if (!getItemsList().equals(other.getItemsList())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + CUSTOM_CLASS_ID_FIELD_NUMBER; + hash = (53 * hash) + getCustomClassId().hashCode(); + if (getItemsCount() > 0) { + hash = (37 * hash) + ITEMS_FIELD_NUMBER; + hash = (53 * hash) + getItemsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.speech.v1p1beta1.CustomClass parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.speech.v1p1beta1.CustomClass 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.v1p1beta1.CustomClass parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.speech.v1p1beta1.CustomClass 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.v1p1beta1.CustomClass parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.speech.v1p1beta1.CustomClass parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.speech.v1p1beta1.CustomClass parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.speech.v1p1beta1.CustomClass 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.v1p1beta1.CustomClass parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.speech.v1p1beta1.CustomClass 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.v1p1beta1.CustomClass parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.speech.v1p1beta1.CustomClass 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.v1p1beta1.CustomClass 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 set of words or phrases that represents a common concept likely to appear
+   * in your audio, for example a list of passenger ship names. CustomClass items
+   * can be substituted into placeholders that you set in PhraseSet phrases.
+   * 
+ * + * Protobuf type {@code google.cloud.speech.v1p1beta1.CustomClass} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.speech.v1p1beta1.CustomClass) + com.google.cloud.speech.v1p1beta1.CustomClassOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.speech.v1p1beta1.SpeechResourceProto + .internal_static_google_cloud_speech_v1p1beta1_CustomClass_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.speech.v1p1beta1.SpeechResourceProto + .internal_static_google_cloud_speech_v1p1beta1_CustomClass_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.speech.v1p1beta1.CustomClass.class, + com.google.cloud.speech.v1p1beta1.CustomClass.Builder.class); + } + + // Construct using com.google.cloud.speech.v1p1beta1.CustomClass.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getItemsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + customClassId_ = ""; + + if (itemsBuilder_ == null) { + items_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + itemsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.speech.v1p1beta1.SpeechResourceProto + .internal_static_google_cloud_speech_v1p1beta1_CustomClass_descriptor; + } + + @java.lang.Override + public com.google.cloud.speech.v1p1beta1.CustomClass getDefaultInstanceForType() { + return com.google.cloud.speech.v1p1beta1.CustomClass.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.speech.v1p1beta1.CustomClass build() { + com.google.cloud.speech.v1p1beta1.CustomClass result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.speech.v1p1beta1.CustomClass buildPartial() { + com.google.cloud.speech.v1p1beta1.CustomClass result = + new com.google.cloud.speech.v1p1beta1.CustomClass(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.customClassId_ = customClassId_; + if (itemsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + items_ = java.util.Collections.unmodifiableList(items_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.items_ = items_; + } else { + result.items_ = itemsBuilder_.build(); + } + onBuilt(); + return result; + } + + @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.v1p1beta1.CustomClass) { + return mergeFrom((com.google.cloud.speech.v1p1beta1.CustomClass) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.speech.v1p1beta1.CustomClass other) { + if (other == com.google.cloud.speech.v1p1beta1.CustomClass.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getCustomClassId().isEmpty()) { + customClassId_ = other.customClassId_; + onChanged(); + } + if (itemsBuilder_ == null) { + if (!other.items_.isEmpty()) { + if (items_.isEmpty()) { + items_ = other.items_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureItemsIsMutable(); + items_.addAll(other.items_); + } + onChanged(); + } + } else { + if (!other.items_.isEmpty()) { + if (itemsBuilder_.isEmpty()) { + itemsBuilder_.dispose(); + itemsBuilder_ = null; + items_ = other.items_; + bitField0_ = (bitField0_ & ~0x00000001); + itemsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getItemsFieldBuilder() + : null; + } else { + itemsBuilder_.addAllMessages(other.items_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.speech.v1p1beta1.CustomClass parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.speech.v1p1beta1.CustomClass) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The resource name of the custom class.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The resource name of the custom class.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The resource name of the custom class.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the custom class.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the custom class.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object customClassId_ = ""; + /** + * + * + *
+     * If this custom class is a resource, the custom_class_id is the resource id
+     * of the CustomClass.
+     * 
+ * + * string custom_class_id = 2; + * + * @return The customClassId. + */ + public java.lang.String getCustomClassId() { + java.lang.Object ref = customClassId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + customClassId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * If this custom class is a resource, the custom_class_id is the resource id
+     * of the CustomClass.
+     * 
+ * + * string custom_class_id = 2; + * + * @return The bytes for customClassId. + */ + public com.google.protobuf.ByteString getCustomClassIdBytes() { + java.lang.Object ref = customClassId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + customClassId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * If this custom class is a resource, the custom_class_id is the resource id
+     * of the CustomClass.
+     * 
+ * + * string custom_class_id = 2; + * + * @param value The customClassId to set. + * @return This builder for chaining. + */ + public Builder setCustomClassId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + customClassId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If this custom class is a resource, the custom_class_id is the resource id
+     * of the CustomClass.
+     * 
+ * + * string custom_class_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearCustomClassId() { + + customClassId_ = getDefaultInstance().getCustomClassId(); + onChanged(); + return this; + } + /** + * + * + *
+     * If this custom class is a resource, the custom_class_id is the resource id
+     * of the CustomClass.
+     * 
+ * + * string custom_class_id = 2; + * + * @param value The bytes for customClassId to set. + * @return This builder for chaining. + */ + public Builder setCustomClassIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + customClassId_ = value; + onChanged(); + return this; + } + + private java.util.List items_ = + java.util.Collections.emptyList(); + + private void ensureItemsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + items_ = + new java.util.ArrayList( + items_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.speech.v1p1beta1.CustomClass.ClassItem, + com.google.cloud.speech.v1p1beta1.CustomClass.ClassItem.Builder, + com.google.cloud.speech.v1p1beta1.CustomClass.ClassItemOrBuilder> + itemsBuilder_; + + /** + * + * + *
+     * A collection of class items.
+     * 
+ * + * repeated .google.cloud.speech.v1p1beta1.CustomClass.ClassItem items = 3; + */ + public java.util.List getItemsList() { + if (itemsBuilder_ == null) { + return java.util.Collections.unmodifiableList(items_); + } else { + return itemsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A collection of class items.
+     * 
+ * + * repeated .google.cloud.speech.v1p1beta1.CustomClass.ClassItem items = 3; + */ + public int getItemsCount() { + if (itemsBuilder_ == null) { + return items_.size(); + } else { + return itemsBuilder_.getCount(); + } + } + /** + * + * + *
+     * A collection of class items.
+     * 
+ * + * repeated .google.cloud.speech.v1p1beta1.CustomClass.ClassItem items = 3; + */ + public com.google.cloud.speech.v1p1beta1.CustomClass.ClassItem getItems(int index) { + if (itemsBuilder_ == null) { + return items_.get(index); + } else { + return itemsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A collection of class items.
+     * 
+ * + * repeated .google.cloud.speech.v1p1beta1.CustomClass.ClassItem items = 3; + */ + public Builder setItems( + int index, com.google.cloud.speech.v1p1beta1.CustomClass.ClassItem value) { + if (itemsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureItemsIsMutable(); + items_.set(index, value); + onChanged(); + } else { + itemsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A collection of class items.
+     * 
+ * + * repeated .google.cloud.speech.v1p1beta1.CustomClass.ClassItem items = 3; + */ + public Builder setItems( + int index, + com.google.cloud.speech.v1p1beta1.CustomClass.ClassItem.Builder builderForValue) { + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.set(index, builderForValue.build()); + onChanged(); + } else { + itemsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A collection of class items.
+     * 
+ * + * repeated .google.cloud.speech.v1p1beta1.CustomClass.ClassItem items = 3; + */ + public Builder addItems(com.google.cloud.speech.v1p1beta1.CustomClass.ClassItem value) { + if (itemsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureItemsIsMutable(); + items_.add(value); + onChanged(); + } else { + itemsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A collection of class items.
+     * 
+ * + * repeated .google.cloud.speech.v1p1beta1.CustomClass.ClassItem items = 3; + */ + public Builder addItems( + int index, com.google.cloud.speech.v1p1beta1.CustomClass.ClassItem value) { + if (itemsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureItemsIsMutable(); + items_.add(index, value); + onChanged(); + } else { + itemsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A collection of class items.
+     * 
+ * + * repeated .google.cloud.speech.v1p1beta1.CustomClass.ClassItem items = 3; + */ + public Builder addItems( + com.google.cloud.speech.v1p1beta1.CustomClass.ClassItem.Builder builderForValue) { + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(builderForValue.build()); + onChanged(); + } else { + itemsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A collection of class items.
+     * 
+ * + * repeated .google.cloud.speech.v1p1beta1.CustomClass.ClassItem items = 3; + */ + public Builder addItems( + int index, + com.google.cloud.speech.v1p1beta1.CustomClass.ClassItem.Builder builderForValue) { + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(index, builderForValue.build()); + onChanged(); + } else { + itemsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A collection of class items.
+     * 
+ * + * repeated .google.cloud.speech.v1p1beta1.CustomClass.ClassItem items = 3; + */ + public Builder addAllItems( + java.lang.Iterable + values) { + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, items_); + onChanged(); + } else { + itemsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A collection of class items.
+     * 
+ * + * repeated .google.cloud.speech.v1p1beta1.CustomClass.ClassItem items = 3; + */ + public Builder clearItems() { + if (itemsBuilder_ == null) { + items_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + itemsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A collection of class items.
+     * 
+ * + * repeated .google.cloud.speech.v1p1beta1.CustomClass.ClassItem items = 3; + */ + public Builder removeItems(int index) { + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.remove(index); + onChanged(); + } else { + itemsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A collection of class items.
+     * 
+ * + * repeated .google.cloud.speech.v1p1beta1.CustomClass.ClassItem items = 3; + */ + public com.google.cloud.speech.v1p1beta1.CustomClass.ClassItem.Builder getItemsBuilder( + int index) { + return getItemsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A collection of class items.
+     * 
+ * + * repeated .google.cloud.speech.v1p1beta1.CustomClass.ClassItem items = 3; + */ + public com.google.cloud.speech.v1p1beta1.CustomClass.ClassItemOrBuilder getItemsOrBuilder( + int index) { + if (itemsBuilder_ == null) { + return items_.get(index); + } else { + return itemsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A collection of class items.
+     * 
+ * + * repeated .google.cloud.speech.v1p1beta1.CustomClass.ClassItem items = 3; + */ + public java.util.List< + ? extends com.google.cloud.speech.v1p1beta1.CustomClass.ClassItemOrBuilder> + getItemsOrBuilderList() { + if (itemsBuilder_ != null) { + return itemsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(items_); + } + } + /** + * + * + *
+     * A collection of class items.
+     * 
+ * + * repeated .google.cloud.speech.v1p1beta1.CustomClass.ClassItem items = 3; + */ + public com.google.cloud.speech.v1p1beta1.CustomClass.ClassItem.Builder addItemsBuilder() { + return getItemsFieldBuilder() + .addBuilder(com.google.cloud.speech.v1p1beta1.CustomClass.ClassItem.getDefaultInstance()); + } + /** + * + * + *
+     * A collection of class items.
+     * 
+ * + * repeated .google.cloud.speech.v1p1beta1.CustomClass.ClassItem items = 3; + */ + public com.google.cloud.speech.v1p1beta1.CustomClass.ClassItem.Builder addItemsBuilder( + int index) { + return getItemsFieldBuilder() + .addBuilder( + index, com.google.cloud.speech.v1p1beta1.CustomClass.ClassItem.getDefaultInstance()); + } + /** + * + * + *
+     * A collection of class items.
+     * 
+ * + * repeated .google.cloud.speech.v1p1beta1.CustomClass.ClassItem items = 3; + */ + public java.util.List + getItemsBuilderList() { + return getItemsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.speech.v1p1beta1.CustomClass.ClassItem, + com.google.cloud.speech.v1p1beta1.CustomClass.ClassItem.Builder, + com.google.cloud.speech.v1p1beta1.CustomClass.ClassItemOrBuilder> + getItemsFieldBuilder() { + if (itemsBuilder_ == null) { + itemsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.speech.v1p1beta1.CustomClass.ClassItem, + com.google.cloud.speech.v1p1beta1.CustomClass.ClassItem.Builder, + com.google.cloud.speech.v1p1beta1.CustomClass.ClassItemOrBuilder>( + items_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + items_ = null; + } + return itemsBuilder_; + } + + @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.v1p1beta1.CustomClass) + } + + // @@protoc_insertion_point(class_scope:google.cloud.speech.v1p1beta1.CustomClass) + private static final com.google.cloud.speech.v1p1beta1.CustomClass DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.speech.v1p1beta1.CustomClass(); + } + + public static com.google.cloud.speech.v1p1beta1.CustomClass getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CustomClass parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CustomClass(input, extensionRegistry); + } + }; + + 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.v1p1beta1.CustomClass getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/CustomClassName.java b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/CustomClassName.java new file mode 100644 index 000000000..3fc961136 --- /dev/null +++ b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/CustomClassName.java @@ -0,0 +1,215 @@ +/* + * Copyright 2020 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. + */ + +package com.google.cloud.speech.v1p1beta1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +/** AUTO-GENERATED DOCUMENTATION AND CLASS */ +@javax.annotation.Generated("by GAPIC protoc plugin") +public class CustomClassName implements ResourceName { + + private static final PathTemplate PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/customClasses/{custom_class}"); + + private volatile Map fieldValuesMap; + + private final String project; + private final String location; + private final String customClass; + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getCustomClass() { + return customClass; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + private CustomClassName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + customClass = Preconditions.checkNotNull(builder.getCustomClass()); + } + + public static CustomClassName of(String project, String location, String customClass) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setCustomClass(customClass) + .build(); + } + + public static String format(String project, String location, String customClass) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setCustomClass(customClass) + .build() + .toString(); + } + + public static CustomClassName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PATH_TEMPLATE.validatedMatch( + formattedString, "CustomClassName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("custom_class")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList(values.size()); + for (CustomClassName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PATH_TEMPLATE.matches(formattedString); + } + + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + fieldMapBuilder.put("project", project); + fieldMapBuilder.put("location", location); + fieldMapBuilder.put("customClass", customClass); + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PATH_TEMPLATE.instantiate( + "project", project, "location", location, "custom_class", customClass); + } + + /** Builder for CustomClassName. */ + public static class Builder { + + private String project; + private String location; + private String customClass; + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getCustomClass() { + return customClass; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setCustomClass(String customClass) { + this.customClass = customClass; + return this; + } + + private Builder() {} + + private Builder(CustomClassName customClassName) { + project = customClassName.project; + location = customClassName.location; + customClass = customClassName.customClass; + } + + public CustomClassName build() { + return new CustomClassName(this); + } + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof CustomClassName) { + CustomClassName that = (CustomClassName) o; + return (this.project.equals(that.project)) + && (this.location.equals(that.location)) + && (this.customClass.equals(that.customClass)); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= project.hashCode(); + h *= 1000003; + h ^= location.hashCode(); + h *= 1000003; + h ^= customClass.hashCode(); + return h; + } +} diff --git a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/CustomClassOrBuilder.java b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/CustomClassOrBuilder.java new file mode 100644 index 000000000..b6f23c994 --- /dev/null +++ b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/CustomClassOrBuilder.java @@ -0,0 +1,129 @@ +/* + * Copyright 2020 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/v1p1beta1/resource.proto + +package com.google.cloud.speech.v1p1beta1; + +public interface CustomClassOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.speech.v1p1beta1.CustomClass) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The resource name of the custom class.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The resource name of the custom class.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * If this custom class is a resource, the custom_class_id is the resource id
+   * of the CustomClass.
+   * 
+ * + * string custom_class_id = 2; + * + * @return The customClassId. + */ + java.lang.String getCustomClassId(); + /** + * + * + *
+   * If this custom class is a resource, the custom_class_id is the resource id
+   * of the CustomClass.
+   * 
+ * + * string custom_class_id = 2; + * + * @return The bytes for customClassId. + */ + com.google.protobuf.ByteString getCustomClassIdBytes(); + + /** + * + * + *
+   * A collection of class items.
+   * 
+ * + * repeated .google.cloud.speech.v1p1beta1.CustomClass.ClassItem items = 3; + */ + java.util.List getItemsList(); + /** + * + * + *
+   * A collection of class items.
+   * 
+ * + * repeated .google.cloud.speech.v1p1beta1.CustomClass.ClassItem items = 3; + */ + com.google.cloud.speech.v1p1beta1.CustomClass.ClassItem getItems(int index); + /** + * + * + *
+   * A collection of class items.
+   * 
+ * + * repeated .google.cloud.speech.v1p1beta1.CustomClass.ClassItem items = 3; + */ + int getItemsCount(); + /** + * + * + *
+   * A collection of class items.
+   * 
+ * + * repeated .google.cloud.speech.v1p1beta1.CustomClass.ClassItem items = 3; + */ + java.util.List + getItemsOrBuilderList(); + /** + * + * + *
+   * A collection of class items.
+   * 
+ * + * repeated .google.cloud.speech.v1p1beta1.CustomClass.ClassItem items = 3; + */ + com.google.cloud.speech.v1p1beta1.CustomClass.ClassItemOrBuilder getItemsOrBuilder(int index); +} diff --git a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/LongRunningRecognizeMetadata.java b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/LongRunningRecognizeMetadata.java index 90b14f1c0..b0d70b68e 100644 --- a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/LongRunningRecognizeMetadata.java +++ b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/LongRunningRecognizeMetadata.java @@ -39,7 +39,9 @@ private LongRunningRecognizeMetadata(com.google.protobuf.GeneratedMessageV3.Buil super(builder); } - private LongRunningRecognizeMetadata() {} + private LongRunningRecognizeMetadata() { + uri_ = ""; + } @java.lang.Override @SuppressWarnings({"unused"}) @@ -103,6 +105,13 @@ private LongRunningRecognizeMetadata( lastUpdateTime_ = subBuilder.buildPartial(); } + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + uri_ = s; break; } default: @@ -245,6 +254,55 @@ public com.google.protobuf.TimestampOrBuilder getLastUpdateTimeOrBuilder() { return getLastUpdateTime(); } + public static final int URI_FIELD_NUMBER = 4; + private volatile java.lang.Object uri_; + /** + * + * + *
+   * The URI of the audio file being transcribed. Empty if the audio was sent
+   * as byte content.
+   * 
+ * + * string uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + 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(); + uri_ = s; + return s; + } + } + /** + * + * + *
+   * The URI of the audio file being transcribed. Empty if the audio was sent
+   * as byte content.
+   * 
+ * + * string uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -268,6 +326,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (lastUpdateTime_ != null) { output.writeMessage(3, getLastUpdateTime()); } + if (!getUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, uri_); + } unknownFields.writeTo(output); } @@ -286,6 +347,9 @@ public int getSerializedSize() { if (lastUpdateTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getLastUpdateTime()); } + if (!getUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, uri_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -311,6 +375,7 @@ public boolean equals(final java.lang.Object obj) { if (hasLastUpdateTime()) { if (!getLastUpdateTime().equals(other.getLastUpdateTime())) return false; } + if (!getUri().equals(other.getUri())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -332,6 +397,8 @@ public int hashCode() { hash = (37 * hash) + LAST_UPDATE_TIME_FIELD_NUMBER; hash = (53 * hash) + getLastUpdateTime().hashCode(); } + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -494,6 +561,8 @@ public Builder clear() { lastUpdateTime_ = null; lastUpdateTimeBuilder_ = null; } + uri_ = ""; + return this; } @@ -533,6 +602,7 @@ public com.google.cloud.speech.v1p1beta1.LongRunningRecognizeMetadata buildParti } else { result.lastUpdateTime_ = lastUpdateTimeBuilder_.build(); } + result.uri_ = uri_; onBuilt(); return result; } @@ -593,6 +663,10 @@ public Builder mergeFrom(com.google.cloud.speech.v1p1beta1.LongRunningRecognizeM if (other.hasLastUpdateTime()) { mergeLastUpdateTime(other.getLastUpdateTime()); } + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + onChanged(); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -1042,6 +1116,117 @@ public com.google.protobuf.TimestampOrBuilder getLastUpdateTimeOrBuilder() { return lastUpdateTimeBuilder_; } + private java.lang.Object uri_ = ""; + /** + * + * + *
+     * The URI of the audio file being transcribed. Empty if the audio was sent
+     * as byte content.
+     * 
+ * + * string uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The URI of the audio file being transcribed. Empty if the audio was sent
+     * as byte content.
+     * 
+ * + * string uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The URI of the audio file being transcribed. Empty if the audio was sent
+     * as byte content.
+     * 
+ * + * string uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + uri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The URI of the audio file being transcribed. Empty if the audio was sent
+     * as byte content.
+     * 
+ * + * string uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + + uri_ = getDefaultInstance().getUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * The URI of the audio file being transcribed. Empty if the audio was sent
+     * as byte content.
+     * 
+ * + * string uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + uri_ = value; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/LongRunningRecognizeMetadataOrBuilder.java b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/LongRunningRecognizeMetadataOrBuilder.java index 54eb9ad36..072c108ae 100644 --- a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/LongRunningRecognizeMetadataOrBuilder.java +++ b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/LongRunningRecognizeMetadataOrBuilder.java @@ -106,4 +106,31 @@ public interface LongRunningRecognizeMetadataOrBuilder * .google.protobuf.Timestamp last_update_time = 3; */ com.google.protobuf.TimestampOrBuilder getLastUpdateTimeOrBuilder(); + + /** + * + * + *
+   * The URI of the audio file being transcribed. Empty if the audio was sent
+   * as byte content.
+   * 
+ * + * string uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+   * The URI of the audio file being transcribed. Empty if the audio was sent
+   * as byte content.
+   * 
+ * + * string uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); } diff --git a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/PhraseSet.java b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/PhraseSet.java new file mode 100644 index 000000000..cd79ae341 --- /dev/null +++ b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/PhraseSet.java @@ -0,0 +1,2080 @@ +/* + * Copyright 2020 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/v1p1beta1/resource.proto + +package com.google.cloud.speech.v1p1beta1; + +/** + * + * + *
+ * Provides "hints" to the speech recognizer to favor specific words and phrases
+ * in the results.
+ * 
+ * + * Protobuf type {@code google.cloud.speech.v1p1beta1.PhraseSet} + */ +public final class PhraseSet extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.speech.v1p1beta1.PhraseSet) + PhraseSetOrBuilder { + private static final long serialVersionUID = 0L; + // Use PhraseSet.newBuilder() to construct. + private PhraseSet(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PhraseSet() { + name_ = ""; + phrases_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PhraseSet(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private PhraseSet( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + 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(); + + name_ = s; + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + phrases_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + phrases_.add( + input.readMessage( + com.google.cloud.speech.v1p1beta1.PhraseSet.Phrase.parser(), + extensionRegistry)); + break; + } + case 37: + { + boost_ = input.readFloat(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + phrases_ = java.util.Collections.unmodifiableList(phrases_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.speech.v1p1beta1.SpeechResourceProto + .internal_static_google_cloud_speech_v1p1beta1_PhraseSet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.speech.v1p1beta1.SpeechResourceProto + .internal_static_google_cloud_speech_v1p1beta1_PhraseSet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.speech.v1p1beta1.PhraseSet.class, + com.google.cloud.speech.v1p1beta1.PhraseSet.Builder.class); + } + + public interface PhraseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.speech.v1p1beta1.PhraseSet.Phrase) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The phrase itself.
+     * 
+ * + * string value = 1; + * + * @return The value. + */ + java.lang.String getValue(); + /** + * + * + *
+     * The phrase itself.
+     * 
+ * + * string value = 1; + * + * @return The bytes for value. + */ + com.google.protobuf.ByteString getValueBytes(); + + /** + * + * + *
+     * Hint Boost. Overrides the boost set at the phrase set level.
+     * Positive value will increase the probability that a specific phrase will
+     * be recognized over other similar sounding phrases. The higher the boost,
+     * the higher the chance of false positive recognition as well. Negative
+     * boost values would correspond to anti-biasing. Anti-biasing is not
+     * enabled, so negative boost will simply be ignored. Though `boost` can
+     * accept a wide range of positive values, most use cases are best served
+     * with values between 0 and 20. We recommend using a binary search approach
+     * to finding the optimal value for your use case. Speech recognition
+     * will skip PhraseSets with a boost value of 0.
+     * 
+ * + * float boost = 2; + * + * @return The boost. + */ + float getBoost(); + } + /** + * + * + *
+   * A phrases containing words and phrase "hints" so that
+   * the speech recognition is more likely to recognize them. This can be used
+   * to improve the accuracy for specific words and phrases, for example, if
+   * specific commands are typically spoken by the user. This can also be used
+   * to add additional words to the vocabulary of the recognizer. See
+   * [usage limits](https://cloud.google.com/speech-to-text/quotas#content).
+   * List items can also include pre-built or custom classes containing groups
+   * of words that represent common concepts that occur in natural language. For
+   * example, rather than providing a phrase hint for every month of the
+   * year (e.g. "i was born in january", "i was born in febuary", ...), use the
+   * pre-built `$MONTH` class improves the likelihood of correctly transcribing
+   * audio that includes months (e.g. "i was born in $month").
+   * To refer to pre-built classes, use the class' symbol prepended with `$`
+   * e.g. `$MONTH`. To refer to custom classes that were defined inline in the
+   * request, set the class's `custom_class_id` to a string unique to all class
+   * resources and inline classes. Then use the class' id wrapped in $`{...}`
+   * e.g. "${my-months}". To refer to custom classes resources, use the class'
+   * id wrapped in `${}` (e.g. `${my-months}`).
+   * 
+ * + * Protobuf type {@code google.cloud.speech.v1p1beta1.PhraseSet.Phrase} + */ + public static final class Phrase extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.speech.v1p1beta1.PhraseSet.Phrase) + PhraseOrBuilder { + private static final long serialVersionUID = 0L; + // Use Phrase.newBuilder() to construct. + private Phrase(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Phrase() { + value_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Phrase(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Phrase( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + 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(); + + value_ = s; + break; + } + case 21: + { + boost_ = input.readFloat(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.speech.v1p1beta1.SpeechResourceProto + .internal_static_google_cloud_speech_v1p1beta1_PhraseSet_Phrase_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.speech.v1p1beta1.SpeechResourceProto + .internal_static_google_cloud_speech_v1p1beta1_PhraseSet_Phrase_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.speech.v1p1beta1.PhraseSet.Phrase.class, + com.google.cloud.speech.v1p1beta1.PhraseSet.Phrase.Builder.class); + } + + public static final int VALUE_FIELD_NUMBER = 1; + private volatile java.lang.Object value_; + /** + * + * + *
+     * The phrase itself.
+     * 
+ * + * string value = 1; + * + * @return The value. + */ + public java.lang.String getValue() { + java.lang.Object ref = value_; + 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(); + value_ = s; + return s; + } + } + /** + * + * + *
+     * The phrase itself.
+     * 
+ * + * string value = 1; + * + * @return The bytes for value. + */ + public com.google.protobuf.ByteString getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BOOST_FIELD_NUMBER = 2; + private float boost_; + /** + * + * + *
+     * Hint Boost. Overrides the boost set at the phrase set level.
+     * Positive value will increase the probability that a specific phrase will
+     * be recognized over other similar sounding phrases. The higher the boost,
+     * the higher the chance of false positive recognition as well. Negative
+     * boost values would correspond to anti-biasing. Anti-biasing is not
+     * enabled, so negative boost will simply be ignored. Though `boost` can
+     * accept a wide range of positive values, most use cases are best served
+     * with values between 0 and 20. We recommend using a binary search approach
+     * to finding the optimal value for your use case. Speech recognition
+     * will skip PhraseSets with a boost value of 0.
+     * 
+ * + * float boost = 2; + * + * @return The boost. + */ + public float getBoost() { + return boost_; + } + + 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 (!getValueBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, value_); + } + if (boost_ != 0F) { + output.writeFloat(2, boost_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getValueBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, value_); + } + if (boost_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, boost_); + } + size += unknownFields.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.v1p1beta1.PhraseSet.Phrase)) { + return super.equals(obj); + } + com.google.cloud.speech.v1p1beta1.PhraseSet.Phrase other = + (com.google.cloud.speech.v1p1beta1.PhraseSet.Phrase) obj; + + if (!getValue().equals(other.getValue())) return false; + if (java.lang.Float.floatToIntBits(getBoost()) + != java.lang.Float.floatToIntBits(other.getBoost())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + hash = (37 * hash) + BOOST_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getBoost()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.speech.v1p1beta1.PhraseSet.Phrase parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.speech.v1p1beta1.PhraseSet.Phrase 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.v1p1beta1.PhraseSet.Phrase parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.speech.v1p1beta1.PhraseSet.Phrase 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.v1p1beta1.PhraseSet.Phrase parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.speech.v1p1beta1.PhraseSet.Phrase parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.speech.v1p1beta1.PhraseSet.Phrase parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.speech.v1p1beta1.PhraseSet.Phrase 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.v1p1beta1.PhraseSet.Phrase parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.speech.v1p1beta1.PhraseSet.Phrase 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.v1p1beta1.PhraseSet.Phrase parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.speech.v1p1beta1.PhraseSet.Phrase 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.v1p1beta1.PhraseSet.Phrase 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 phrases containing words and phrase "hints" so that
+     * the speech recognition is more likely to recognize them. This can be used
+     * to improve the accuracy for specific words and phrases, for example, if
+     * specific commands are typically spoken by the user. This can also be used
+     * to add additional words to the vocabulary of the recognizer. See
+     * [usage limits](https://cloud.google.com/speech-to-text/quotas#content).
+     * List items can also include pre-built or custom classes containing groups
+     * of words that represent common concepts that occur in natural language. For
+     * example, rather than providing a phrase hint for every month of the
+     * year (e.g. "i was born in january", "i was born in febuary", ...), use the
+     * pre-built `$MONTH` class improves the likelihood of correctly transcribing
+     * audio that includes months (e.g. "i was born in $month").
+     * To refer to pre-built classes, use the class' symbol prepended with `$`
+     * e.g. `$MONTH`. To refer to custom classes that were defined inline in the
+     * request, set the class's `custom_class_id` to a string unique to all class
+     * resources and inline classes. Then use the class' id wrapped in $`{...}`
+     * e.g. "${my-months}". To refer to custom classes resources, use the class'
+     * id wrapped in `${}` (e.g. `${my-months}`).
+     * 
+ * + * Protobuf type {@code google.cloud.speech.v1p1beta1.PhraseSet.Phrase} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.speech.v1p1beta1.PhraseSet.Phrase) + com.google.cloud.speech.v1p1beta1.PhraseSet.PhraseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.speech.v1p1beta1.SpeechResourceProto + .internal_static_google_cloud_speech_v1p1beta1_PhraseSet_Phrase_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.speech.v1p1beta1.SpeechResourceProto + .internal_static_google_cloud_speech_v1p1beta1_PhraseSet_Phrase_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.speech.v1p1beta1.PhraseSet.Phrase.class, + com.google.cloud.speech.v1p1beta1.PhraseSet.Phrase.Builder.class); + } + + // Construct using com.google.cloud.speech.v1p1beta1.PhraseSet.Phrase.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + value_ = ""; + + boost_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.speech.v1p1beta1.SpeechResourceProto + .internal_static_google_cloud_speech_v1p1beta1_PhraseSet_Phrase_descriptor; + } + + @java.lang.Override + public com.google.cloud.speech.v1p1beta1.PhraseSet.Phrase getDefaultInstanceForType() { + return com.google.cloud.speech.v1p1beta1.PhraseSet.Phrase.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.speech.v1p1beta1.PhraseSet.Phrase build() { + com.google.cloud.speech.v1p1beta1.PhraseSet.Phrase result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.speech.v1p1beta1.PhraseSet.Phrase buildPartial() { + com.google.cloud.speech.v1p1beta1.PhraseSet.Phrase result = + new com.google.cloud.speech.v1p1beta1.PhraseSet.Phrase(this); + result.value_ = value_; + result.boost_ = boost_; + onBuilt(); + return result; + } + + @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.v1p1beta1.PhraseSet.Phrase) { + return mergeFrom((com.google.cloud.speech.v1p1beta1.PhraseSet.Phrase) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.speech.v1p1beta1.PhraseSet.Phrase other) { + if (other == com.google.cloud.speech.v1p1beta1.PhraseSet.Phrase.getDefaultInstance()) + return this; + if (!other.getValue().isEmpty()) { + value_ = other.value_; + onChanged(); + } + if (other.getBoost() != 0F) { + setBoost(other.getBoost()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.speech.v1p1beta1.PhraseSet.Phrase parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.speech.v1p1beta1.PhraseSet.Phrase) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object value_ = ""; + /** + * + * + *
+       * The phrase itself.
+       * 
+ * + * string value = 1; + * + * @return The value. + */ + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The phrase itself.
+       * 
+ * + * string value = 1; + * + * @return The bytes for value. + */ + public com.google.protobuf.ByteString getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The phrase itself.
+       * 
+ * + * string value = 1; + * + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + value_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The phrase itself.
+       * 
+ * + * string value = 1; + * + * @return This builder for chaining. + */ + public Builder clearValue() { + + value_ = getDefaultInstance().getValue(); + onChanged(); + return this; + } + /** + * + * + *
+       * The phrase itself.
+       * 
+ * + * string value = 1; + * + * @param value The bytes for value to set. + * @return This builder for chaining. + */ + public Builder setValueBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + value_ = value; + onChanged(); + return this; + } + + private float boost_; + /** + * + * + *
+       * Hint Boost. Overrides the boost set at the phrase set level.
+       * Positive value will increase the probability that a specific phrase will
+       * be recognized over other similar sounding phrases. The higher the boost,
+       * the higher the chance of false positive recognition as well. Negative
+       * boost values would correspond to anti-biasing. Anti-biasing is not
+       * enabled, so negative boost will simply be ignored. Though `boost` can
+       * accept a wide range of positive values, most use cases are best served
+       * with values between 0 and 20. We recommend using a binary search approach
+       * to finding the optimal value for your use case. Speech recognition
+       * will skip PhraseSets with a boost value of 0.
+       * 
+ * + * float boost = 2; + * + * @return The boost. + */ + public float getBoost() { + return boost_; + } + /** + * + * + *
+       * Hint Boost. Overrides the boost set at the phrase set level.
+       * Positive value will increase the probability that a specific phrase will
+       * be recognized over other similar sounding phrases. The higher the boost,
+       * the higher the chance of false positive recognition as well. Negative
+       * boost values would correspond to anti-biasing. Anti-biasing is not
+       * enabled, so negative boost will simply be ignored. Though `boost` can
+       * accept a wide range of positive values, most use cases are best served
+       * with values between 0 and 20. We recommend using a binary search approach
+       * to finding the optimal value for your use case. Speech recognition
+       * will skip PhraseSets with a boost value of 0.
+       * 
+ * + * float boost = 2; + * + * @param value The boost to set. + * @return This builder for chaining. + */ + public Builder setBoost(float value) { + + boost_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Hint Boost. Overrides the boost set at the phrase set level.
+       * Positive value will increase the probability that a specific phrase will
+       * be recognized over other similar sounding phrases. The higher the boost,
+       * the higher the chance of false positive recognition as well. Negative
+       * boost values would correspond to anti-biasing. Anti-biasing is not
+       * enabled, so negative boost will simply be ignored. Though `boost` can
+       * accept a wide range of positive values, most use cases are best served
+       * with values between 0 and 20. We recommend using a binary search approach
+       * to finding the optimal value for your use case. Speech recognition
+       * will skip PhraseSets with a boost value of 0.
+       * 
+ * + * float boost = 2; + * + * @return This builder for chaining. + */ + public Builder clearBoost() { + + boost_ = 0F; + 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.v1p1beta1.PhraseSet.Phrase) + } + + // @@protoc_insertion_point(class_scope:google.cloud.speech.v1p1beta1.PhraseSet.Phrase) + private static final com.google.cloud.speech.v1p1beta1.PhraseSet.Phrase DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.speech.v1p1beta1.PhraseSet.Phrase(); + } + + public static com.google.cloud.speech.v1p1beta1.PhraseSet.Phrase getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Phrase parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Phrase(input, extensionRegistry); + } + }; + + 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.v1p1beta1.PhraseSet.Phrase getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * The resource name of the phrase set.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * The resource name of the phrase set.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PHRASES_FIELD_NUMBER = 2; + private java.util.List phrases_; + /** + * + * + *
+   * A list of word and phrases.
+   * 
+ * + * repeated .google.cloud.speech.v1p1beta1.PhraseSet.Phrase phrases = 2; + */ + public java.util.List getPhrasesList() { + return phrases_; + } + /** + * + * + *
+   * A list of word and phrases.
+   * 
+ * + * repeated .google.cloud.speech.v1p1beta1.PhraseSet.Phrase phrases = 2; + */ + public java.util.List + getPhrasesOrBuilderList() { + return phrases_; + } + /** + * + * + *
+   * A list of word and phrases.
+   * 
+ * + * repeated .google.cloud.speech.v1p1beta1.PhraseSet.Phrase phrases = 2; + */ + public int getPhrasesCount() { + return phrases_.size(); + } + /** + * + * + *
+   * A list of word and phrases.
+   * 
+ * + * repeated .google.cloud.speech.v1p1beta1.PhraseSet.Phrase phrases = 2; + */ + public com.google.cloud.speech.v1p1beta1.PhraseSet.Phrase getPhrases(int index) { + return phrases_.get(index); + } + /** + * + * + *
+   * A list of word and phrases.
+   * 
+ * + * repeated .google.cloud.speech.v1p1beta1.PhraseSet.Phrase phrases = 2; + */ + public com.google.cloud.speech.v1p1beta1.PhraseSet.PhraseOrBuilder getPhrasesOrBuilder( + int index) { + return phrases_.get(index); + } + + public static final int BOOST_FIELD_NUMBER = 4; + private float boost_; + /** + * + * + *
+   * Hint Boost. Positive value will increase the probability that a specific
+   * phrase will be recognized over other similar sounding phrases. The higher
+   * the boost, the higher the chance of false positive recognition as well.
+   * Negative boost values would correspond to anti-biasing. Anti-biasing is not
+   * enabled, so negative boost will simply be ignored. Though `boost` can
+   * accept a wide range of positive values, most use cases are best served with
+   * values between 0 (exclusive) and 20. We recommend using a binary search
+   * approach to finding the optimal value for your use case. Speech recognition
+   * will skip PhraseSets with a boost value of 0.
+   * 
+ * + * float boost = 4; + * + * @return The boost. + */ + public float getBoost() { + return boost_; + } + + 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 (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + for (int i = 0; i < phrases_.size(); i++) { + output.writeMessage(2, phrases_.get(i)); + } + if (boost_ != 0F) { + output.writeFloat(4, boost_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + for (int i = 0; i < phrases_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, phrases_.get(i)); + } + if (boost_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(4, boost_); + } + size += unknownFields.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.v1p1beta1.PhraseSet)) { + return super.equals(obj); + } + com.google.cloud.speech.v1p1beta1.PhraseSet other = + (com.google.cloud.speech.v1p1beta1.PhraseSet) obj; + + if (!getName().equals(other.getName())) return false; + if (!getPhrasesList().equals(other.getPhrasesList())) return false; + if (java.lang.Float.floatToIntBits(getBoost()) + != java.lang.Float.floatToIntBits(other.getBoost())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getPhrasesCount() > 0) { + hash = (37 * hash) + PHRASES_FIELD_NUMBER; + hash = (53 * hash) + getPhrasesList().hashCode(); + } + hash = (37 * hash) + BOOST_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getBoost()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.speech.v1p1beta1.PhraseSet parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.speech.v1p1beta1.PhraseSet 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.v1p1beta1.PhraseSet parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.speech.v1p1beta1.PhraseSet 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.v1p1beta1.PhraseSet parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.speech.v1p1beta1.PhraseSet parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.speech.v1p1beta1.PhraseSet parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.speech.v1p1beta1.PhraseSet 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.v1p1beta1.PhraseSet parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.speech.v1p1beta1.PhraseSet 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.v1p1beta1.PhraseSet parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.speech.v1p1beta1.PhraseSet 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.v1p1beta1.PhraseSet 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; + } + /** + * + * + *
+   * Provides "hints" to the speech recognizer to favor specific words and phrases
+   * in the results.
+   * 
+ * + * Protobuf type {@code google.cloud.speech.v1p1beta1.PhraseSet} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.speech.v1p1beta1.PhraseSet) + com.google.cloud.speech.v1p1beta1.PhraseSetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.speech.v1p1beta1.SpeechResourceProto + .internal_static_google_cloud_speech_v1p1beta1_PhraseSet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.speech.v1p1beta1.SpeechResourceProto + .internal_static_google_cloud_speech_v1p1beta1_PhraseSet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.speech.v1p1beta1.PhraseSet.class, + com.google.cloud.speech.v1p1beta1.PhraseSet.Builder.class); + } + + // Construct using com.google.cloud.speech.v1p1beta1.PhraseSet.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPhrasesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (phrasesBuilder_ == null) { + phrases_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + phrasesBuilder_.clear(); + } + boost_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.speech.v1p1beta1.SpeechResourceProto + .internal_static_google_cloud_speech_v1p1beta1_PhraseSet_descriptor; + } + + @java.lang.Override + public com.google.cloud.speech.v1p1beta1.PhraseSet getDefaultInstanceForType() { + return com.google.cloud.speech.v1p1beta1.PhraseSet.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.speech.v1p1beta1.PhraseSet build() { + com.google.cloud.speech.v1p1beta1.PhraseSet result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.speech.v1p1beta1.PhraseSet buildPartial() { + com.google.cloud.speech.v1p1beta1.PhraseSet result = + new com.google.cloud.speech.v1p1beta1.PhraseSet(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + if (phrasesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + phrases_ = java.util.Collections.unmodifiableList(phrases_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.phrases_ = phrases_; + } else { + result.phrases_ = phrasesBuilder_.build(); + } + result.boost_ = boost_; + onBuilt(); + return result; + } + + @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.v1p1beta1.PhraseSet) { + return mergeFrom((com.google.cloud.speech.v1p1beta1.PhraseSet) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.speech.v1p1beta1.PhraseSet other) { + if (other == com.google.cloud.speech.v1p1beta1.PhraseSet.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (phrasesBuilder_ == null) { + if (!other.phrases_.isEmpty()) { + if (phrases_.isEmpty()) { + phrases_ = other.phrases_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePhrasesIsMutable(); + phrases_.addAll(other.phrases_); + } + onChanged(); + } + } else { + if (!other.phrases_.isEmpty()) { + if (phrasesBuilder_.isEmpty()) { + phrasesBuilder_.dispose(); + phrasesBuilder_ = null; + phrases_ = other.phrases_; + bitField0_ = (bitField0_ & ~0x00000001); + phrasesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPhrasesFieldBuilder() + : null; + } else { + phrasesBuilder_.addAllMessages(other.phrases_); + } + } + } + if (other.getBoost() != 0F) { + setBoost(other.getBoost()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.speech.v1p1beta1.PhraseSet parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.speech.v1p1beta1.PhraseSet) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The resource name of the phrase set.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The resource name of the phrase set.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The resource name of the phrase set.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the phrase set.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the phrase set.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.util.List phrases_ = + java.util.Collections.emptyList(); + + private void ensurePhrasesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + phrases_ = + new java.util.ArrayList(phrases_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.speech.v1p1beta1.PhraseSet.Phrase, + com.google.cloud.speech.v1p1beta1.PhraseSet.Phrase.Builder, + com.google.cloud.speech.v1p1beta1.PhraseSet.PhraseOrBuilder> + phrasesBuilder_; + + /** + * + * + *
+     * A list of word and phrases.
+     * 
+ * + * repeated .google.cloud.speech.v1p1beta1.PhraseSet.Phrase phrases = 2; + */ + public java.util.List getPhrasesList() { + if (phrasesBuilder_ == null) { + return java.util.Collections.unmodifiableList(phrases_); + } else { + return phrasesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of word and phrases.
+     * 
+ * + * repeated .google.cloud.speech.v1p1beta1.PhraseSet.Phrase phrases = 2; + */ + public int getPhrasesCount() { + if (phrasesBuilder_ == null) { + return phrases_.size(); + } else { + return phrasesBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of word and phrases.
+     * 
+ * + * repeated .google.cloud.speech.v1p1beta1.PhraseSet.Phrase phrases = 2; + */ + public com.google.cloud.speech.v1p1beta1.PhraseSet.Phrase getPhrases(int index) { + if (phrasesBuilder_ == null) { + return phrases_.get(index); + } else { + return phrasesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of word and phrases.
+     * 
+ * + * repeated .google.cloud.speech.v1p1beta1.PhraseSet.Phrase phrases = 2; + */ + public Builder setPhrases(int index, com.google.cloud.speech.v1p1beta1.PhraseSet.Phrase value) { + if (phrasesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePhrasesIsMutable(); + phrases_.set(index, value); + onChanged(); + } else { + phrasesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of word and phrases.
+     * 
+ * + * repeated .google.cloud.speech.v1p1beta1.PhraseSet.Phrase phrases = 2; + */ + public Builder setPhrases( + int index, com.google.cloud.speech.v1p1beta1.PhraseSet.Phrase.Builder builderForValue) { + if (phrasesBuilder_ == null) { + ensurePhrasesIsMutable(); + phrases_.set(index, builderForValue.build()); + onChanged(); + } else { + phrasesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of word and phrases.
+     * 
+ * + * repeated .google.cloud.speech.v1p1beta1.PhraseSet.Phrase phrases = 2; + */ + public Builder addPhrases(com.google.cloud.speech.v1p1beta1.PhraseSet.Phrase value) { + if (phrasesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePhrasesIsMutable(); + phrases_.add(value); + onChanged(); + } else { + phrasesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of word and phrases.
+     * 
+ * + * repeated .google.cloud.speech.v1p1beta1.PhraseSet.Phrase phrases = 2; + */ + public Builder addPhrases(int index, com.google.cloud.speech.v1p1beta1.PhraseSet.Phrase value) { + if (phrasesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePhrasesIsMutable(); + phrases_.add(index, value); + onChanged(); + } else { + phrasesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of word and phrases.
+     * 
+ * + * repeated .google.cloud.speech.v1p1beta1.PhraseSet.Phrase phrases = 2; + */ + public Builder addPhrases( + com.google.cloud.speech.v1p1beta1.PhraseSet.Phrase.Builder builderForValue) { + if (phrasesBuilder_ == null) { + ensurePhrasesIsMutable(); + phrases_.add(builderForValue.build()); + onChanged(); + } else { + phrasesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of word and phrases.
+     * 
+ * + * repeated .google.cloud.speech.v1p1beta1.PhraseSet.Phrase phrases = 2; + */ + public Builder addPhrases( + int index, com.google.cloud.speech.v1p1beta1.PhraseSet.Phrase.Builder builderForValue) { + if (phrasesBuilder_ == null) { + ensurePhrasesIsMutable(); + phrases_.add(index, builderForValue.build()); + onChanged(); + } else { + phrasesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of word and phrases.
+     * 
+ * + * repeated .google.cloud.speech.v1p1beta1.PhraseSet.Phrase phrases = 2; + */ + public Builder addAllPhrases( + java.lang.Iterable values) { + if (phrasesBuilder_ == null) { + ensurePhrasesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, phrases_); + onChanged(); + } else { + phrasesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of word and phrases.
+     * 
+ * + * repeated .google.cloud.speech.v1p1beta1.PhraseSet.Phrase phrases = 2; + */ + public Builder clearPhrases() { + if (phrasesBuilder_ == null) { + phrases_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + phrasesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of word and phrases.
+     * 
+ * + * repeated .google.cloud.speech.v1p1beta1.PhraseSet.Phrase phrases = 2; + */ + public Builder removePhrases(int index) { + if (phrasesBuilder_ == null) { + ensurePhrasesIsMutable(); + phrases_.remove(index); + onChanged(); + } else { + phrasesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of word and phrases.
+     * 
+ * + * repeated .google.cloud.speech.v1p1beta1.PhraseSet.Phrase phrases = 2; + */ + public com.google.cloud.speech.v1p1beta1.PhraseSet.Phrase.Builder getPhrasesBuilder(int index) { + return getPhrasesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of word and phrases.
+     * 
+ * + * repeated .google.cloud.speech.v1p1beta1.PhraseSet.Phrase phrases = 2; + */ + public com.google.cloud.speech.v1p1beta1.PhraseSet.PhraseOrBuilder getPhrasesOrBuilder( + int index) { + if (phrasesBuilder_ == null) { + return phrases_.get(index); + } else { + return phrasesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of word and phrases.
+     * 
+ * + * repeated .google.cloud.speech.v1p1beta1.PhraseSet.Phrase phrases = 2; + */ + public java.util.List + getPhrasesOrBuilderList() { + if (phrasesBuilder_ != null) { + return phrasesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(phrases_); + } + } + /** + * + * + *
+     * A list of word and phrases.
+     * 
+ * + * repeated .google.cloud.speech.v1p1beta1.PhraseSet.Phrase phrases = 2; + */ + public com.google.cloud.speech.v1p1beta1.PhraseSet.Phrase.Builder addPhrasesBuilder() { + return getPhrasesFieldBuilder() + .addBuilder(com.google.cloud.speech.v1p1beta1.PhraseSet.Phrase.getDefaultInstance()); + } + /** + * + * + *
+     * A list of word and phrases.
+     * 
+ * + * repeated .google.cloud.speech.v1p1beta1.PhraseSet.Phrase phrases = 2; + */ + public com.google.cloud.speech.v1p1beta1.PhraseSet.Phrase.Builder addPhrasesBuilder(int index) { + return getPhrasesFieldBuilder() + .addBuilder( + index, com.google.cloud.speech.v1p1beta1.PhraseSet.Phrase.getDefaultInstance()); + } + /** + * + * + *
+     * A list of word and phrases.
+     * 
+ * + * repeated .google.cloud.speech.v1p1beta1.PhraseSet.Phrase phrases = 2; + */ + public java.util.List + getPhrasesBuilderList() { + return getPhrasesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.speech.v1p1beta1.PhraseSet.Phrase, + com.google.cloud.speech.v1p1beta1.PhraseSet.Phrase.Builder, + com.google.cloud.speech.v1p1beta1.PhraseSet.PhraseOrBuilder> + getPhrasesFieldBuilder() { + if (phrasesBuilder_ == null) { + phrasesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.speech.v1p1beta1.PhraseSet.Phrase, + com.google.cloud.speech.v1p1beta1.PhraseSet.Phrase.Builder, + com.google.cloud.speech.v1p1beta1.PhraseSet.PhraseOrBuilder>( + phrases_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + phrases_ = null; + } + return phrasesBuilder_; + } + + private float boost_; + /** + * + * + *
+     * Hint Boost. Positive value will increase the probability that a specific
+     * phrase will be recognized over other similar sounding phrases. The higher
+     * the boost, the higher the chance of false positive recognition as well.
+     * Negative boost values would correspond to anti-biasing. Anti-biasing is not
+     * enabled, so negative boost will simply be ignored. Though `boost` can
+     * accept a wide range of positive values, most use cases are best served with
+     * values between 0 (exclusive) and 20. We recommend using a binary search
+     * approach to finding the optimal value for your use case. Speech recognition
+     * will skip PhraseSets with a boost value of 0.
+     * 
+ * + * float boost = 4; + * + * @return The boost. + */ + public float getBoost() { + return boost_; + } + /** + * + * + *
+     * Hint Boost. Positive value will increase the probability that a specific
+     * phrase will be recognized over other similar sounding phrases. The higher
+     * the boost, the higher the chance of false positive recognition as well.
+     * Negative boost values would correspond to anti-biasing. Anti-biasing is not
+     * enabled, so negative boost will simply be ignored. Though `boost` can
+     * accept a wide range of positive values, most use cases are best served with
+     * values between 0 (exclusive) and 20. We recommend using a binary search
+     * approach to finding the optimal value for your use case. Speech recognition
+     * will skip PhraseSets with a boost value of 0.
+     * 
+ * + * float boost = 4; + * + * @param value The boost to set. + * @return This builder for chaining. + */ + public Builder setBoost(float value) { + + boost_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Hint Boost. Positive value will increase the probability that a specific
+     * phrase will be recognized over other similar sounding phrases. The higher
+     * the boost, the higher the chance of false positive recognition as well.
+     * Negative boost values would correspond to anti-biasing. Anti-biasing is not
+     * enabled, so negative boost will simply be ignored. Though `boost` can
+     * accept a wide range of positive values, most use cases are best served with
+     * values between 0 (exclusive) and 20. We recommend using a binary search
+     * approach to finding the optimal value for your use case. Speech recognition
+     * will skip PhraseSets with a boost value of 0.
+     * 
+ * + * float boost = 4; + * + * @return This builder for chaining. + */ + public Builder clearBoost() { + + boost_ = 0F; + 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.v1p1beta1.PhraseSet) + } + + // @@protoc_insertion_point(class_scope:google.cloud.speech.v1p1beta1.PhraseSet) + private static final com.google.cloud.speech.v1p1beta1.PhraseSet DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.speech.v1p1beta1.PhraseSet(); + } + + public static com.google.cloud.speech.v1p1beta1.PhraseSet getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PhraseSet parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PhraseSet(input, extensionRegistry); + } + }; + + 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.v1p1beta1.PhraseSet getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/PhraseSetName.java b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/PhraseSetName.java new file mode 100644 index 000000000..7d7f40576 --- /dev/null +++ b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/PhraseSetName.java @@ -0,0 +1,211 @@ +/* + * Copyright 2020 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. + */ + +package com.google.cloud.speech.v1p1beta1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +/** AUTO-GENERATED DOCUMENTATION AND CLASS */ +@javax.annotation.Generated("by GAPIC protoc plugin") +public class PhraseSetName implements ResourceName { + + private static final PathTemplate PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/phraseSets/{phrase_set}"); + + private volatile Map fieldValuesMap; + + private final String project; + private final String location; + private final String phraseSet; + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getPhraseSet() { + return phraseSet; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + private PhraseSetName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + phraseSet = Preconditions.checkNotNull(builder.getPhraseSet()); + } + + public static PhraseSetName of(String project, String location, String phraseSet) { + return newBuilder().setProject(project).setLocation(location).setPhraseSet(phraseSet).build(); + } + + public static String format(String project, String location, String phraseSet) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setPhraseSet(phraseSet) + .build() + .toString(); + } + + public static PhraseSetName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PATH_TEMPLATE.validatedMatch( + formattedString, "PhraseSetName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("phrase_set")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList(values.size()); + for (PhraseSetName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PATH_TEMPLATE.matches(formattedString); + } + + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + fieldMapBuilder.put("project", project); + fieldMapBuilder.put("location", location); + fieldMapBuilder.put("phraseSet", phraseSet); + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PATH_TEMPLATE.instantiate( + "project", project, "location", location, "phrase_set", phraseSet); + } + + /** Builder for PhraseSetName. */ + public static class Builder { + + private String project; + private String location; + private String phraseSet; + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getPhraseSet() { + return phraseSet; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setPhraseSet(String phraseSet) { + this.phraseSet = phraseSet; + return this; + } + + private Builder() {} + + private Builder(PhraseSetName phraseSetName) { + project = phraseSetName.project; + location = phraseSetName.location; + phraseSet = phraseSetName.phraseSet; + } + + public PhraseSetName build() { + return new PhraseSetName(this); + } + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof PhraseSetName) { + PhraseSetName that = (PhraseSetName) o; + return (this.project.equals(that.project)) + && (this.location.equals(that.location)) + && (this.phraseSet.equals(that.phraseSet)); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= project.hashCode(); + h *= 1000003; + h ^= location.hashCode(); + h *= 1000003; + h ^= phraseSet.hashCode(); + return h; + } +} diff --git a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/PhraseSetOrBuilder.java b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/PhraseSetOrBuilder.java new file mode 100644 index 000000000..55f1127b4 --- /dev/null +++ b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/PhraseSetOrBuilder.java @@ -0,0 +1,123 @@ +/* + * Copyright 2020 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/v1p1beta1/resource.proto + +package com.google.cloud.speech.v1p1beta1; + +public interface PhraseSetOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.speech.v1p1beta1.PhraseSet) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The resource name of the phrase set.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The resource name of the phrase set.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * A list of word and phrases.
+   * 
+ * + * repeated .google.cloud.speech.v1p1beta1.PhraseSet.Phrase phrases = 2; + */ + java.util.List getPhrasesList(); + /** + * + * + *
+   * A list of word and phrases.
+   * 
+ * + * repeated .google.cloud.speech.v1p1beta1.PhraseSet.Phrase phrases = 2; + */ + com.google.cloud.speech.v1p1beta1.PhraseSet.Phrase getPhrases(int index); + /** + * + * + *
+   * A list of word and phrases.
+   * 
+ * + * repeated .google.cloud.speech.v1p1beta1.PhraseSet.Phrase phrases = 2; + */ + int getPhrasesCount(); + /** + * + * + *
+   * A list of word and phrases.
+   * 
+ * + * repeated .google.cloud.speech.v1p1beta1.PhraseSet.Phrase phrases = 2; + */ + java.util.List + getPhrasesOrBuilderList(); + /** + * + * + *
+   * A list of word and phrases.
+   * 
+ * + * repeated .google.cloud.speech.v1p1beta1.PhraseSet.Phrase phrases = 2; + */ + com.google.cloud.speech.v1p1beta1.PhraseSet.PhraseOrBuilder getPhrasesOrBuilder(int index); + + /** + * + * + *
+   * Hint Boost. Positive value will increase the probability that a specific
+   * phrase will be recognized over other similar sounding phrases. The higher
+   * the boost, the higher the chance of false positive recognition as well.
+   * Negative boost values would correspond to anti-biasing. Anti-biasing is not
+   * enabled, so negative boost will simply be ignored. Though `boost` can
+   * accept a wide range of positive values, most use cases are best served with
+   * values between 0 (exclusive) and 20. We recommend using a binary search
+   * approach to finding the optimal value for your use case. Speech recognition
+   * will skip PhraseSets with a boost value of 0.
+   * 
+ * + * float boost = 4; + * + * @return The boost. + */ + float getBoost(); +} diff --git a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/RecognitionAudio.java b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/RecognitionAudio.java index 35357ce74..acef6e707 100644 --- a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/RecognitionAudio.java +++ b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/RecognitionAudio.java @@ -24,8 +24,8 @@ *
  * Contains audio data in the encoding specified in the `RecognitionConfig`.
  * Either `content` or `uri` must be supplied. Supplying both or neither
- * returns [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. See
- * [content limits](https://cloud.google.com/speech-to-text/quotas#content).
+ * returns [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
+ * See [content limits](https://cloud.google.com/speech-to-text/quotas#content).
  * 
* * Protobuf type {@code google.cloud.speech.v1p1beta1.RecognitionAudio} @@ -196,8 +196,9 @@ public com.google.protobuf.ByteString getContent() { * Currently, only Google Cloud Storage URIs are * supported, which must be specified in the following format: * `gs://bucket_name/object_name` (other URI formats return - * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see - * [Request URIs](https://cloud.google.com/storage/docs/reference-uris). + * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). + * For more information, see [Request + * URIs](https://cloud.google.com/storage/docs/reference-uris). * * * string uri = 2; @@ -229,8 +230,9 @@ public java.lang.String getUri() { * Currently, only Google Cloud Storage URIs are * supported, which must be specified in the following format: * `gs://bucket_name/object_name` (other URI formats return - * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see - * [Request URIs](https://cloud.google.com/storage/docs/reference-uris). + * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). + * For more information, see [Request + * URIs](https://cloud.google.com/storage/docs/reference-uris). * * * string uri = 2; @@ -447,8 +449,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build *
    * Contains audio data in the encoding specified in the `RecognitionConfig`.
    * Either `content` or `uri` must be supplied. Supplying both or neither
-   * returns [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. See
-   * [content limits](https://cloud.google.com/speech-to-text/quotas#content).
+   * returns [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
+   * See [content limits](https://cloud.google.com/speech-to-text/quotas#content).
    * 
* * Protobuf type {@code google.cloud.speech.v1p1beta1.RecognitionAudio} @@ -710,8 +712,9 @@ public Builder clearContent() { * Currently, only Google Cloud Storage URIs are * supported, which must be specified in the following format: * `gs://bucket_name/object_name` (other URI formats return - * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see - * [Request URIs](https://cloud.google.com/storage/docs/reference-uris). + * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). + * For more information, see [Request + * URIs](https://cloud.google.com/storage/docs/reference-uris). * * * string uri = 2; @@ -743,8 +746,9 @@ public java.lang.String getUri() { * Currently, only Google Cloud Storage URIs are * supported, which must be specified in the following format: * `gs://bucket_name/object_name` (other URI formats return - * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see - * [Request URIs](https://cloud.google.com/storage/docs/reference-uris). + * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). + * For more information, see [Request + * URIs](https://cloud.google.com/storage/docs/reference-uris). * * * string uri = 2; @@ -776,8 +780,9 @@ public com.google.protobuf.ByteString getUriBytes() { * Currently, only Google Cloud Storage URIs are * supported, which must be specified in the following format: * `gs://bucket_name/object_name` (other URI formats return - * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see - * [Request URIs](https://cloud.google.com/storage/docs/reference-uris). + * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). + * For more information, see [Request + * URIs](https://cloud.google.com/storage/docs/reference-uris). * * * string uri = 2; @@ -803,8 +808,9 @@ public Builder setUri(java.lang.String value) { * Currently, only Google Cloud Storage URIs are * supported, which must be specified in the following format: * `gs://bucket_name/object_name` (other URI formats return - * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see - * [Request URIs](https://cloud.google.com/storage/docs/reference-uris). + * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). + * For more information, see [Request + * URIs](https://cloud.google.com/storage/docs/reference-uris). * * * string uri = 2; @@ -828,8 +834,9 @@ public Builder clearUri() { * Currently, only Google Cloud Storage URIs are * supported, which must be specified in the following format: * `gs://bucket_name/object_name` (other URI formats return - * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see - * [Request URIs](https://cloud.google.com/storage/docs/reference-uris). + * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). + * For more information, see [Request + * URIs](https://cloud.google.com/storage/docs/reference-uris). * * * string uri = 2; diff --git a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/RecognitionAudioOrBuilder.java b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/RecognitionAudioOrBuilder.java index 1bb6755fb..417e5bbe2 100644 --- a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/RecognitionAudioOrBuilder.java +++ b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/RecognitionAudioOrBuilder.java @@ -47,8 +47,9 @@ public interface RecognitionAudioOrBuilder * Currently, only Google Cloud Storage URIs are * supported, which must be specified in the following format: * `gs://bucket_name/object_name` (other URI formats return - * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see - * [Request URIs](https://cloud.google.com/storage/docs/reference-uris). + * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). + * For more information, see [Request + * URIs](https://cloud.google.com/storage/docs/reference-uris). * * * string uri = 2; @@ -65,8 +66,9 @@ public interface RecognitionAudioOrBuilder * Currently, only Google Cloud Storage URIs are * supported, which must be specified in the following format: * `gs://bucket_name/object_name` (other URI formats return - * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see - * [Request URIs](https://cloud.google.com/storage/docs/reference-uris). + * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). + * For more information, see [Request + * URIs](https://cloud.google.com/storage/docs/reference-uris). * * * string uri = 2; diff --git a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/RecognitionConfig.java b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/RecognitionConfig.java index dcb80a03c..7550d83b3 100644 --- a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/RecognitionConfig.java +++ b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/RecognitionConfig.java @@ -206,6 +206,23 @@ private RecognitionConfig( diarizationConfig_ = subBuilder.buildPartial(); } + break; + } + case 162: + { + com.google.cloud.speech.v1p1beta1.SpeechAdaptation.Builder subBuilder = null; + if (adaptation_ != null) { + subBuilder = adaptation_.toBuilder(); + } + adaptation_ = + input.readMessage( + com.google.cloud.speech.v1p1beta1.SpeechAdaptation.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(adaptation_); + adaptation_ = subBuilder.buildPartial(); + } + break; } default: @@ -270,7 +287,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * an `AudioEncoding` when you send send `FLAC` or `WAV` audio, the * encoding configuration must match the encoding described in the audio * header; otherwise the request returns an - * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error code. + * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error + * code. * * * Protobuf enum {@code google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding} @@ -380,8 +398,8 @@ public enum AudioEncoding implements com.google.protobuf.ProtocolMessageEnum { * *
      * MP3 audio. Support all standard MP3 bitrates (which range from 32-320
-     * kbps). When using this encoding, `sample_rate_hertz` can be optionally
-     * unset if not known.
+     * kbps). When using this encoding, `sample_rate_hertz` has to match the
+     * sample rate of the file being used.
      * 
* * MP3 = 8; @@ -494,8 +512,8 @@ public enum AudioEncoding implements com.google.protobuf.ProtocolMessageEnum { * *
      * MP3 audio. Support all standard MP3 bitrates (which range from 32-320
-     * kbps). When using this encoding, `sample_rate_hertz` can be optionally
-     * unset if not known.
+     * kbps). When using this encoding, `sample_rate_hertz` has to match the
+     * sample rate of the file being used.
      * 
* * MP3 = 8; @@ -603,7 +621,8 @@ private AudioEncoding(int value) { *
    * Encoding of audio data sent in all `RecognitionAudio` messages.
    * This field is optional for `FLAC` and `WAV` audio files and required
-   * for all other audio formats. For details, see [AudioEncoding][google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding].
+   * for all other audio formats. For details, see
+   * [AudioEncoding][google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding].
    * 
* * .google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding encoding = 1; @@ -619,7 +638,8 @@ public int getEncodingValue() { *
    * Encoding of audio data sent in all `RecognitionAudio` messages.
    * This field is optional for `FLAC` and `WAV` audio files and required
-   * for all other audio formats. For details, see [AudioEncoding][google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding].
+   * for all other audio formats. For details, see
+   * [AudioEncoding][google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding].
    * 
* * .google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding encoding = 1; @@ -647,7 +667,8 @@ public com.google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding getEnco * source to 16000 Hz. If that's not possible, use the native sample rate of * the audio source (instead of re-sampling). * This field is optional for FLAC and WAV audio files, but is - * required for all other audio formats. For details, see [AudioEncoding][google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding]. + * required for all other audio formats. For details, see + * [AudioEncoding][google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding]. * * * int32 sample_rate_hertz = 2; @@ -909,6 +930,63 @@ public boolean getProfanityFilter() { return profanityFilter_; } + public static final int ADAPTATION_FIELD_NUMBER = 20; + private com.google.cloud.speech.v1p1beta1.SpeechAdaptation adaptation_; + /** + * + * + *
+   * Speech adaptation configuration improves the accuracy of speech
+   * recognition. When speech adaptation is set it supersedes the
+   * `speech_contexts` field. For more information, see the [speech
+   * adaptation](https://cloud.google.com/speech-to-text/docs/context-strength)
+   * documentation.
+   * 
+ * + * .google.cloud.speech.v1p1beta1.SpeechAdaptation adaptation = 20; + * + * @return Whether the adaptation field is set. + */ + public boolean hasAdaptation() { + return adaptation_ != null; + } + /** + * + * + *
+   * Speech adaptation configuration improves the accuracy of speech
+   * recognition. When speech adaptation is set it supersedes the
+   * `speech_contexts` field. For more information, see the [speech
+   * adaptation](https://cloud.google.com/speech-to-text/docs/context-strength)
+   * documentation.
+   * 
+ * + * .google.cloud.speech.v1p1beta1.SpeechAdaptation adaptation = 20; + * + * @return The adaptation. + */ + public com.google.cloud.speech.v1p1beta1.SpeechAdaptation getAdaptation() { + return adaptation_ == null + ? com.google.cloud.speech.v1p1beta1.SpeechAdaptation.getDefaultInstance() + : adaptation_; + } + /** + * + * + *
+   * Speech adaptation configuration improves the accuracy of speech
+   * recognition. When speech adaptation is set it supersedes the
+   * `speech_contexts` field. For more information, see the [speech
+   * adaptation](https://cloud.google.com/speech-to-text/docs/context-strength)
+   * documentation.
+   * 
+ * + * .google.cloud.speech.v1p1beta1.SpeechAdaptation adaptation = 20; + */ + public com.google.cloud.speech.v1p1beta1.SpeechAdaptationOrBuilder getAdaptationOrBuilder() { + return getAdaptation(); + } + public static final int SPEECH_CONTEXTS_FIELD_NUMBER = 6; private java.util.List speechContexts_; /** @@ -1043,9 +1121,6 @@ public boolean getEnableWordConfidence() { * This feature is only available in select languages. Setting this for * requests in other languages has no effect at all. * The default 'false' value does not add punctuation to result hypotheses. - * Note: This is currently offered as an experimental service, complimentary - * to all users. In the future this may be exclusively available as a - * premium feature. * * * bool enable_automatic_punctuation = 11; @@ -1412,6 +1487,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (diarizationConfig_ != null) { output.writeMessage(19, getDiarizationConfig()); } + if (adaptation_ != null) { + output.writeMessage(20, getAdaptation()); + } unknownFields.writeTo(output); } @@ -1485,6 +1563,9 @@ public int getSerializedSize() { if (diarizationConfig_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(19, getDiarizationConfig()); } + if (adaptation_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(20, getAdaptation()); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -1511,6 +1592,10 @@ public boolean equals(final java.lang.Object obj) { return false; if (getMaxAlternatives() != other.getMaxAlternatives()) return false; if (getProfanityFilter() != other.getProfanityFilter()) return false; + if (hasAdaptation() != other.hasAdaptation()) return false; + if (hasAdaptation()) { + if (!getAdaptation().equals(other.getAdaptation())) return false; + } if (!getSpeechContextsList().equals(other.getSpeechContextsList())) return false; if (getEnableWordTimeOffsets() != other.getEnableWordTimeOffsets()) return false; if (getEnableWordConfidence() != other.getEnableWordConfidence()) return false; @@ -1558,6 +1643,10 @@ public int hashCode() { hash = (53 * hash) + getMaxAlternatives(); hash = (37 * hash) + PROFANITY_FILTER_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getProfanityFilter()); + if (hasAdaptation()) { + hash = (37 * hash) + ADAPTATION_FIELD_NUMBER; + hash = (53 * hash) + getAdaptation().hashCode(); + } if (getSpeechContextsCount() > 0) { hash = (37 * hash) + SPEECH_CONTEXTS_FIELD_NUMBER; hash = (53 * hash) + getSpeechContextsList().hashCode(); @@ -1748,6 +1837,12 @@ public Builder clear() { profanityFilter_ = false; + if (adaptationBuilder_ == null) { + adaptation_ = null; + } else { + adaptation_ = null; + adaptationBuilder_ = null; + } if (speechContextsBuilder_ == null) { speechContexts_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); @@ -1820,6 +1915,11 @@ public com.google.cloud.speech.v1p1beta1.RecognitionConfig buildPartial() { result.alternativeLanguageCodes_ = alternativeLanguageCodes_; result.maxAlternatives_ = maxAlternatives_; result.profanityFilter_ = profanityFilter_; + if (adaptationBuilder_ == null) { + result.adaptation_ = adaptation_; + } else { + result.adaptation_ = adaptationBuilder_.build(); + } if (speechContextsBuilder_ == null) { if (((bitField0_ & 0x00000002) != 0)) { speechContexts_ = java.util.Collections.unmodifiableList(speechContexts_); @@ -1928,6 +2028,9 @@ public Builder mergeFrom(com.google.cloud.speech.v1p1beta1.RecognitionConfig oth if (other.getProfanityFilter() != false) { setProfanityFilter(other.getProfanityFilter()); } + if (other.hasAdaptation()) { + mergeAdaptation(other.getAdaptation()); + } if (speechContextsBuilder_ == null) { if (!other.speechContexts_.isEmpty()) { if (speechContexts_.isEmpty()) { @@ -2022,7 +2125,8 @@ public Builder mergeFrom( *
      * Encoding of audio data sent in all `RecognitionAudio` messages.
      * This field is optional for `FLAC` and `WAV` audio files and required
-     * for all other audio formats. For details, see [AudioEncoding][google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding].
+     * for all other audio formats. For details, see
+     * [AudioEncoding][google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding].
      * 
* * .google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding encoding = 1; @@ -2038,7 +2142,8 @@ public int getEncodingValue() { *
      * Encoding of audio data sent in all `RecognitionAudio` messages.
      * This field is optional for `FLAC` and `WAV` audio files and required
-     * for all other audio formats. For details, see [AudioEncoding][google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding].
+     * for all other audio formats. For details, see
+     * [AudioEncoding][google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding].
      * 
* * .google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding encoding = 1; @@ -2057,7 +2162,8 @@ public Builder setEncodingValue(int value) { *
      * Encoding of audio data sent in all `RecognitionAudio` messages.
      * This field is optional for `FLAC` and `WAV` audio files and required
-     * for all other audio formats. For details, see [AudioEncoding][google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding].
+     * for all other audio formats. For details, see
+     * [AudioEncoding][google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding].
      * 
* * .google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding encoding = 1; @@ -2078,7 +2184,8 @@ public com.google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding getEnco *
      * Encoding of audio data sent in all `RecognitionAudio` messages.
      * This field is optional for `FLAC` and `WAV` audio files and required
-     * for all other audio formats. For details, see [AudioEncoding][google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding].
+     * for all other audio formats. For details, see
+     * [AudioEncoding][google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding].
      * 
* * .google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding encoding = 1; @@ -2102,7 +2209,8 @@ public Builder setEncoding( *
      * Encoding of audio data sent in all `RecognitionAudio` messages.
      * This field is optional for `FLAC` and `WAV` audio files and required
-     * for all other audio formats. For details, see [AudioEncoding][google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding].
+     * for all other audio formats. For details, see
+     * [AudioEncoding][google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding].
      * 
* * .google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding encoding = 1; @@ -2127,7 +2235,8 @@ public Builder clearEncoding() { * source to 16000 Hz. If that's not possible, use the native sample rate of * the audio source (instead of re-sampling). * This field is optional for FLAC and WAV audio files, but is - * required for all other audio formats. For details, see [AudioEncoding][google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding]. + * required for all other audio formats. For details, see + * [AudioEncoding][google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding]. * * * int32 sample_rate_hertz = 2; @@ -2147,7 +2256,8 @@ public int getSampleRateHertz() { * source to 16000 Hz. If that's not possible, use the native sample rate of * the audio source (instead of re-sampling). * This field is optional for FLAC and WAV audio files, but is - * required for all other audio formats. For details, see [AudioEncoding][google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding]. + * required for all other audio formats. For details, see + * [AudioEncoding][google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding]. * * * int32 sample_rate_hertz = 2; @@ -2171,7 +2281,8 @@ public Builder setSampleRateHertz(int value) { * source to 16000 Hz. If that's not possible, use the native sample rate of * the audio source (instead of re-sampling). * This field is optional for FLAC and WAV audio files, but is - * required for all other audio formats. For details, see [AudioEncoding][google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding]. + * required for all other audio formats. For details, see + * [AudioEncoding][google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding]. * * * int32 sample_rate_hertz = 2; @@ -2851,6 +2962,228 @@ public Builder clearProfanityFilter() { return this; } + private com.google.cloud.speech.v1p1beta1.SpeechAdaptation adaptation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.speech.v1p1beta1.SpeechAdaptation, + com.google.cloud.speech.v1p1beta1.SpeechAdaptation.Builder, + com.google.cloud.speech.v1p1beta1.SpeechAdaptationOrBuilder> + adaptationBuilder_; + /** + * + * + *
+     * Speech adaptation configuration improves the accuracy of speech
+     * recognition. When speech adaptation is set it supersedes the
+     * `speech_contexts` field. For more information, see the [speech
+     * adaptation](https://cloud.google.com/speech-to-text/docs/context-strength)
+     * documentation.
+     * 
+ * + * .google.cloud.speech.v1p1beta1.SpeechAdaptation adaptation = 20; + * + * @return Whether the adaptation field is set. + */ + public boolean hasAdaptation() { + return adaptationBuilder_ != null || adaptation_ != null; + } + /** + * + * + *
+     * Speech adaptation configuration improves the accuracy of speech
+     * recognition. When speech adaptation is set it supersedes the
+     * `speech_contexts` field. For more information, see the [speech
+     * adaptation](https://cloud.google.com/speech-to-text/docs/context-strength)
+     * documentation.
+     * 
+ * + * .google.cloud.speech.v1p1beta1.SpeechAdaptation adaptation = 20; + * + * @return The adaptation. + */ + public com.google.cloud.speech.v1p1beta1.SpeechAdaptation getAdaptation() { + if (adaptationBuilder_ == null) { + return adaptation_ == null + ? com.google.cloud.speech.v1p1beta1.SpeechAdaptation.getDefaultInstance() + : adaptation_; + } else { + return adaptationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Speech adaptation configuration improves the accuracy of speech
+     * recognition. When speech adaptation is set it supersedes the
+     * `speech_contexts` field. For more information, see the [speech
+     * adaptation](https://cloud.google.com/speech-to-text/docs/context-strength)
+     * documentation.
+     * 
+ * + * .google.cloud.speech.v1p1beta1.SpeechAdaptation adaptation = 20; + */ + public Builder setAdaptation(com.google.cloud.speech.v1p1beta1.SpeechAdaptation value) { + if (adaptationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + adaptation_ = value; + onChanged(); + } else { + adaptationBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Speech adaptation configuration improves the accuracy of speech
+     * recognition. When speech adaptation is set it supersedes the
+     * `speech_contexts` field. For more information, see the [speech
+     * adaptation](https://cloud.google.com/speech-to-text/docs/context-strength)
+     * documentation.
+     * 
+ * + * .google.cloud.speech.v1p1beta1.SpeechAdaptation adaptation = 20; + */ + public Builder setAdaptation( + com.google.cloud.speech.v1p1beta1.SpeechAdaptation.Builder builderForValue) { + if (adaptationBuilder_ == null) { + adaptation_ = builderForValue.build(); + onChanged(); + } else { + adaptationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Speech adaptation configuration improves the accuracy of speech
+     * recognition. When speech adaptation is set it supersedes the
+     * `speech_contexts` field. For more information, see the [speech
+     * adaptation](https://cloud.google.com/speech-to-text/docs/context-strength)
+     * documentation.
+     * 
+ * + * .google.cloud.speech.v1p1beta1.SpeechAdaptation adaptation = 20; + */ + public Builder mergeAdaptation(com.google.cloud.speech.v1p1beta1.SpeechAdaptation value) { + if (adaptationBuilder_ == null) { + if (adaptation_ != null) { + adaptation_ = + com.google.cloud.speech.v1p1beta1.SpeechAdaptation.newBuilder(adaptation_) + .mergeFrom(value) + .buildPartial(); + } else { + adaptation_ = value; + } + onChanged(); + } else { + adaptationBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Speech adaptation configuration improves the accuracy of speech
+     * recognition. When speech adaptation is set it supersedes the
+     * `speech_contexts` field. For more information, see the [speech
+     * adaptation](https://cloud.google.com/speech-to-text/docs/context-strength)
+     * documentation.
+     * 
+ * + * .google.cloud.speech.v1p1beta1.SpeechAdaptation adaptation = 20; + */ + public Builder clearAdaptation() { + if (adaptationBuilder_ == null) { + adaptation_ = null; + onChanged(); + } else { + adaptation_ = null; + adaptationBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Speech adaptation configuration improves the accuracy of speech
+     * recognition. When speech adaptation is set it supersedes the
+     * `speech_contexts` field. For more information, see the [speech
+     * adaptation](https://cloud.google.com/speech-to-text/docs/context-strength)
+     * documentation.
+     * 
+ * + * .google.cloud.speech.v1p1beta1.SpeechAdaptation adaptation = 20; + */ + public com.google.cloud.speech.v1p1beta1.SpeechAdaptation.Builder getAdaptationBuilder() { + + onChanged(); + return getAdaptationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Speech adaptation configuration improves the accuracy of speech
+     * recognition. When speech adaptation is set it supersedes the
+     * `speech_contexts` field. For more information, see the [speech
+     * adaptation](https://cloud.google.com/speech-to-text/docs/context-strength)
+     * documentation.
+     * 
+ * + * .google.cloud.speech.v1p1beta1.SpeechAdaptation adaptation = 20; + */ + public com.google.cloud.speech.v1p1beta1.SpeechAdaptationOrBuilder getAdaptationOrBuilder() { + if (adaptationBuilder_ != null) { + return adaptationBuilder_.getMessageOrBuilder(); + } else { + return adaptation_ == null + ? com.google.cloud.speech.v1p1beta1.SpeechAdaptation.getDefaultInstance() + : adaptation_; + } + } + /** + * + * + *
+     * Speech adaptation configuration improves the accuracy of speech
+     * recognition. When speech adaptation is set it supersedes the
+     * `speech_contexts` field. For more information, see the [speech
+     * adaptation](https://cloud.google.com/speech-to-text/docs/context-strength)
+     * documentation.
+     * 
+ * + * .google.cloud.speech.v1p1beta1.SpeechAdaptation adaptation = 20; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.speech.v1p1beta1.SpeechAdaptation, + com.google.cloud.speech.v1p1beta1.SpeechAdaptation.Builder, + com.google.cloud.speech.v1p1beta1.SpeechAdaptationOrBuilder> + getAdaptationFieldBuilder() { + if (adaptationBuilder_ == null) { + adaptationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.speech.v1p1beta1.SpeechAdaptation, + com.google.cloud.speech.v1p1beta1.SpeechAdaptation.Builder, + com.google.cloud.speech.v1p1beta1.SpeechAdaptationOrBuilder>( + getAdaptation(), getParentForChildren(), isClean()); + adaptation_ = null; + } + return adaptationBuilder_; + } + private java.util.List speechContexts_ = java.util.Collections.emptyList(); @@ -3409,9 +3742,6 @@ public Builder clearEnableWordConfidence() { * This feature is only available in select languages. Setting this for * requests in other languages has no effect at all. * The default 'false' value does not add punctuation to result hypotheses. - * Note: This is currently offered as an experimental service, complimentary - * to all users. In the future this may be exclusively available as a - * premium feature. * * * bool enable_automatic_punctuation = 11; @@ -3429,9 +3759,6 @@ public boolean getEnableAutomaticPunctuation() { * This feature is only available in select languages. Setting this for * requests in other languages has no effect at all. * The default 'false' value does not add punctuation to result hypotheses. - * Note: This is currently offered as an experimental service, complimentary - * to all users. In the future this may be exclusively available as a - * premium feature. * * * bool enable_automatic_punctuation = 11; @@ -3453,9 +3780,6 @@ public Builder setEnableAutomaticPunctuation(boolean value) { * This feature is only available in select languages. Setting this for * requests in other languages has no effect at all. * The default 'false' value does not add punctuation to result hypotheses. - * Note: This is currently offered as an experimental service, complimentary - * to all users. In the future this may be exclusively available as a - * premium feature. * * * bool enable_automatic_punctuation = 11; diff --git a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/RecognitionConfigOrBuilder.java b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/RecognitionConfigOrBuilder.java index c3f510bb4..199837a00 100644 --- a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/RecognitionConfigOrBuilder.java +++ b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/RecognitionConfigOrBuilder.java @@ -29,7 +29,8 @@ public interface RecognitionConfigOrBuilder *
    * Encoding of audio data sent in all `RecognitionAudio` messages.
    * This field is optional for `FLAC` and `WAV` audio files and required
-   * for all other audio formats. For details, see [AudioEncoding][google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding].
+   * for all other audio formats. For details, see
+   * [AudioEncoding][google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding].
    * 
* * .google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding encoding = 1; @@ -43,7 +44,8 @@ public interface RecognitionConfigOrBuilder *
    * Encoding of audio data sent in all `RecognitionAudio` messages.
    * This field is optional for `FLAC` and `WAV` audio files and required
-   * for all other audio formats. For details, see [AudioEncoding][google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding].
+   * for all other audio formats. For details, see
+   * [AudioEncoding][google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding].
    * 
* * .google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding encoding = 1; @@ -62,7 +64,8 @@ public interface RecognitionConfigOrBuilder * source to 16000 Hz. If that's not possible, use the native sample rate of * the audio source (instead of re-sampling). * This field is optional for FLAC and WAV audio files, but is - * required for all other audio formats. For details, see [AudioEncoding][google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding]. + * required for all other audio formats. For details, see + * [AudioEncoding][google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding]. * * * int32 sample_rate_hertz = 2; @@ -274,6 +277,53 @@ public interface RecognitionConfigOrBuilder */ boolean getProfanityFilter(); + /** + * + * + *
+   * Speech adaptation configuration improves the accuracy of speech
+   * recognition. When speech adaptation is set it supersedes the
+   * `speech_contexts` field. For more information, see the [speech
+   * adaptation](https://cloud.google.com/speech-to-text/docs/context-strength)
+   * documentation.
+   * 
+ * + * .google.cloud.speech.v1p1beta1.SpeechAdaptation adaptation = 20; + * + * @return Whether the adaptation field is set. + */ + boolean hasAdaptation(); + /** + * + * + *
+   * Speech adaptation configuration improves the accuracy of speech
+   * recognition. When speech adaptation is set it supersedes the
+   * `speech_contexts` field. For more information, see the [speech
+   * adaptation](https://cloud.google.com/speech-to-text/docs/context-strength)
+   * documentation.
+   * 
+ * + * .google.cloud.speech.v1p1beta1.SpeechAdaptation adaptation = 20; + * + * @return The adaptation. + */ + com.google.cloud.speech.v1p1beta1.SpeechAdaptation getAdaptation(); + /** + * + * + *
+   * Speech adaptation configuration improves the accuracy of speech
+   * recognition. When speech adaptation is set it supersedes the
+   * `speech_contexts` field. For more information, see the [speech
+   * adaptation](https://cloud.google.com/speech-to-text/docs/context-strength)
+   * documentation.
+   * 
+ * + * .google.cloud.speech.v1p1beta1.SpeechAdaptation adaptation = 20; + */ + com.google.cloud.speech.v1p1beta1.SpeechAdaptationOrBuilder getAdaptationOrBuilder(); + /** * * @@ -385,9 +435,6 @@ public interface RecognitionConfigOrBuilder * This feature is only available in select languages. Setting this for * requests in other languages has no effect at all. * The default 'false' value does not add punctuation to result hypotheses. - * Note: This is currently offered as an experimental service, complimentary - * to all users. In the future this may be exclusively available as a - * premium feature. * * * bool enable_automatic_punctuation = 11; diff --git a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/SpeakerDiarizationConfig.java b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/SpeakerDiarizationConfig.java index 1043538e6..15d561dad 100644 --- a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/SpeakerDiarizationConfig.java +++ b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/SpeakerDiarizationConfig.java @@ -83,6 +83,11 @@ private SpeakerDiarizationConfig( maxSpeakerCount_ = input.readInt32(); break; } + case 40: + { + speakerTag_ = input.readInt32(); + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -174,6 +179,25 @@ public int getMaxSpeakerCount() { return maxSpeakerCount_; } + public static final int SPEAKER_TAG_FIELD_NUMBER = 5; + private int speakerTag_; + /** + * + * + *
+   * Output only. Unused.
+   * 
+ * + * int32 speaker_tag = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The speakerTag. + */ + @java.lang.Deprecated + public int getSpeakerTag() { + return speakerTag_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -197,6 +221,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (maxSpeakerCount_ != 0) { output.writeInt32(3, maxSpeakerCount_); } + if (speakerTag_ != 0) { + output.writeInt32(5, speakerTag_); + } unknownFields.writeTo(output); } @@ -215,6 +242,9 @@ public int getSerializedSize() { if (maxSpeakerCount_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, maxSpeakerCount_); } + if (speakerTag_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, speakerTag_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -234,6 +264,7 @@ public boolean equals(final java.lang.Object obj) { if (getEnableSpeakerDiarization() != other.getEnableSpeakerDiarization()) return false; if (getMinSpeakerCount() != other.getMinSpeakerCount()) return false; if (getMaxSpeakerCount() != other.getMaxSpeakerCount()) return false; + if (getSpeakerTag() != other.getSpeakerTag()) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -251,6 +282,8 @@ public int hashCode() { hash = (53 * hash) + getMinSpeakerCount(); hash = (37 * hash) + MAX_SPEAKER_COUNT_FIELD_NUMBER; hash = (53 * hash) + getMaxSpeakerCount(); + hash = (37 * hash) + SPEAKER_TAG_FIELD_NUMBER; + hash = (53 * hash) + getSpeakerTag(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -403,6 +436,8 @@ public Builder clear() { maxSpeakerCount_ = 0; + speakerTag_ = 0; + return this; } @@ -433,6 +468,7 @@ public com.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfig buildPartial() result.enableSpeakerDiarization_ = enableSpeakerDiarization_; result.minSpeakerCount_ = minSpeakerCount_; result.maxSpeakerCount_ = maxSpeakerCount_; + result.speakerTag_ = speakerTag_; onBuilt(); return result; } @@ -492,6 +528,9 @@ public Builder mergeFrom(com.google.cloud.speech.v1p1beta1.SpeakerDiarizationCon if (other.getMaxSpeakerCount() != 0) { setMaxSpeakerCount(other.getMaxSpeakerCount()); } + if (other.getSpeakerTag() != 0) { + setSpeakerTag(other.getSpeakerTag()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -693,6 +732,63 @@ public Builder clearMaxSpeakerCount() { return this; } + private int speakerTag_; + /** + * + * + *
+     * Output only. Unused.
+     * 
+ * + * int32 speaker_tag = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The speakerTag. + */ + @java.lang.Deprecated + public int getSpeakerTag() { + return speakerTag_; + } + /** + * + * + *
+     * Output only. Unused.
+     * 
+ * + * int32 speaker_tag = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The speakerTag to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setSpeakerTag(int value) { + + speakerTag_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Unused.
+     * 
+ * + * int32 speaker_tag = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder clearSpeakerTag() { + + speakerTag_ = 0; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/SpeakerDiarizationConfigOrBuilder.java b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/SpeakerDiarizationConfigOrBuilder.java index 3d1426633..3a1bf9e62 100644 --- a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/SpeakerDiarizationConfigOrBuilder.java +++ b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/SpeakerDiarizationConfigOrBuilder.java @@ -67,4 +67,19 @@ public interface SpeakerDiarizationConfigOrBuilder * @return The maxSpeakerCount. */ int getMaxSpeakerCount(); + + /** + * + * + *
+   * Output only. Unused.
+   * 
+ * + * int32 speaker_tag = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The speakerTag. + */ + @java.lang.Deprecated + int getSpeakerTag(); } diff --git a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/SpeechAdaptation.java b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/SpeechAdaptation.java new file mode 100644 index 000000000..8d9cac486 --- /dev/null +++ b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/SpeechAdaptation.java @@ -0,0 +1,1556 @@ +/* + * Copyright 2020 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/v1p1beta1/resource.proto + +package com.google.cloud.speech.v1p1beta1; + +/** + * + * + *
+ * Speech adaptation configuration.
+ * 
+ * + * Protobuf type {@code google.cloud.speech.v1p1beta1.SpeechAdaptation} + */ +public final class SpeechAdaptation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.speech.v1p1beta1.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(); + customClasses_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SpeechAdaptation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SpeechAdaptation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + phraseSets_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + phraseSets_.add( + input.readMessage( + com.google.cloud.speech.v1p1beta1.PhraseSet.parser(), extensionRegistry)); + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + customClasses_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + customClasses_.add( + input.readMessage( + com.google.cloud.speech.v1p1beta1.CustomClass.parser(), extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + phraseSets_ = java.util.Collections.unmodifiableList(phraseSets_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + customClasses_ = java.util.Collections.unmodifiableList(customClasses_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.speech.v1p1beta1.SpeechResourceProto + .internal_static_google_cloud_speech_v1p1beta1_SpeechAdaptation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.speech.v1p1beta1.SpeechResourceProto + .internal_static_google_cloud_speech_v1p1beta1_SpeechAdaptation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.speech.v1p1beta1.SpeechAdaptation.class, + com.google.cloud.speech.v1p1beta1.SpeechAdaptation.Builder.class); + } + + public static final int PHRASE_SETS_FIELD_NUMBER = 1; + 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.v1p1beta1.PhraseSet phrase_sets = 1; + */ + 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.v1p1beta1.PhraseSet phrase_sets = 1; + */ + 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.v1p1beta1.PhraseSet phrase_sets = 1; + */ + 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.v1p1beta1.PhraseSet phrase_sets = 1; + */ + public com.google.cloud.speech.v1p1beta1.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.v1p1beta1.PhraseSet phrase_sets = 1; + */ + public com.google.cloud.speech.v1p1beta1.PhraseSetOrBuilder getPhraseSetsOrBuilder(int index) { + return phraseSets_.get(index); + } + + public static final int CUSTOM_CLASSES_FIELD_NUMBER = 2; + 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.v1p1beta1.CustomClass custom_classes = 2; + */ + 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.v1p1beta1.CustomClass custom_classes = 2; + */ + 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.v1p1beta1.CustomClass custom_classes = 2; + */ + 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.v1p1beta1.CustomClass custom_classes = 2; + */ + public com.google.cloud.speech.v1p1beta1.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.v1p1beta1.CustomClass custom_classes = 2; + */ + public com.google.cloud.speech.v1p1beta1.CustomClassOrBuilder getCustomClassesOrBuilder( + int index) { + return customClasses_.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 < phraseSets_.size(); i++) { + output.writeMessage(1, phraseSets_.get(i)); + } + for (int i = 0; i < customClasses_.size(); i++) { + output.writeMessage(2, customClasses_.get(i)); + } + unknownFields.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)); + } + for (int i = 0; i < customClasses_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, customClasses_.get(i)); + } + size += unknownFields.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.v1p1beta1.SpeechAdaptation)) { + return super.equals(obj); + } + com.google.cloud.speech.v1p1beta1.SpeechAdaptation other = + (com.google.cloud.speech.v1p1beta1.SpeechAdaptation) obj; + + if (!getPhraseSetsList().equals(other.getPhraseSetsList())) return false; + if (!getCustomClassesList().equals(other.getCustomClassesList())) return false; + if (!unknownFields.equals(other.unknownFields)) 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 (getCustomClassesCount() > 0) { + hash = (37 * hash) + CUSTOM_CLASSES_FIELD_NUMBER; + hash = (53 * hash) + getCustomClassesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.speech.v1p1beta1.SpeechAdaptation parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.speech.v1p1beta1.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.v1p1beta1.SpeechAdaptation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.speech.v1p1beta1.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.v1p1beta1.SpeechAdaptation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.speech.v1p1beta1.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.v1p1beta1.SpeechAdaptation parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.speech.v1p1beta1.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.v1p1beta1.SpeechAdaptation parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.speech.v1p1beta1.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.v1p1beta1.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.v1p1beta1.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.v1p1beta1.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.v1p1beta1.SpeechAdaptation} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.speech.v1p1beta1.SpeechAdaptation) + com.google.cloud.speech.v1p1beta1.SpeechAdaptationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.speech.v1p1beta1.SpeechResourceProto + .internal_static_google_cloud_speech_v1p1beta1_SpeechAdaptation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.speech.v1p1beta1.SpeechResourceProto + .internal_static_google_cloud_speech_v1p1beta1_SpeechAdaptation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.speech.v1p1beta1.SpeechAdaptation.class, + com.google.cloud.speech.v1p1beta1.SpeechAdaptation.Builder.class); + } + + // Construct using com.google.cloud.speech.v1p1beta1.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(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (phraseSetsBuilder_ == null) { + phraseSets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + phraseSetsBuilder_.clear(); + } + if (customClassesBuilder_ == null) { + customClasses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + customClassesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.speech.v1p1beta1.SpeechResourceProto + .internal_static_google_cloud_speech_v1p1beta1_SpeechAdaptation_descriptor; + } + + @java.lang.Override + public com.google.cloud.speech.v1p1beta1.SpeechAdaptation getDefaultInstanceForType() { + return com.google.cloud.speech.v1p1beta1.SpeechAdaptation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.speech.v1p1beta1.SpeechAdaptation build() { + com.google.cloud.speech.v1p1beta1.SpeechAdaptation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.speech.v1p1beta1.SpeechAdaptation buildPartial() { + com.google.cloud.speech.v1p1beta1.SpeechAdaptation result = + new com.google.cloud.speech.v1p1beta1.SpeechAdaptation(this); + int from_bitField0_ = bitField0_; + 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_ & 0x00000002) != 0)) { + customClasses_ = java.util.Collections.unmodifiableList(customClasses_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.customClasses_ = customClasses_; + } else { + result.customClasses_ = customClassesBuilder_.build(); + } + onBuilt(); + return result; + } + + @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.v1p1beta1.SpeechAdaptation) { + return mergeFrom((com.google.cloud.speech.v1p1beta1.SpeechAdaptation) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.speech.v1p1beta1.SpeechAdaptation other) { + if (other == com.google.cloud.speech.v1p1beta1.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 (customClassesBuilder_ == null) { + if (!other.customClasses_.isEmpty()) { + if (customClasses_.isEmpty()) { + customClasses_ = other.customClasses_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureCustomClassesIsMutable(); + customClasses_.addAll(other.customClasses_); + } + onChanged(); + } + } else { + if (!other.customClasses_.isEmpty()) { + if (customClassesBuilder_.isEmpty()) { + customClassesBuilder_.dispose(); + customClassesBuilder_ = null; + customClasses_ = other.customClasses_; + bitField0_ = (bitField0_ & ~0x00000002); + customClassesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getCustomClassesFieldBuilder() + : null; + } else { + customClassesBuilder_.addAllMessages(other.customClasses_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.speech.v1p1beta1.SpeechAdaptation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.speech.v1p1beta1.SpeechAdaptation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + 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.v1p1beta1.PhraseSet, + com.google.cloud.speech.v1p1beta1.PhraseSet.Builder, + com.google.cloud.speech.v1p1beta1.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.v1p1beta1.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.v1p1beta1.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.v1p1beta1.PhraseSet phrase_sets = 1; + */ + public com.google.cloud.speech.v1p1beta1.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.v1p1beta1.PhraseSet phrase_sets = 1; + */ + public Builder setPhraseSets(int index, com.google.cloud.speech.v1p1beta1.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.v1p1beta1.PhraseSet phrase_sets = 1; + */ + public Builder setPhraseSets( + int index, com.google.cloud.speech.v1p1beta1.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.v1p1beta1.PhraseSet phrase_sets = 1; + */ + public Builder addPhraseSets(com.google.cloud.speech.v1p1beta1.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.v1p1beta1.PhraseSet phrase_sets = 1; + */ + public Builder addPhraseSets(int index, com.google.cloud.speech.v1p1beta1.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.v1p1beta1.PhraseSet phrase_sets = 1; + */ + public Builder addPhraseSets( + com.google.cloud.speech.v1p1beta1.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.v1p1beta1.PhraseSet phrase_sets = 1; + */ + public Builder addPhraseSets( + int index, com.google.cloud.speech.v1p1beta1.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.v1p1beta1.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.v1p1beta1.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.v1p1beta1.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.v1p1beta1.PhraseSet phrase_sets = 1; + */ + public com.google.cloud.speech.v1p1beta1.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.v1p1beta1.PhraseSet phrase_sets = 1; + */ + public com.google.cloud.speech.v1p1beta1.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.v1p1beta1.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.v1p1beta1.PhraseSet phrase_sets = 1; + */ + public com.google.cloud.speech.v1p1beta1.PhraseSet.Builder addPhraseSetsBuilder() { + return getPhraseSetsFieldBuilder() + .addBuilder(com.google.cloud.speech.v1p1beta1.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.v1p1beta1.PhraseSet phrase_sets = 1; + */ + public com.google.cloud.speech.v1p1beta1.PhraseSet.Builder addPhraseSetsBuilder(int index) { + return getPhraseSetsFieldBuilder() + .addBuilder(index, com.google.cloud.speech.v1p1beta1.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.v1p1beta1.PhraseSet phrase_sets = 1; + */ + public java.util.List + getPhraseSetsBuilderList() { + return getPhraseSetsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.speech.v1p1beta1.PhraseSet, + com.google.cloud.speech.v1p1beta1.PhraseSet.Builder, + com.google.cloud.speech.v1p1beta1.PhraseSetOrBuilder> + getPhraseSetsFieldBuilder() { + if (phraseSetsBuilder_ == null) { + phraseSetsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.speech.v1p1beta1.PhraseSet, + com.google.cloud.speech.v1p1beta1.PhraseSet.Builder, + com.google.cloud.speech.v1p1beta1.PhraseSetOrBuilder>( + phraseSets_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + phraseSets_ = null; + } + return phraseSetsBuilder_; + } + + private java.util.List customClasses_ = + java.util.Collections.emptyList(); + + private void ensureCustomClassesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + customClasses_ = + new java.util.ArrayList(customClasses_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.speech.v1p1beta1.CustomClass, + com.google.cloud.speech.v1p1beta1.CustomClass.Builder, + com.google.cloud.speech.v1p1beta1.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.v1p1beta1.CustomClass custom_classes = 2; + */ + 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.v1p1beta1.CustomClass custom_classes = 2; + */ + 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.v1p1beta1.CustomClass custom_classes = 2; + */ + public com.google.cloud.speech.v1p1beta1.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.v1p1beta1.CustomClass custom_classes = 2; + */ + public Builder setCustomClasses( + int index, com.google.cloud.speech.v1p1beta1.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.v1p1beta1.CustomClass custom_classes = 2; + */ + public Builder setCustomClasses( + int index, com.google.cloud.speech.v1p1beta1.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.v1p1beta1.CustomClass custom_classes = 2; + */ + public Builder addCustomClasses(com.google.cloud.speech.v1p1beta1.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.v1p1beta1.CustomClass custom_classes = 2; + */ + public Builder addCustomClasses( + int index, com.google.cloud.speech.v1p1beta1.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.v1p1beta1.CustomClass custom_classes = 2; + */ + public Builder addCustomClasses( + com.google.cloud.speech.v1p1beta1.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.v1p1beta1.CustomClass custom_classes = 2; + */ + public Builder addCustomClasses( + int index, com.google.cloud.speech.v1p1beta1.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.v1p1beta1.CustomClass custom_classes = 2; + */ + 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.v1p1beta1.CustomClass custom_classes = 2; + */ + public Builder clearCustomClasses() { + if (customClassesBuilder_ == null) { + customClasses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + 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.v1p1beta1.CustomClass custom_classes = 2; + */ + 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.v1p1beta1.CustomClass custom_classes = 2; + */ + public com.google.cloud.speech.v1p1beta1.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.v1p1beta1.CustomClass custom_classes = 2; + */ + public com.google.cloud.speech.v1p1beta1.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.v1p1beta1.CustomClass custom_classes = 2; + */ + 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.v1p1beta1.CustomClass custom_classes = 2; + */ + public com.google.cloud.speech.v1p1beta1.CustomClass.Builder addCustomClassesBuilder() { + return getCustomClassesFieldBuilder() + .addBuilder(com.google.cloud.speech.v1p1beta1.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.v1p1beta1.CustomClass custom_classes = 2; + */ + public com.google.cloud.speech.v1p1beta1.CustomClass.Builder addCustomClassesBuilder( + int index) { + return getCustomClassesFieldBuilder() + .addBuilder(index, com.google.cloud.speech.v1p1beta1.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.v1p1beta1.CustomClass custom_classes = 2; + */ + public java.util.List + getCustomClassesBuilderList() { + return getCustomClassesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.speech.v1p1beta1.CustomClass, + com.google.cloud.speech.v1p1beta1.CustomClass.Builder, + com.google.cloud.speech.v1p1beta1.CustomClassOrBuilder> + getCustomClassesFieldBuilder() { + if (customClassesBuilder_ == null) { + customClassesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.speech.v1p1beta1.CustomClass, + com.google.cloud.speech.v1p1beta1.CustomClass.Builder, + com.google.cloud.speech.v1p1beta1.CustomClassOrBuilder>( + customClasses_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + customClasses_ = null; + } + return customClassesBuilder_; + } + + @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.v1p1beta1.SpeechAdaptation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.speech.v1p1beta1.SpeechAdaptation) + private static final com.google.cloud.speech.v1p1beta1.SpeechAdaptation DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.speech.v1p1beta1.SpeechAdaptation(); + } + + public static com.google.cloud.speech.v1p1beta1.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 { + return new SpeechAdaptation(input, extensionRegistry); + } + }; + + 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.v1p1beta1.SpeechAdaptation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/SpeechAdaptationOrBuilder.java b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/SpeechAdaptationOrBuilder.java new file mode 100644 index 000000000..1549bd430 --- /dev/null +++ b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/SpeechAdaptationOrBuilder.java @@ -0,0 +1,154 @@ +/* + * Copyright 2020 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/v1p1beta1/resource.proto + +package com.google.cloud.speech.v1p1beta1; + +public interface SpeechAdaptationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.speech.v1p1beta1.SpeechAdaptation) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * 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.v1p1beta1.PhraseSet phrase_sets = 1; + */ + java.util.List getPhraseSetsList(); + /** + * + * + *
+   * 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.v1p1beta1.PhraseSet phrase_sets = 1; + */ + com.google.cloud.speech.v1p1beta1.PhraseSet getPhraseSets(int 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.v1p1beta1.PhraseSet phrase_sets = 1; + */ + int getPhraseSetsCount(); + /** + * + * + *
+   * 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.v1p1beta1.PhraseSet phrase_sets = 1; + */ + java.util.List + getPhraseSetsOrBuilderList(); + /** + * + * + *
+   * 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.v1p1beta1.PhraseSet phrase_sets = 1; + */ + com.google.cloud.speech.v1p1beta1.PhraseSetOrBuilder getPhraseSetsOrBuilder(int 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.v1p1beta1.CustomClass custom_classes = 2; + */ + java.util.List getCustomClassesList(); + /** + * + * + *
+   * 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.v1p1beta1.CustomClass custom_classes = 2; + */ + com.google.cloud.speech.v1p1beta1.CustomClass getCustomClasses(int 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.v1p1beta1.CustomClass custom_classes = 2; + */ + int getCustomClassesCount(); + /** + * + * + *
+   * 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.v1p1beta1.CustomClass custom_classes = 2; + */ + java.util.List + getCustomClassesOrBuilderList(); + /** + * + * + *
+   * 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.v1p1beta1.CustomClass custom_classes = 2; + */ + com.google.cloud.speech.v1p1beta1.CustomClassOrBuilder getCustomClassesOrBuilder(int index); +} diff --git a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/SpeechProto.java b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/SpeechProto.java index 0ab809fe2..bcc62d545 100644 --- a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/SpeechProto.java +++ b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/SpeechProto.java @@ -108,138 +108,143 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "eech.proto\022\035google.cloud.speech.v1p1beta" + "1\032\034google/api/annotations.proto\032\027google/" + "api/client.proto\032\037google/api/field_behav" - + "ior.proto\032#google/longrunning/operations" - + ".proto\032\031google/protobuf/any.proto\032\036googl" - + "e/protobuf/duration.proto\032\037google/protob" - + "uf/timestamp.proto\032\027google/rpc/status.pr" - + "oto\"\236\001\n\020RecognizeRequest\022E\n\006config\030\001 \001(\013" - + "20.google.cloud.speech.v1p1beta1.Recogni" - + "tionConfigB\003\340A\002\022C\n\005audio\030\002 \001(\0132/.google." - + "cloud.speech.v1p1beta1.RecognitionAudioB" - + "\003\340A\002\"\251\001\n\033LongRunningRecognizeRequest\022E\n\006" - + "config\030\001 \001(\01320.google.cloud.speech.v1p1b" - + "eta1.RecognitionConfigB\003\340A\002\022C\n\005audio\030\002 \001" - + "(\0132/.google.cloud.speech.v1p1beta1.Recog" - + "nitionAudioB\003\340A\002\"\240\001\n\031StreamingRecognizeR" - + "equest\022U\n\020streaming_config\030\001 \001(\01329.googl" - + "e.cloud.speech.v1p1beta1.StreamingRecogn" - + "itionConfigH\000\022\027\n\raudio_content\030\002 \001(\014H\000B\023" - + "\n\021streaming_request\"\226\001\n\032StreamingRecogni" - + "tionConfig\022E\n\006config\030\001 \001(\01320.google.clou" - + "d.speech.v1p1beta1.RecognitionConfigB\003\340A" - + "\002\022\030\n\020single_utterance\030\002 \001(\010\022\027\n\017interim_r" - + "esults\030\003 \001(\010\"\227\007\n\021RecognitionConfig\022P\n\010en" - + "coding\030\001 \001(\0162>.google.cloud.speech.v1p1b" - + "eta1.RecognitionConfig.AudioEncoding\022\031\n\021" - + "sample_rate_hertz\030\002 \001(\005\022\033\n\023audio_channel" - + "_count\030\007 \001(\005\022/\n\'enable_separate_recognit" - + "ion_per_channel\030\014 \001(\010\022\032\n\rlanguage_code\030\003" - + " \001(\tB\003\340A\002\022\"\n\032alternative_language_codes\030" - + "\022 \003(\t\022\030\n\020max_alternatives\030\004 \001(\005\022\030\n\020profa" - + "nity_filter\030\005 \001(\010\022E\n\017speech_contexts\030\006 \003" - + "(\0132,.google.cloud.speech.v1p1beta1.Speec" - + "hContext\022 \n\030enable_word_time_offsets\030\010 \001" - + "(\010\022\036\n\026enable_word_confidence\030\017 \001(\010\022$\n\034en" - + "able_automatic_punctuation\030\013 \001(\010\022&\n\032enab" - + "le_speaker_diarization\030\020 \001(\010B\002\030\001\022%\n\031diar" - + "ization_speaker_count\030\021 \001(\005B\002\030\001\022S\n\022diari" - + "zation_config\030\023 \001(\01327.google.cloud.speec" - + "h.v1p1beta1.SpeakerDiarizationConfig\022D\n\010" - + "metadata\030\t \001(\01322.google.cloud.speech.v1p" - + "1beta1.RecognitionMetadata\022\r\n\005model\030\r \001(" - + "\t\022\024\n\014use_enhanced\030\016 \001(\010\"\224\001\n\rAudioEncodin" - + "g\022\030\n\024ENCODING_UNSPECIFIED\020\000\022\014\n\010LINEAR16\020" - + "\001\022\010\n\004FLAC\020\002\022\t\n\005MULAW\020\003\022\007\n\003AMR\020\004\022\n\n\006AMR_W" - + "B\020\005\022\014\n\010OGG_OPUS\020\006\022\032\n\026SPEEX_WITH_HEADER_B" - + "YTE\020\007\022\007\n\003MP3\020\010\"t\n\030SpeakerDiarizationConf" - + "ig\022\"\n\032enable_speaker_diarization\030\001 \001(\010\022\031" - + "\n\021min_speaker_count\030\002 \001(\005\022\031\n\021max_speaker" - + "_count\030\003 \001(\005\"\327\010\n\023RecognitionMetadata\022\\\n\020" - + "interaction_type\030\001 \001(\0162B.google.cloud.sp" - + "eech.v1p1beta1.RecognitionMetadata.Inter" - + "actionType\022$\n\034industry_naics_code_of_aud" - + "io\030\003 \001(\r\022b\n\023microphone_distance\030\004 \001(\0162E." - + "google.cloud.speech.v1p1beta1.Recognitio" - + "nMetadata.MicrophoneDistance\022a\n\023original" - + "_media_type\030\005 \001(\0162D.google.cloud.speech." - + "v1p1beta1.RecognitionMetadata.OriginalMe" - + "diaType\022e\n\025recording_device_type\030\006 \001(\0162F" - + ".google.cloud.speech.v1p1beta1.Recogniti" - + "onMetadata.RecordingDeviceType\022\035\n\025record" - + "ing_device_name\030\007 \001(\t\022\032\n\022original_mime_t" - + "ype\030\010 \001(\t\022\031\n\robfuscated_id\030\t \001(\003B\002\030\001\022\023\n\013" - + "audio_topic\030\n \001(\t\"\305\001\n\017InteractionType\022 \n" - + "\034INTERACTION_TYPE_UNSPECIFIED\020\000\022\016\n\nDISCU" - + "SSION\020\001\022\020\n\014PRESENTATION\020\002\022\016\n\nPHONE_CALL\020" - + "\003\022\r\n\tVOICEMAIL\020\004\022\033\n\027PROFESSIONALLY_PRODU" - + "CED\020\005\022\020\n\014VOICE_SEARCH\020\006\022\021\n\rVOICE_COMMAND" - + "\020\007\022\r\n\tDICTATION\020\010\"d\n\022MicrophoneDistance\022" - + "#\n\037MICROPHONE_DISTANCE_UNSPECIFIED\020\000\022\r\n\t" - + "NEARFIELD\020\001\022\014\n\010MIDFIELD\020\002\022\014\n\010FARFIELD\020\003\"" - + "N\n\021OriginalMediaType\022#\n\037ORIGINAL_MEDIA_T" - + "YPE_UNSPECIFIED\020\000\022\t\n\005AUDIO\020\001\022\t\n\005VIDEO\020\002\"" - + "\244\001\n\023RecordingDeviceType\022%\n!RECORDING_DEV" - + "ICE_TYPE_UNSPECIFIED\020\000\022\016\n\nSMARTPHONE\020\001\022\006" - + "\n\002PC\020\002\022\016\n\nPHONE_LINE\020\003\022\013\n\007VEHICLE\020\004\022\030\n\024O" - + "THER_OUTDOOR_DEVICE\020\005\022\027\n\023OTHER_INDOOR_DE" - + "VICE\020\006\"/\n\rSpeechContext\022\017\n\007phrases\030\001 \003(\t" - + "\022\r\n\005boost\030\004 \001(\002\"D\n\020RecognitionAudio\022\021\n\007c" - + "ontent\030\001 \001(\014H\000\022\r\n\003uri\030\002 \001(\tH\000B\016\n\014audio_s" - + "ource\"\\\n\021RecognizeResponse\022G\n\007results\030\002 " - + "\003(\01326.google.cloud.speech.v1p1beta1.Spee" - + "chRecognitionResult\"g\n\034LongRunningRecogn" - + "izeResponse\022G\n\007results\030\002 \003(\01326.google.cl" - + "oud.speech.v1p1beta1.SpeechRecognitionRe" - + "sult\"\236\001\n\034LongRunningRecognizeMetadata\022\030\n" - + "\020progress_percent\030\001 \001(\005\022.\n\nstart_time\030\002 " - + "\001(\0132\032.google.protobuf.Timestamp\0224\n\020last_" - + "update_time\030\003 \001(\0132\032.google.protobuf.Time" - + "stamp\"\277\002\n\032StreamingRecognizeResponse\022!\n\005" - + "error\030\001 \001(\0132\022.google.rpc.Status\022J\n\007resul" - + "ts\030\002 \003(\01329.google.cloud.speech.v1p1beta1" - + ".StreamingRecognitionResult\022d\n\021speech_ev" - + "ent_type\030\004 \001(\0162I.google.cloud.speech.v1p" - + "1beta1.StreamingRecognizeResponse.Speech" - + "EventType\"L\n\017SpeechEventType\022\034\n\030SPEECH_E" - + "VENT_UNSPECIFIED\020\000\022\033\n\027END_OF_SINGLE_UTTE" - + "RANCE\020\001\"\364\001\n\032StreamingRecognitionResult\022Q" - + "\n\014alternatives\030\001 \003(\0132;.google.cloud.spee" - + "ch.v1p1beta1.SpeechRecognitionAlternativ" - + "e\022\020\n\010is_final\030\002 \001(\010\022\021\n\tstability\030\003 \001(\002\0222" - + "\n\017result_end_time\030\004 \001(\0132\031.google.protobu" - + "f.Duration\022\023\n\013channel_tag\030\005 \001(\005\022\025\n\rlangu" - + "age_code\030\006 \001(\t\"\230\001\n\027SpeechRecognitionResu" - + "lt\022Q\n\014alternatives\030\001 \003(\0132;.google.cloud." - + "speech.v1p1beta1.SpeechRecognitionAltern" - + "ative\022\023\n\013channel_tag\030\002 \001(\005\022\025\n\rlanguage_c" - + "ode\030\005 \001(\t\"~\n\034SpeechRecognitionAlternativ" - + "e\022\022\n\ntranscript\030\001 \001(\t\022\022\n\nconfidence\030\002 \001(" - + "\002\0226\n\005words\030\003 \003(\0132\'.google.cloud.speech.v" - + "1p1beta1.WordInfo\"\235\001\n\010WordInfo\022-\n\nstart_" - + "time\030\001 \001(\0132\031.google.protobuf.Duration\022+\n" - + "\010end_time\030\002 \001(\0132\031.google.protobuf.Durati" - + "on\022\014\n\004word\030\003 \001(\t\022\022\n\nconfidence\030\004 \001(\002\022\023\n\013" - + "speaker_tag\030\005 \001(\0052\202\005\n\006Speech\022\245\001\n\tRecogni" - + "ze\022/.google.cloud.speech.v1p1beta1.Recog" - + "nizeRequest\0320.google.cloud.speech.v1p1be" - + "ta1.RecognizeResponse\"5\202\323\344\223\002 \"\033/v1p1beta" - + "1/speech:recognize:\001*\332A\014config,audio\022\362\001\n" - + "\024LongRunningRecognize\022:.google.cloud.spe" - + "ech.v1p1beta1.LongRunningRecognizeReques" - + "t\032\035.google.longrunning.Operation\"\177\202\323\344\223\002+" - + "\"&/v1p1beta1/speech:longrunningrecognize" - + ":\001*\332A\014config,audio\312A<\n\034LongRunningRecogn" - + "izeResponse\022\034LongRunningRecognizeMetadat" - + "a\022\217\001\n\022StreamingRecognize\0228.google.cloud." - + "speech.v1p1beta1.StreamingRecognizeReque" - + "st\0329.google.cloud.speech.v1p1beta1.Strea" - + "mingRecognizeResponse\"\000(\0010\001\032I\312A\025speech.g" - + "oogleapis.com\322A.https://www.googleapis.c" - + "om/auth/cloud-platformB\200\001\n!com.google.cl" - + "oud.speech.v1p1beta1B\013SpeechProtoP\001ZCgoo" - + "gle.golang.org/genproto/googleapis/cloud" - + "/speech/v1p1beta1;speech\370\001\001\242\002\003GCSb\006proto" - + "3" + + "ior.proto\032\031google/api/resource.proto\032,go" + + "ogle/cloud/speech/v1p1beta1/resource.pro" + + "to\032#google/longrunning/operations.proto\032" + + "\031google/protobuf/any.proto\032\036google/proto" + + "buf/duration.proto\032\037google/protobuf/time" + + "stamp.proto\032\027google/rpc/status.proto\"\236\001\n" + + "\020RecognizeRequest\022E\n\006config\030\001 \001(\01320.goog" + + "le.cloud.speech.v1p1beta1.RecognitionCon" + + "figB\003\340A\002\022C\n\005audio\030\002 \001(\0132/.google.cloud.s" + + "peech.v1p1beta1.RecognitionAudioB\003\340A\002\"\251\001" + + "\n\033LongRunningRecognizeRequest\022E\n\006config\030" + + "\001 \001(\01320.google.cloud.speech.v1p1beta1.Re" + + "cognitionConfigB\003\340A\002\022C\n\005audio\030\002 \001(\0132/.go" + + "ogle.cloud.speech.v1p1beta1.RecognitionA" + + "udioB\003\340A\002\"\240\001\n\031StreamingRecognizeRequest\022" + + "U\n\020streaming_config\030\001 \001(\01329.google.cloud" + + ".speech.v1p1beta1.StreamingRecognitionCo" + + "nfigH\000\022\027\n\raudio_content\030\002 \001(\014H\000B\023\n\021strea" + + "ming_request\"\226\001\n\032StreamingRecognitionCon" + + "fig\022E\n\006config\030\001 \001(\01320.google.cloud.speec" + + "h.v1p1beta1.RecognitionConfigB\003\340A\002\022\030\n\020si" + + "ngle_utterance\030\002 \001(\010\022\027\n\017interim_results\030" + + "\003 \001(\010\"\334\007\n\021RecognitionConfig\022P\n\010encoding\030" + + "\001 \001(\0162>.google.cloud.speech.v1p1beta1.Re" + + "cognitionConfig.AudioEncoding\022\031\n\021sample_" + + "rate_hertz\030\002 \001(\005\022\033\n\023audio_channel_count\030" + + "\007 \001(\005\022/\n\'enable_separate_recognition_per" + + "_channel\030\014 \001(\010\022\032\n\rlanguage_code\030\003 \001(\tB\003\340" + + "A\002\022\"\n\032alternative_language_codes\030\022 \003(\t\022\030" + + "\n\020max_alternatives\030\004 \001(\005\022\030\n\020profanity_fi" + + "lter\030\005 \001(\010\022C\n\nadaptation\030\024 \001(\0132/.google." + + "cloud.speech.v1p1beta1.SpeechAdaptation\022" + + "E\n\017speech_contexts\030\006 \003(\0132,.google.cloud." + + "speech.v1p1beta1.SpeechContext\022 \n\030enable" + + "_word_time_offsets\030\010 \001(\010\022\036\n\026enable_word_" + + "confidence\030\017 \001(\010\022$\n\034enable_automatic_pun" + + "ctuation\030\013 \001(\010\022&\n\032enable_speaker_diariza" + + "tion\030\020 \001(\010B\002\030\001\022%\n\031diarization_speaker_co" + + "unt\030\021 \001(\005B\002\030\001\022S\n\022diarization_config\030\023 \001(" + + "\01327.google.cloud.speech.v1p1beta1.Speake" + + "rDiarizationConfig\022D\n\010metadata\030\t \001(\01322.g" + + "oogle.cloud.speech.v1p1beta1.Recognition" + + "Metadata\022\r\n\005model\030\r \001(\t\022\024\n\014use_enhanced\030" + + "\016 \001(\010\"\224\001\n\rAudioEncoding\022\030\n\024ENCODING_UNSP" + + "ECIFIED\020\000\022\014\n\010LINEAR16\020\001\022\010\n\004FLAC\020\002\022\t\n\005MUL" + + "AW\020\003\022\007\n\003AMR\020\004\022\n\n\006AMR_WB\020\005\022\014\n\010OGG_OPUS\020\006\022" + + "\032\n\026SPEEX_WITH_HEADER_BYTE\020\007\022\007\n\003MP3\020\010\"\220\001\n" + + "\030SpeakerDiarizationConfig\022\"\n\032enable_spea" + + "ker_diarization\030\001 \001(\010\022\031\n\021min_speaker_cou" + + "nt\030\002 \001(\005\022\031\n\021max_speaker_count\030\003 \001(\005\022\032\n\013s" + + "peaker_tag\030\005 \001(\005B\005\030\001\340A\003\"\327\010\n\023RecognitionM" + + "etadata\022\\\n\020interaction_type\030\001 \001(\0162B.goog" + + "le.cloud.speech.v1p1beta1.RecognitionMet" + + "adata.InteractionType\022$\n\034industry_naics_" + + "code_of_audio\030\003 \001(\r\022b\n\023microphone_distan" + + "ce\030\004 \001(\0162E.google.cloud.speech.v1p1beta1" + + ".RecognitionMetadata.MicrophoneDistance\022" + + "a\n\023original_media_type\030\005 \001(\0162D.google.cl" + + "oud.speech.v1p1beta1.RecognitionMetadata" + + ".OriginalMediaType\022e\n\025recording_device_t" + + "ype\030\006 \001(\0162F.google.cloud.speech.v1p1beta" + + "1.RecognitionMetadata.RecordingDeviceTyp" + + "e\022\035\n\025recording_device_name\030\007 \001(\t\022\032\n\022orig" + + "inal_mime_type\030\010 \001(\t\022\031\n\robfuscated_id\030\t " + + "\001(\003B\002\030\001\022\023\n\013audio_topic\030\n \001(\t\"\305\001\n\017Interac" + + "tionType\022 \n\034INTERACTION_TYPE_UNSPECIFIED" + + "\020\000\022\016\n\nDISCUSSION\020\001\022\020\n\014PRESENTATION\020\002\022\016\n\n" + + "PHONE_CALL\020\003\022\r\n\tVOICEMAIL\020\004\022\033\n\027PROFESSIO" + + "NALLY_PRODUCED\020\005\022\020\n\014VOICE_SEARCH\020\006\022\021\n\rVO" + + "ICE_COMMAND\020\007\022\r\n\tDICTATION\020\010\"d\n\022Micropho" + + "neDistance\022#\n\037MICROPHONE_DISTANCE_UNSPEC" + + "IFIED\020\000\022\r\n\tNEARFIELD\020\001\022\014\n\010MIDFIELD\020\002\022\014\n\010" + + "FARFIELD\020\003\"N\n\021OriginalMediaType\022#\n\037ORIGI" + + "NAL_MEDIA_TYPE_UNSPECIFIED\020\000\022\t\n\005AUDIO\020\001\022" + + "\t\n\005VIDEO\020\002\"\244\001\n\023RecordingDeviceType\022%\n!RE" + + "CORDING_DEVICE_TYPE_UNSPECIFIED\020\000\022\016\n\nSMA" + + "RTPHONE\020\001\022\006\n\002PC\020\002\022\016\n\nPHONE_LINE\020\003\022\013\n\007VEH" + + "ICLE\020\004\022\030\n\024OTHER_OUTDOOR_DEVICE\020\005\022\027\n\023OTHE" + + "R_INDOOR_DEVICE\020\006\"/\n\rSpeechContext\022\017\n\007ph" + + "rases\030\001 \003(\t\022\r\n\005boost\030\004 \001(\002\"D\n\020Recognitio" + + "nAudio\022\021\n\007content\030\001 \001(\014H\000\022\r\n\003uri\030\002 \001(\tH\000" + + "B\016\n\014audio_source\"\\\n\021RecognizeResponse\022G\n" + + "\007results\030\002 \003(\01326.google.cloud.speech.v1p" + + "1beta1.SpeechRecognitionResult\"g\n\034LongRu" + + "nningRecognizeResponse\022G\n\007results\030\002 \003(\0132" + + "6.google.cloud.speech.v1p1beta1.SpeechRe" + + "cognitionResult\"\260\001\n\034LongRunningRecognize" + + "Metadata\022\030\n\020progress_percent\030\001 \001(\005\022.\n\nst" + + "art_time\030\002 \001(\0132\032.google.protobuf.Timesta" + + "mp\0224\n\020last_update_time\030\003 \001(\0132\032.google.pr" + + "otobuf.Timestamp\022\020\n\003uri\030\004 \001(\tB\003\340A\003\"\277\002\n\032S" + + "treamingRecognizeResponse\022!\n\005error\030\001 \001(\013" + + "2\022.google.rpc.Status\022J\n\007results\030\002 \003(\01329." + + "google.cloud.speech.v1p1beta1.StreamingR" + + "ecognitionResult\022d\n\021speech_event_type\030\004 " + + "\001(\0162I.google.cloud.speech.v1p1beta1.Stre" + + "amingRecognizeResponse.SpeechEventType\"L" + + "\n\017SpeechEventType\022\034\n\030SPEECH_EVENT_UNSPEC" + + "IFIED\020\000\022\033\n\027END_OF_SINGLE_UTTERANCE\020\001\"\371\001\n" + + "\032StreamingRecognitionResult\022Q\n\014alternati" + + "ves\030\001 \003(\0132;.google.cloud.speech.v1p1beta" + + "1.SpeechRecognitionAlternative\022\020\n\010is_fin" + + "al\030\002 \001(\010\022\021\n\tstability\030\003 \001(\002\0222\n\017result_en" + + "d_time\030\004 \001(\0132\031.google.protobuf.Duration\022" + + "\023\n\013channel_tag\030\005 \001(\005\022\032\n\rlanguage_code\030\006 " + + "\001(\tB\003\340A\003\"\235\001\n\027SpeechRecognitionResult\022Q\n\014" + + "alternatives\030\001 \003(\0132;.google.cloud.speech" + + ".v1p1beta1.SpeechRecognitionAlternative\022" + + "\023\n\013channel_tag\030\002 \001(\005\022\032\n\rlanguage_code\030\005 " + + "\001(\tB\003\340A\003\"~\n\034SpeechRecognitionAlternative" + + "\022\022\n\ntranscript\030\001 \001(\t\022\022\n\nconfidence\030\002 \001(\002" + + "\0226\n\005words\030\003 \003(\0132\'.google.cloud.speech.v1" + + "p1beta1.WordInfo\"\242\001\n\010WordInfo\022-\n\nstart_t" + + "ime\030\001 \001(\0132\031.google.protobuf.Duration\022+\n\010" + + "end_time\030\002 \001(\0132\031.google.protobuf.Duratio" + + "n\022\014\n\004word\030\003 \001(\t\022\022\n\nconfidence\030\004 \001(\002\022\030\n\013s" + + "peaker_tag\030\005 \001(\005B\003\340A\0032\202\005\n\006Speech\022\245\001\n\tRec" + + "ognize\022/.google.cloud.speech.v1p1beta1.R" + + "ecognizeRequest\0320.google.cloud.speech.v1" + + "p1beta1.RecognizeResponse\"5\202\323\344\223\002 \"\033/v1p1" + + "beta1/speech:recognize:\001*\332A\014config,audio" + + "\022\362\001\n\024LongRunningRecognize\022:.google.cloud" + + ".speech.v1p1beta1.LongRunningRecognizeRe" + + "quest\032\035.google.longrunning.Operation\"\177\202\323" + + "\344\223\002+\"&/v1p1beta1/speech:longrunningrecog" + + "nize:\001*\332A\014config,audio\312A<\n\034LongRunningRe" + + "cognizeResponse\022\034LongRunningRecognizeMet" + + "adata\022\217\001\n\022StreamingRecognize\0228.google.cl" + + "oud.speech.v1p1beta1.StreamingRecognizeR" + + "equest\0329.google.cloud.speech.v1p1beta1.S" + + "treamingRecognizeResponse\"\000(\0010\001\032I\312A\025spee" + + "ch.googleapis.com\322A.https://www.googleap" + + "is.com/auth/cloud-platformB\200\001\n!com.googl" + + "e.cloud.speech.v1p1beta1B\013SpeechProtoP\001Z" + + "Cgoogle.golang.org/genproto/googleapis/c" + + "loud/speech/v1p1beta1;speech\370\001\001\242\002\003GCSb\006p" + + "roto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -248,6 +253,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.AnnotationsProto.getDescriptor(), com.google.api.ClientProto.getDescriptor(), com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.speech.v1p1beta1.SpeechResourceProto.getDescriptor(), com.google.longrunning.OperationsProto.getDescriptor(), com.google.protobuf.AnyProto.getDescriptor(), com.google.protobuf.DurationProto.getDescriptor(), @@ -300,6 +307,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "AlternativeLanguageCodes", "MaxAlternatives", "ProfanityFilter", + "Adaptation", "SpeechContexts", "EnableWordTimeOffsets", "EnableWordConfidence", @@ -317,7 +325,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_speech_v1p1beta1_SpeakerDiarizationConfig_descriptor, new java.lang.String[] { - "EnableSpeakerDiarization", "MinSpeakerCount", "MaxSpeakerCount", + "EnableSpeakerDiarization", "MinSpeakerCount", "MaxSpeakerCount", "SpeakerTag", }); internal_static_google_cloud_speech_v1p1beta1_RecognitionMetadata_descriptor = getDescriptor().getMessageTypes().get(6); @@ -373,7 +381,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_speech_v1p1beta1_LongRunningRecognizeMetadata_descriptor, new java.lang.String[] { - "ProgressPercent", "StartTime", "LastUpdateTime", + "ProgressPercent", "StartTime", "LastUpdateTime", "Uri", }); internal_static_google_cloud_speech_v1p1beta1_StreamingRecognizeResponse_descriptor = getDescriptor().getMessageTypes().get(12); @@ -428,6 +436,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.AnnotationsProto.getDescriptor(); com.google.api.ClientProto.getDescriptor(); com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.speech.v1p1beta1.SpeechResourceProto.getDescriptor(); com.google.longrunning.OperationsProto.getDescriptor(); com.google.protobuf.AnyProto.getDescriptor(); com.google.protobuf.DurationProto.getDescriptor(); diff --git a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/SpeechRecognitionResult.java b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/SpeechRecognitionResult.java index aa2c01342..985d2a186 100644 --- a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/SpeechRecognitionResult.java +++ b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/SpeechRecognitionResult.java @@ -248,12 +248,12 @@ public int getChannelTag() { * * *
-   * The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag
-   * of the language in this result. This language code was detected to have
-   * the most likelihood of being spoken in the audio.
+   * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
+   * language tag of the language in this result. This language code was
+   * detected to have the most likelihood of being spoken in the audio.
    * 
* - * string language_code = 5; + * string language_code = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The languageCode. */ @@ -272,12 +272,12 @@ public java.lang.String getLanguageCode() { * * *
-   * The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag
-   * of the language in this result. This language code was detected to have
-   * the most likelihood of being spoken in the audio.
+   * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
+   * language tag of the language in this result. This language code was
+   * detected to have the most likelihood of being spoken in the audio.
    * 
* - * string language_code = 5; + * string language_code = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The bytes for languageCode. */ @@ -1187,12 +1187,12 @@ public Builder clearChannelTag() { * * *
-     * The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag
-     * of the language in this result. This language code was detected to have
-     * the most likelihood of being spoken in the audio.
+     * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
+     * language tag of the language in this result. This language code was
+     * detected to have the most likelihood of being spoken in the audio.
      * 
* - * string language_code = 5; + * string language_code = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The languageCode. */ @@ -1211,12 +1211,12 @@ public java.lang.String getLanguageCode() { * * *
-     * The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag
-     * of the language in this result. This language code was detected to have
-     * the most likelihood of being spoken in the audio.
+     * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
+     * language tag of the language in this result. This language code was
+     * detected to have the most likelihood of being spoken in the audio.
      * 
* - * string language_code = 5; + * string language_code = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The bytes for languageCode. */ @@ -1235,12 +1235,12 @@ public com.google.protobuf.ByteString getLanguageCodeBytes() { * * *
-     * The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag
-     * of the language in this result. This language code was detected to have
-     * the most likelihood of being spoken in the audio.
+     * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
+     * language tag of the language in this result. This language code was
+     * detected to have the most likelihood of being spoken in the audio.
      * 
* - * string language_code = 5; + * string language_code = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @param value The languageCode to set. * @return This builder for chaining. @@ -1258,12 +1258,12 @@ public Builder setLanguageCode(java.lang.String value) { * * *
-     * The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag
-     * of the language in this result. This language code was detected to have
-     * the most likelihood of being spoken in the audio.
+     * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
+     * language tag of the language in this result. This language code was
+     * detected to have the most likelihood of being spoken in the audio.
      * 
* - * string language_code = 5; + * string language_code = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return This builder for chaining. */ @@ -1277,12 +1277,12 @@ public Builder clearLanguageCode() { * * *
-     * The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag
-     * of the language in this result. This language code was detected to have
-     * the most likelihood of being spoken in the audio.
+     * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
+     * language tag of the language in this result. This language code was
+     * detected to have the most likelihood of being spoken in the audio.
      * 
* - * string language_code = 5; + * string language_code = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @param value The bytes for languageCode to set. * @return This builder for chaining. diff --git a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/SpeechRecognitionResultOrBuilder.java b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/SpeechRecognitionResultOrBuilder.java index eec819e05..b27b1cbad 100644 --- a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/SpeechRecognitionResultOrBuilder.java +++ b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/SpeechRecognitionResultOrBuilder.java @@ -116,12 +116,12 @@ com.google.cloud.speech.v1p1beta1.SpeechRecognitionAlternativeOrBuilder getAlter * * *
-   * The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag
-   * of the language in this result. This language code was detected to have
-   * the most likelihood of being spoken in the audio.
+   * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
+   * language tag of the language in this result. This language code was
+   * detected to have the most likelihood of being spoken in the audio.
    * 
* - * string language_code = 5; + * string language_code = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The languageCode. */ @@ -130,12 +130,12 @@ com.google.cloud.speech.v1p1beta1.SpeechRecognitionAlternativeOrBuilder getAlter * * *
-   * The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag
-   * of the language in this result. This language code was detected to have
-   * the most likelihood of being spoken in the audio.
+   * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
+   * language tag of the language in this result. This language code was
+   * detected to have the most likelihood of being spoken in the audio.
    * 
* - * string language_code = 5; + * string language_code = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The bytes for languageCode. */ diff --git a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/SpeechResourceProto.java b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/SpeechResourceProto.java new file mode 100644 index 000000000..c10c54239 --- /dev/null +++ b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/SpeechResourceProto.java @@ -0,0 +1,143 @@ +/* + * Copyright 2020 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/v1p1beta1/resource.proto + +package com.google.cloud.speech.v1p1beta1; + +public final class SpeechResourceProto { + private SpeechResourceProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_speech_v1p1beta1_CustomClass_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_speech_v1p1beta1_CustomClass_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_speech_v1p1beta1_CustomClass_ClassItem_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_speech_v1p1beta1_CustomClass_ClassItem_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_speech_v1p1beta1_PhraseSet_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_speech_v1p1beta1_PhraseSet_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_speech_v1p1beta1_PhraseSet_Phrase_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_speech_v1p1beta1_PhraseSet_Phrase_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_speech_v1p1beta1_SpeechAdaptation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_speech_v1p1beta1_SpeechAdaptation_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n,google/cloud/speech/v1p1beta1/resource" + + ".proto\022\035google.cloud.speech.v1p1beta1\032\034g" + + "oogle/api/annotations.proto\032\031google/api/" + + "resource.proto\"\203\002\n\013CustomClass\022\014\n\004name\030\001" + + " \001(\t\022\027\n\017custom_class_id\030\002 \001(\t\022C\n\005items\030\003" + + " \003(\01324.google.cloud.speech.v1p1beta1.Cus" + + "tomClass.ClassItem\032\032\n\tClassItem\022\r\n\005value" + + "\030\001 \001(\t:l\352Ai\n!speech.googleapis.com/Custo" + + "mClass\022Dprojects/{project}/locations/{lo" + + "cation}/customClasses/{custom_class}\"\371\001\n" + + "\tPhraseSet\022\014\n\004name\030\001 \001(\t\022@\n\007phrases\030\002 \003(" + + "\0132/.google.cloud.speech.v1p1beta1.Phrase" + + "Set.Phrase\022\r\n\005boost\030\004 \001(\002\032&\n\006Phrase\022\r\n\005v" + + "alue\030\001 \001(\t\022\r\n\005boost\030\002 \001(\002:e\352Ab\n\037speech.g" + + "oogleapis.com/PhraseSet\022?projects/{proje" + + "ct}/locations/{location}/phraseSets/{phr" + + "ase_set}\"\225\001\n\020SpeechAdaptation\022=\n\013phrase_" + + "sets\030\001 \003(\0132(.google.cloud.speech.v1p1bet" + + "a1.PhraseSet\022B\n\016custom_classes\030\002 \003(\0132*.g" + + "oogle.cloud.speech.v1p1beta1.CustomClass" + + "B\210\001\n!com.google.cloud.speech.v1p1beta1B\023" + + "SpeechResourceProtoP\001ZCgoogle.golang.org" + + "/genproto/googleapis/cloud/speech/v1p1be" + + "ta1;speech\370\001\001\242\002\003GCSb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + }); + internal_static_google_cloud_speech_v1p1beta1_CustomClass_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_speech_v1p1beta1_CustomClass_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_speech_v1p1beta1_CustomClass_descriptor, + new java.lang.String[] { + "Name", "CustomClassId", "Items", + }); + internal_static_google_cloud_speech_v1p1beta1_CustomClass_ClassItem_descriptor = + internal_static_google_cloud_speech_v1p1beta1_CustomClass_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_speech_v1p1beta1_CustomClass_ClassItem_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_speech_v1p1beta1_CustomClass_ClassItem_descriptor, + new java.lang.String[] { + "Value", + }); + internal_static_google_cloud_speech_v1p1beta1_PhraseSet_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_speech_v1p1beta1_PhraseSet_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_speech_v1p1beta1_PhraseSet_descriptor, + new java.lang.String[] { + "Name", "Phrases", "Boost", + }); + internal_static_google_cloud_speech_v1p1beta1_PhraseSet_Phrase_descriptor = + internal_static_google_cloud_speech_v1p1beta1_PhraseSet_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_speech_v1p1beta1_PhraseSet_Phrase_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_speech_v1p1beta1_PhraseSet_Phrase_descriptor, + new java.lang.String[] { + "Value", "Boost", + }); + internal_static_google_cloud_speech_v1p1beta1_SpeechAdaptation_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_speech_v1p1beta1_SpeechAdaptation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_speech_v1p1beta1_SpeechAdaptation_descriptor, + new java.lang.String[] { + "PhraseSets", "CustomClasses", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ResourceProto.resource); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/StreamingRecognitionResult.java b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/StreamingRecognitionResult.java index 22c83ae21..058ec3049 100644 --- a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/StreamingRecognitionResult.java +++ b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/StreamingRecognitionResult.java @@ -364,12 +364,12 @@ public int getChannelTag() { * * *
-   * The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag
-   * of the language in this result. This language code was detected to have
-   * the most likelihood of being spoken in the audio.
+   * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
+   * language tag of the language in this result. This language code was
+   * detected to have the most likelihood of being spoken in the audio.
    * 
* - * string language_code = 6; + * string language_code = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The languageCode. */ @@ -388,12 +388,12 @@ public java.lang.String getLanguageCode() { * * *
-   * The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag
-   * of the language in this result. This language code was detected to have
-   * the most likelihood of being spoken in the audio.
+   * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
+   * language tag of the language in this result. This language code was
+   * detected to have the most likelihood of being spoken in the audio.
    * 
* - * string language_code = 6; + * string language_code = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The bytes for languageCode. */ @@ -1685,12 +1685,12 @@ public Builder clearChannelTag() { * * *
-     * The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag
-     * of the language in this result. This language code was detected to have
-     * the most likelihood of being spoken in the audio.
+     * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
+     * language tag of the language in this result. This language code was
+     * detected to have the most likelihood of being spoken in the audio.
      * 
* - * string language_code = 6; + * string language_code = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The languageCode. */ @@ -1709,12 +1709,12 @@ public java.lang.String getLanguageCode() { * * *
-     * The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag
-     * of the language in this result. This language code was detected to have
-     * the most likelihood of being spoken in the audio.
+     * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
+     * language tag of the language in this result. This language code was
+     * detected to have the most likelihood of being spoken in the audio.
      * 
* - * string language_code = 6; + * string language_code = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The bytes for languageCode. */ @@ -1733,12 +1733,12 @@ public com.google.protobuf.ByteString getLanguageCodeBytes() { * * *
-     * The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag
-     * of the language in this result. This language code was detected to have
-     * the most likelihood of being spoken in the audio.
+     * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
+     * language tag of the language in this result. This language code was
+     * detected to have the most likelihood of being spoken in the audio.
      * 
* - * string language_code = 6; + * string language_code = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @param value The languageCode to set. * @return This builder for chaining. @@ -1756,12 +1756,12 @@ public Builder setLanguageCode(java.lang.String value) { * * *
-     * The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag
-     * of the language in this result. This language code was detected to have
-     * the most likelihood of being spoken in the audio.
+     * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
+     * language tag of the language in this result. This language code was
+     * detected to have the most likelihood of being spoken in the audio.
      * 
* - * string language_code = 6; + * string language_code = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return This builder for chaining. */ @@ -1775,12 +1775,12 @@ public Builder clearLanguageCode() { * * *
-     * The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag
-     * of the language in this result. This language code was detected to have
-     * the most likelihood of being spoken in the audio.
+     * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
+     * language tag of the language in this result. This language code was
+     * detected to have the most likelihood of being spoken in the audio.
      * 
* - * string language_code = 6; + * string language_code = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @param value The bytes for languageCode to set. * @return This builder for chaining. diff --git a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/StreamingRecognitionResultOrBuilder.java b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/StreamingRecognitionResultOrBuilder.java index d35bf0565..bde0e8939 100644 --- a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/StreamingRecognitionResultOrBuilder.java +++ b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/StreamingRecognitionResultOrBuilder.java @@ -188,12 +188,12 @@ com.google.cloud.speech.v1p1beta1.SpeechRecognitionAlternativeOrBuilder getAlter * * *
-   * The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag
-   * of the language in this result. This language code was detected to have
-   * the most likelihood of being spoken in the audio.
+   * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
+   * language tag of the language in this result. This language code was
+   * detected to have the most likelihood of being spoken in the audio.
    * 
* - * string language_code = 6; + * string language_code = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The languageCode. */ @@ -202,12 +202,12 @@ com.google.cloud.speech.v1p1beta1.SpeechRecognitionAlternativeOrBuilder getAlter * * *
-   * The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag
-   * of the language in this result. This language code was detected to have
-   * the most likelihood of being spoken in the audio.
+   * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
+   * language tag of the language in this result. This language code was
+   * detected to have the most likelihood of being spoken in the audio.
    * 
* - * string language_code = 6; + * string language_code = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The bytes for languageCode. */ diff --git a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/WordInfo.java b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/WordInfo.java index f9fb7a1c1..c3fc733a8 100644 --- a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/WordInfo.java +++ b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/WordInfo.java @@ -343,14 +343,14 @@ public float getConfidence() { * * *
-   * A distinct integer value is assigned for every speaker within
+   * Output only. A distinct integer value is assigned for every speaker within
    * the audio. This field specifies which one of those speakers was detected to
    * have spoken this word. Value ranges from '1' to diarization_speaker_count.
    * speaker_tag is set if enable_speaker_diarization = 'true' and only in the
    * top alternative.
    * 
* - * int32 speaker_tag = 5; + * int32 speaker_tag = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The speakerTag. */ @@ -1389,14 +1389,14 @@ public Builder clearConfidence() { * * *
-     * A distinct integer value is assigned for every speaker within
+     * Output only. A distinct integer value is assigned for every speaker within
      * the audio. This field specifies which one of those speakers was detected to
      * have spoken this word. Value ranges from '1' to diarization_speaker_count.
      * speaker_tag is set if enable_speaker_diarization = 'true' and only in the
      * top alternative.
      * 
* - * int32 speaker_tag = 5; + * int32 speaker_tag = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The speakerTag. */ @@ -1407,14 +1407,14 @@ public int getSpeakerTag() { * * *
-     * A distinct integer value is assigned for every speaker within
+     * Output only. A distinct integer value is assigned for every speaker within
      * the audio. This field specifies which one of those speakers was detected to
      * have spoken this word. Value ranges from '1' to diarization_speaker_count.
      * speaker_tag is set if enable_speaker_diarization = 'true' and only in the
      * top alternative.
      * 
* - * int32 speaker_tag = 5; + * int32 speaker_tag = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @param value The speakerTag to set. * @return This builder for chaining. @@ -1429,14 +1429,14 @@ public Builder setSpeakerTag(int value) { * * *
-     * A distinct integer value is assigned for every speaker within
+     * Output only. A distinct integer value is assigned for every speaker within
      * the audio. This field specifies which one of those speakers was detected to
      * have spoken this word. Value ranges from '1' to diarization_speaker_count.
      * speaker_tag is set if enable_speaker_diarization = 'true' and only in the
      * top alternative.
      * 
* - * int32 speaker_tag = 5; + * int32 speaker_tag = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return This builder for chaining. */ diff --git a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/WordInfoOrBuilder.java b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/WordInfoOrBuilder.java index 80b26ea5d..0bdb11ab4 100644 --- a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/WordInfoOrBuilder.java +++ b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/WordInfoOrBuilder.java @@ -171,14 +171,14 @@ public interface WordInfoOrBuilder * * *
-   * A distinct integer value is assigned for every speaker within
+   * Output only. A distinct integer value is assigned for every speaker within
    * the audio. This field specifies which one of those speakers was detected to
    * have spoken this word. Value ranges from '1' to diarization_speaker_count.
    * speaker_tag is set if enable_speaker_diarization = 'true' and only in the
    * top alternative.
    * 
* - * int32 speaker_tag = 5; + * int32 speaker_tag = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The speakerTag. */ diff --git a/proto-google-cloud-speech-v1p1beta1/src/main/proto/google/cloud/speech/v1p1beta1/cloud_speech.proto b/proto-google-cloud-speech-v1p1beta1/src/main/proto/google/cloud/speech/v1p1beta1/cloud_speech.proto index 7718b0eb3..7bb12866b 100644 --- a/proto-google-cloud-speech-v1p1beta1/src/main/proto/google/cloud/speech/v1p1beta1/cloud_speech.proto +++ b/proto-google-cloud-speech-v1p1beta1/src/main/proto/google/cloud/speech/v1p1beta1/cloud_speech.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // 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. -// syntax = "proto3"; @@ -20,6 +19,8 @@ package google.cloud.speech.v1p1beta1; import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/speech/v1p1beta1/resource.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/any.proto"; import "google/protobuf/duration.proto"; @@ -36,7 +37,8 @@ option objc_class_prefix = "GCS"; // Service that implements Google Cloud Speech API. service Speech { option (google.api.default_host) = "speech.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; // Performs synchronous speech recognition: receive results after all audio // has been sent and processed. @@ -54,7 +56,8 @@ service Speech { // a `LongRunningRecognizeResponse` message. // For more information on asynchronous speech recognition, see the // [how-to](https://cloud.google.com/speech-to-text/docs/async-recognize). - rpc LongRunningRecognize(LongRunningRecognizeRequest) returns (google.longrunning.Operation) { + rpc LongRunningRecognize(LongRunningRecognizeRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1p1beta1/speech:longrunningrecognize" body: "*" @@ -68,8 +71,8 @@ service Speech { // Performs bidirectional streaming speech recognition: receive results while // sending audio. This method is only available via the gRPC API (not REST). - rpc StreamingRecognize(stream StreamingRecognizeRequest) returns (stream StreamingRecognizeResponse) { - } + rpc StreamingRecognize(stream StreamingRecognizeRequest) + returns (stream StreamingRecognizeResponse) {} } // The top-level message sent by the client for the `Recognize` method. @@ -169,7 +172,8 @@ message RecognitionConfig { // an `AudioEncoding` when you send send `FLAC` or `WAV` audio, the // encoding configuration must match the encoding described in the audio // header; otherwise the request returns an - // [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error code. + // [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error + // code. enum AudioEncoding { // Not specified. ENCODING_UNSPECIFIED = 0; @@ -215,14 +219,15 @@ message RecognitionConfig { SPEEX_WITH_HEADER_BYTE = 7; // MP3 audio. Support all standard MP3 bitrates (which range from 32-320 - // kbps). When using this encoding, `sample_rate_hertz` can be optionally - // unset if not known. + // kbps). When using this encoding, `sample_rate_hertz` has to match the + // sample rate of the file being used. MP3 = 8; } // Encoding of audio data sent in all `RecognitionAudio` messages. // This field is optional for `FLAC` and `WAV` audio files and required - // for all other audio formats. For details, see [AudioEncoding][google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding]. + // for all other audio formats. For details, see + // [AudioEncoding][google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding]. AudioEncoding encoding = 1; // Sample rate in Hertz of the audio data sent in all @@ -231,7 +236,8 @@ message RecognitionConfig { // source to 16000 Hz. If that's not possible, use the native sample rate of // the audio source (instead of re-sampling). // This field is optional for FLAC and WAV audio files, but is - // required for all other audio formats. For details, see [AudioEncoding][google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding]. + // required for all other audio formats. For details, see + // [AudioEncoding][google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding]. int32 sample_rate_hertz = 2; // The number of channels in the input audio data. @@ -289,6 +295,13 @@ message RecognitionConfig { // won't be filtered out. bool profanity_filter = 5; + // Speech adaptation configuration improves the accuracy of speech + // recognition. When speech adaptation is set it supersedes the + // `speech_contexts` field. For more information, see the [speech + // adaptation](https://cloud.google.com/speech-to-text/docs/context-strength) + // documentation. + SpeechAdaptation adaptation = 20; + // Array of [SpeechContext][google.cloud.speech.v1p1beta1.SpeechContext]. // A means to provide context to assist the speech recognition. For more // information, see @@ -311,9 +324,6 @@ message RecognitionConfig { // This feature is only available in select languages. Setting this for // requests in other languages has no effect at all. // The default 'false' value does not add punctuation to result hypotheses. - // Note: This is currently offered as an experimental service, complimentary - // to all users. In the future this may be exclusively available as a - // premium feature. bool enable_automatic_punctuation = 11; // If 'true', enables speaker detection for each recognized word in @@ -401,6 +411,10 @@ message SpeakerDiarizationConfig { // flexibility by allowing the system to automatically determine the correct // number of speakers. If not set, the default value is 6. int32 max_speaker_count = 3; + + // Output only. Unused. + int32 speaker_tag = 5 + [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY]; } // Description of audio data to be recognized. @@ -564,8 +578,8 @@ message SpeechContext { // Contains audio data in the encoding specified in the `RecognitionConfig`. // Either `content` or `uri` must be supplied. Supplying both or neither -// returns [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. See -// [content limits](https://cloud.google.com/speech-to-text/quotas#content). +// returns [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. +// See [content limits](https://cloud.google.com/speech-to-text/quotas#content). message RecognitionAudio { // The audio source, which is either inline content or a Google Cloud // Storage uri. @@ -580,8 +594,9 @@ message RecognitionAudio { // Currently, only Google Cloud Storage URIs are // supported, which must be specified in the following format: // `gs://bucket_name/object_name` (other URI formats return - // [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see - // [Request URIs](https://cloud.google.com/storage/docs/reference-uris). + // [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). + // For more information, see [Request + // URIs](https://cloud.google.com/storage/docs/reference-uris). string uri = 2; } } @@ -619,6 +634,10 @@ message LongRunningRecognizeMetadata { // Time of the most recent processing update. google.protobuf.Timestamp last_update_time = 3; + + // The URI of the audio file being transcribed. Empty if the audio was sent + // as byte content. + string uri = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } // `StreamingRecognizeResponse` is the only message returned to the client by @@ -732,10 +751,10 @@ message StreamingRecognitionResult { // For audio_channel_count = N, its output values can range from '1' to 'N'. int32 channel_tag = 5; - // The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag - // of the language in this result. This language code was detected to have - // the most likelihood of being spoken in the audio. - string language_code = 6; + // Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) + // language tag of the language in this result. This language code was + // detected to have the most likelihood of being spoken in the audio. + string language_code = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; } // A speech recognition result corresponding to a portion of the audio. @@ -751,10 +770,10 @@ message SpeechRecognitionResult { // For audio_channel_count = N, its output values can range from '1' to 'N'. int32 channel_tag = 2; - // The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag - // of the language in this result. This language code was detected to have - // the most likelihood of being spoken in the audio. - string language_code = 5; + // Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) + // language tag of the language in this result. This language code was + // detected to have the most likelihood of being spoken in the audio. + string language_code = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Alternative hypotheses (a.k.a. n-best list). @@ -807,10 +826,10 @@ message WordInfo { // The default of 0.0 is a sentinel value indicating `confidence` was not set. float confidence = 4; - // A distinct integer value is assigned for every speaker within + // Output only. A distinct integer value is assigned for every speaker within // the audio. This field specifies which one of those speakers was detected to // have spoken this word. Value ranges from '1' to diarization_speaker_count. // speaker_tag is set if enable_speaker_diarization = 'true' and only in the // top alternative. - int32 speaker_tag = 5; + int32 speaker_tag = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/proto-google-cloud-speech-v1p1beta1/src/main/proto/google/cloud/speech/v1p1beta1/resource.proto b/proto-google-cloud-speech-v1p1beta1/src/main/proto/google/cloud/speech/v1p1beta1/resource.proto new file mode 100644 index 000000000..5bb379ff1 --- /dev/null +++ b/proto-google-cloud-speech-v1p1beta1/src/main/proto/google/cloud/speech/v1p1beta1/resource.proto @@ -0,0 +1,129 @@ +// Copyright 2020 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.speech.v1p1beta1; + +import "google/api/annotations.proto"; +import "google/api/resource.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/speech/v1p1beta1;speech"; +option java_multiple_files = true; +option java_outer_classname = "SpeechResourceProto"; +option java_package = "com.google.cloud.speech.v1p1beta1"; +option objc_class_prefix = "GCS"; + +// A set of words or phrases that represents a common concept likely to appear +// in your audio, for example a list of passenger ship names. CustomClass items +// can be substituted into placeholders that you set in PhraseSet phrases. +message CustomClass { + option (google.api.resource) = { + type: "speech.googleapis.com/CustomClass" + pattern: "projects/{project}/locations/{location}/customClasses/{custom_class}" + }; + + // An item of the class. + message ClassItem { + // The class item's value. + string value = 1; + } + + // The resource name of the custom class. + string name = 1; + + // If this custom class is a resource, the custom_class_id is the resource id + // of the CustomClass. + string custom_class_id = 2; + + // A collection of class items. + repeated ClassItem items = 3; +} + +// Provides "hints" to the speech recognizer to favor specific words and phrases +// in the results. +message PhraseSet { + option (google.api.resource) = { + type: "speech.googleapis.com/PhraseSet" + pattern: "projects/{project}/locations/{location}/phraseSets/{phrase_set}" + }; + + // A phrases containing words and phrase "hints" so that + // the speech recognition is more likely to recognize them. This can be used + // to improve the accuracy for specific words and phrases, for example, if + // specific commands are typically spoken by the user. This can also be used + // to add additional words to the vocabulary of the recognizer. See + // [usage limits](https://cloud.google.com/speech-to-text/quotas#content). + // + // List items can also include pre-built or custom classes containing groups + // of words that represent common concepts that occur in natural language. For + // example, rather than providing a phrase hint for every month of the + // year (e.g. "i was born in january", "i was born in febuary", ...), use the + // pre-built `$MONTH` class improves the likelihood of correctly transcribing + // audio that includes months (e.g. "i was born in $month"). + // To refer to pre-built classes, use the class' symbol prepended with `$` + // e.g. `$MONTH`. To refer to custom classes that were defined inline in the + // request, set the class's `custom_class_id` to a string unique to all class + // resources and inline classes. Then use the class' id wrapped in $`{...}` + // e.g. "${my-months}". To refer to custom classes resources, use the class' + // id wrapped in `${}` (e.g. `${my-months}`). + message Phrase { + // The phrase itself. + string value = 1; + + // Hint Boost. Overrides the boost set at the phrase set level. + // Positive value will increase the probability that a specific phrase will + // be recognized over other similar sounding phrases. The higher the boost, + // the higher the chance of false positive recognition as well. Negative + // boost values would correspond to anti-biasing. Anti-biasing is not + // enabled, so negative boost will simply be ignored. Though `boost` can + // accept a wide range of positive values, most use cases are best served + // with values between 0 and 20. We recommend using a binary search approach + // to finding the optimal value for your use case. Speech recognition + // will skip PhraseSets with a boost value of 0. + float boost = 2; + } + + // The resource name of the phrase set. + string name = 1; + + // A list of word and phrases. + repeated Phrase phrases = 2; + + // Hint Boost. Positive value will increase the probability that a specific + // phrase will be recognized over other similar sounding phrases. The higher + // the boost, the higher the chance of false positive recognition as well. + // Negative boost values would correspond to anti-biasing. Anti-biasing is not + // enabled, so negative boost will simply be ignored. Though `boost` can + // accept a wide range of positive values, most use cases are best served with + // values between 0 (exclusive) and 20. We recommend using a binary search + // approach to finding the optimal value for your use case. Speech recognition + // will skip PhraseSets with a boost value of 0. + float boost = 4; +} + +// Speech adaptation configuration. +message SpeechAdaptation { + // 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 PhraseSet phrase_sets = 1; + + // 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 CustomClass custom_classes = 2; +} diff --git a/synth.metadata b/synth.metadata index 7e98b88f0..a44cab801 100644 --- a/synth.metadata +++ b/synth.metadata @@ -3,24 +3,24 @@ { "git": { "name": ".", - "remote": "git@github.com:googleapis/java-speech.git", - "sha": "59bd95e03185c08d6d1df249d4bf6161402d7bc8" + "remote": "https://github.com/googleapis/java-speech.git", + "sha": "10b6412657c5babf6dfab973165a4ba9ad110bf9" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "ee4ea76504aa60c2bff9b7c11269c155d8c21e0d", - "internalRef": "305619145" + "sha": "4d61e1cb40184a7ad63ef37b1813f6608718674a", + "internalRef": "306280989" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "ee4ea76504aa60c2bff9b7c11269c155d8c21e0d", - "internalRef": "305619145" + "sha": "4d61e1cb40184a7ad63ef37b1813f6608718674a", + "internalRef": "306280989" } }, {