Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* 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/v2beta1/participant.proto
// Protobuf Java Version: 3.25.5
package com.google.cloud.dialogflow.v2beta1;
/**
*
*
*
* Represents a suggestion for a human agent.
*
*
* Protobuf type {@code google.cloud.dialogflow.v2beta1.Suggestion}
*/
@java.lang.Deprecated
public final class Suggestion extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2beta1.Suggestion)
SuggestionOrBuilder {
private static final long serialVersionUID = 0L;
// Use Suggestion.newBuilder() to construct.
private Suggestion(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Suggestion() {
name_ = "";
articles_ = java.util.Collections.emptyList();
faqAnswers_ = java.util.Collections.emptyList();
latestMessage_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new Suggestion();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.v2beta1.ParticipantProto
.internal_static_google_cloud_dialogflow_v2beta1_Suggestion_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2beta1.ParticipantProto
.internal_static_google_cloud_dialogflow_v2beta1_Suggestion_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2beta1.Suggestion.class,
com.google.cloud.dialogflow.v2beta1.Suggestion.Builder.class);
}
public interface ArticleOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2beta1.Suggestion.Article)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Output only. The article title.
*
*
* string title = 1;
*
* @return The title.
*/
java.lang.String getTitle();
/**
*
*
*
* Output only. The article title.
*
*
* string title = 1;
*
* @return The bytes for title.
*/
com.google.protobuf.ByteString getTitleBytes();
/**
*
*
*
* Output only. The article URI.
*
*
* string uri = 2;
*
* @return The uri.
*/
java.lang.String getUri();
/**
*
*
*
* Output only. The article URI.
*
*
* string uri = 2;
*
* @return The bytes for uri.
*/
com.google.protobuf.ByteString getUriBytes();
/**
*
*
*
* Output only. Article snippets.
*
*
* repeated string snippets = 3;
*
* @return A list containing the snippets.
*/
java.util.List getSnippetsList();
/**
*
*
*
* Output only. Article snippets.
*
*
* repeated string snippets = 3;
*
* @return The count of snippets.
*/
int getSnippetsCount();
/**
*
*
*
* Output only. Article snippets.
*
*
* repeated string snippets = 3;
*
* @param index The index of the element to return.
* @return The snippets at the given index.
*/
java.lang.String getSnippets(int index);
/**
*
*
*
* Output only. Article snippets.
*
*
* repeated string snippets = 3;
*
* @param index The index of the value to return.
* @return The bytes of the snippets at the given index.
*/
com.google.protobuf.ByteString getSnippetsBytes(int index);
/**
*
*
*
* Output only. A map that contains metadata about the answer and the
* document from which it originates.
*
*
* string uri = 2;
*
* @return The bytes for uri.
*/
@java.lang.Override
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;
}
}
public static final int SNIPPETS_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList snippets_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
*
*
* Output only. Article snippets.
*
*
* repeated string snippets = 3;
*
* @return A list containing the snippets.
*/
public com.google.protobuf.ProtocolStringList getSnippetsList() {
return snippets_;
}
/**
*
*
*
* Output only. Article snippets.
*
*
* repeated string snippets = 3;
*
* @return The count of snippets.
*/
public int getSnippetsCount() {
return snippets_.size();
}
/**
*
*
*
* Output only. Article snippets.
*
*
* repeated string snippets = 3;
*
* @param index The index of the element to return.
* @return The snippets at the given index.
*/
public java.lang.String getSnippets(int index) {
return snippets_.get(index);
}
/**
*
*
*
* Output only. Article snippets.
*
*
* repeated string snippets = 3;
*
* @param index The index of the value to return.
* @return The bytes of the snippets at the given index.
*/
public com.google.protobuf.ByteString getSnippetsBytes(int index) {
return snippets_.getByteString(index);
}
public static final int METADATA_FIELD_NUMBER = 5;
private static final class MetadataDefaultEntryHolder {
static final com.google.protobuf.MapEntry defaultEntry =
com.google.protobuf.MapEntry.newDefaultInstance(
com.google.cloud.dialogflow.v2beta1.ParticipantProto
.internal_static_google_cloud_dialogflow_v2beta1_Suggestion_Article_MetadataEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.STRING,
"");
}
@SuppressWarnings("serial")
private com.google.protobuf.MapField metadata_;
private com.google.protobuf.MapField internalGetMetadata() {
if (metadata_ == null) {
return com.google.protobuf.MapField.emptyMapField(MetadataDefaultEntryHolder.defaultEntry);
}
return metadata_;
}
public int getMetadataCount() {
return internalGetMetadata().getMap().size();
}
/**
*
*
*
* Output only. A map that contains metadata about the answer and the
* document from which it originates.
*
*
* map<string, string> metadata = 5;
*/
@java.lang.Override
public boolean containsMetadata(java.lang.String key) {
if (key == null) {
throw new NullPointerException("map key");
}
return internalGetMetadata().getMap().containsKey(key);
}
/** Use {@link #getMetadataMap()} instead. */
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getMetadata() {
return getMetadataMap();
}
/**
*
*
*
* Output only. A map that contains metadata about the answer and the
* document from which it originates.
*
*
* string title = 1;
*
* @return The bytes for title.
*/
public com.google.protobuf.ByteString getTitleBytes() {
java.lang.Object ref = title_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
title_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Output only. The article title.
*
*
* string title = 1;
*
* @param value The title to set.
* @return This builder for chaining.
*/
public Builder setTitle(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
title_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Output only. The article title.
*
*
* string title = 1;
*
* @return This builder for chaining.
*/
public Builder clearTitle() {
title_ = getDefaultInstance().getTitle();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* Output only. The article title.
*
*
* string title = 1;
*
* @param value The bytes for title to set.
* @return This builder for chaining.
*/
public Builder setTitleBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
title_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object uri_ = "";
/**
*
*
*
*
* string uri = 2;
*
* @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;
}
}
/**
*
*
*
* Output only. The article URI.
*
*
* string uri = 2;
*
* @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;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Output only. The article URI.
*
*
* string uri = 2;
*
* @return This builder for chaining.
*/
public Builder clearUri() {
uri_ = getDefaultInstance().getUri();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*
*
* Output only. The article URI.
*
*
* string uri = 2;
*
* @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;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList snippets_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureSnippetsIsMutable() {
if (!snippets_.isModifiable()) {
snippets_ = new com.google.protobuf.LazyStringArrayList(snippets_);
}
bitField0_ |= 0x00000004;
}
/**
*
*
*
* Output only. Article snippets.
*
*
* repeated string snippets = 3;
*
* @return A list containing the snippets.
*/
public com.google.protobuf.ProtocolStringList getSnippetsList() {
snippets_.makeImmutable();
return snippets_;
}
/**
*
*
*
* Output only. Article snippets.
*
*
* repeated string snippets = 3;
*
* @return The count of snippets.
*/
public int getSnippetsCount() {
return snippets_.size();
}
/**
*
*
*
* Output only. Article snippets.
*
*
* repeated string snippets = 3;
*
* @param index The index of the element to return.
* @return The snippets at the given index.
*/
public java.lang.String getSnippets(int index) {
return snippets_.get(index);
}
/**
*
*
*
* Output only. Article snippets.
*
*
* repeated string snippets = 3;
*
* @param index The index of the value to return.
* @return The bytes of the snippets at the given index.
*/
public com.google.protobuf.ByteString getSnippetsBytes(int index) {
return snippets_.getByteString(index);
}
/**
*
*
*
* Output only. Article snippets.
*
*
* repeated string snippets = 3;
*
* @param index The index to set the value at.
* @param value The snippets to set.
* @return This builder for chaining.
*/
public Builder setSnippets(int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureSnippetsIsMutable();
snippets_.set(index, value);
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Output only. Article snippets.
*
*
* repeated string snippets = 3;
*
* @param value The snippets to add.
* @return This builder for chaining.
*/
public Builder addSnippets(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureSnippetsIsMutable();
snippets_.add(value);
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Output only. Article snippets.
*
*
* repeated string snippets = 3;
*
* @param values The snippets to add.
* @return This builder for chaining.
*/
public Builder addAllSnippets(java.lang.Iterable values) {
ensureSnippetsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, snippets_);
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Output only. The piece of text from the `source` knowledge base document.
*
*
* string answer = 1;
*
* @return The bytes for answer.
*/
com.google.protobuf.ByteString getAnswerBytes();
/**
*
*
*
* The system's confidence score that this Knowledge answer is a good match
* for this conversational query, range from 0.0 (completely uncertain)
* to 1.0 (completely certain).
*
* Output only. The piece of text from the `source` knowledge base document.
*
*
* string answer = 1;
*
* @return The bytes for answer.
*/
@java.lang.Override
public com.google.protobuf.ByteString getAnswerBytes() {
java.lang.Object ref = answer_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
answer_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int CONFIDENCE_FIELD_NUMBER = 2;
private float confidence_ = 0F;
/**
*
*
*
* The system's confidence score that this Knowledge answer is a good match
* for this conversational query, range from 0.0 (completely uncertain)
* to 1.0 (completely certain).
*
*
* float confidence = 2;
*
* @return The confidence.
*/
@java.lang.Override
public float getConfidence() {
return confidence_;
}
public static final int QUESTION_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private volatile java.lang.Object question_ = "";
/**
*
*
*
* Output only. The piece of text from the `source` knowledge base document.
*
*
* string answer = 1;
*
* @param value The bytes for answer to set.
* @return This builder for chaining.
*/
public Builder setAnswerBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
answer_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private float confidence_;
/**
*
*
*
* The system's confidence score that this Knowledge answer is a good match
* for this conversational query, range from 0.0 (completely uncertain)
* to 1.0 (completely certain).
*
* The system's confidence score that this Knowledge answer is a good match
* for this conversational query, range from 0.0 (completely uncertain)
* to 1.0 (completely certain).
*
*
* float confidence = 2;
*
* @param value The confidence to set.
* @return This builder for chaining.
*/
public Builder setConfidence(float value) {
confidence_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* The system's confidence score that this Knowledge answer is a good match
* for this conversational query, range from 0.0 (completely uncertain)
* to 1.0 (completely certain).
*
* Output only. The name of answer record, in the format of
* "projects/<Project ID>/locations/<Location ID>/answerRecords/<Answer
* Record ID>"
*
*
* string answer_record = 6;
*
* @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_ |= 0x00000020;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer)
private static final com.google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer();
}
public static com.google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public FaqAnswer 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.v2beta1.Suggestion.FaqAnswer getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int bitField0_;
public static final int NAME_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object name_ = "";
/**
*
*
*
* Output only. The name of this suggestion.
* Format:
* `projects/<Project ID>/locations/<Location ID>/conversations/<Conversation
* ID>/participants/*/suggestions/<Suggestion ID>`.
*
* Output only. The name of this suggestion.
* Format:
* `projects/<Project ID>/locations/<Location ID>/conversations/<Conversation
* ID>/participants/*/suggestions/<Suggestion ID>`.
*
*
* string name = 1;
*
* @return The bytes for name.
*/
@java.lang.Override
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 ARTICLES_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private java.util.List articles_;
/**
*
*
*
* Output only. Articles ordered by score in descending order.
*
* Output only. Latest message used as context to compile this suggestion.
*
* Format: `projects/<Project ID>/locations/<Location
* ID>/conversations/<Conversation ID>/messages/<Message ID>`.
*
*
* string latest_message = 7;
*
* @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;
}
}
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(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
for (int i = 0; i < articles_.size(); i++) {
output.writeMessage(2, articles_.get(i));
}
for (int i = 0; i < faqAnswers_.size(); i++) {
output.writeMessage(4, faqAnswers_.get(i));
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(5, getCreateTime());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(latestMessage_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 7, latestMessage_);
}
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(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
for (int i = 0; i < articles_.size(); i++) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, articles_.get(i));
}
for (int i = 0; i < faqAnswers_.size(); i++) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, faqAnswers_.get(i));
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getCreateTime());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(latestMessage_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, latestMessage_);
}
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.v2beta1.Suggestion)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.v2beta1.Suggestion other =
(com.google.cloud.dialogflow.v2beta1.Suggestion) obj;
if (!getName().equals(other.getName())) return false;
if (!getArticlesList().equals(other.getArticlesList())) return false;
if (!getFaqAnswersList().equals(other.getFaqAnswersList())) return false;
if (hasCreateTime() != other.hasCreateTime()) return false;
if (hasCreateTime()) {
if (!getCreateTime().equals(other.getCreateTime())) return false;
}
if (!getLatestMessage().equals(other.getLatestMessage())) 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) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
if (getArticlesCount() > 0) {
hash = (37 * hash) + ARTICLES_FIELD_NUMBER;
hash = (53 * hash) + getArticlesList().hashCode();
}
if (getFaqAnswersCount() > 0) {
hash = (37 * hash) + FAQ_ANSWERS_FIELD_NUMBER;
hash = (53 * hash) + getFaqAnswersList().hashCode();
}
if (hasCreateTime()) {
hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER;
hash = (53 * hash) + getCreateTime().hashCode();
}
hash = (37 * hash) + LATEST_MESSAGE_FIELD_NUMBER;
hash = (53 * hash) + getLatestMessage().hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.v2beta1.Suggestion parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2beta1.Suggestion 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.v2beta1.Suggestion parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2beta1.Suggestion 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.v2beta1.Suggestion parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2beta1.Suggestion parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2beta1.Suggestion parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2beta1.Suggestion 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.v2beta1.Suggestion parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2beta1.Suggestion 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.v2beta1.Suggestion parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2beta1.Suggestion 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.v2beta1.Suggestion 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;
}
/**
*
*
*
* Represents a suggestion for a human agent.
*
*
* Protobuf type {@code google.cloud.dialogflow.v2beta1.Suggestion}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2beta1.Suggestion)
com.google.cloud.dialogflow.v2beta1.SuggestionOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.v2beta1.ParticipantProto
.internal_static_google_cloud_dialogflow_v2beta1_Suggestion_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2beta1.ParticipantProto
.internal_static_google_cloud_dialogflow_v2beta1_Suggestion_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2beta1.Suggestion.class,
com.google.cloud.dialogflow.v2beta1.Suggestion.Builder.class);
}
// Construct using com.google.cloud.dialogflow.v2beta1.Suggestion.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getArticlesFieldBuilder();
getFaqAnswersFieldBuilder();
getCreateTimeFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
name_ = "";
if (articlesBuilder_ == null) {
articles_ = java.util.Collections.emptyList();
} else {
articles_ = null;
articlesBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
if (faqAnswersBuilder_ == null) {
faqAnswers_ = java.util.Collections.emptyList();
} else {
faqAnswers_ = null;
faqAnswersBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
createTime_ = null;
if (createTimeBuilder_ != null) {
createTimeBuilder_.dispose();
createTimeBuilder_ = null;
}
latestMessage_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dialogflow.v2beta1.ParticipantProto
.internal_static_google_cloud_dialogflow_v2beta1_Suggestion_descriptor;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2beta1.Suggestion getDefaultInstanceForType() {
return com.google.cloud.dialogflow.v2beta1.Suggestion.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.dialogflow.v2beta1.Suggestion build() {
com.google.cloud.dialogflow.v2beta1.Suggestion result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2beta1.Suggestion buildPartial() {
com.google.cloud.dialogflow.v2beta1.Suggestion result =
new com.google.cloud.dialogflow.v2beta1.Suggestion(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartialRepeatedFields(com.google.cloud.dialogflow.v2beta1.Suggestion result) {
if (articlesBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
articles_ = java.util.Collections.unmodifiableList(articles_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.articles_ = articles_;
} else {
result.articles_ = articlesBuilder_.build();
}
if (faqAnswersBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0)) {
faqAnswers_ = java.util.Collections.unmodifiableList(faqAnswers_);
bitField0_ = (bitField0_ & ~0x00000004);
}
result.faqAnswers_ = faqAnswers_;
} else {
result.faqAnswers_ = faqAnswersBuilder_.build();
}
}
private void buildPartial0(com.google.cloud.dialogflow.v2beta1.Suggestion result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.name_ = name_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000008) != 0)) {
result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.latestMessage_ = latestMessage_;
}
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.v2beta1.Suggestion) {
return mergeFrom((com.google.cloud.dialogflow.v2beta1.Suggestion) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.dialogflow.v2beta1.Suggestion other) {
if (other == com.google.cloud.dialogflow.v2beta1.Suggestion.getDefaultInstance()) return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
bitField0_ |= 0x00000001;
onChanged();
}
if (articlesBuilder_ == null) {
if (!other.articles_.isEmpty()) {
if (articles_.isEmpty()) {
articles_ = other.articles_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureArticlesIsMutable();
articles_.addAll(other.articles_);
}
onChanged();
}
} else {
if (!other.articles_.isEmpty()) {
if (articlesBuilder_.isEmpty()) {
articlesBuilder_.dispose();
articlesBuilder_ = null;
articles_ = other.articles_;
bitField0_ = (bitField0_ & ~0x00000002);
articlesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getArticlesFieldBuilder()
: null;
} else {
articlesBuilder_.addAllMessages(other.articles_);
}
}
}
if (faqAnswersBuilder_ == null) {
if (!other.faqAnswers_.isEmpty()) {
if (faqAnswers_.isEmpty()) {
faqAnswers_ = other.faqAnswers_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureFaqAnswersIsMutable();
faqAnswers_.addAll(other.faqAnswers_);
}
onChanged();
}
} else {
if (!other.faqAnswers_.isEmpty()) {
if (faqAnswersBuilder_.isEmpty()) {
faqAnswersBuilder_.dispose();
faqAnswersBuilder_ = null;
faqAnswers_ = other.faqAnswers_;
bitField0_ = (bitField0_ & ~0x00000004);
faqAnswersBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getFaqAnswersFieldBuilder()
: null;
} else {
faqAnswersBuilder_.addAllMessages(other.faqAnswers_);
}
}
}
if (other.hasCreateTime()) {
mergeCreateTime(other.getCreateTime());
}
if (!other.getLatestMessage().isEmpty()) {
latestMessage_ = other.latestMessage_;
bitField0_ |= 0x00000010;
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:
{
name_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18:
{
com.google.cloud.dialogflow.v2beta1.Suggestion.Article m =
input.readMessage(
com.google.cloud.dialogflow.v2beta1.Suggestion.Article.parser(),
extensionRegistry);
if (articlesBuilder_ == null) {
ensureArticlesIsMutable();
articles_.add(m);
} else {
articlesBuilder_.addMessage(m);
}
break;
} // case 18
case 34:
{
com.google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer m =
input.readMessage(
com.google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer.parser(),
extensionRegistry);
if (faqAnswersBuilder_ == null) {
ensureFaqAnswersIsMutable();
faqAnswers_.add(m);
} else {
faqAnswersBuilder_.addMessage(m);
}
break;
} // case 34
case 42:
{
input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000008;
break;
} // case 42
case 58:
{
latestMessage_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000010;
break;
} // case 58
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 name_ = "";
/**
*
*
*
* Output only. The name of this suggestion.
* Format:
* `projects/<Project ID>/locations/<Location ID>/conversations/<Conversation
* ID>/participants/*/suggestions/<Suggestion ID>`.
*
* Output only. The name of this suggestion.
* Format:
* `projects/<Project ID>/locations/<Location ID>/conversations/<Conversation
* ID>/participants/*/suggestions/<Suggestion ID>`.
*
*
* 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;
}
}
/**
*
*
*
* Output only. The name of this suggestion.
* Format:
* `projects/<Project ID>/locations/<Location ID>/conversations/<Conversation
* ID>/participants/*/suggestions/<Suggestion ID>`.
*
*
* 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;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Output only. The name of this suggestion.
* Format:
* `projects/<Project ID>/locations/<Location ID>/conversations/<Conversation
* ID>/participants/*/suggestions/<Suggestion ID>`.
*
*
* string name = 1;
*
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* Output only. The name of this suggestion.
* Format:
* `projects/<Project ID>/locations/<Location ID>/conversations/<Conversation
* ID>/participants/*/suggestions/<Suggestion ID>`.
*
*
* 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;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.util.List articles_ =
java.util.Collections.emptyList();
private void ensureArticlesIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
articles_ =
new java.util.ArrayList(
articles_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.v2beta1.Suggestion.Article,
com.google.cloud.dialogflow.v2beta1.Suggestion.Article.Builder,
com.google.cloud.dialogflow.v2beta1.Suggestion.ArticleOrBuilder>
articlesBuilder_;
/**
*
*
*
* Output only. Articles ordered by score in descending order.
*