Class Fulfillment (4.6.0)

public final class Fulfillment extends GeneratedMessageV3 implements FulfillmentOrBuilder

By default, your agent responds to a matched intent with a static response. As an alternative, you can provide a more dynamic response by using fulfillment. When you enable fulfillment for an intent, Dialogflow responds to that intent by calling a service that you define. For example, if an end-user wants to schedule a haircut on Friday, your service can check your database and respond to the end-user with availability information for Friday. For more information, see the fulfillment guide.

Protobuf type google.cloud.dialogflow.v2.Fulfillment

Static Fields

DISPLAY_NAME_FIELD_NUMBER

public static final int DISPLAY_NAME_FIELD_NUMBER
Field Value
TypeDescription
int

ENABLED_FIELD_NUMBER

public static final int ENABLED_FIELD_NUMBER
Field Value
TypeDescription
int

FEATURES_FIELD_NUMBER

public static final int FEATURES_FIELD_NUMBER
Field Value
TypeDescription
int

GENERIC_WEB_SERVICE_FIELD_NUMBER

public static final int GENERIC_WEB_SERVICE_FIELD_NUMBER
Field Value
TypeDescription
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static Fulfillment getDefaultInstance()
Returns
TypeDescription
Fulfillment

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static Fulfillment.Builder newBuilder()
Returns
TypeDescription
Fulfillment.Builder

newBuilder(Fulfillment prototype)

public static Fulfillment.Builder newBuilder(Fulfillment prototype)
Parameter
NameDescription
prototypeFulfillment
Returns
TypeDescription
Fulfillment.Builder

parseDelimitedFrom(InputStream input)

public static Fulfillment parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Fulfillment
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Fulfillment parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Fulfillment
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static Fulfillment parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
Fulfillment
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Fulfillment parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Fulfillment
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Fulfillment parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
Fulfillment
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Fulfillment parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Fulfillment
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Fulfillment parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
Fulfillment
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Fulfillment parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Fulfillment
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static Fulfillment parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Fulfillment
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Fulfillment parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Fulfillment
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static Fulfillment parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
Fulfillment
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Fulfillment parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Fulfillment
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<Fulfillment> parser()
Returns
TypeDescription
Parser<Fulfillment>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstanceForType()

public Fulfillment getDefaultInstanceForType()
Returns
TypeDescription
Fulfillment

getDisplayName()

public String getDisplayName()

Optional. The human-readable name of the fulfillment, unique within the agent. This field is not used for Fulfillment in an Environment.

string display_name = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

Optional. The human-readable name of the fulfillment, unique within the agent. This field is not used for Fulfillment in an Environment.

string display_name = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
ByteString

The bytes for displayName.

getEnabled()

public boolean getEnabled()

Optional. Whether fulfillment is enabled.

bool enabled = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
boolean

The enabled.

getFeatures(int index)

public Fulfillment.Feature getFeatures(int index)

Optional. The field defines whether the fulfillment is enabled for certain features.

repeated .google.cloud.dialogflow.v2.Fulfillment.Feature features = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
indexint
Returns
TypeDescription
Fulfillment.Feature

getFeaturesCount()

public int getFeaturesCount()

Optional. The field defines whether the fulfillment is enabled for certain features.

repeated .google.cloud.dialogflow.v2.Fulfillment.Feature features = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
int

getFeaturesList()

public List<Fulfillment.Feature> getFeaturesList()

Optional. The field defines whether the fulfillment is enabled for certain features.

repeated .google.cloud.dialogflow.v2.Fulfillment.Feature features = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
List<Feature>

getFeaturesOrBuilder(int index)

public Fulfillment.FeatureOrBuilder getFeaturesOrBuilder(int index)

Optional. The field defines whether the fulfillment is enabled for certain features.

repeated .google.cloud.dialogflow.v2.Fulfillment.Feature features = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
indexint
Returns
TypeDescription
Fulfillment.FeatureOrBuilder

getFeaturesOrBuilderList()

public List<? extends Fulfillment.FeatureOrBuilder> getFeaturesOrBuilderList()

Optional. The field defines whether the fulfillment is enabled for certain features.

repeated .google.cloud.dialogflow.v2.Fulfillment.Feature features = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
List<? extends com.google.cloud.dialogflow.v2.Fulfillment.FeatureOrBuilder>

getFulfillmentCase()

public Fulfillment.FulfillmentCase getFulfillmentCase()
Returns
TypeDescription
Fulfillment.FulfillmentCase

getGenericWebService()

public Fulfillment.GenericWebService getGenericWebService()

Configuration for a generic web service.

.google.cloud.dialogflow.v2.Fulfillment.GenericWebService generic_web_service = 3;

Returns
TypeDescription
Fulfillment.GenericWebService

The genericWebService.

getGenericWebServiceOrBuilder()

public Fulfillment.GenericWebServiceOrBuilder getGenericWebServiceOrBuilder()

Configuration for a generic web service.

.google.cloud.dialogflow.v2.Fulfillment.GenericWebService generic_web_service = 3;

Returns
TypeDescription
Fulfillment.GenericWebServiceOrBuilder

getName()

public String getName()

Required. The unique identifier of the fulfillment. Supported formats:

  • projects/<Project ID>/agent/fulfillment
  • projects/<Project ID>/locations/<Location ID>/agent/fulfillment This field is not used for Fulfillment in an Environment.

string name = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

Required. The unique identifier of the fulfillment. Supported formats:

  • projects/<Project ID>/agent/fulfillment
  • projects/<Project ID>/locations/<Location ID>/agent/fulfillment This field is not used for Fulfillment in an Environment.

string name = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
ByteString

The bytes for name.

getParserForType()

public Parser<Fulfillment> getParserForType()
Returns
TypeDescription
Parser<Fulfillment>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

hasGenericWebService()

public boolean hasGenericWebService()

Configuration for a generic web service.

.google.cloud.dialogflow.v2.Fulfillment.GenericWebService generic_web_service = 3;

Returns
TypeDescription
boolean

Whether the genericWebService field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public Fulfillment.Builder newBuilderForType()
Returns
TypeDescription
Fulfillment.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Fulfillment.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
Fulfillment.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public Fulfillment.Builder toBuilder()
Returns
TypeDescription
Fulfillment.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides Exceptions
TypeDescription
IOException