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

com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse Maven / Gradle / Ivy

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

// Protobuf Java Version: 3.25.5
package com.google.cloud.dialogflow.v2;

/**
 *
 *
 * 
 * The response message for
 * [Conversations.SuggestConversationSummary][google.cloud.dialogflow.v2.Conversations.SuggestConversationSummary].
 * 
* * Protobuf type {@code google.cloud.dialogflow.v2.SuggestConversationSummaryResponse} */ public final class SuggestConversationSummaryResponse extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.SuggestConversationSummaryResponse) SuggestConversationSummaryResponseOrBuilder { private static final long serialVersionUID = 0L; // Use SuggestConversationSummaryResponse.newBuilder() to construct. private SuggestConversationSummaryResponse( com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private SuggestConversationSummaryResponse() { latestMessage_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new SuggestConversationSummaryResponse(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dialogflow.v2.ConversationProto .internal_static_google_cloud_dialogflow_v2_SuggestConversationSummaryResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.dialogflow.v2.ConversationProto .internal_static_google_cloud_dialogflow_v2_SuggestConversationSummaryResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.class, com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Builder.class); } public interface SummaryOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary) com.google.protobuf.MessageOrBuilder { /** * * *
     * The summary content that is concatenated into one string.
     * 
* * string text = 1; * * @return The text. */ java.lang.String getText(); /** * * *
     * The summary content that is concatenated into one string.
     * 
* * string text = 1; * * @return The bytes for text. */ com.google.protobuf.ByteString getTextBytes(); /** * * *
     * The summary content that is divided into sections. The key is the
     * section's name and the value is the section's content. There is no
     * specific format for the key or value.
     * 
* * map<string, string> text_sections = 4; */ int getTextSectionsCount(); /** * * *
     * The summary content that is divided into sections. The key is the
     * section's name and the value is the section's content. There is no
     * specific format for the key or value.
     * 
* * map<string, string> text_sections = 4; */ boolean containsTextSections(java.lang.String key); /** Use {@link #getTextSectionsMap()} instead. */ @java.lang.Deprecated java.util.Map getTextSections(); /** * * *
     * The summary content that is divided into sections. The key is the
     * section's name and the value is the section's content. There is no
     * specific format for the key or value.
     * 
* * map<string, string> text_sections = 4; */ java.util.Map getTextSectionsMap(); /** * * *
     * The summary content that is divided into sections. The key is the
     * section's name and the value is the section's content. There is no
     * specific format for the key or value.
     * 
* * map<string, string> text_sections = 4; */ /* nullable */ java.lang.String getTextSectionsOrDefault( java.lang.String key, /* nullable */ java.lang.String defaultValue); /** * * *
     * The summary content that is divided into sections. The key is the
     * section's name and the value is the section's content. There is no
     * specific format for the key or value.
     * 
* * map<string, string> text_sections = 4; */ java.lang.String getTextSectionsOrThrow(java.lang.String key); /** * * *
     * The name of the answer record. Format:
     * "projects/<Project ID>/answerRecords/<Answer Record ID>"
     * 
* * string answer_record = 3 [(.google.api.resource_reference) = { ... } * * @return The answerRecord. */ java.lang.String getAnswerRecord(); /** * * *
     * The name of the answer record. Format:
     * "projects/<Project ID>/answerRecords/<Answer Record ID>"
     * 
* * string answer_record = 3 [(.google.api.resource_reference) = { ... } * * @return The bytes for answerRecord. */ com.google.protobuf.ByteString getAnswerRecordBytes(); /** * * *
     * The baseline model version used to generate this summary. It is empty if
     * a baseline model was not used to generate this summary.
     * 
* * string baseline_model_version = 5; * * @return The baselineModelVersion. */ java.lang.String getBaselineModelVersion(); /** * * *
     * The baseline model version used to generate this summary. It is empty if
     * a baseline model was not used to generate this summary.
     * 
* * string baseline_model_version = 5; * * @return The bytes for baselineModelVersion. */ com.google.protobuf.ByteString getBaselineModelVersionBytes(); } /** * * *
   * Generated summary for a conversation.
   * 
* * Protobuf type {@code google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary} */ public static final class Summary extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary) SummaryOrBuilder { private static final long serialVersionUID = 0L; // Use Summary.newBuilder() to construct. private Summary(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Summary() { text_ = ""; answerRecord_ = ""; baselineModelVersion_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new Summary(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dialogflow.v2.ConversationProto .internal_static_google_cloud_dialogflow_v2_SuggestConversationSummaryResponse_Summary_descriptor; } @SuppressWarnings({"rawtypes"}) @java.lang.Override protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 4: return internalGetTextSections(); default: throw new RuntimeException("Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.dialogflow.v2.ConversationProto .internal_static_google_cloud_dialogflow_v2_SuggestConversationSummaryResponse_Summary_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary.class, com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary.Builder .class); } public static final int TEXT_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object text_ = ""; /** * * *
     * The summary content that is concatenated into one string.
     * 
* * string text = 1; * * @return The text. */ @java.lang.Override public java.lang.String getText() { java.lang.Object ref = text_; 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(); text_ = s; return s; } } /** * * *
     * The summary content that is concatenated into one string.
     * 
* * string text = 1; * * @return The bytes for text. */ @java.lang.Override public com.google.protobuf.ByteString getTextBytes() { java.lang.Object ref = text_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); text_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int TEXT_SECTIONS_FIELD_NUMBER = 4; private static final class TextSectionsDefaultEntryHolder { static final com.google.protobuf.MapEntry defaultEntry = com.google.protobuf.MapEntry.newDefaultInstance( com.google.cloud.dialogflow.v2.ConversationProto .internal_static_google_cloud_dialogflow_v2_SuggestConversationSummaryResponse_Summary_TextSectionsEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.STRING, ""); } @SuppressWarnings("serial") private com.google.protobuf.MapField textSections_; private com.google.protobuf.MapField internalGetTextSections() { if (textSections_ == null) { return com.google.protobuf.MapField.emptyMapField( TextSectionsDefaultEntryHolder.defaultEntry); } return textSections_; } public int getTextSectionsCount() { return internalGetTextSections().getMap().size(); } /** * * *
     * The summary content that is divided into sections. The key is the
     * section's name and the value is the section's content. There is no
     * specific format for the key or value.
     * 
* * map<string, string> text_sections = 4; */ @java.lang.Override public boolean containsTextSections(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetTextSections().getMap().containsKey(key); } /** Use {@link #getTextSectionsMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getTextSections() { return getTextSectionsMap(); } /** * * *
     * The summary content that is divided into sections. The key is the
     * section's name and the value is the section's content. There is no
     * specific format for the key or value.
     * 
* * map<string, string> text_sections = 4; */ @java.lang.Override public java.util.Map getTextSectionsMap() { return internalGetTextSections().getMap(); } /** * * *
     * The summary content that is divided into sections. The key is the
     * section's name and the value is the section's content. There is no
     * specific format for the key or value.
     * 
* * map<string, string> text_sections = 4; */ @java.lang.Override public /* nullable */ java.lang.String getTextSectionsOrDefault( java.lang.String key, /* nullable */ java.lang.String defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetTextSections().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** * * *
     * The summary content that is divided into sections. The key is the
     * section's name and the value is the section's content. There is no
     * specific format for the key or value.
     * 
* * map<string, string> text_sections = 4; */ @java.lang.Override public java.lang.String getTextSectionsOrThrow(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetTextSections().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public static final int ANSWER_RECORD_FIELD_NUMBER = 3; @SuppressWarnings("serial") private volatile java.lang.Object answerRecord_ = ""; /** * * *
     * The name of the answer record. Format:
     * "projects/<Project ID>/answerRecords/<Answer Record ID>"
     * 
* * string answer_record = 3 [(.google.api.resource_reference) = { ... } * * @return The answerRecord. */ @java.lang.Override public java.lang.String getAnswerRecord() { java.lang.Object ref = answerRecord_; 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(); answerRecord_ = s; return s; } } /** * * *
     * The name of the answer record. Format:
     * "projects/<Project ID>/answerRecords/<Answer Record ID>"
     * 
* * string answer_record = 3 [(.google.api.resource_reference) = { ... } * * @return The bytes for answerRecord. */ @java.lang.Override public com.google.protobuf.ByteString getAnswerRecordBytes() { java.lang.Object ref = answerRecord_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); answerRecord_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int BASELINE_MODEL_VERSION_FIELD_NUMBER = 5; @SuppressWarnings("serial") private volatile java.lang.Object baselineModelVersion_ = ""; /** * * *
     * The baseline model version used to generate this summary. It is empty if
     * a baseline model was not used to generate this summary.
     * 
* * string baseline_model_version = 5; * * @return The baselineModelVersion. */ @java.lang.Override public java.lang.String getBaselineModelVersion() { java.lang.Object ref = baselineModelVersion_; 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(); baselineModelVersion_ = s; return s; } } /** * * *
     * The baseline model version used to generate this summary. It is empty if
     * a baseline model was not used to generate this summary.
     * 
* * string baseline_model_version = 5; * * @return The bytes for baselineModelVersion. */ @java.lang.Override public com.google.protobuf.ByteString getBaselineModelVersionBytes() { java.lang.Object ref = baselineModelVersion_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); baselineModelVersion_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, text_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(answerRecord_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, answerRecord_); } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetTextSections(), TextSectionsDefaultEntryHolder.defaultEntry, 4); if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(baselineModelVersion_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, baselineModelVersion_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, text_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(answerRecord_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, answerRecord_); } for (java.util.Map.Entry entry : internalGetTextSections().getMap().entrySet()) { com.google.protobuf.MapEntry textSections__ = TextSectionsDefaultEntryHolder.defaultEntry .newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, textSections__); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(baselineModelVersion_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, baselineModelVersion_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary)) { return super.equals(obj); } com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary other = (com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary) obj; if (!getText().equals(other.getText())) return false; if (!internalGetTextSections().equals(other.internalGetTextSections())) return false; if (!getAnswerRecord().equals(other.getAnswerRecord())) return false; if (!getBaselineModelVersion().equals(other.getBaselineModelVersion())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + TEXT_FIELD_NUMBER; hash = (53 * hash) + getText().hashCode(); if (!internalGetTextSections().getMap().isEmpty()) { hash = (37 * hash) + TEXT_SECTIONS_FIELD_NUMBER; hash = (53 * hash) + internalGetTextSections().hashCode(); } hash = (37 * hash) + ANSWER_RECORD_FIELD_NUMBER; hash = (53 * hash) + getAnswerRecord().hashCode(); hash = (37 * hash) + BASELINE_MODEL_VERSION_FIELD_NUMBER; hash = (53 * hash) + getBaselineModelVersion().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary 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.dialogflow.v2.SuggestConversationSummaryResponse.Summary parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary 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.dialogflow.v2.SuggestConversationSummaryResponse.Summary parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary 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.dialogflow.v2.SuggestConversationSummaryResponse.Summary parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary 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.dialogflow.v2.SuggestConversationSummaryResponse.Summary parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary 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.dialogflow.v2.SuggestConversationSummaryResponse.Summary 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; } /** * * *
     * Generated summary for a conversation.
     * 
* * Protobuf type {@code google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary) com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.SummaryOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dialogflow.v2.ConversationProto .internal_static_google_cloud_dialogflow_v2_SuggestConversationSummaryResponse_Summary_descriptor; } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 4: return internalGetTextSections(); default: throw new RuntimeException("Invalid map field number: " + number); } } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( int number) { switch (number) { case 4: return internalGetMutableTextSections(); default: throw new RuntimeException("Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.dialogflow.v2.ConversationProto .internal_static_google_cloud_dialogflow_v2_SuggestConversationSummaryResponse_Summary_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary.class, com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary.Builder .class); } // Construct using // com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; text_ = ""; internalGetMutableTextSections().clear(); answerRecord_ = ""; baselineModelVersion_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.dialogflow.v2.ConversationProto .internal_static_google_cloud_dialogflow_v2_SuggestConversationSummaryResponse_Summary_descriptor; } @java.lang.Override public com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary getDefaultInstanceForType() { return com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary .getDefaultInstance(); } @java.lang.Override public com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary build() { com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary buildPartial() { com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary result = new com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0( com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.text_ = text_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.textSections_ = internalGetTextSections(); result.textSections_.makeImmutable(); } if (((from_bitField0_ & 0x00000004) != 0)) { result.answerRecord_ = answerRecord_; } if (((from_bitField0_ & 0x00000008) != 0)) { result.baselineModelVersion_ = baselineModelVersion_; } } @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.dialogflow.v2.SuggestConversationSummaryResponse.Summary) { return mergeFrom( (com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom( com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary other) { if (other == com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary .getDefaultInstance()) return this; if (!other.getText().isEmpty()) { text_ = other.text_; bitField0_ |= 0x00000001; onChanged(); } internalGetMutableTextSections().mergeFrom(other.internalGetTextSections()); bitField0_ |= 0x00000002; if (!other.getAnswerRecord().isEmpty()) { answerRecord_ = other.answerRecord_; bitField0_ |= 0x00000004; onChanged(); } if (!other.getBaselineModelVersion().isEmpty()) { baselineModelVersion_ = other.baselineModelVersion_; bitField0_ |= 0x00000008; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { text_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 case 26: { answerRecord_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000004; break; } // case 26 case 34: { com.google.protobuf.MapEntry textSections__ = input.readMessage( TextSectionsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); internalGetMutableTextSections() .getMutableMap() .put(textSections__.getKey(), textSections__.getValue()); bitField0_ |= 0x00000002; break; } // case 34 case 42: { baselineModelVersion_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000008; break; } // case 42 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private java.lang.Object text_ = ""; /** * * *
       * The summary content that is concatenated into one string.
       * 
* * string text = 1; * * @return The text. */ public java.lang.String getText() { java.lang.Object ref = text_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); text_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
       * The summary content that is concatenated into one string.
       * 
* * string text = 1; * * @return The bytes for text. */ public com.google.protobuf.ByteString getTextBytes() { java.lang.Object ref = text_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); text_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
       * The summary content that is concatenated into one string.
       * 
* * string text = 1; * * @param value The text to set. * @return This builder for chaining. */ public Builder setText(java.lang.String value) { if (value == null) { throw new NullPointerException(); } text_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
       * The summary content that is concatenated into one string.
       * 
* * string text = 1; * * @return This builder for chaining. */ public Builder clearText() { text_ = getDefaultInstance().getText(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * * *
       * The summary content that is concatenated into one string.
       * 
* * string text = 1; * * @param value The bytes for text to set. * @return This builder for chaining. */ public Builder setTextBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); text_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } private com.google.protobuf.MapField textSections_; private com.google.protobuf.MapField internalGetTextSections() { if (textSections_ == null) { return com.google.protobuf.MapField.emptyMapField( TextSectionsDefaultEntryHolder.defaultEntry); } return textSections_; } private com.google.protobuf.MapField internalGetMutableTextSections() { if (textSections_ == null) { textSections_ = com.google.protobuf.MapField.newMapField(TextSectionsDefaultEntryHolder.defaultEntry); } if (!textSections_.isMutable()) { textSections_ = textSections_.copy(); } bitField0_ |= 0x00000002; onChanged(); return textSections_; } public int getTextSectionsCount() { return internalGetTextSections().getMap().size(); } /** * * *
       * The summary content that is divided into sections. The key is the
       * section's name and the value is the section's content. There is no
       * specific format for the key or value.
       * 
* * map<string, string> text_sections = 4; */ @java.lang.Override public boolean containsTextSections(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetTextSections().getMap().containsKey(key); } /** Use {@link #getTextSectionsMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getTextSections() { return getTextSectionsMap(); } /** * * *
       * The summary content that is divided into sections. The key is the
       * section's name and the value is the section's content. There is no
       * specific format for the key or value.
       * 
* * map<string, string> text_sections = 4; */ @java.lang.Override public java.util.Map getTextSectionsMap() { return internalGetTextSections().getMap(); } /** * * *
       * The summary content that is divided into sections. The key is the
       * section's name and the value is the section's content. There is no
       * specific format for the key or value.
       * 
* * map<string, string> text_sections = 4; */ @java.lang.Override public /* nullable */ java.lang.String getTextSectionsOrDefault( java.lang.String key, /* nullable */ java.lang.String defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetTextSections().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** * * *
       * The summary content that is divided into sections. The key is the
       * section's name and the value is the section's content. There is no
       * specific format for the key or value.
       * 
* * map<string, string> text_sections = 4; */ @java.lang.Override public java.lang.String getTextSectionsOrThrow(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetTextSections().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public Builder clearTextSections() { bitField0_ = (bitField0_ & ~0x00000002); internalGetMutableTextSections().getMutableMap().clear(); return this; } /** * * *
       * The summary content that is divided into sections. The key is the
       * section's name and the value is the section's content. There is no
       * specific format for the key or value.
       * 
* * map<string, string> text_sections = 4; */ public Builder removeTextSections(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } internalGetMutableTextSections().getMutableMap().remove(key); return this; } /** Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutableTextSections() { bitField0_ |= 0x00000002; return internalGetMutableTextSections().getMutableMap(); } /** * * *
       * The summary content that is divided into sections. The key is the
       * section's name and the value is the section's content. There is no
       * specific format for the key or value.
       * 
* * map<string, string> text_sections = 4; */ public Builder putTextSections(java.lang.String key, java.lang.String value) { if (key == null) { throw new NullPointerException("map key"); } if (value == null) { throw new NullPointerException("map value"); } internalGetMutableTextSections().getMutableMap().put(key, value); bitField0_ |= 0x00000002; return this; } /** * * *
       * The summary content that is divided into sections. The key is the
       * section's name and the value is the section's content. There is no
       * specific format for the key or value.
       * 
* * map<string, string> text_sections = 4; */ public Builder putAllTextSections(java.util.Map values) { internalGetMutableTextSections().getMutableMap().putAll(values); bitField0_ |= 0x00000002; return this; } private java.lang.Object answerRecord_ = ""; /** * * *
       * The name of the answer record. Format:
       * "projects/<Project ID>/answerRecords/<Answer Record ID>"
       * 
* * string answer_record = 3 [(.google.api.resource_reference) = { ... } * * @return The answerRecord. */ public java.lang.String getAnswerRecord() { java.lang.Object ref = answerRecord_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); answerRecord_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
       * The name of the answer record. Format:
       * "projects/<Project ID>/answerRecords/<Answer Record ID>"
       * 
* * string answer_record = 3 [(.google.api.resource_reference) = { ... } * * @return The bytes for answerRecord. */ public com.google.protobuf.ByteString getAnswerRecordBytes() { java.lang.Object ref = answerRecord_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); answerRecord_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
       * The name of the answer record. Format:
       * "projects/<Project ID>/answerRecords/<Answer Record ID>"
       * 
* * string answer_record = 3 [(.google.api.resource_reference) = { ... } * * @param value The answerRecord to set. * @return This builder for chaining. */ public Builder setAnswerRecord(java.lang.String value) { if (value == null) { throw new NullPointerException(); } answerRecord_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
       * The name of the answer record. Format:
       * "projects/<Project ID>/answerRecords/<Answer Record ID>"
       * 
* * string answer_record = 3 [(.google.api.resource_reference) = { ... } * * @return This builder for chaining. */ public Builder clearAnswerRecord() { answerRecord_ = getDefaultInstance().getAnswerRecord(); bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } /** * * *
       * The name of the answer record. Format:
       * "projects/<Project ID>/answerRecords/<Answer Record ID>"
       * 
* * string answer_record = 3 [(.google.api.resource_reference) = { ... } * * @param value The bytes for answerRecord to set. * @return This builder for chaining. */ public Builder setAnswerRecordBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); answerRecord_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } private java.lang.Object baselineModelVersion_ = ""; /** * * *
       * The baseline model version used to generate this summary. It is empty if
       * a baseline model was not used to generate this summary.
       * 
* * string baseline_model_version = 5; * * @return The baselineModelVersion. */ public java.lang.String getBaselineModelVersion() { java.lang.Object ref = baselineModelVersion_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); baselineModelVersion_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
       * The baseline model version used to generate this summary. It is empty if
       * a baseline model was not used to generate this summary.
       * 
* * string baseline_model_version = 5; * * @return The bytes for baselineModelVersion. */ public com.google.protobuf.ByteString getBaselineModelVersionBytes() { java.lang.Object ref = baselineModelVersion_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); baselineModelVersion_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
       * The baseline model version used to generate this summary. It is empty if
       * a baseline model was not used to generate this summary.
       * 
* * string baseline_model_version = 5; * * @param value The baselineModelVersion to set. * @return This builder for chaining. */ public Builder setBaselineModelVersion(java.lang.String value) { if (value == null) { throw new NullPointerException(); } baselineModelVersion_ = value; bitField0_ |= 0x00000008; onChanged(); return this; } /** * * *
       * The baseline model version used to generate this summary. It is empty if
       * a baseline model was not used to generate this summary.
       * 
* * string baseline_model_version = 5; * * @return This builder for chaining. */ public Builder clearBaselineModelVersion() { baselineModelVersion_ = getDefaultInstance().getBaselineModelVersion(); bitField0_ = (bitField0_ & ~0x00000008); onChanged(); return this; } /** * * *
       * The baseline model version used to generate this summary. It is empty if
       * a baseline model was not used to generate this summary.
       * 
* * string baseline_model_version = 5; * * @param value The bytes for baselineModelVersion to set. * @return This builder for chaining. */ public Builder setBaselineModelVersionBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); baselineModelVersion_ = value; bitField0_ |= 0x00000008; 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.dialogflow.v2.SuggestConversationSummaryResponse.Summary) } // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary) private static final com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary(); } public static com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Summary parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException() .setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } private int bitField0_; public static final int SUMMARY_FIELD_NUMBER = 1; private com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary summary_; /** * * *
   * Generated summary.
   * 
* * .google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary summary = 1; * * * @return Whether the summary field is set. */ @java.lang.Override public boolean hasSummary() { return ((bitField0_ & 0x00000001) != 0); } /** * * *
   * Generated summary.
   * 
* * .google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary summary = 1; * * * @return The summary. */ @java.lang.Override public com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary getSummary() { return summary_ == null ? com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary .getDefaultInstance() : summary_; } /** * * *
   * Generated summary.
   * 
* * .google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary summary = 1; * */ @java.lang.Override public com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.SummaryOrBuilder getSummaryOrBuilder() { return summary_ == null ? com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary .getDefaultInstance() : summary_; } public static final int LATEST_MESSAGE_FIELD_NUMBER = 2; @SuppressWarnings("serial") private volatile java.lang.Object latestMessage_ = ""; /** * * *
   * The name of the latest conversation message used as context for
   * compiling suggestion.
   *
   * Format: `projects/<Project ID>/locations/<Location
   * ID>/conversations/<Conversation ID>/messages/<Message ID>`.
   * 
* * string latest_message = 2 [(.google.api.resource_reference) = { ... } * * @return The latestMessage. */ @java.lang.Override public java.lang.String getLatestMessage() { java.lang.Object ref = latestMessage_; 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(); latestMessage_ = s; return s; } } /** * * *
   * The name of the latest conversation message used as context for
   * compiling suggestion.
   *
   * Format: `projects/<Project ID>/locations/<Location
   * ID>/conversations/<Conversation ID>/messages/<Message ID>`.
   * 
* * string latest_message = 2 [(.google.api.resource_reference) = { ... } * * @return The bytes for latestMessage. */ @java.lang.Override public com.google.protobuf.ByteString getLatestMessageBytes() { java.lang.Object ref = latestMessage_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); latestMessage_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int CONTEXT_SIZE_FIELD_NUMBER = 3; private int contextSize_ = 0; /** * * *
   * Number of messages prior to and including
   * [last_conversation_message][] used to compile the suggestion. It may be
   * smaller than the [SuggestSummaryRequest.context_size][] field in the
   * request if there weren't that many messages in the conversation.
   * 
* * int32 context_size = 3; * * @return The contextSize. */ @java.lang.Override public int getContextSize() { return contextSize_; } 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 (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(1, getSummary()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(latestMessage_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, latestMessage_); } if (contextSize_ != 0) { output.writeInt32(3, contextSize_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getSummary()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(latestMessage_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, latestMessage_); } if (contextSize_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, contextSize_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse)) { return super.equals(obj); } com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse other = (com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse) obj; if (hasSummary() != other.hasSummary()) return false; if (hasSummary()) { if (!getSummary().equals(other.getSummary())) return false; } if (!getLatestMessage().equals(other.getLatestMessage())) return false; if (getContextSize() != other.getContextSize()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasSummary()) { hash = (37 * hash) + SUMMARY_FIELD_NUMBER; hash = (53 * hash) + getSummary().hashCode(); } hash = (37 * hash) + LATEST_MESSAGE_FIELD_NUMBER; hash = (53 * hash) + getLatestMessage().hashCode(); hash = (37 * hash) + CONTEXT_SIZE_FIELD_NUMBER; hash = (53 * hash) + getContextSize(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse 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.dialogflow.v2.SuggestConversationSummaryResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse 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.dialogflow.v2.SuggestConversationSummaryResponse parseFrom( byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse 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.dialogflow.v2.SuggestConversationSummaryResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse 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.dialogflow.v2.SuggestConversationSummaryResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse 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.dialogflow.v2.SuggestConversationSummaryResponse 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; } /** * * *
   * The response message for
   * [Conversations.SuggestConversationSummary][google.cloud.dialogflow.v2.Conversations.SuggestConversationSummary].
   * 
* * Protobuf type {@code google.cloud.dialogflow.v2.SuggestConversationSummaryResponse} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.SuggestConversationSummaryResponse) com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dialogflow.v2.ConversationProto .internal_static_google_cloud_dialogflow_v2_SuggestConversationSummaryResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.dialogflow.v2.ConversationProto .internal_static_google_cloud_dialogflow_v2_SuggestConversationSummaryResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.class, com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Builder.class); } // Construct using // com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { getSummaryFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; summary_ = null; if (summaryBuilder_ != null) { summaryBuilder_.dispose(); summaryBuilder_ = null; } latestMessage_ = ""; contextSize_ = 0; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.dialogflow.v2.ConversationProto .internal_static_google_cloud_dialogflow_v2_SuggestConversationSummaryResponse_descriptor; } @java.lang.Override public com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse getDefaultInstanceForType() { return com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.getDefaultInstance(); } @java.lang.Override public com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse build() { com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse buildPartial() { com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse result = new com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0( com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse result) { int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { result.summary_ = summaryBuilder_ == null ? summary_ : summaryBuilder_.build(); to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000002) != 0)) { result.latestMessage_ = latestMessage_; } if (((from_bitField0_ & 0x00000004) != 0)) { result.contextSize_ = contextSize_; } result.bitField0_ |= to_bitField0_; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse) { return mergeFrom((com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom( com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse other) { if (other == com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.getDefaultInstance()) return this; if (other.hasSummary()) { mergeSummary(other.getSummary()); } if (!other.getLatestMessage().isEmpty()) { latestMessage_ = other.latestMessage_; bitField0_ |= 0x00000002; onChanged(); } if (other.getContextSize() != 0) { setContextSize(other.getContextSize()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { input.readMessage(getSummaryFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { latestMessage_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000002; break; } // case 18 case 24: { contextSize_ = input.readInt32(); bitField0_ |= 0x00000004; break; } // case 24 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary summary_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary, com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary.Builder, com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.SummaryOrBuilder> summaryBuilder_; /** * * *
     * Generated summary.
     * 
* * .google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary summary = 1; * * * @return Whether the summary field is set. */ public boolean hasSummary() { return ((bitField0_ & 0x00000001) != 0); } /** * * *
     * Generated summary.
     * 
* * .google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary summary = 1; * * * @return The summary. */ public com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary getSummary() { if (summaryBuilder_ == null) { return summary_ == null ? com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary .getDefaultInstance() : summary_; } else { return summaryBuilder_.getMessage(); } } /** * * *
     * Generated summary.
     * 
* * .google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary summary = 1; * */ public Builder setSummary( com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary value) { if (summaryBuilder_ == null) { if (value == null) { throw new NullPointerException(); } summary_ = value; } else { summaryBuilder_.setMessage(value); } bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
     * Generated summary.
     * 
* * .google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary summary = 1; * */ public Builder setSummary( com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary.Builder builderForValue) { if (summaryBuilder_ == null) { summary_ = builderForValue.build(); } else { summaryBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
     * Generated summary.
     * 
* * .google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary summary = 1; * */ public Builder mergeSummary( com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary value) { if (summaryBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0) && summary_ != null && summary_ != com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary .getDefaultInstance()) { getSummaryBuilder().mergeFrom(value); } else { summary_ = value; } } else { summaryBuilder_.mergeFrom(value); } if (summary_ != null) { bitField0_ |= 0x00000001; onChanged(); } return this; } /** * * *
     * Generated summary.
     * 
* * .google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary summary = 1; * */ public Builder clearSummary() { bitField0_ = (bitField0_ & ~0x00000001); summary_ = null; if (summaryBuilder_ != null) { summaryBuilder_.dispose(); summaryBuilder_ = null; } onChanged(); return this; } /** * * *
     * Generated summary.
     * 
* * .google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary summary = 1; * */ public com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary.Builder getSummaryBuilder() { bitField0_ |= 0x00000001; onChanged(); return getSummaryFieldBuilder().getBuilder(); } /** * * *
     * Generated summary.
     * 
* * .google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary summary = 1; * */ public com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.SummaryOrBuilder getSummaryOrBuilder() { if (summaryBuilder_ != null) { return summaryBuilder_.getMessageOrBuilder(); } else { return summary_ == null ? com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary .getDefaultInstance() : summary_; } } /** * * *
     * Generated summary.
     * 
* * .google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary summary = 1; * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary, com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary.Builder, com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.SummaryOrBuilder> getSummaryFieldBuilder() { if (summaryBuilder_ == null) { summaryBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary, com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary.Builder, com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.SummaryOrBuilder>( getSummary(), getParentForChildren(), isClean()); summary_ = null; } return summaryBuilder_; } private java.lang.Object latestMessage_ = ""; /** * * *
     * The name of the latest conversation message used as context for
     * compiling suggestion.
     *
     * Format: `projects/<Project ID>/locations/<Location
     * ID>/conversations/<Conversation ID>/messages/<Message ID>`.
     * 
* * string latest_message = 2 [(.google.api.resource_reference) = { ... } * * @return The latestMessage. */ public java.lang.String getLatestMessage() { java.lang.Object ref = latestMessage_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); latestMessage_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * The name of the latest conversation message used as context for
     * compiling suggestion.
     *
     * Format: `projects/<Project ID>/locations/<Location
     * ID>/conversations/<Conversation ID>/messages/<Message ID>`.
     * 
* * string latest_message = 2 [(.google.api.resource_reference) = { ... } * * @return The bytes for latestMessage. */ public com.google.protobuf.ByteString getLatestMessageBytes() { java.lang.Object ref = latestMessage_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); latestMessage_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * The name of the latest conversation message used as context for
     * compiling suggestion.
     *
     * Format: `projects/<Project ID>/locations/<Location
     * ID>/conversations/<Conversation ID>/messages/<Message ID>`.
     * 
* * string latest_message = 2 [(.google.api.resource_reference) = { ... } * * @param value The latestMessage to set. * @return This builder for chaining. */ public Builder setLatestMessage(java.lang.String value) { if (value == null) { throw new NullPointerException(); } latestMessage_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
     * The name of the latest conversation message used as context for
     * compiling suggestion.
     *
     * Format: `projects/<Project ID>/locations/<Location
     * ID>/conversations/<Conversation ID>/messages/<Message ID>`.
     * 
* * string latest_message = 2 [(.google.api.resource_reference) = { ... } * * @return This builder for chaining. */ public Builder clearLatestMessage() { latestMessage_ = getDefaultInstance().getLatestMessage(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** * * *
     * The name of the latest conversation message used as context for
     * compiling suggestion.
     *
     * Format: `projects/<Project ID>/locations/<Location
     * ID>/conversations/<Conversation ID>/messages/<Message ID>`.
     * 
* * string latest_message = 2 [(.google.api.resource_reference) = { ... } * * @param value The bytes for latestMessage to set. * @return This builder for chaining. */ public Builder setLatestMessageBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); latestMessage_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } private int contextSize_; /** * * *
     * Number of messages prior to and including
     * [last_conversation_message][] used to compile the suggestion. It may be
     * smaller than the [SuggestSummaryRequest.context_size][] field in the
     * request if there weren't that many messages in the conversation.
     * 
* * int32 context_size = 3; * * @return The contextSize. */ @java.lang.Override public int getContextSize() { return contextSize_; } /** * * *
     * Number of messages prior to and including
     * [last_conversation_message][] used to compile the suggestion. It may be
     * smaller than the [SuggestSummaryRequest.context_size][] field in the
     * request if there weren't that many messages in the conversation.
     * 
* * int32 context_size = 3; * * @param value The contextSize to set. * @return This builder for chaining. */ public Builder setContextSize(int value) { contextSize_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
     * Number of messages prior to and including
     * [last_conversation_message][] used to compile the suggestion. It may be
     * smaller than the [SuggestSummaryRequest.context_size][] field in the
     * request if there weren't that many messages in the conversation.
     * 
* * int32 context_size = 3; * * @return This builder for chaining. */ public Builder clearContextSize() { bitField0_ = (bitField0_ & ~0x00000004); contextSize_ = 0; 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.dialogflow.v2.SuggestConversationSummaryResponse) } // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.SuggestConversationSummaryResponse) private static final com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse(); } public static com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public SuggestConversationSummaryResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy