Class Fulfillment
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite
-
- com.google.protobuf.AbstractMessage
-
- com.google.protobuf.GeneratedMessageV3
-
- com.google.cloud.dialogflow.cx.v3.Fulfillment
-
- All Implemented Interfaces:
FulfillmentOrBuilder,com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Serializable
public final class Fulfillment extends com.google.protobuf.GeneratedMessageV3 implements FulfillmentOrBuilder
A fulfillment can do one or more of the following actions at the same time: * Generate rich message responses. * Set parameter values. * Call the webhook. Fulfillments can be called at various stages in the [Page][google.cloud.dialogflow.cx.v3.Page] or [Form][google.cloud.dialogflow.cx.v3.Form] lifecycle. For example, when a [DetectIntentRequest][google.cloud.dialogflow.cx.v3.DetectIntentRequest] drives a session to enter a new page, the page's entry fulfillment can add a static response to the [QueryResult][google.cloud.dialogflow.cx.v3.QueryResult] in the returning [DetectIntentResponse][google.cloud.dialogflow.cx.v3.DetectIntentResponse], call the webhook (for example, to load user data from a database), or both.
Protobuf typegoogle.cloud.dialogflow.cx.v3.Fulfillment- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFulfillment.BuilderA fulfillment can do one or more of the following actions at the same time: * Generate rich message responses.static classFulfillment.ConditionalCasesA list of cascading if-else conditions.static interfaceFulfillment.ConditionalCasesOrBuilderstatic classFulfillment.SetParameterActionSetting a parameter value.static interfaceFulfillment.SetParameterActionOrBuilder-
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
-
-
Field Summary
Fields Modifier and Type Field Description static intCONDITIONAL_CASES_FIELD_NUMBERstatic intMESSAGES_FIELD_NUMBERstatic intRETURN_PARTIAL_RESPONSES_FIELD_NUMBERstatic intSET_PARAMETER_ACTIONS_FIELD_NUMBERstatic intTAG_FIELD_NUMBERstatic intWEBHOOK_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)Fulfillment.ConditionalCasesgetConditionalCases(int index)Conditional cases for this fulfillment.intgetConditionalCasesCount()Conditional cases for this fulfillment.List<Fulfillment.ConditionalCases>getConditionalCasesList()Conditional cases for this fulfillment.Fulfillment.ConditionalCasesOrBuildergetConditionalCasesOrBuilder(int index)Conditional cases for this fulfillment.List<? extends Fulfillment.ConditionalCasesOrBuilder>getConditionalCasesOrBuilderList()Conditional cases for this fulfillment.static FulfillmentgetDefaultInstance()FulfillmentgetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()ResponseMessagegetMessages(int index)The list of rich message responses to present to the user.intgetMessagesCount()The list of rich message responses to present to the user.List<ResponseMessage>getMessagesList()The list of rich message responses to present to the user.ResponseMessageOrBuildergetMessagesOrBuilder(int index)The list of rich message responses to present to the user.List<? extends ResponseMessageOrBuilder>getMessagesOrBuilderList()The list of rich message responses to present to the user.com.google.protobuf.Parser<Fulfillment>getParserForType()booleangetReturnPartialResponses()Whether Dialogflow should return currently queued fulfillment response messages in streaming APIs.intgetSerializedSize()Fulfillment.SetParameterActiongetSetParameterActions(int index)Set parameter values before executing the webhook.intgetSetParameterActionsCount()Set parameter values before executing the webhook.List<Fulfillment.SetParameterAction>getSetParameterActionsList()Set parameter values before executing the webhook.Fulfillment.SetParameterActionOrBuildergetSetParameterActionsOrBuilder(int index)Set parameter values before executing the webhook.List<? extends Fulfillment.SetParameterActionOrBuilder>getSetParameterActionsOrBuilderList()Set parameter values before executing the webhook.StringgetTag()The value of this field will be populated in the [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest] `fulfillmentInfo.tag` field by Dialogflow when the associated webhook is called.com.google.protobuf.ByteStringgetTagBytes()The value of this field will be populated in the [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest] `fulfillmentInfo.tag` field by Dialogflow when the associated webhook is called.StringgetWebhook()The webhook to call.com.google.protobuf.ByteStringgetWebhookBytes()The webhook to call.inthashCode()protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()static Fulfillment.BuildernewBuilder()static Fulfillment.BuildernewBuilder(Fulfillment prototype)Fulfillment.BuildernewBuilderForType()protected Fulfillment.BuildernewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)protected ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)static FulfillmentparseDelimitedFrom(InputStream input)static FulfillmentparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static FulfillmentparseFrom(byte[] data)static FulfillmentparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static FulfillmentparseFrom(com.google.protobuf.ByteString data)static FulfillmentparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static FulfillmentparseFrom(com.google.protobuf.CodedInputStream input)static FulfillmentparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static FulfillmentparseFrom(InputStream input)static FulfillmentparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static FulfillmentparseFrom(ByteBuffer data)static FulfillmentparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static com.google.protobuf.Parser<Fulfillment>parser()Fulfillment.BuildertoBuilder()voidwriteTo(com.google.protobuf.CodedOutputStream output)-
Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
-
Methods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
MESSAGES_FIELD_NUMBER
public static final int MESSAGES_FIELD_NUMBER
- See Also:
- Constant Field Values
-
WEBHOOK_FIELD_NUMBER
public static final int WEBHOOK_FIELD_NUMBER
- See Also:
- Constant Field Values
-
RETURN_PARTIAL_RESPONSES_FIELD_NUMBER
public static final int RETURN_PARTIAL_RESPONSES_FIELD_NUMBER
- See Also:
- Constant Field Values
-
TAG_FIELD_NUMBER
public static final int TAG_FIELD_NUMBER
- See Also:
- Constant Field Values
-
SET_PARAMETER_ACTIONS_FIELD_NUMBER
public static final int SET_PARAMETER_ACTIONS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
CONDITIONAL_CASES_FIELD_NUMBER
public static final int CONDITIONAL_CASES_FIELD_NUMBER
- See Also:
- Constant Field Values
-
-
Method Detail
-
newInstance
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
- Overrides:
newInstancein classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3
-
getMessagesList
public List<ResponseMessage> getMessagesList()
The list of rich message responses to present to the user.
repeated .google.cloud.dialogflow.cx.v3.ResponseMessage messages = 1;- Specified by:
getMessagesListin interfaceFulfillmentOrBuilder
-
getMessagesOrBuilderList
public List<? extends ResponseMessageOrBuilder> getMessagesOrBuilderList()
The list of rich message responses to present to the user.
repeated .google.cloud.dialogflow.cx.v3.ResponseMessage messages = 1;- Specified by:
getMessagesOrBuilderListin interfaceFulfillmentOrBuilder
-
getMessagesCount
public int getMessagesCount()
The list of rich message responses to present to the user.
repeated .google.cloud.dialogflow.cx.v3.ResponseMessage messages = 1;- Specified by:
getMessagesCountin interfaceFulfillmentOrBuilder
-
getMessages
public ResponseMessage getMessages(int index)
The list of rich message responses to present to the user.
repeated .google.cloud.dialogflow.cx.v3.ResponseMessage messages = 1;- Specified by:
getMessagesin interfaceFulfillmentOrBuilder
-
getMessagesOrBuilder
public ResponseMessageOrBuilder getMessagesOrBuilder(int index)
The list of rich message responses to present to the user.
repeated .google.cloud.dialogflow.cx.v3.ResponseMessage messages = 1;- Specified by:
getMessagesOrBuilderin interfaceFulfillmentOrBuilder
-
getWebhook
public String getWebhook()
The webhook to call. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/webhooks/<Webhook ID>`.
string webhook = 2 [(.google.api.resource_reference) = { ... }- Specified by:
getWebhookin interfaceFulfillmentOrBuilder- Returns:
- The webhook.
-
getWebhookBytes
public com.google.protobuf.ByteString getWebhookBytes()
The webhook to call. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/webhooks/<Webhook ID>`.
string webhook = 2 [(.google.api.resource_reference) = { ... }- Specified by:
getWebhookBytesin interfaceFulfillmentOrBuilder- Returns:
- The bytes for webhook.
-
getReturnPartialResponses
public boolean getReturnPartialResponses()
Whether Dialogflow should return currently queued fulfillment response messages in streaming APIs. If a webhook is specified, it happens before Dialogflow invokes webhook. Warning: 1) This flag only affects streaming API. Responses are still queued and returned once in non-streaming API. 2) The flag can be enabled in any fulfillment but only the first 3 partial responses will be returned. You may only want to apply it to fulfillments that have slow webhooks.
bool return_partial_responses = 8;- Specified by:
getReturnPartialResponsesin interfaceFulfillmentOrBuilder- Returns:
- The returnPartialResponses.
-
getTag
public String getTag()
The value of this field will be populated in the [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest] `fulfillmentInfo.tag` field by Dialogflow when the associated webhook is called. The tag is typically used by the webhook service to identify which fulfillment is being called, but it could be used for other purposes. This field is required if `webhook` is specified.
string tag = 3;- Specified by:
getTagin interfaceFulfillmentOrBuilder- Returns:
- The tag.
-
getTagBytes
public com.google.protobuf.ByteString getTagBytes()
The value of this field will be populated in the [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest] `fulfillmentInfo.tag` field by Dialogflow when the associated webhook is called. The tag is typically used by the webhook service to identify which fulfillment is being called, but it could be used for other purposes. This field is required if `webhook` is specified.
string tag = 3;- Specified by:
getTagBytesin interfaceFulfillmentOrBuilder- Returns:
- The bytes for tag.
-
getSetParameterActionsList
public List<Fulfillment.SetParameterAction> getSetParameterActionsList()
Set parameter values before executing the webhook.
repeated .google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction set_parameter_actions = 4;- Specified by:
getSetParameterActionsListin interfaceFulfillmentOrBuilder
-
getSetParameterActionsOrBuilderList
public List<? extends Fulfillment.SetParameterActionOrBuilder> getSetParameterActionsOrBuilderList()
Set parameter values before executing the webhook.
repeated .google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction set_parameter_actions = 4;- Specified by:
getSetParameterActionsOrBuilderListin interfaceFulfillmentOrBuilder
-
getSetParameterActionsCount
public int getSetParameterActionsCount()
Set parameter values before executing the webhook.
repeated .google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction set_parameter_actions = 4;- Specified by:
getSetParameterActionsCountin interfaceFulfillmentOrBuilder
-
getSetParameterActions
public Fulfillment.SetParameterAction getSetParameterActions(int index)
Set parameter values before executing the webhook.
repeated .google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction set_parameter_actions = 4;- Specified by:
getSetParameterActionsin interfaceFulfillmentOrBuilder
-
getSetParameterActionsOrBuilder
public Fulfillment.SetParameterActionOrBuilder getSetParameterActionsOrBuilder(int index)
Set parameter values before executing the webhook.
repeated .google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction set_parameter_actions = 4;- Specified by:
getSetParameterActionsOrBuilderin interfaceFulfillmentOrBuilder
-
getConditionalCasesList
public List<Fulfillment.ConditionalCases> getConditionalCasesList()
Conditional cases for this fulfillment.
repeated .google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases conditional_cases = 5;- Specified by:
getConditionalCasesListin interfaceFulfillmentOrBuilder
-
getConditionalCasesOrBuilderList
public List<? extends Fulfillment.ConditionalCasesOrBuilder> getConditionalCasesOrBuilderList()
Conditional cases for this fulfillment.
repeated .google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases conditional_cases = 5;- Specified by:
getConditionalCasesOrBuilderListin interfaceFulfillmentOrBuilder
-
getConditionalCasesCount
public int getConditionalCasesCount()
Conditional cases for this fulfillment.
repeated .google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases conditional_cases = 5;- Specified by:
getConditionalCasesCountin interfaceFulfillmentOrBuilder
-
getConditionalCases
public Fulfillment.ConditionalCases getConditionalCases(int index)
Conditional cases for this fulfillment.
repeated .google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases conditional_cases = 5;- Specified by:
getConditionalCasesin interfaceFulfillmentOrBuilder
-
getConditionalCasesOrBuilder
public Fulfillment.ConditionalCasesOrBuilder getConditionalCasesOrBuilder(int index)
Conditional cases for this fulfillment.
repeated .google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases conditional_cases = 5;- Specified by:
getConditionalCasesOrBuilderin interfaceFulfillmentOrBuilder
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessageV3- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessageV3
-
equals
public boolean equals(Object obj)
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static Fulfillment parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Fulfillment parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Fulfillment parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Fulfillment parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Fulfillment parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Fulfillment parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Fulfillment parseFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static Fulfillment parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static Fulfillment parseDelimitedFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static Fulfillment parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseFrom
public static Fulfillment parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static Fulfillment parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
newBuilderForType
public Fulfillment.Builder newBuilderForType()
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
public static Fulfillment.Builder newBuilder()
-
newBuilder
public static Fulfillment.Builder newBuilder(Fulfillment prototype)
-
toBuilder
public Fulfillment.Builder toBuilder()
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected Fulfillment.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
public static Fulfillment getDefaultInstance()
-
parser
public static com.google.protobuf.Parser<Fulfillment> parser()
-
getParserForType
public com.google.protobuf.Parser<Fulfillment> getParserForType()
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public Fulfillment getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
-