Package com.google.cloud.dialogflow.v2
Class EventInput.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessageV3.Builder<EventInput.Builder>
-
- com.google.cloud.dialogflow.v2.EventInput.Builder
-
- All Implemented Interfaces:
EventInputOrBuilder
,com.google.protobuf.Message.Builder
,com.google.protobuf.MessageLite.Builder
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,Cloneable
- Enclosing class:
- EventInput
public static final class EventInput.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<EventInput.Builder> implements EventInputOrBuilder
Events allow for matching intents by event name instead of the natural language input. For instance, input `<event: { name: "welcome_event", parameters: { name: "Sam" } }>` can trigger a personalized welcome response. The parameter `name` may be used by the agent in the response: `"Hello #welcome_event.name! What can I do for you today?"`.
Protobuf typegoogle.cloud.dialogflow.v2.EventInput
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description EventInput.Builder
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
EventInput
build()
EventInput
buildPartial()
EventInput.Builder
clear()
EventInput.Builder
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
EventInput.Builder
clearLanguageCode()
Required.EventInput.Builder
clearName()
Required.EventInput.Builder
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
EventInput.Builder
clearParameters()
The collection of parameters associated with the event.EventInput.Builder
clone()
EventInput
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
com.google.protobuf.Descriptors.Descriptor
getDescriptorForType()
String
getLanguageCode()
Required.com.google.protobuf.ByteString
getLanguageCodeBytes()
Required.String
getName()
Required.com.google.protobuf.ByteString
getNameBytes()
Required.com.google.protobuf.Struct
getParameters()
The collection of parameters associated with the event.com.google.protobuf.Struct.Builder
getParametersBuilder()
The collection of parameters associated with the event.com.google.protobuf.StructOrBuilder
getParametersOrBuilder()
The collection of parameters associated with the event.boolean
hasParameters()
The collection of parameters associated with the event.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
EventInput.Builder
mergeFrom(EventInput other)
EventInput.Builder
mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
EventInput.Builder
mergeFrom(com.google.protobuf.Message other)
EventInput.Builder
mergeParameters(com.google.protobuf.Struct value)
The collection of parameters associated with the event.EventInput.Builder
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
EventInput.Builder
setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
EventInput.Builder
setLanguageCode(String value)
Required.EventInput.Builder
setLanguageCodeBytes(com.google.protobuf.ByteString value)
Required.EventInput.Builder
setName(String value)
Required.EventInput.Builder
setNameBytes(com.google.protobuf.ByteString value)
Required.EventInput.Builder
setParameters(com.google.protobuf.Struct value)
The collection of parameters associated with the event.EventInput.Builder
setParameters(com.google.protobuf.Struct.Builder builderForValue)
The collection of parameters associated with the event.EventInput.Builder
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
EventInput.Builder
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<EventInput.Builder>
-
clear
public EventInput.Builder clear()
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.Builder<EventInput.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessageV3.Builder<EventInput.Builder>
-
getDefaultInstanceForType
public EventInput getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
public EventInput build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public EventInput buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
public EventInput.Builder clone()
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in classcom.google.protobuf.GeneratedMessageV3.Builder<EventInput.Builder>
-
setField
public EventInput.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<EventInput.Builder>
-
clearField
public EventInput.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<EventInput.Builder>
-
clearOneof
public EventInput.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in classcom.google.protobuf.GeneratedMessageV3.Builder<EventInput.Builder>
-
setRepeatedField
public EventInput.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<EventInput.Builder>
-
addRepeatedField
public EventInput.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<EventInput.Builder>
-
mergeFrom
public EventInput.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<EventInput.Builder>
-
mergeFrom
public EventInput.Builder mergeFrom(EventInput other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3.Builder<EventInput.Builder>
-
mergeFrom
public EventInput.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<EventInput.Builder>
- Throws:
IOException
-
getName
public String getName()
Required. The unique identifier of the event.
string name = 1 [(.google.api.field_behavior) = REQUIRED];
- Specified by:
getName
in interfaceEventInputOrBuilder
- Returns:
- The name.
-
getNameBytes
public com.google.protobuf.ByteString getNameBytes()
Required. The unique identifier of the event.
string name = 1 [(.google.api.field_behavior) = REQUIRED];
- Specified by:
getNameBytes
in interfaceEventInputOrBuilder
- Returns:
- The bytes for name.
-
setName
public EventInput.Builder setName(String value)
Required. The unique identifier of the event.
string name = 1 [(.google.api.field_behavior) = REQUIRED];
- Parameters:
value
- The name to set.- Returns:
- This builder for chaining.
-
clearName
public EventInput.Builder clearName()
Required. The unique identifier of the event.
string name = 1 [(.google.api.field_behavior) = REQUIRED];
- Returns:
- This builder for chaining.
-
setNameBytes
public EventInput.Builder setNameBytes(com.google.protobuf.ByteString value)
Required. The unique identifier of the event.
string name = 1 [(.google.api.field_behavior) = REQUIRED];
- Parameters:
value
- The bytes for name to set.- Returns:
- This builder for chaining.
-
hasParameters
public boolean hasParameters()
The collection of parameters associated with the event. Depending on your protocol or client library language, this is a map, associative array, symbol table, dictionary, or JSON object composed of a collection of (MapKey, MapValue) pairs: * MapKey type: string * MapKey value: parameter name * MapValue type: If parameter's entity type is a composite entity then use map, otherwise, depending on the parameter value type, it could be one of string, number, boolean, null, list or map. * MapValue value: If parameter's entity type is a composite entity then use map from composite entity property names to property values, otherwise, use parameter value.
.google.protobuf.Struct parameters = 2;
- Specified by:
hasParameters
in interfaceEventInputOrBuilder
- Returns:
- Whether the parameters field is set.
-
getParameters
public com.google.protobuf.Struct getParameters()
The collection of parameters associated with the event. Depending on your protocol or client library language, this is a map, associative array, symbol table, dictionary, or JSON object composed of a collection of (MapKey, MapValue) pairs: * MapKey type: string * MapKey value: parameter name * MapValue type: If parameter's entity type is a composite entity then use map, otherwise, depending on the parameter value type, it could be one of string, number, boolean, null, list or map. * MapValue value: If parameter's entity type is a composite entity then use map from composite entity property names to property values, otherwise, use parameter value.
.google.protobuf.Struct parameters = 2;
- Specified by:
getParameters
in interfaceEventInputOrBuilder
- Returns:
- The parameters.
-
setParameters
public EventInput.Builder setParameters(com.google.protobuf.Struct value)
The collection of parameters associated with the event. Depending on your protocol or client library language, this is a map, associative array, symbol table, dictionary, or JSON object composed of a collection of (MapKey, MapValue) pairs: * MapKey type: string * MapKey value: parameter name * MapValue type: If parameter's entity type is a composite entity then use map, otherwise, depending on the parameter value type, it could be one of string, number, boolean, null, list or map. * MapValue value: If parameter's entity type is a composite entity then use map from composite entity property names to property values, otherwise, use parameter value.
.google.protobuf.Struct parameters = 2;
-
setParameters
public EventInput.Builder setParameters(com.google.protobuf.Struct.Builder builderForValue)
The collection of parameters associated with the event. Depending on your protocol or client library language, this is a map, associative array, symbol table, dictionary, or JSON object composed of a collection of (MapKey, MapValue) pairs: * MapKey type: string * MapKey value: parameter name * MapValue type: If parameter's entity type is a composite entity then use map, otherwise, depending on the parameter value type, it could be one of string, number, boolean, null, list or map. * MapValue value: If parameter's entity type is a composite entity then use map from composite entity property names to property values, otherwise, use parameter value.
.google.protobuf.Struct parameters = 2;
-
mergeParameters
public EventInput.Builder mergeParameters(com.google.protobuf.Struct value)
The collection of parameters associated with the event. Depending on your protocol or client library language, this is a map, associative array, symbol table, dictionary, or JSON object composed of a collection of (MapKey, MapValue) pairs: * MapKey type: string * MapKey value: parameter name * MapValue type: If parameter's entity type is a composite entity then use map, otherwise, depending on the parameter value type, it could be one of string, number, boolean, null, list or map. * MapValue value: If parameter's entity type is a composite entity then use map from composite entity property names to property values, otherwise, use parameter value.
.google.protobuf.Struct parameters = 2;
-
clearParameters
public EventInput.Builder clearParameters()
The collection of parameters associated with the event. Depending on your protocol or client library language, this is a map, associative array, symbol table, dictionary, or JSON object composed of a collection of (MapKey, MapValue) pairs: * MapKey type: string * MapKey value: parameter name * MapValue type: If parameter's entity type is a composite entity then use map, otherwise, depending on the parameter value type, it could be one of string, number, boolean, null, list or map. * MapValue value: If parameter's entity type is a composite entity then use map from composite entity property names to property values, otherwise, use parameter value.
.google.protobuf.Struct parameters = 2;
-
getParametersBuilder
public com.google.protobuf.Struct.Builder getParametersBuilder()
The collection of parameters associated with the event. Depending on your protocol or client library language, this is a map, associative array, symbol table, dictionary, or JSON object composed of a collection of (MapKey, MapValue) pairs: * MapKey type: string * MapKey value: parameter name * MapValue type: If parameter's entity type is a composite entity then use map, otherwise, depending on the parameter value type, it could be one of string, number, boolean, null, list or map. * MapValue value: If parameter's entity type is a composite entity then use map from composite entity property names to property values, otherwise, use parameter value.
.google.protobuf.Struct parameters = 2;
-
getParametersOrBuilder
public com.google.protobuf.StructOrBuilder getParametersOrBuilder()
The collection of parameters associated with the event. Depending on your protocol or client library language, this is a map, associative array, symbol table, dictionary, or JSON object composed of a collection of (MapKey, MapValue) pairs: * MapKey type: string * MapKey value: parameter name * MapValue type: If parameter's entity type is a composite entity then use map, otherwise, depending on the parameter value type, it could be one of string, number, boolean, null, list or map. * MapValue value: If parameter's entity type is a composite entity then use map from composite entity property names to property values, otherwise, use parameter value.
.google.protobuf.Struct parameters = 2;
- Specified by:
getParametersOrBuilder
in interfaceEventInputOrBuilder
-
getLanguageCode
public String getLanguageCode()
Required. The language of this query. See [Language Support](https://cloud.google.com/dialogflow/docs/reference/language) for a list of the currently supported language codes. Note that queries in the same session do not necessarily need to specify the same language. This field is ignored when used in the context of a [WebhookResponse.followup_event_input][google.cloud.dialogflow.v2.WebhookResponse.followup_event_input] field, because the language was already defined in the originating detect intent request.
string language_code = 3 [(.google.api.field_behavior) = REQUIRED];
- Specified by:
getLanguageCode
in interfaceEventInputOrBuilder
- Returns:
- The languageCode.
-
getLanguageCodeBytes
public com.google.protobuf.ByteString getLanguageCodeBytes()
Required. The language of this query. See [Language Support](https://cloud.google.com/dialogflow/docs/reference/language) for a list of the currently supported language codes. Note that queries in the same session do not necessarily need to specify the same language. This field is ignored when used in the context of a [WebhookResponse.followup_event_input][google.cloud.dialogflow.v2.WebhookResponse.followup_event_input] field, because the language was already defined in the originating detect intent request.
string language_code = 3 [(.google.api.field_behavior) = REQUIRED];
- Specified by:
getLanguageCodeBytes
in interfaceEventInputOrBuilder
- Returns:
- The bytes for languageCode.
-
setLanguageCode
public EventInput.Builder setLanguageCode(String value)
Required. The language of this query. See [Language Support](https://cloud.google.com/dialogflow/docs/reference/language) for a list of the currently supported language codes. Note that queries in the same session do not necessarily need to specify the same language. This field is ignored when used in the context of a [WebhookResponse.followup_event_input][google.cloud.dialogflow.v2.WebhookResponse.followup_event_input] field, because the language was already defined in the originating detect intent request.
string language_code = 3 [(.google.api.field_behavior) = REQUIRED];
- Parameters:
value
- The languageCode to set.- Returns:
- This builder for chaining.
-
clearLanguageCode
public EventInput.Builder clearLanguageCode()
Required. The language of this query. See [Language Support](https://cloud.google.com/dialogflow/docs/reference/language) for a list of the currently supported language codes. Note that queries in the same session do not necessarily need to specify the same language. This field is ignored when used in the context of a [WebhookResponse.followup_event_input][google.cloud.dialogflow.v2.WebhookResponse.followup_event_input] field, because the language was already defined in the originating detect intent request.
string language_code = 3 [(.google.api.field_behavior) = REQUIRED];
- Returns:
- This builder for chaining.
-
setLanguageCodeBytes
public EventInput.Builder setLanguageCodeBytes(com.google.protobuf.ByteString value)
Required. The language of this query. See [Language Support](https://cloud.google.com/dialogflow/docs/reference/language) for a list of the currently supported language codes. Note that queries in the same session do not necessarily need to specify the same language. This field is ignored when used in the context of a [WebhookResponse.followup_event_input][google.cloud.dialogflow.v2.WebhookResponse.followup_event_input] field, because the language was already defined in the originating detect intent request.
string language_code = 3 [(.google.api.field_behavior) = REQUIRED];
- Parameters:
value
- The bytes for languageCode to set.- Returns:
- This builder for chaining.
-
setUnknownFields
public final EventInput.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<EventInput.Builder>
-
mergeUnknownFields
public final EventInput.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<EventInput.Builder>
-
-