com.google.cloud.dialogflow.v2.Agent Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of proto-google-cloud-dialogflow-v2 Show documentation
Show all versions of proto-google-cloud-dialogflow-v2 Show documentation
PROTO library for proto-google-cloud-dialogflow-v2
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/dialogflow/v2/agent.proto
package com.google.cloud.dialogflow.v2;
/**
*
* Represents a conversational agent.
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.Agent}
*/
public final class Agent extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.Agent)
AgentOrBuilder {
private static final long serialVersionUID = 0L;
// Use Agent.newBuilder() to construct.
private Agent(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Agent() {
parent_ = "";
displayName_ = "";
defaultLanguageCode_ = "";
supportedLanguageCodes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
timeZone_ = "";
description_ = "";
avatarUri_ = "";
enableLogging_ = false;
matchMode_ = 0;
classificationThreshold_ = 0F;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Agent(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
java.lang.String s = input.readStringRequireUtf8();
parent_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
displayName_ = s;
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
defaultLanguageCode_ = s;
break;
}
case 34: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
supportedLanguageCodes_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000008;
}
supportedLanguageCodes_.add(s);
break;
}
case 42: {
java.lang.String s = input.readStringRequireUtf8();
timeZone_ = s;
break;
}
case 50: {
java.lang.String s = input.readStringRequireUtf8();
description_ = s;
break;
}
case 58: {
java.lang.String s = input.readStringRequireUtf8();
avatarUri_ = s;
break;
}
case 64: {
enableLogging_ = input.readBool();
break;
}
case 72: {
int rawValue = input.readEnum();
matchMode_ = rawValue;
break;
}
case 85: {
classificationThreshold_ = input.readFloat();
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
supportedLanguageCodes_ = supportedLanguageCodes_.getUnmodifiableView();
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.cloud.dialogflow.v2.AgentProto.internal_static_google_cloud_dialogflow_v2_Agent_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.AgentProto.internal_static_google_cloud_dialogflow_v2_Agent_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Agent.class, com.google.cloud.dialogflow.v2.Agent.Builder.class);
}
/**
*
* Match mode determines how intents are detected from user queries.
*
*
* Protobuf enum {@code google.cloud.dialogflow.v2.Agent.MatchMode}
*/
public enum MatchMode
implements com.google.protobuf.ProtocolMessageEnum {
/**
*
* Not specified.
*
*
* MATCH_MODE_UNSPECIFIED = 0;
*/
MATCH_MODE_UNSPECIFIED(0),
/**
*
* Best for agents with a small number of examples in intents and/or wide
* use of templates syntax and composite entities.
*
*
* MATCH_MODE_HYBRID = 1;
*/
MATCH_MODE_HYBRID(1),
/**
*
* Can be used for agents with a large number of examples in intents,
* especially the ones using @sys.any or very large developer entities.
*
*
* MATCH_MODE_ML_ONLY = 2;
*/
MATCH_MODE_ML_ONLY(2),
UNRECOGNIZED(-1),
;
/**
*
* Not specified.
*
*
* MATCH_MODE_UNSPECIFIED = 0;
*/
public static final int MATCH_MODE_UNSPECIFIED_VALUE = 0;
/**
*
* Best for agents with a small number of examples in intents and/or wide
* use of templates syntax and composite entities.
*
*
* MATCH_MODE_HYBRID = 1;
*/
public static final int MATCH_MODE_HYBRID_VALUE = 1;
/**
*
* Can be used for agents with a large number of examples in intents,
* especially the ones using @sys.any or very large developer entities.
*
*
* MATCH_MODE_ML_ONLY = 2;
*/
public static final int MATCH_MODE_ML_ONLY_VALUE = 2;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static MatchMode valueOf(int value) {
return forNumber(value);
}
public static MatchMode forNumber(int value) {
switch (value) {
case 0: return MATCH_MODE_UNSPECIFIED;
case 1: return MATCH_MODE_HYBRID;
case 2: return MATCH_MODE_ML_ONLY;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
MatchMode> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public MatchMode findValueByNumber(int number) {
return MatchMode.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return com.google.cloud.dialogflow.v2.Agent.getDescriptor().getEnumTypes().get(0);
}
private static final MatchMode[] VALUES = values();
public static MatchMode valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private MatchMode(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.v2.Agent.MatchMode)
}
private int bitField0_;
public static final int PARENT_FIELD_NUMBER = 1;
private volatile java.lang.Object parent_;
/**
*
* Required. The project of this agent.
* Format: `projects/<Project ID>`.
*
*
* string parent = 1;
*/
public java.lang.String getParent() {
java.lang.Object ref = parent_;
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();
parent_ = s;
return s;
}
}
/**
*
* Required. The project of this agent.
* Format: `projects/<Project ID>`.
*
*
* string parent = 1;
*/
public com.google.protobuf.ByteString
getParentBytes() {
java.lang.Object ref = parent_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
parent_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DISPLAY_NAME_FIELD_NUMBER = 2;
private volatile java.lang.Object displayName_;
/**
*
* Required. The name of this agent.
*
*
* string display_name = 2;
*/
public java.lang.String getDisplayName() {
java.lang.Object ref = displayName_;
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();
displayName_ = s;
return s;
}
}
/**
*
* Required. The name of this agent.
*
*
* string display_name = 2;
*/
public com.google.protobuf.ByteString
getDisplayNameBytes() {
java.lang.Object ref = displayName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
displayName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DEFAULT_LANGUAGE_CODE_FIELD_NUMBER = 3;
private volatile java.lang.Object defaultLanguageCode_;
/**
*
* Required. The default language of the agent as a language tag. See
* [Language Support](https://dialogflow.com/docs/reference/language) for a
* list of the currently supported language codes.
* This field cannot be set by the `Update` method.
*
*
* string default_language_code = 3;
*/
public java.lang.String getDefaultLanguageCode() {
java.lang.Object ref = defaultLanguageCode_;
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();
defaultLanguageCode_ = s;
return s;
}
}
/**
*
* Required. The default language of the agent as a language tag. See
* [Language Support](https://dialogflow.com/docs/reference/language) for a
* list of the currently supported language codes.
* This field cannot be set by the `Update` method.
*
*
* string default_language_code = 3;
*/
public com.google.protobuf.ByteString
getDefaultLanguageCodeBytes() {
java.lang.Object ref = defaultLanguageCode_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
defaultLanguageCode_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int SUPPORTED_LANGUAGE_CODES_FIELD_NUMBER = 4;
private com.google.protobuf.LazyStringList supportedLanguageCodes_;
/**
*
* Optional. The list of all languages supported by this agent (except for the
* `default_language_code`).
*
*
* repeated string supported_language_codes = 4;
*/
public com.google.protobuf.ProtocolStringList
getSupportedLanguageCodesList() {
return supportedLanguageCodes_;
}
/**
*
* Optional. The list of all languages supported by this agent (except for the
* `default_language_code`).
*
*
* repeated string supported_language_codes = 4;
*/
public int getSupportedLanguageCodesCount() {
return supportedLanguageCodes_.size();
}
/**
*
* Optional. The list of all languages supported by this agent (except for the
* `default_language_code`).
*
*
* repeated string supported_language_codes = 4;
*/
public java.lang.String getSupportedLanguageCodes(int index) {
return supportedLanguageCodes_.get(index);
}
/**
*
* Optional. The list of all languages supported by this agent (except for the
* `default_language_code`).
*
*
* repeated string supported_language_codes = 4;
*/
public com.google.protobuf.ByteString
getSupportedLanguageCodesBytes(int index) {
return supportedLanguageCodes_.getByteString(index);
}
public static final int TIME_ZONE_FIELD_NUMBER = 5;
private volatile java.lang.Object timeZone_;
/**
*
* Required. The time zone of this agent from the
* [time zone database](https://www.iana.org/time-zones), e.g.,
* America/New_York, Europe/Paris.
*
*
* string time_zone = 5;
*/
public java.lang.String getTimeZone() {
java.lang.Object ref = timeZone_;
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();
timeZone_ = s;
return s;
}
}
/**
*
* Required. The time zone of this agent from the
* [time zone database](https://www.iana.org/time-zones), e.g.,
* America/New_York, Europe/Paris.
*
*
* string time_zone = 5;
*/
public com.google.protobuf.ByteString
getTimeZoneBytes() {
java.lang.Object ref = timeZone_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
timeZone_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DESCRIPTION_FIELD_NUMBER = 6;
private volatile java.lang.Object description_;
/**
*
* Optional. The description of this agent.
* The maximum length is 500 characters. If exceeded, the request is rejected.
*
*
* string description = 6;
*/
public java.lang.String getDescription() {
java.lang.Object ref = description_;
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();
description_ = s;
return s;
}
}
/**
*
* Optional. The description of this agent.
* The maximum length is 500 characters. If exceeded, the request is rejected.
*
*
* string description = 6;
*/
public com.google.protobuf.ByteString
getDescriptionBytes() {
java.lang.Object ref = description_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
description_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int AVATAR_URI_FIELD_NUMBER = 7;
private volatile java.lang.Object avatarUri_;
/**
*
* Optional. The URI of the agent's avatar.
* Avatars are used throughout the Dialogflow console and in the self-hosted
* [Web Demo](https://dialogflow.com/docs/integrations/web-demo) integration.
*
*
* string avatar_uri = 7;
*/
public java.lang.String getAvatarUri() {
java.lang.Object ref = avatarUri_;
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();
avatarUri_ = s;
return s;
}
}
/**
*
* Optional. The URI of the agent's avatar.
* Avatars are used throughout the Dialogflow console and in the self-hosted
* [Web Demo](https://dialogflow.com/docs/integrations/web-demo) integration.
*
*
* string avatar_uri = 7;
*/
public com.google.protobuf.ByteString
getAvatarUriBytes() {
java.lang.Object ref = avatarUri_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
avatarUri_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ENABLE_LOGGING_FIELD_NUMBER = 8;
private boolean enableLogging_;
/**
*
* Optional. Determines whether this agent should log conversation queries.
*
*
* bool enable_logging = 8;
*/
public boolean getEnableLogging() {
return enableLogging_;
}
public static final int MATCH_MODE_FIELD_NUMBER = 9;
private int matchMode_;
/**
*
* Optional. Determines how intents are detected from user queries.
*
*
* .google.cloud.dialogflow.v2.Agent.MatchMode match_mode = 9;
*/
public int getMatchModeValue() {
return matchMode_;
}
/**
*
* Optional. Determines how intents are detected from user queries.
*
*
* .google.cloud.dialogflow.v2.Agent.MatchMode match_mode = 9;
*/
public com.google.cloud.dialogflow.v2.Agent.MatchMode getMatchMode() {
com.google.cloud.dialogflow.v2.Agent.MatchMode result = com.google.cloud.dialogflow.v2.Agent.MatchMode.valueOf(matchMode_);
return result == null ? com.google.cloud.dialogflow.v2.Agent.MatchMode.UNRECOGNIZED : result;
}
public static final int CLASSIFICATION_THRESHOLD_FIELD_NUMBER = 10;
private float classificationThreshold_;
/**
*
* Optional. To filter out false positive results and still get variety in
* matched natural language inputs for your agent, you can tune the machine
* learning classification threshold. If the returned score value is less than
* the threshold value, then a fallback intent is be triggered or, if there
* are no fallback intents defined, no intent will be triggered. The score
* values range from 0.0 (completely uncertain) to 1.0 (completely certain).
* If set to 0.0, the default of 0.3 is used.
*
*
* float classification_threshold = 10;
*/
public float getClassificationThreshold() {
return classificationThreshold_;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getParentBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_);
}
if (!getDisplayNameBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_);
}
if (!getDefaultLanguageCodeBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, defaultLanguageCode_);
}
for (int i = 0; i < supportedLanguageCodes_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, supportedLanguageCodes_.getRaw(i));
}
if (!getTimeZoneBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, timeZone_);
}
if (!getDescriptionBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, description_);
}
if (!getAvatarUriBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 7, avatarUri_);
}
if (enableLogging_ != false) {
output.writeBool(8, enableLogging_);
}
if (matchMode_ != com.google.cloud.dialogflow.v2.Agent.MatchMode.MATCH_MODE_UNSPECIFIED.getNumber()) {
output.writeEnum(9, matchMode_);
}
if (classificationThreshold_ != 0F) {
output.writeFloat(10, classificationThreshold_);
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getParentBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_);
}
if (!getDisplayNameBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_);
}
if (!getDefaultLanguageCodeBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, defaultLanguageCode_);
}
{
int dataSize = 0;
for (int i = 0; i < supportedLanguageCodes_.size(); i++) {
dataSize += computeStringSizeNoTag(supportedLanguageCodes_.getRaw(i));
}
size += dataSize;
size += 1 * getSupportedLanguageCodesList().size();
}
if (!getTimeZoneBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, timeZone_);
}
if (!getDescriptionBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, description_);
}
if (!getAvatarUriBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, avatarUri_);
}
if (enableLogging_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(8, enableLogging_);
}
if (matchMode_ != com.google.cloud.dialogflow.v2.Agent.MatchMode.MATCH_MODE_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(9, matchMode_);
}
if (classificationThreshold_ != 0F) {
size += com.google.protobuf.CodedOutputStream
.computeFloatSize(10, classificationThreshold_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.cloud.dialogflow.v2.Agent)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.v2.Agent other = (com.google.cloud.dialogflow.v2.Agent) obj;
boolean result = true;
result = result && getParent()
.equals(other.getParent());
result = result && getDisplayName()
.equals(other.getDisplayName());
result = result && getDefaultLanguageCode()
.equals(other.getDefaultLanguageCode());
result = result && getSupportedLanguageCodesList()
.equals(other.getSupportedLanguageCodesList());
result = result && getTimeZone()
.equals(other.getTimeZone());
result = result && getDescription()
.equals(other.getDescription());
result = result && getAvatarUri()
.equals(other.getAvatarUri());
result = result && (getEnableLogging()
== other.getEnableLogging());
result = result && matchMode_ == other.matchMode_;
result = result && (
java.lang.Float.floatToIntBits(getClassificationThreshold())
== java.lang.Float.floatToIntBits(
other.getClassificationThreshold()));
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + PARENT_FIELD_NUMBER;
hash = (53 * hash) + getParent().hashCode();
hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER;
hash = (53 * hash) + getDisplayName().hashCode();
hash = (37 * hash) + DEFAULT_LANGUAGE_CODE_FIELD_NUMBER;
hash = (53 * hash) + getDefaultLanguageCode().hashCode();
if (getSupportedLanguageCodesCount() > 0) {
hash = (37 * hash) + SUPPORTED_LANGUAGE_CODES_FIELD_NUMBER;
hash = (53 * hash) + getSupportedLanguageCodesList().hashCode();
}
hash = (37 * hash) + TIME_ZONE_FIELD_NUMBER;
hash = (53 * hash) + getTimeZone().hashCode();
hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
hash = (53 * hash) + getDescription().hashCode();
hash = (37 * hash) + AVATAR_URI_FIELD_NUMBER;
hash = (53 * hash) + getAvatarUri().hashCode();
hash = (37 * hash) + ENABLE_LOGGING_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getEnableLogging());
hash = (37 * hash) + MATCH_MODE_FIELD_NUMBER;
hash = (53 * hash) + matchMode_;
hash = (37 * hash) + CLASSIFICATION_THRESHOLD_FIELD_NUMBER;
hash = (53 * hash) + java.lang.Float.floatToIntBits(
getClassificationThreshold());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.v2.Agent parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Agent 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.Agent parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Agent 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.Agent parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Agent 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.Agent parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Agent 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.Agent parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Agent 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.Agent 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.Agent parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.cloud.dialogflow.v2.Agent prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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 conversational agent.
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.Agent}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.Agent)
com.google.cloud.dialogflow.v2.AgentOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.cloud.dialogflow.v2.AgentProto.internal_static_google_cloud_dialogflow_v2_Agent_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.AgentProto.internal_static_google_cloud_dialogflow_v2_Agent_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Agent.class, com.google.cloud.dialogflow.v2.Agent.Builder.class);
}
// Construct using com.google.cloud.dialogflow.v2.Agent.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
parent_ = "";
displayName_ = "";
defaultLanguageCode_ = "";
supportedLanguageCodes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000008);
timeZone_ = "";
description_ = "";
avatarUri_ = "";
enableLogging_ = false;
matchMode_ = 0;
classificationThreshold_ = 0F;
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.cloud.dialogflow.v2.AgentProto.internal_static_google_cloud_dialogflow_v2_Agent_descriptor;
}
public com.google.cloud.dialogflow.v2.Agent getDefaultInstanceForType() {
return com.google.cloud.dialogflow.v2.Agent.getDefaultInstance();
}
public com.google.cloud.dialogflow.v2.Agent build() {
com.google.cloud.dialogflow.v2.Agent result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.google.cloud.dialogflow.v2.Agent buildPartial() {
com.google.cloud.dialogflow.v2.Agent result = new com.google.cloud.dialogflow.v2.Agent(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
result.parent_ = parent_;
result.displayName_ = displayName_;
result.defaultLanguageCode_ = defaultLanguageCode_;
if (((bitField0_ & 0x00000008) == 0x00000008)) {
supportedLanguageCodes_ = supportedLanguageCodes_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000008);
}
result.supportedLanguageCodes_ = supportedLanguageCodes_;
result.timeZone_ = timeZone_;
result.description_ = description_;
result.avatarUri_ = avatarUri_;
result.enableLogging_ = enableLogging_;
result.matchMode_ = matchMode_;
result.classificationThreshold_ = classificationThreshold_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.dialogflow.v2.Agent) {
return mergeFrom((com.google.cloud.dialogflow.v2.Agent)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.dialogflow.v2.Agent other) {
if (other == com.google.cloud.dialogflow.v2.Agent.getDefaultInstance()) return this;
if (!other.getParent().isEmpty()) {
parent_ = other.parent_;
onChanged();
}
if (!other.getDisplayName().isEmpty()) {
displayName_ = other.displayName_;
onChanged();
}
if (!other.getDefaultLanguageCode().isEmpty()) {
defaultLanguageCode_ = other.defaultLanguageCode_;
onChanged();
}
if (!other.supportedLanguageCodes_.isEmpty()) {
if (supportedLanguageCodes_.isEmpty()) {
supportedLanguageCodes_ = other.supportedLanguageCodes_;
bitField0_ = (bitField0_ & ~0x00000008);
} else {
ensureSupportedLanguageCodesIsMutable();
supportedLanguageCodes_.addAll(other.supportedLanguageCodes_);
}
onChanged();
}
if (!other.getTimeZone().isEmpty()) {
timeZone_ = other.timeZone_;
onChanged();
}
if (!other.getDescription().isEmpty()) {
description_ = other.description_;
onChanged();
}
if (!other.getAvatarUri().isEmpty()) {
avatarUri_ = other.avatarUri_;
onChanged();
}
if (other.getEnableLogging() != false) {
setEnableLogging(other.getEnableLogging());
}
if (other.matchMode_ != 0) {
setMatchModeValue(other.getMatchModeValue());
}
if (other.getClassificationThreshold() != 0F) {
setClassificationThreshold(other.getClassificationThreshold());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.cloud.dialogflow.v2.Agent parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.cloud.dialogflow.v2.Agent) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object parent_ = "";
/**
*
* Required. The project of this agent.
* Format: `projects/<Project ID>`.
*
*
* string parent = 1;
*/
public java.lang.String getParent() {
java.lang.Object ref = parent_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
parent_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Required. The project of this agent.
* Format: `projects/<Project ID>`.
*
*
* string parent = 1;
*/
public com.google.protobuf.ByteString
getParentBytes() {
java.lang.Object ref = parent_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
parent_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Required. The project of this agent.
* Format: `projects/<Project ID>`.
*
*
* string parent = 1;
*/
public Builder setParent(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
parent_ = value;
onChanged();
return this;
}
/**
*
* Required. The project of this agent.
* Format: `projects/<Project ID>`.
*
*
* string parent = 1;
*/
public Builder clearParent() {
parent_ = getDefaultInstance().getParent();
onChanged();
return this;
}
/**
*
* Required. The project of this agent.
* Format: `projects/<Project ID>`.
*
*
* string parent = 1;
*/
public Builder setParentBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
parent_ = value;
onChanged();
return this;
}
private java.lang.Object displayName_ = "";
/**
*
* Required. The name of this agent.
*
*
* string display_name = 2;
*/
public java.lang.String getDisplayName() {
java.lang.Object ref = displayName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
displayName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Required. The name of this agent.
*
*
* string display_name = 2;
*/
public com.google.protobuf.ByteString
getDisplayNameBytes() {
java.lang.Object ref = displayName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
displayName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Required. The name of this agent.
*
*
* string display_name = 2;
*/
public Builder setDisplayName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
displayName_ = value;
onChanged();
return this;
}
/**
*
* Required. The name of this agent.
*
*
* string display_name = 2;
*/
public Builder clearDisplayName() {
displayName_ = getDefaultInstance().getDisplayName();
onChanged();
return this;
}
/**
*
* Required. The name of this agent.
*
*
* string display_name = 2;
*/
public Builder setDisplayNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
displayName_ = value;
onChanged();
return this;
}
private java.lang.Object defaultLanguageCode_ = "";
/**
*
* Required. The default language of the agent as a language tag. See
* [Language Support](https://dialogflow.com/docs/reference/language) for a
* list of the currently supported language codes.
* This field cannot be set by the `Update` method.
*
*
* string default_language_code = 3;
*/
public java.lang.String getDefaultLanguageCode() {
java.lang.Object ref = defaultLanguageCode_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
defaultLanguageCode_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Required. The default language of the agent as a language tag. See
* [Language Support](https://dialogflow.com/docs/reference/language) for a
* list of the currently supported language codes.
* This field cannot be set by the `Update` method.
*
*
* string default_language_code = 3;
*/
public com.google.protobuf.ByteString
getDefaultLanguageCodeBytes() {
java.lang.Object ref = defaultLanguageCode_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
defaultLanguageCode_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Required. The default language of the agent as a language tag. See
* [Language Support](https://dialogflow.com/docs/reference/language) for a
* list of the currently supported language codes.
* This field cannot be set by the `Update` method.
*
*
* string default_language_code = 3;
*/
public Builder setDefaultLanguageCode(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
defaultLanguageCode_ = value;
onChanged();
return this;
}
/**
*
* Required. The default language of the agent as a language tag. See
* [Language Support](https://dialogflow.com/docs/reference/language) for a
* list of the currently supported language codes.
* This field cannot be set by the `Update` method.
*
*
* string default_language_code = 3;
*/
public Builder clearDefaultLanguageCode() {
defaultLanguageCode_ = getDefaultInstance().getDefaultLanguageCode();
onChanged();
return this;
}
/**
*
* Required. The default language of the agent as a language tag. See
* [Language Support](https://dialogflow.com/docs/reference/language) for a
* list of the currently supported language codes.
* This field cannot be set by the `Update` method.
*
*
* string default_language_code = 3;
*/
public Builder setDefaultLanguageCodeBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
defaultLanguageCode_ = value;
onChanged();
return this;
}
private com.google.protobuf.LazyStringList supportedLanguageCodes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureSupportedLanguageCodesIsMutable() {
if (!((bitField0_ & 0x00000008) == 0x00000008)) {
supportedLanguageCodes_ = new com.google.protobuf.LazyStringArrayList(supportedLanguageCodes_);
bitField0_ |= 0x00000008;
}
}
/**
*
* Optional. The list of all languages supported by this agent (except for the
* `default_language_code`).
*
*
* repeated string supported_language_codes = 4;
*/
public com.google.protobuf.ProtocolStringList
getSupportedLanguageCodesList() {
return supportedLanguageCodes_.getUnmodifiableView();
}
/**
*
* Optional. The list of all languages supported by this agent (except for the
* `default_language_code`).
*
*
* repeated string supported_language_codes = 4;
*/
public int getSupportedLanguageCodesCount() {
return supportedLanguageCodes_.size();
}
/**
*
* Optional. The list of all languages supported by this agent (except for the
* `default_language_code`).
*
*
* repeated string supported_language_codes = 4;
*/
public java.lang.String getSupportedLanguageCodes(int index) {
return supportedLanguageCodes_.get(index);
}
/**
*
* Optional. The list of all languages supported by this agent (except for the
* `default_language_code`).
*
*
* repeated string supported_language_codes = 4;
*/
public com.google.protobuf.ByteString
getSupportedLanguageCodesBytes(int index) {
return supportedLanguageCodes_.getByteString(index);
}
/**
*
* Optional. The list of all languages supported by this agent (except for the
* `default_language_code`).
*
*
* repeated string supported_language_codes = 4;
*/
public Builder setSupportedLanguageCodes(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureSupportedLanguageCodesIsMutable();
supportedLanguageCodes_.set(index, value);
onChanged();
return this;
}
/**
*
* Optional. The list of all languages supported by this agent (except for the
* `default_language_code`).
*
*
* repeated string supported_language_codes = 4;
*/
public Builder addSupportedLanguageCodes(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureSupportedLanguageCodesIsMutable();
supportedLanguageCodes_.add(value);
onChanged();
return this;
}
/**
*
* Optional. The list of all languages supported by this agent (except for the
* `default_language_code`).
*
*
* repeated string supported_language_codes = 4;
*/
public Builder addAllSupportedLanguageCodes(
java.lang.Iterable values) {
ensureSupportedLanguageCodesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, supportedLanguageCodes_);
onChanged();
return this;
}
/**
*
* Optional. The list of all languages supported by this agent (except for the
* `default_language_code`).
*
*
* repeated string supported_language_codes = 4;
*/
public Builder clearSupportedLanguageCodes() {
supportedLanguageCodes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
return this;
}
/**
*
* Optional. The list of all languages supported by this agent (except for the
* `default_language_code`).
*
*
* repeated string supported_language_codes = 4;
*/
public Builder addSupportedLanguageCodesBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureSupportedLanguageCodesIsMutable();
supportedLanguageCodes_.add(value);
onChanged();
return this;
}
private java.lang.Object timeZone_ = "";
/**
*
* Required. The time zone of this agent from the
* [time zone database](https://www.iana.org/time-zones), e.g.,
* America/New_York, Europe/Paris.
*
*
* string time_zone = 5;
*/
public java.lang.String getTimeZone() {
java.lang.Object ref = timeZone_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
timeZone_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Required. The time zone of this agent from the
* [time zone database](https://www.iana.org/time-zones), e.g.,
* America/New_York, Europe/Paris.
*
*
* string time_zone = 5;
*/
public com.google.protobuf.ByteString
getTimeZoneBytes() {
java.lang.Object ref = timeZone_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
timeZone_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Required. The time zone of this agent from the
* [time zone database](https://www.iana.org/time-zones), e.g.,
* America/New_York, Europe/Paris.
*
*
* string time_zone = 5;
*/
public Builder setTimeZone(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
timeZone_ = value;
onChanged();
return this;
}
/**
*
* Required. The time zone of this agent from the
* [time zone database](https://www.iana.org/time-zones), e.g.,
* America/New_York, Europe/Paris.
*
*
* string time_zone = 5;
*/
public Builder clearTimeZone() {
timeZone_ = getDefaultInstance().getTimeZone();
onChanged();
return this;
}
/**
*
* Required. The time zone of this agent from the
* [time zone database](https://www.iana.org/time-zones), e.g.,
* America/New_York, Europe/Paris.
*
*
* string time_zone = 5;
*/
public Builder setTimeZoneBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
timeZone_ = value;
onChanged();
return this;
}
private java.lang.Object description_ = "";
/**
*
* Optional. The description of this agent.
* The maximum length is 500 characters. If exceeded, the request is rejected.
*
*
* string description = 6;
*/
public java.lang.String getDescription() {
java.lang.Object ref = description_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
description_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Optional. The description of this agent.
* The maximum length is 500 characters. If exceeded, the request is rejected.
*
*
* string description = 6;
*/
public com.google.protobuf.ByteString
getDescriptionBytes() {
java.lang.Object ref = description_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
description_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Optional. The description of this agent.
* The maximum length is 500 characters. If exceeded, the request is rejected.
*
*
* string description = 6;
*/
public Builder setDescription(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
description_ = value;
onChanged();
return this;
}
/**
*
* Optional. The description of this agent.
* The maximum length is 500 characters. If exceeded, the request is rejected.
*
*
* string description = 6;
*/
public Builder clearDescription() {
description_ = getDefaultInstance().getDescription();
onChanged();
return this;
}
/**
*
* Optional. The description of this agent.
* The maximum length is 500 characters. If exceeded, the request is rejected.
*
*
* string description = 6;
*/
public Builder setDescriptionBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
description_ = value;
onChanged();
return this;
}
private java.lang.Object avatarUri_ = "";
/**
*
* Optional. The URI of the agent's avatar.
* Avatars are used throughout the Dialogflow console and in the self-hosted
* [Web Demo](https://dialogflow.com/docs/integrations/web-demo) integration.
*
*
* string avatar_uri = 7;
*/
public java.lang.String getAvatarUri() {
java.lang.Object ref = avatarUri_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
avatarUri_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Optional. The URI of the agent's avatar.
* Avatars are used throughout the Dialogflow console and in the self-hosted
* [Web Demo](https://dialogflow.com/docs/integrations/web-demo) integration.
*
*
* string avatar_uri = 7;
*/
public com.google.protobuf.ByteString
getAvatarUriBytes() {
java.lang.Object ref = avatarUri_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
avatarUri_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Optional. The URI of the agent's avatar.
* Avatars are used throughout the Dialogflow console and in the self-hosted
* [Web Demo](https://dialogflow.com/docs/integrations/web-demo) integration.
*
*
* string avatar_uri = 7;
*/
public Builder setAvatarUri(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
avatarUri_ = value;
onChanged();
return this;
}
/**
*
* Optional. The URI of the agent's avatar.
* Avatars are used throughout the Dialogflow console and in the self-hosted
* [Web Demo](https://dialogflow.com/docs/integrations/web-demo) integration.
*
*
* string avatar_uri = 7;
*/
public Builder clearAvatarUri() {
avatarUri_ = getDefaultInstance().getAvatarUri();
onChanged();
return this;
}
/**
*
* Optional. The URI of the agent's avatar.
* Avatars are used throughout the Dialogflow console and in the self-hosted
* [Web Demo](https://dialogflow.com/docs/integrations/web-demo) integration.
*
*
* string avatar_uri = 7;
*/
public Builder setAvatarUriBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
avatarUri_ = value;
onChanged();
return this;
}
private boolean enableLogging_ ;
/**
*
* Optional. Determines whether this agent should log conversation queries.
*
*
* bool enable_logging = 8;
*/
public boolean getEnableLogging() {
return enableLogging_;
}
/**
*
* Optional. Determines whether this agent should log conversation queries.
*
*
* bool enable_logging = 8;
*/
public Builder setEnableLogging(boolean value) {
enableLogging_ = value;
onChanged();
return this;
}
/**
*
* Optional. Determines whether this agent should log conversation queries.
*
*
* bool enable_logging = 8;
*/
public Builder clearEnableLogging() {
enableLogging_ = false;
onChanged();
return this;
}
private int matchMode_ = 0;
/**
*
* Optional. Determines how intents are detected from user queries.
*
*
* .google.cloud.dialogflow.v2.Agent.MatchMode match_mode = 9;
*/
public int getMatchModeValue() {
return matchMode_;
}
/**
*
* Optional. Determines how intents are detected from user queries.
*
*
* .google.cloud.dialogflow.v2.Agent.MatchMode match_mode = 9;
*/
public Builder setMatchModeValue(int value) {
matchMode_ = value;
onChanged();
return this;
}
/**
*
* Optional. Determines how intents are detected from user queries.
*
*
* .google.cloud.dialogflow.v2.Agent.MatchMode match_mode = 9;
*/
public com.google.cloud.dialogflow.v2.Agent.MatchMode getMatchMode() {
com.google.cloud.dialogflow.v2.Agent.MatchMode result = com.google.cloud.dialogflow.v2.Agent.MatchMode.valueOf(matchMode_);
return result == null ? com.google.cloud.dialogflow.v2.Agent.MatchMode.UNRECOGNIZED : result;
}
/**
*
* Optional. Determines how intents are detected from user queries.
*
*
* .google.cloud.dialogflow.v2.Agent.MatchMode match_mode = 9;
*/
public Builder setMatchMode(com.google.cloud.dialogflow.v2.Agent.MatchMode value) {
if (value == null) {
throw new NullPointerException();
}
matchMode_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Optional. Determines how intents are detected from user queries.
*
*
* .google.cloud.dialogflow.v2.Agent.MatchMode match_mode = 9;
*/
public Builder clearMatchMode() {
matchMode_ = 0;
onChanged();
return this;
}
private float classificationThreshold_ ;
/**
*
* Optional. To filter out false positive results and still get variety in
* matched natural language inputs for your agent, you can tune the machine
* learning classification threshold. If the returned score value is less than
* the threshold value, then a fallback intent is be triggered or, if there
* are no fallback intents defined, no intent will be triggered. The score
* values range from 0.0 (completely uncertain) to 1.0 (completely certain).
* If set to 0.0, the default of 0.3 is used.
*
*
* float classification_threshold = 10;
*/
public float getClassificationThreshold() {
return classificationThreshold_;
}
/**
*
* Optional. To filter out false positive results and still get variety in
* matched natural language inputs for your agent, you can tune the machine
* learning classification threshold. If the returned score value is less than
* the threshold value, then a fallback intent is be triggered or, if there
* are no fallback intents defined, no intent will be triggered. The score
* values range from 0.0 (completely uncertain) to 1.0 (completely certain).
* If set to 0.0, the default of 0.3 is used.
*
*
* float classification_threshold = 10;
*/
public Builder setClassificationThreshold(float value) {
classificationThreshold_ = value;
onChanged();
return this;
}
/**
*
* Optional. To filter out false positive results and still get variety in
* matched natural language inputs for your agent, you can tune the machine
* learning classification threshold. If the returned score value is less than
* the threshold value, then a fallback intent is be triggered or, if there
* are no fallback intents defined, no intent will be triggered. The score
* values range from 0.0 (completely uncertain) to 1.0 (completely certain).
* If set to 0.0, the default of 0.3 is used.
*
*
* float classification_threshold = 10;
*/
public Builder clearClassificationThreshold() {
classificationThreshold_ = 0F;
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.Agent)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Agent)
private static final com.google.cloud.dialogflow.v2.Agent DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2.Agent();
}
public static com.google.cloud.dialogflow.v2.Agent getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public Agent parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Agent(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public com.google.cloud.dialogflow.v2.Agent getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}