public final class Fulfillment extends 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 or
Form lifecycle. For example, when
a
DetectIntentRequest
drives a session to enter a new page, the page's entry fulfillment can add a
static response to the
QueryResult in the
returning
DetectIntentResponse,
call the webhook (for example, to load user data from a database), or both.
Protobuf type google.cloud.dialogflow.cx.v3beta1.Fulfillment
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)
Static Fields
ADVANCED_SETTINGS_FIELD_NUMBER
public static final int ADVANCED_SETTINGS_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
CONDITIONAL_CASES_FIELD_NUMBER
public static final int CONDITIONAL_CASES_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
ENABLE_GENERATIVE_FALLBACK_FIELD_NUMBER
public static final int ENABLE_GENERATIVE_FALLBACK_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
MESSAGES_FIELD_NUMBER
public static final int MESSAGES_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
RETURN_PARTIAL_RESPONSES_FIELD_NUMBER
public static final int RETURN_PARTIAL_RESPONSES_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
SET_PARAMETER_ACTIONS_FIELD_NUMBER
public static final int SET_PARAMETER_ACTIONS_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
TAG_FIELD_NUMBER
public static final int TAG_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
WEBHOOK_FIELD_NUMBER
public static final int WEBHOOK_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
Static Methods
getDefaultInstance()
public static Fulfillment getDefaultInstance()
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
newBuilder()
public static Fulfillment.Builder newBuilder()
newBuilder(Fulfillment prototype)
public static Fulfillment.Builder newBuilder(Fulfillment prototype)
public static Fulfillment parseDelimitedFrom(InputStream input)
public static Fulfillment parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(byte[] data)
public static Fulfillment parseFrom(byte[] data)
Parameter |
Name |
Description |
data |
byte[]
|
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static Fulfillment parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteString data)
public static Fulfillment parseFrom(ByteString data)
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static Fulfillment parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static Fulfillment parseFrom(CodedInputStream input)
public static Fulfillment parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static Fulfillment parseFrom(InputStream input)
public static Fulfillment parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteBuffer data)
public static Fulfillment parseFrom(ByteBuffer data)
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static Fulfillment parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
parser()
public static Parser<Fulfillment> parser()
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter |
Name |
Description |
obj |
Object
|
Overrides
getAdvancedSettings()
public AdvancedSettings getAdvancedSettings()
Hierarchical advanced settings for this fulfillment. The settings exposed
at the lower level overrides the settings exposed at the higher level.
.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 7;
getAdvancedSettingsOrBuilder()
public AdvancedSettingsOrBuilder getAdvancedSettingsOrBuilder()
Hierarchical advanced settings for this fulfillment. The settings exposed
at the lower level overrides the settings exposed at the higher level.
.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 7;
getConditionalCases(int index)
public Fulfillment.ConditionalCases getConditionalCases(int index)
Conditional cases for this fulfillment.
repeated .google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases conditional_cases = 5;
Parameter |
Name |
Description |
index |
int
|
getConditionalCasesCount()
public int getConditionalCasesCount()
Conditional cases for this fulfillment.
repeated .google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases conditional_cases = 5;
Returns |
Type |
Description |
int |
|
getConditionalCasesList()
public List<Fulfillment.ConditionalCases> getConditionalCasesList()
Conditional cases for this fulfillment.
repeated .google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases conditional_cases = 5;
getConditionalCasesOrBuilder(int index)
public Fulfillment.ConditionalCasesOrBuilder getConditionalCasesOrBuilder(int index)
Conditional cases for this fulfillment.
repeated .google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases conditional_cases = 5;
Parameter |
Name |
Description |
index |
int
|
getConditionalCasesOrBuilderList()
public List<? extends Fulfillment.ConditionalCasesOrBuilder> getConditionalCasesOrBuilderList()
Conditional cases for this fulfillment.
repeated .google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases conditional_cases = 5;
Returns |
Type |
Description |
List<? extends com.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCasesOrBuilder> |
|
getDefaultInstanceForType()
public Fulfillment getDefaultInstanceForType()
getEnableGenerativeFallback()
public boolean getEnableGenerativeFallback()
If the flag is true, the agent will utilize LLM to generate a text
response. If LLM generation fails, the defined
responses in the
fulfillment will be respected. This flag is only useful for fulfillments
associated with no-match event handlers.
bool enable_generative_fallback = 12;
Returns |
Type |
Description |
boolean |
The enableGenerativeFallback.
|
getMessages(int index)
public ResponseMessage getMessages(int index)
The list of rich message responses to present to the user.
repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage messages = 1;
Parameter |
Name |
Description |
index |
int
|
getMessagesCount()
public int getMessagesCount()
The list of rich message responses to present to the user.
repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage messages = 1;
Returns |
Type |
Description |
int |
|
getMessagesList()
public List<ResponseMessage> getMessagesList()
The list of rich message responses to present to the user.
repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage messages = 1;
getMessagesOrBuilder(int index)
public ResponseMessageOrBuilder getMessagesOrBuilder(int index)
The list of rich message responses to present to the user.
repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage messages = 1;
Parameter |
Name |
Description |
index |
int
|
getMessagesOrBuilderList()
public List<? extends ResponseMessageOrBuilder> getMessagesOrBuilderList()
The list of rich message responses to present to the user.
repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage messages = 1;
Returns |
Type |
Description |
List<? extends com.google.cloud.dialogflow.cx.v3beta1.ResponseMessageOrBuilder> |
|
getParserForType()
public Parser<Fulfillment> getParserForType()
Overrides
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;
Returns |
Type |
Description |
boolean |
The returnPartialResponses.
|
getSerializedSize()
public int getSerializedSize()
Returns |
Type |
Description |
int |
|
Overrides
getSetParameterActions(int index)
public Fulfillment.SetParameterAction getSetParameterActions(int index)
Set parameter values before executing the webhook.
repeated .google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction set_parameter_actions = 4;
Parameter |
Name |
Description |
index |
int
|
getSetParameterActionsCount()
public int getSetParameterActionsCount()
Set parameter values before executing the webhook.
repeated .google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction set_parameter_actions = 4;
Returns |
Type |
Description |
int |
|
getSetParameterActionsList()
public List<Fulfillment.SetParameterAction> getSetParameterActionsList()
Set parameter values before executing the webhook.
repeated .google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction set_parameter_actions = 4;
getSetParameterActionsOrBuilder(int index)
public Fulfillment.SetParameterActionOrBuilder getSetParameterActionsOrBuilder(int index)
Set parameter values before executing the webhook.
repeated .google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction set_parameter_actions = 4;
Parameter |
Name |
Description |
index |
int
|
getSetParameterActionsOrBuilderList()
public List<? extends Fulfillment.SetParameterActionOrBuilder> getSetParameterActionsOrBuilderList()
Set parameter values before executing the webhook.
repeated .google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction set_parameter_actions = 4;
Returns |
Type |
Description |
List<? extends com.google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterActionOrBuilder> |
|
getTag()
The value of this field will be populated in the
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;
Returns |
Type |
Description |
String |
The tag.
|
getTagBytes()
public ByteString getTagBytes()
The value of this field will be populated in the
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;
Returns |
Type |
Description |
ByteString |
The bytes for tag.
|
getWebhook()
public String getWebhook()
The webhook to call.
Format:
projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/webhooks/<WebhookID>
.
string webhook = 2 [(.google.api.resource_reference) = { ... }
Returns |
Type |
Description |
String |
The webhook.
|
getWebhookBytes()
public ByteString getWebhookBytes()
The webhook to call.
Format:
projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/webhooks/<WebhookID>
.
string webhook = 2 [(.google.api.resource_reference) = { ... }
Returns |
Type |
Description |
ByteString |
The bytes for webhook.
|
hasAdvancedSettings()
public boolean hasAdvancedSettings()
Hierarchical advanced settings for this fulfillment. The settings exposed
at the lower level overrides the settings exposed at the higher level.
.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 7;
Returns |
Type |
Description |
boolean |
Whether the advancedSettings field is set.
|
hashCode()
Returns |
Type |
Description |
int |
|
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
newBuilderForType()
public Fulfillment.Builder newBuilderForType()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected Fulfillment.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Returns |
Type |
Description |
Object |
|
Overrides
toBuilder()
public Fulfillment.Builder toBuilder()
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Overrides