com.google.cloud.dialogflow.v2.QueryParameters 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/session.proto
package com.google.cloud.dialogflow.v2;
/**
*
* Represents the parameters of the conversational query.
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.QueryParameters}
*/
public final class QueryParameters extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.QueryParameters)
QueryParametersOrBuilder {
private static final long serialVersionUID = 0L;
// Use QueryParameters.newBuilder() to construct.
private QueryParameters(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private QueryParameters() {
timeZone_ = "";
contexts_ = java.util.Collections.emptyList();
resetContexts_ = false;
sessionEntityTypes_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private QueryParameters(
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();
timeZone_ = s;
break;
}
case 18: {
com.google.type.LatLng.Builder subBuilder = null;
if (geoLocation_ != null) {
subBuilder = geoLocation_.toBuilder();
}
geoLocation_ = input.readMessage(com.google.type.LatLng.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(geoLocation_);
geoLocation_ = subBuilder.buildPartial();
}
break;
}
case 26: {
if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
contexts_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000004;
}
contexts_.add(
input.readMessage(com.google.cloud.dialogflow.v2.Context.parser(), extensionRegistry));
break;
}
case 32: {
resetContexts_ = input.readBool();
break;
}
case 42: {
if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
sessionEntityTypes_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000010;
}
sessionEntityTypes_.add(
input.readMessage(com.google.cloud.dialogflow.v2.SessionEntityType.parser(), extensionRegistry));
break;
}
case 50: {
com.google.protobuf.Struct.Builder subBuilder = null;
if (payload_ != null) {
subBuilder = payload_.toBuilder();
}
payload_ = input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(payload_);
payload_ = subBuilder.buildPartial();
}
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_ & 0x00000004) == 0x00000004)) {
contexts_ = java.util.Collections.unmodifiableList(contexts_);
}
if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
sessionEntityTypes_ = java.util.Collections.unmodifiableList(sessionEntityTypes_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.cloud.dialogflow.v2.SessionProto.internal_static_google_cloud_dialogflow_v2_QueryParameters_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.SessionProto.internal_static_google_cloud_dialogflow_v2_QueryParameters_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.QueryParameters.class, com.google.cloud.dialogflow.v2.QueryParameters.Builder.class);
}
private int bitField0_;
public static final int TIME_ZONE_FIELD_NUMBER = 1;
private volatile java.lang.Object timeZone_;
/**
*
* Optional. The time zone of this conversational query from the
* [time zone database](https://www.iana.org/time-zones), e.g.,
* America/New_York, Europe/Paris. If not provided, the time zone specified in
* agent settings is used.
*
*
* string time_zone = 1;
*/
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;
}
}
/**
*
* Optional. The time zone of this conversational query from the
* [time zone database](https://www.iana.org/time-zones), e.g.,
* America/New_York, Europe/Paris. If not provided, the time zone specified in
* agent settings is used.
*
*
* string time_zone = 1;
*/
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 GEO_LOCATION_FIELD_NUMBER = 2;
private com.google.type.LatLng geoLocation_;
/**
*
* Optional. The geo location of this conversational query.
*
*
* .google.type.LatLng geo_location = 2;
*/
public boolean hasGeoLocation() {
return geoLocation_ != null;
}
/**
*
* Optional. The geo location of this conversational query.
*
*
* .google.type.LatLng geo_location = 2;
*/
public com.google.type.LatLng getGeoLocation() {
return geoLocation_ == null ? com.google.type.LatLng.getDefaultInstance() : geoLocation_;
}
/**
*
* Optional. The geo location of this conversational query.
*
*
* .google.type.LatLng geo_location = 2;
*/
public com.google.type.LatLngOrBuilder getGeoLocationOrBuilder() {
return getGeoLocation();
}
public static final int CONTEXTS_FIELD_NUMBER = 3;
private java.util.List contexts_;
/**
*
* Optional. The collection of contexts to be activated before this query is
* executed.
*
*
* repeated .google.cloud.dialogflow.v2.Context contexts = 3;
*/
public java.util.List getContextsList() {
return contexts_;
}
/**
*
* Optional. The collection of contexts to be activated before this query is
* executed.
*
*
* repeated .google.cloud.dialogflow.v2.Context contexts = 3;
*/
public java.util.List extends com.google.cloud.dialogflow.v2.ContextOrBuilder>
getContextsOrBuilderList() {
return contexts_;
}
/**
*
* Optional. The collection of contexts to be activated before this query is
* executed.
*
*
* repeated .google.cloud.dialogflow.v2.Context contexts = 3;
*/
public int getContextsCount() {
return contexts_.size();
}
/**
*
* Optional. The collection of contexts to be activated before this query is
* executed.
*
*
* repeated .google.cloud.dialogflow.v2.Context contexts = 3;
*/
public com.google.cloud.dialogflow.v2.Context getContexts(int index) {
return contexts_.get(index);
}
/**
*
* Optional. The collection of contexts to be activated before this query is
* executed.
*
*
* repeated .google.cloud.dialogflow.v2.Context contexts = 3;
*/
public com.google.cloud.dialogflow.v2.ContextOrBuilder getContextsOrBuilder(
int index) {
return contexts_.get(index);
}
public static final int RESET_CONTEXTS_FIELD_NUMBER = 4;
private boolean resetContexts_;
/**
*
* Optional. Specifies whether to delete all contexts in the current session
* before the new ones are activated.
*
*
* bool reset_contexts = 4;
*/
public boolean getResetContexts() {
return resetContexts_;
}
public static final int SESSION_ENTITY_TYPES_FIELD_NUMBER = 5;
private java.util.List sessionEntityTypes_;
/**
*
* Optional. The collection of session entity types to replace or extend
* developer entities with for this query only. The entity synonyms apply
* to all languages.
*
*
* repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 5;
*/
public java.util.List getSessionEntityTypesList() {
return sessionEntityTypes_;
}
/**
*
* Optional. The collection of session entity types to replace or extend
* developer entities with for this query only. The entity synonyms apply
* to all languages.
*
*
* repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 5;
*/
public java.util.List extends com.google.cloud.dialogflow.v2.SessionEntityTypeOrBuilder>
getSessionEntityTypesOrBuilderList() {
return sessionEntityTypes_;
}
/**
*
* Optional. The collection of session entity types to replace or extend
* developer entities with for this query only. The entity synonyms apply
* to all languages.
*
*
* repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 5;
*/
public int getSessionEntityTypesCount() {
return sessionEntityTypes_.size();
}
/**
*
* Optional. The collection of session entity types to replace or extend
* developer entities with for this query only. The entity synonyms apply
* to all languages.
*
*
* repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 5;
*/
public com.google.cloud.dialogflow.v2.SessionEntityType getSessionEntityTypes(int index) {
return sessionEntityTypes_.get(index);
}
/**
*
* Optional. The collection of session entity types to replace or extend
* developer entities with for this query only. The entity synonyms apply
* to all languages.
*
*
* repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 5;
*/
public com.google.cloud.dialogflow.v2.SessionEntityTypeOrBuilder getSessionEntityTypesOrBuilder(
int index) {
return sessionEntityTypes_.get(index);
}
public static final int PAYLOAD_FIELD_NUMBER = 6;
private com.google.protobuf.Struct payload_;
/**
*
* Optional. This field can be used to pass custom data into the webhook
* associated with the agent. Arbitrary JSON objects are supported.
*
*
* .google.protobuf.Struct payload = 6;
*/
public boolean hasPayload() {
return payload_ != null;
}
/**
*
* Optional. This field can be used to pass custom data into the webhook
* associated with the agent. Arbitrary JSON objects are supported.
*
*
* .google.protobuf.Struct payload = 6;
*/
public com.google.protobuf.Struct getPayload() {
return payload_ == null ? com.google.protobuf.Struct.getDefaultInstance() : payload_;
}
/**
*
* Optional. This field can be used to pass custom data into the webhook
* associated with the agent. Arbitrary JSON objects are supported.
*
*
* .google.protobuf.Struct payload = 6;
*/
public com.google.protobuf.StructOrBuilder getPayloadOrBuilder() {
return getPayload();
}
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 (!getTimeZoneBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, timeZone_);
}
if (geoLocation_ != null) {
output.writeMessage(2, getGeoLocation());
}
for (int i = 0; i < contexts_.size(); i++) {
output.writeMessage(3, contexts_.get(i));
}
if (resetContexts_ != false) {
output.writeBool(4, resetContexts_);
}
for (int i = 0; i < sessionEntityTypes_.size(); i++) {
output.writeMessage(5, sessionEntityTypes_.get(i));
}
if (payload_ != null) {
output.writeMessage(6, getPayload());
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getTimeZoneBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, timeZone_);
}
if (geoLocation_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getGeoLocation());
}
for (int i = 0; i < contexts_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, contexts_.get(i));
}
if (resetContexts_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(4, resetContexts_);
}
for (int i = 0; i < sessionEntityTypes_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, sessionEntityTypes_.get(i));
}
if (payload_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, getPayload());
}
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.QueryParameters)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.v2.QueryParameters other = (com.google.cloud.dialogflow.v2.QueryParameters) obj;
boolean result = true;
result = result && getTimeZone()
.equals(other.getTimeZone());
result = result && (hasGeoLocation() == other.hasGeoLocation());
if (hasGeoLocation()) {
result = result && getGeoLocation()
.equals(other.getGeoLocation());
}
result = result && getContextsList()
.equals(other.getContextsList());
result = result && (getResetContexts()
== other.getResetContexts());
result = result && getSessionEntityTypesList()
.equals(other.getSessionEntityTypesList());
result = result && (hasPayload() == other.hasPayload());
if (hasPayload()) {
result = result && getPayload()
.equals(other.getPayload());
}
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) + TIME_ZONE_FIELD_NUMBER;
hash = (53 * hash) + getTimeZone().hashCode();
if (hasGeoLocation()) {
hash = (37 * hash) + GEO_LOCATION_FIELD_NUMBER;
hash = (53 * hash) + getGeoLocation().hashCode();
}
if (getContextsCount() > 0) {
hash = (37 * hash) + CONTEXTS_FIELD_NUMBER;
hash = (53 * hash) + getContextsList().hashCode();
}
hash = (37 * hash) + RESET_CONTEXTS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getResetContexts());
if (getSessionEntityTypesCount() > 0) {
hash = (37 * hash) + SESSION_ENTITY_TYPES_FIELD_NUMBER;
hash = (53 * hash) + getSessionEntityTypesList().hashCode();
}
if (hasPayload()) {
hash = (37 * hash) + PAYLOAD_FIELD_NUMBER;
hash = (53 * hash) + getPayload().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.v2.QueryParameters parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.QueryParameters 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.QueryParameters parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.QueryParameters 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.QueryParameters parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.QueryParameters 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.QueryParameters parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.QueryParameters 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.QueryParameters parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.QueryParameters 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.QueryParameters 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.QueryParameters 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.QueryParameters 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 the parameters of the conversational query.
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.QueryParameters}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.QueryParameters)
com.google.cloud.dialogflow.v2.QueryParametersOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.cloud.dialogflow.v2.SessionProto.internal_static_google_cloud_dialogflow_v2_QueryParameters_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.SessionProto.internal_static_google_cloud_dialogflow_v2_QueryParameters_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.QueryParameters.class, com.google.cloud.dialogflow.v2.QueryParameters.Builder.class);
}
// Construct using com.google.cloud.dialogflow.v2.QueryParameters.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getContextsFieldBuilder();
getSessionEntityTypesFieldBuilder();
}
}
public Builder clear() {
super.clear();
timeZone_ = "";
if (geoLocationBuilder_ == null) {
geoLocation_ = null;
} else {
geoLocation_ = null;
geoLocationBuilder_ = null;
}
if (contextsBuilder_ == null) {
contexts_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
} else {
contextsBuilder_.clear();
}
resetContexts_ = false;
if (sessionEntityTypesBuilder_ == null) {
sessionEntityTypes_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000010);
} else {
sessionEntityTypesBuilder_.clear();
}
if (payloadBuilder_ == null) {
payload_ = null;
} else {
payload_ = null;
payloadBuilder_ = null;
}
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.cloud.dialogflow.v2.SessionProto.internal_static_google_cloud_dialogflow_v2_QueryParameters_descriptor;
}
public com.google.cloud.dialogflow.v2.QueryParameters getDefaultInstanceForType() {
return com.google.cloud.dialogflow.v2.QueryParameters.getDefaultInstance();
}
public com.google.cloud.dialogflow.v2.QueryParameters build() {
com.google.cloud.dialogflow.v2.QueryParameters result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.google.cloud.dialogflow.v2.QueryParameters buildPartial() {
com.google.cloud.dialogflow.v2.QueryParameters result = new com.google.cloud.dialogflow.v2.QueryParameters(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
result.timeZone_ = timeZone_;
if (geoLocationBuilder_ == null) {
result.geoLocation_ = geoLocation_;
} else {
result.geoLocation_ = geoLocationBuilder_.build();
}
if (contextsBuilder_ == null) {
if (((bitField0_ & 0x00000004) == 0x00000004)) {
contexts_ = java.util.Collections.unmodifiableList(contexts_);
bitField0_ = (bitField0_ & ~0x00000004);
}
result.contexts_ = contexts_;
} else {
result.contexts_ = contextsBuilder_.build();
}
result.resetContexts_ = resetContexts_;
if (sessionEntityTypesBuilder_ == null) {
if (((bitField0_ & 0x00000010) == 0x00000010)) {
sessionEntityTypes_ = java.util.Collections.unmodifiableList(sessionEntityTypes_);
bitField0_ = (bitField0_ & ~0x00000010);
}
result.sessionEntityTypes_ = sessionEntityTypes_;
} else {
result.sessionEntityTypes_ = sessionEntityTypesBuilder_.build();
}
if (payloadBuilder_ == null) {
result.payload_ = payload_;
} else {
result.payload_ = payloadBuilder_.build();
}
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.QueryParameters) {
return mergeFrom((com.google.cloud.dialogflow.v2.QueryParameters)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.dialogflow.v2.QueryParameters other) {
if (other == com.google.cloud.dialogflow.v2.QueryParameters.getDefaultInstance()) return this;
if (!other.getTimeZone().isEmpty()) {
timeZone_ = other.timeZone_;
onChanged();
}
if (other.hasGeoLocation()) {
mergeGeoLocation(other.getGeoLocation());
}
if (contextsBuilder_ == null) {
if (!other.contexts_.isEmpty()) {
if (contexts_.isEmpty()) {
contexts_ = other.contexts_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureContextsIsMutable();
contexts_.addAll(other.contexts_);
}
onChanged();
}
} else {
if (!other.contexts_.isEmpty()) {
if (contextsBuilder_.isEmpty()) {
contextsBuilder_.dispose();
contextsBuilder_ = null;
contexts_ = other.contexts_;
bitField0_ = (bitField0_ & ~0x00000004);
contextsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getContextsFieldBuilder() : null;
} else {
contextsBuilder_.addAllMessages(other.contexts_);
}
}
}
if (other.getResetContexts() != false) {
setResetContexts(other.getResetContexts());
}
if (sessionEntityTypesBuilder_ == null) {
if (!other.sessionEntityTypes_.isEmpty()) {
if (sessionEntityTypes_.isEmpty()) {
sessionEntityTypes_ = other.sessionEntityTypes_;
bitField0_ = (bitField0_ & ~0x00000010);
} else {
ensureSessionEntityTypesIsMutable();
sessionEntityTypes_.addAll(other.sessionEntityTypes_);
}
onChanged();
}
} else {
if (!other.sessionEntityTypes_.isEmpty()) {
if (sessionEntityTypesBuilder_.isEmpty()) {
sessionEntityTypesBuilder_.dispose();
sessionEntityTypesBuilder_ = null;
sessionEntityTypes_ = other.sessionEntityTypes_;
bitField0_ = (bitField0_ & ~0x00000010);
sessionEntityTypesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getSessionEntityTypesFieldBuilder() : null;
} else {
sessionEntityTypesBuilder_.addAllMessages(other.sessionEntityTypes_);
}
}
}
if (other.hasPayload()) {
mergePayload(other.getPayload());
}
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.QueryParameters parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.cloud.dialogflow.v2.QueryParameters) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object timeZone_ = "";
/**
*
* Optional. The time zone of this conversational query from the
* [time zone database](https://www.iana.org/time-zones), e.g.,
* America/New_York, Europe/Paris. If not provided, the time zone specified in
* agent settings is used.
*
*
* string time_zone = 1;
*/
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;
}
}
/**
*
* Optional. The time zone of this conversational query from the
* [time zone database](https://www.iana.org/time-zones), e.g.,
* America/New_York, Europe/Paris. If not provided, the time zone specified in
* agent settings is used.
*
*
* string time_zone = 1;
*/
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;
}
}
/**
*
* Optional. The time zone of this conversational query from the
* [time zone database](https://www.iana.org/time-zones), e.g.,
* America/New_York, Europe/Paris. If not provided, the time zone specified in
* agent settings is used.
*
*
* string time_zone = 1;
*/
public Builder setTimeZone(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
timeZone_ = value;
onChanged();
return this;
}
/**
*
* Optional. The time zone of this conversational query from the
* [time zone database](https://www.iana.org/time-zones), e.g.,
* America/New_York, Europe/Paris. If not provided, the time zone specified in
* agent settings is used.
*
*
* string time_zone = 1;
*/
public Builder clearTimeZone() {
timeZone_ = getDefaultInstance().getTimeZone();
onChanged();
return this;
}
/**
*
* Optional. The time zone of this conversational query from the
* [time zone database](https://www.iana.org/time-zones), e.g.,
* America/New_York, Europe/Paris. If not provided, the time zone specified in
* agent settings is used.
*
*
* string time_zone = 1;
*/
public Builder setTimeZoneBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
timeZone_ = value;
onChanged();
return this;
}
private com.google.type.LatLng geoLocation_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> geoLocationBuilder_;
/**
*
* Optional. The geo location of this conversational query.
*
*
* .google.type.LatLng geo_location = 2;
*/
public boolean hasGeoLocation() {
return geoLocationBuilder_ != null || geoLocation_ != null;
}
/**
*
* Optional. The geo location of this conversational query.
*
*
* .google.type.LatLng geo_location = 2;
*/
public com.google.type.LatLng getGeoLocation() {
if (geoLocationBuilder_ == null) {
return geoLocation_ == null ? com.google.type.LatLng.getDefaultInstance() : geoLocation_;
} else {
return geoLocationBuilder_.getMessage();
}
}
/**
*
* Optional. The geo location of this conversational query.
*
*
* .google.type.LatLng geo_location = 2;
*/
public Builder setGeoLocation(com.google.type.LatLng value) {
if (geoLocationBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
geoLocation_ = value;
onChanged();
} else {
geoLocationBuilder_.setMessage(value);
}
return this;
}
/**
*
* Optional. The geo location of this conversational query.
*
*
* .google.type.LatLng geo_location = 2;
*/
public Builder setGeoLocation(
com.google.type.LatLng.Builder builderForValue) {
if (geoLocationBuilder_ == null) {
geoLocation_ = builderForValue.build();
onChanged();
} else {
geoLocationBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Optional. The geo location of this conversational query.
*
*
* .google.type.LatLng geo_location = 2;
*/
public Builder mergeGeoLocation(com.google.type.LatLng value) {
if (geoLocationBuilder_ == null) {
if (geoLocation_ != null) {
geoLocation_ =
com.google.type.LatLng.newBuilder(geoLocation_).mergeFrom(value).buildPartial();
} else {
geoLocation_ = value;
}
onChanged();
} else {
geoLocationBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Optional. The geo location of this conversational query.
*
*
* .google.type.LatLng geo_location = 2;
*/
public Builder clearGeoLocation() {
if (geoLocationBuilder_ == null) {
geoLocation_ = null;
onChanged();
} else {
geoLocation_ = null;
geoLocationBuilder_ = null;
}
return this;
}
/**
*
* Optional. The geo location of this conversational query.
*
*
* .google.type.LatLng geo_location = 2;
*/
public com.google.type.LatLng.Builder getGeoLocationBuilder() {
onChanged();
return getGeoLocationFieldBuilder().getBuilder();
}
/**
*
* Optional. The geo location of this conversational query.
*
*
* .google.type.LatLng geo_location = 2;
*/
public com.google.type.LatLngOrBuilder getGeoLocationOrBuilder() {
if (geoLocationBuilder_ != null) {
return geoLocationBuilder_.getMessageOrBuilder();
} else {
return geoLocation_ == null ?
com.google.type.LatLng.getDefaultInstance() : geoLocation_;
}
}
/**
*
* Optional. The geo location of this conversational query.
*
*
* .google.type.LatLng geo_location = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder>
getGeoLocationFieldBuilder() {
if (geoLocationBuilder_ == null) {
geoLocationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder>(
getGeoLocation(),
getParentForChildren(),
isClean());
geoLocation_ = null;
}
return geoLocationBuilder_;
}
private java.util.List contexts_ =
java.util.Collections.emptyList();
private void ensureContextsIsMutable() {
if (!((bitField0_ & 0x00000004) == 0x00000004)) {
contexts_ = new java.util.ArrayList(contexts_);
bitField0_ |= 0x00000004;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.v2.Context, com.google.cloud.dialogflow.v2.Context.Builder, com.google.cloud.dialogflow.v2.ContextOrBuilder> contextsBuilder_;
/**
*
* Optional. The collection of contexts to be activated before this query is
* executed.
*
*
* repeated .google.cloud.dialogflow.v2.Context contexts = 3;
*/
public java.util.List getContextsList() {
if (contextsBuilder_ == null) {
return java.util.Collections.unmodifiableList(contexts_);
} else {
return contextsBuilder_.getMessageList();
}
}
/**
*
* Optional. The collection of contexts to be activated before this query is
* executed.
*
*
* repeated .google.cloud.dialogflow.v2.Context contexts = 3;
*/
public int getContextsCount() {
if (contextsBuilder_ == null) {
return contexts_.size();
} else {
return contextsBuilder_.getCount();
}
}
/**
*
* Optional. The collection of contexts to be activated before this query is
* executed.
*
*
* repeated .google.cloud.dialogflow.v2.Context contexts = 3;
*/
public com.google.cloud.dialogflow.v2.Context getContexts(int index) {
if (contextsBuilder_ == null) {
return contexts_.get(index);
} else {
return contextsBuilder_.getMessage(index);
}
}
/**
*
* Optional. The collection of contexts to be activated before this query is
* executed.
*
*
* repeated .google.cloud.dialogflow.v2.Context contexts = 3;
*/
public Builder setContexts(
int index, com.google.cloud.dialogflow.v2.Context value) {
if (contextsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureContextsIsMutable();
contexts_.set(index, value);
onChanged();
} else {
contextsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Optional. The collection of contexts to be activated before this query is
* executed.
*
*
* repeated .google.cloud.dialogflow.v2.Context contexts = 3;
*/
public Builder setContexts(
int index, com.google.cloud.dialogflow.v2.Context.Builder builderForValue) {
if (contextsBuilder_ == null) {
ensureContextsIsMutable();
contexts_.set(index, builderForValue.build());
onChanged();
} else {
contextsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Optional. The collection of contexts to be activated before this query is
* executed.
*
*
* repeated .google.cloud.dialogflow.v2.Context contexts = 3;
*/
public Builder addContexts(com.google.cloud.dialogflow.v2.Context value) {
if (contextsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureContextsIsMutable();
contexts_.add(value);
onChanged();
} else {
contextsBuilder_.addMessage(value);
}
return this;
}
/**
*
* Optional. The collection of contexts to be activated before this query is
* executed.
*
*
* repeated .google.cloud.dialogflow.v2.Context contexts = 3;
*/
public Builder addContexts(
int index, com.google.cloud.dialogflow.v2.Context value) {
if (contextsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureContextsIsMutable();
contexts_.add(index, value);
onChanged();
} else {
contextsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Optional. The collection of contexts to be activated before this query is
* executed.
*
*
* repeated .google.cloud.dialogflow.v2.Context contexts = 3;
*/
public Builder addContexts(
com.google.cloud.dialogflow.v2.Context.Builder builderForValue) {
if (contextsBuilder_ == null) {
ensureContextsIsMutable();
contexts_.add(builderForValue.build());
onChanged();
} else {
contextsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Optional. The collection of contexts to be activated before this query is
* executed.
*
*
* repeated .google.cloud.dialogflow.v2.Context contexts = 3;
*/
public Builder addContexts(
int index, com.google.cloud.dialogflow.v2.Context.Builder builderForValue) {
if (contextsBuilder_ == null) {
ensureContextsIsMutable();
contexts_.add(index, builderForValue.build());
onChanged();
} else {
contextsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Optional. The collection of contexts to be activated before this query is
* executed.
*
*
* repeated .google.cloud.dialogflow.v2.Context contexts = 3;
*/
public Builder addAllContexts(
java.lang.Iterable extends com.google.cloud.dialogflow.v2.Context> values) {
if (contextsBuilder_ == null) {
ensureContextsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, contexts_);
onChanged();
} else {
contextsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Optional. The collection of contexts to be activated before this query is
* executed.
*
*
* repeated .google.cloud.dialogflow.v2.Context contexts = 3;
*/
public Builder clearContexts() {
if (contextsBuilder_ == null) {
contexts_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
} else {
contextsBuilder_.clear();
}
return this;
}
/**
*
* Optional. The collection of contexts to be activated before this query is
* executed.
*
*
* repeated .google.cloud.dialogflow.v2.Context contexts = 3;
*/
public Builder removeContexts(int index) {
if (contextsBuilder_ == null) {
ensureContextsIsMutable();
contexts_.remove(index);
onChanged();
} else {
contextsBuilder_.remove(index);
}
return this;
}
/**
*
* Optional. The collection of contexts to be activated before this query is
* executed.
*
*
* repeated .google.cloud.dialogflow.v2.Context contexts = 3;
*/
public com.google.cloud.dialogflow.v2.Context.Builder getContextsBuilder(
int index) {
return getContextsFieldBuilder().getBuilder(index);
}
/**
*
* Optional. The collection of contexts to be activated before this query is
* executed.
*
*
* repeated .google.cloud.dialogflow.v2.Context contexts = 3;
*/
public com.google.cloud.dialogflow.v2.ContextOrBuilder getContextsOrBuilder(
int index) {
if (contextsBuilder_ == null) {
return contexts_.get(index); } else {
return contextsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Optional. The collection of contexts to be activated before this query is
* executed.
*
*
* repeated .google.cloud.dialogflow.v2.Context contexts = 3;
*/
public java.util.List extends com.google.cloud.dialogflow.v2.ContextOrBuilder>
getContextsOrBuilderList() {
if (contextsBuilder_ != null) {
return contextsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(contexts_);
}
}
/**
*
* Optional. The collection of contexts to be activated before this query is
* executed.
*
*
* repeated .google.cloud.dialogflow.v2.Context contexts = 3;
*/
public com.google.cloud.dialogflow.v2.Context.Builder addContextsBuilder() {
return getContextsFieldBuilder().addBuilder(
com.google.cloud.dialogflow.v2.Context.getDefaultInstance());
}
/**
*
* Optional. The collection of contexts to be activated before this query is
* executed.
*
*
* repeated .google.cloud.dialogflow.v2.Context contexts = 3;
*/
public com.google.cloud.dialogflow.v2.Context.Builder addContextsBuilder(
int index) {
return getContextsFieldBuilder().addBuilder(
index, com.google.cloud.dialogflow.v2.Context.getDefaultInstance());
}
/**
*
* Optional. The collection of contexts to be activated before this query is
* executed.
*
*
* repeated .google.cloud.dialogflow.v2.Context contexts = 3;
*/
public java.util.List
getContextsBuilderList() {
return getContextsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.v2.Context, com.google.cloud.dialogflow.v2.Context.Builder, com.google.cloud.dialogflow.v2.ContextOrBuilder>
getContextsFieldBuilder() {
if (contextsBuilder_ == null) {
contextsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.v2.Context, com.google.cloud.dialogflow.v2.Context.Builder, com.google.cloud.dialogflow.v2.ContextOrBuilder>(
contexts_,
((bitField0_ & 0x00000004) == 0x00000004),
getParentForChildren(),
isClean());
contexts_ = null;
}
return contextsBuilder_;
}
private boolean resetContexts_ ;
/**
*
* Optional. Specifies whether to delete all contexts in the current session
* before the new ones are activated.
*
*
* bool reset_contexts = 4;
*/
public boolean getResetContexts() {
return resetContexts_;
}
/**
*
* Optional. Specifies whether to delete all contexts in the current session
* before the new ones are activated.
*
*
* bool reset_contexts = 4;
*/
public Builder setResetContexts(boolean value) {
resetContexts_ = value;
onChanged();
return this;
}
/**
*
* Optional. Specifies whether to delete all contexts in the current session
* before the new ones are activated.
*
*
* bool reset_contexts = 4;
*/
public Builder clearResetContexts() {
resetContexts_ = false;
onChanged();
return this;
}
private java.util.List sessionEntityTypes_ =
java.util.Collections.emptyList();
private void ensureSessionEntityTypesIsMutable() {
if (!((bitField0_ & 0x00000010) == 0x00000010)) {
sessionEntityTypes_ = new java.util.ArrayList(sessionEntityTypes_);
bitField0_ |= 0x00000010;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.v2.SessionEntityType, com.google.cloud.dialogflow.v2.SessionEntityType.Builder, com.google.cloud.dialogflow.v2.SessionEntityTypeOrBuilder> sessionEntityTypesBuilder_;
/**
*
* Optional. The collection of session entity types to replace or extend
* developer entities with for this query only. The entity synonyms apply
* to all languages.
*
*
* repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 5;
*/
public java.util.List getSessionEntityTypesList() {
if (sessionEntityTypesBuilder_ == null) {
return java.util.Collections.unmodifiableList(sessionEntityTypes_);
} else {
return sessionEntityTypesBuilder_.getMessageList();
}
}
/**
*
* Optional. The collection of session entity types to replace or extend
* developer entities with for this query only. The entity synonyms apply
* to all languages.
*
*
* repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 5;
*/
public int getSessionEntityTypesCount() {
if (sessionEntityTypesBuilder_ == null) {
return sessionEntityTypes_.size();
} else {
return sessionEntityTypesBuilder_.getCount();
}
}
/**
*
* Optional. The collection of session entity types to replace or extend
* developer entities with for this query only. The entity synonyms apply
* to all languages.
*
*
* repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 5;
*/
public com.google.cloud.dialogflow.v2.SessionEntityType getSessionEntityTypes(int index) {
if (sessionEntityTypesBuilder_ == null) {
return sessionEntityTypes_.get(index);
} else {
return sessionEntityTypesBuilder_.getMessage(index);
}
}
/**
*
* Optional. The collection of session entity types to replace or extend
* developer entities with for this query only. The entity synonyms apply
* to all languages.
*
*
* repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 5;
*/
public Builder setSessionEntityTypes(
int index, com.google.cloud.dialogflow.v2.SessionEntityType value) {
if (sessionEntityTypesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSessionEntityTypesIsMutable();
sessionEntityTypes_.set(index, value);
onChanged();
} else {
sessionEntityTypesBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Optional. The collection of session entity types to replace or extend
* developer entities with for this query only. The entity synonyms apply
* to all languages.
*
*
* repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 5;
*/
public Builder setSessionEntityTypes(
int index, com.google.cloud.dialogflow.v2.SessionEntityType.Builder builderForValue) {
if (sessionEntityTypesBuilder_ == null) {
ensureSessionEntityTypesIsMutable();
sessionEntityTypes_.set(index, builderForValue.build());
onChanged();
} else {
sessionEntityTypesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Optional. The collection of session entity types to replace or extend
* developer entities with for this query only. The entity synonyms apply
* to all languages.
*
*
* repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 5;
*/
public Builder addSessionEntityTypes(com.google.cloud.dialogflow.v2.SessionEntityType value) {
if (sessionEntityTypesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSessionEntityTypesIsMutable();
sessionEntityTypes_.add(value);
onChanged();
} else {
sessionEntityTypesBuilder_.addMessage(value);
}
return this;
}
/**
*
* Optional. The collection of session entity types to replace or extend
* developer entities with for this query only. The entity synonyms apply
* to all languages.
*
*
* repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 5;
*/
public Builder addSessionEntityTypes(
int index, com.google.cloud.dialogflow.v2.SessionEntityType value) {
if (sessionEntityTypesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSessionEntityTypesIsMutable();
sessionEntityTypes_.add(index, value);
onChanged();
} else {
sessionEntityTypesBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Optional. The collection of session entity types to replace or extend
* developer entities with for this query only. The entity synonyms apply
* to all languages.
*
*
* repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 5;
*/
public Builder addSessionEntityTypes(
com.google.cloud.dialogflow.v2.SessionEntityType.Builder builderForValue) {
if (sessionEntityTypesBuilder_ == null) {
ensureSessionEntityTypesIsMutable();
sessionEntityTypes_.add(builderForValue.build());
onChanged();
} else {
sessionEntityTypesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Optional. The collection of session entity types to replace or extend
* developer entities with for this query only. The entity synonyms apply
* to all languages.
*
*
* repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 5;
*/
public Builder addSessionEntityTypes(
int index, com.google.cloud.dialogflow.v2.SessionEntityType.Builder builderForValue) {
if (sessionEntityTypesBuilder_ == null) {
ensureSessionEntityTypesIsMutable();
sessionEntityTypes_.add(index, builderForValue.build());
onChanged();
} else {
sessionEntityTypesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Optional. The collection of session entity types to replace or extend
* developer entities with for this query only. The entity synonyms apply
* to all languages.
*
*
* repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 5;
*/
public Builder addAllSessionEntityTypes(
java.lang.Iterable extends com.google.cloud.dialogflow.v2.SessionEntityType> values) {
if (sessionEntityTypesBuilder_ == null) {
ensureSessionEntityTypesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, sessionEntityTypes_);
onChanged();
} else {
sessionEntityTypesBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Optional. The collection of session entity types to replace or extend
* developer entities with for this query only. The entity synonyms apply
* to all languages.
*
*
* repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 5;
*/
public Builder clearSessionEntityTypes() {
if (sessionEntityTypesBuilder_ == null) {
sessionEntityTypes_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000010);
onChanged();
} else {
sessionEntityTypesBuilder_.clear();
}
return this;
}
/**
*
* Optional. The collection of session entity types to replace or extend
* developer entities with for this query only. The entity synonyms apply
* to all languages.
*
*
* repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 5;
*/
public Builder removeSessionEntityTypes(int index) {
if (sessionEntityTypesBuilder_ == null) {
ensureSessionEntityTypesIsMutable();
sessionEntityTypes_.remove(index);
onChanged();
} else {
sessionEntityTypesBuilder_.remove(index);
}
return this;
}
/**
*
* Optional. The collection of session entity types to replace or extend
* developer entities with for this query only. The entity synonyms apply
* to all languages.
*
*
* repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 5;
*/
public com.google.cloud.dialogflow.v2.SessionEntityType.Builder getSessionEntityTypesBuilder(
int index) {
return getSessionEntityTypesFieldBuilder().getBuilder(index);
}
/**
*
* Optional. The collection of session entity types to replace or extend
* developer entities with for this query only. The entity synonyms apply
* to all languages.
*
*
* repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 5;
*/
public com.google.cloud.dialogflow.v2.SessionEntityTypeOrBuilder getSessionEntityTypesOrBuilder(
int index) {
if (sessionEntityTypesBuilder_ == null) {
return sessionEntityTypes_.get(index); } else {
return sessionEntityTypesBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Optional. The collection of session entity types to replace or extend
* developer entities with for this query only. The entity synonyms apply
* to all languages.
*
*
* repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 5;
*/
public java.util.List extends com.google.cloud.dialogflow.v2.SessionEntityTypeOrBuilder>
getSessionEntityTypesOrBuilderList() {
if (sessionEntityTypesBuilder_ != null) {
return sessionEntityTypesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(sessionEntityTypes_);
}
}
/**
*
* Optional. The collection of session entity types to replace or extend
* developer entities with for this query only. The entity synonyms apply
* to all languages.
*
*
* repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 5;
*/
public com.google.cloud.dialogflow.v2.SessionEntityType.Builder addSessionEntityTypesBuilder() {
return getSessionEntityTypesFieldBuilder().addBuilder(
com.google.cloud.dialogflow.v2.SessionEntityType.getDefaultInstance());
}
/**
*
* Optional. The collection of session entity types to replace or extend
* developer entities with for this query only. The entity synonyms apply
* to all languages.
*
*
* repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 5;
*/
public com.google.cloud.dialogflow.v2.SessionEntityType.Builder addSessionEntityTypesBuilder(
int index) {
return getSessionEntityTypesFieldBuilder().addBuilder(
index, com.google.cloud.dialogflow.v2.SessionEntityType.getDefaultInstance());
}
/**
*
* Optional. The collection of session entity types to replace or extend
* developer entities with for this query only. The entity synonyms apply
* to all languages.
*
*
* repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 5;
*/
public java.util.List
getSessionEntityTypesBuilderList() {
return getSessionEntityTypesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.v2.SessionEntityType, com.google.cloud.dialogflow.v2.SessionEntityType.Builder, com.google.cloud.dialogflow.v2.SessionEntityTypeOrBuilder>
getSessionEntityTypesFieldBuilder() {
if (sessionEntityTypesBuilder_ == null) {
sessionEntityTypesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.v2.SessionEntityType, com.google.cloud.dialogflow.v2.SessionEntityType.Builder, com.google.cloud.dialogflow.v2.SessionEntityTypeOrBuilder>(
sessionEntityTypes_,
((bitField0_ & 0x00000010) == 0x00000010),
getParentForChildren(),
isClean());
sessionEntityTypes_ = null;
}
return sessionEntityTypesBuilder_;
}
private com.google.protobuf.Struct payload_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> payloadBuilder_;
/**
*
* Optional. This field can be used to pass custom data into the webhook
* associated with the agent. Arbitrary JSON objects are supported.
*
*
* .google.protobuf.Struct payload = 6;
*/
public boolean hasPayload() {
return payloadBuilder_ != null || payload_ != null;
}
/**
*
* Optional. This field can be used to pass custom data into the webhook
* associated with the agent. Arbitrary JSON objects are supported.
*
*
* .google.protobuf.Struct payload = 6;
*/
public com.google.protobuf.Struct getPayload() {
if (payloadBuilder_ == null) {
return payload_ == null ? com.google.protobuf.Struct.getDefaultInstance() : payload_;
} else {
return payloadBuilder_.getMessage();
}
}
/**
*
* Optional. This field can be used to pass custom data into the webhook
* associated with the agent. Arbitrary JSON objects are supported.
*
*
* .google.protobuf.Struct payload = 6;
*/
public Builder setPayload(com.google.protobuf.Struct value) {
if (payloadBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
payload_ = value;
onChanged();
} else {
payloadBuilder_.setMessage(value);
}
return this;
}
/**
*
* Optional. This field can be used to pass custom data into the webhook
* associated with the agent. Arbitrary JSON objects are supported.
*
*
* .google.protobuf.Struct payload = 6;
*/
public Builder setPayload(
com.google.protobuf.Struct.Builder builderForValue) {
if (payloadBuilder_ == null) {
payload_ = builderForValue.build();
onChanged();
} else {
payloadBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Optional. This field can be used to pass custom data into the webhook
* associated with the agent. Arbitrary JSON objects are supported.
*
*
* .google.protobuf.Struct payload = 6;
*/
public Builder mergePayload(com.google.protobuf.Struct value) {
if (payloadBuilder_ == null) {
if (payload_ != null) {
payload_ =
com.google.protobuf.Struct.newBuilder(payload_).mergeFrom(value).buildPartial();
} else {
payload_ = value;
}
onChanged();
} else {
payloadBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Optional. This field can be used to pass custom data into the webhook
* associated with the agent. Arbitrary JSON objects are supported.
*
*
* .google.protobuf.Struct payload = 6;
*/
public Builder clearPayload() {
if (payloadBuilder_ == null) {
payload_ = null;
onChanged();
} else {
payload_ = null;
payloadBuilder_ = null;
}
return this;
}
/**
*
* Optional. This field can be used to pass custom data into the webhook
* associated with the agent. Arbitrary JSON objects are supported.
*
*
* .google.protobuf.Struct payload = 6;
*/
public com.google.protobuf.Struct.Builder getPayloadBuilder() {
onChanged();
return getPayloadFieldBuilder().getBuilder();
}
/**
*
* Optional. This field can be used to pass custom data into the webhook
* associated with the agent. Arbitrary JSON objects are supported.
*
*
* .google.protobuf.Struct payload = 6;
*/
public com.google.protobuf.StructOrBuilder getPayloadOrBuilder() {
if (payloadBuilder_ != null) {
return payloadBuilder_.getMessageOrBuilder();
} else {
return payload_ == null ?
com.google.protobuf.Struct.getDefaultInstance() : payload_;
}
}
/**
*
* Optional. This field can be used to pass custom data into the webhook
* associated with the agent. Arbitrary JSON objects are supported.
*
*
* .google.protobuf.Struct payload = 6;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>
getPayloadFieldBuilder() {
if (payloadBuilder_ == null) {
payloadBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>(
getPayload(),
getParentForChildren(),
isClean());
payload_ = null;
}
return payloadBuilder_;
}
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.QueryParameters)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.QueryParameters)
private static final com.google.cloud.dialogflow.v2.QueryParameters DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2.QueryParameters();
}
public static com.google.cloud.dialogflow.v2.QueryParameters getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public QueryParameters parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new QueryParameters(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.QueryParameters getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}