Class SessionInfo.Builder (0.41.0)

public static final class SessionInfo.Builder extends GeneratedMessageV3.Builder<SessionInfo.Builder> implements SessionInfoOrBuilder

Represents session information communicated to and from the webhook.

Protobuf type google.cloud.dialogflow.cx.v3.SessionInfo

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public SessionInfo.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
SessionInfo.Builder
Overrides

build()

public SessionInfo build()
Returns
Type Description
SessionInfo

buildPartial()

public SessionInfo buildPartial()
Returns
Type Description
SessionInfo

clear()

public SessionInfo.Builder clear()
Returns
Type Description
SessionInfo.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public SessionInfo.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
SessionInfo.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public SessionInfo.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
SessionInfo.Builder
Overrides

clearParameters()

public SessionInfo.Builder clearParameters()
Returns
Type Description
SessionInfo.Builder

clearSession()

public SessionInfo.Builder clearSession()

Always present for WebhookRequest. Ignored for WebhookResponse. The unique identifier of the session. This field can be used by the webhook to identify a session. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/sessions/<Session ID> or projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment ID>/sessions/<Session ID> if environment is specified.

string session = 1 [(.google.api.resource_reference) = { ... }

Returns
Type Description
SessionInfo.Builder

This builder for chaining.

clone()

public SessionInfo.Builder clone()
Returns
Type Description
SessionInfo.Builder
Overrides

containsParameters(String key)

public boolean containsParameters(String key)

Optional for WebhookRequest. Optional for WebhookResponse. All parameters collected from forms and intents during the session. Parameters can be created, updated, or removed by the webhook. To remove a parameter from the session, the webhook should explicitly set the parameter value to null in WebhookResponse. The map is keyed by parameters' display names.

map<string, .google.protobuf.Value> parameters = 2;

Parameter
Name Description
key String
Returns
Type Description
boolean

getDefaultInstanceForType()

public SessionInfo getDefaultInstanceForType()
Returns
Type Description
SessionInfo

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getMutableParameters()

public Map<String,Value> getMutableParameters()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,Value>

getParameters()

public Map<String,Value> getParameters()

Use #getParametersMap() instead.

Returns
Type Description
Map<String,Value>

getParametersCount()

public int getParametersCount()

Optional for WebhookRequest. Optional for WebhookResponse. All parameters collected from forms and intents during the session. Parameters can be created, updated, or removed by the webhook. To remove a parameter from the session, the webhook should explicitly set the parameter value to null in WebhookResponse. The map is keyed by parameters' display names.

map<string, .google.protobuf.Value> parameters = 2;

Returns
Type Description
int

getParametersMap()

public Map<String,Value> getParametersMap()

Optional for WebhookRequest. Optional for WebhookResponse. All parameters collected from forms and intents during the session. Parameters can be created, updated, or removed by the webhook. To remove a parameter from the session, the webhook should explicitly set the parameter value to null in WebhookResponse. The map is keyed by parameters' display names.

map<string, .google.protobuf.Value> parameters = 2;

Returns
Type Description
Map<String,Value>

getParametersOrDefault(String key, Value defaultValue)

public Value getParametersOrDefault(String key, Value defaultValue)

Optional for WebhookRequest. Optional for WebhookResponse. All parameters collected from forms and intents during the session. Parameters can be created, updated, or removed by the webhook. To remove a parameter from the session, the webhook should explicitly set the parameter value to null in WebhookResponse. The map is keyed by parameters' display names.

map<string, .google.protobuf.Value> parameters = 2;

Parameters
Name Description
key String
defaultValue Value
Returns
Type Description
Value

getParametersOrThrow(String key)

public Value getParametersOrThrow(String key)

Optional for WebhookRequest. Optional for WebhookResponse. All parameters collected from forms and intents during the session. Parameters can be created, updated, or removed by the webhook. To remove a parameter from the session, the webhook should explicitly set the parameter value to null in WebhookResponse. The map is keyed by parameters' display names.

map<string, .google.protobuf.Value> parameters = 2;

Parameter
Name Description
key String
Returns
Type Description
Value

getSession()

public String getSession()

Always present for WebhookRequest. Ignored for WebhookResponse. The unique identifier of the session. This field can be used by the webhook to identify a session. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/sessions/<Session ID> or projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment ID>/sessions/<Session ID> if environment is specified.

string session = 1 [(.google.api.resource_reference) = { ... }

Returns
Type Description
String

The session.

getSessionBytes()

public ByteString getSessionBytes()

Always present for WebhookRequest. Ignored for WebhookResponse. The unique identifier of the session. This field can be used by the webhook to identify a session. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/sessions/<Session ID> or projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment ID>/sessions/<Session ID> if environment is specified.

string session = 1 [(.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for session.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
Name Description
number int
Returns
Type Description
MapField
Overrides

internalGetMutableMapField(int number)

protected MapField internalGetMutableMapField(int number)
Parameter
Name Description
number int
Returns
Type Description
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(SessionInfo other)

public SessionInfo.Builder mergeFrom(SessionInfo other)
Parameter
Name Description
other SessionInfo
Returns
Type Description
SessionInfo.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public SessionInfo.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
SessionInfo.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public SessionInfo.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
SessionInfo.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final SessionInfo.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
SessionInfo.Builder
Overrides

putAllParameters(Map<String,Value> values)

public SessionInfo.Builder putAllParameters(Map<String,Value> values)

Optional for WebhookRequest. Optional for WebhookResponse. All parameters collected from forms and intents during the session. Parameters can be created, updated, or removed by the webhook. To remove a parameter from the session, the webhook should explicitly set the parameter value to null in WebhookResponse. The map is keyed by parameters' display names.

map<string, .google.protobuf.Value> parameters = 2;

Parameter
Name Description
values Map<String,Value>
Returns
Type Description
SessionInfo.Builder

putParameters(String key, Value value)

public SessionInfo.Builder putParameters(String key, Value value)

Optional for WebhookRequest. Optional for WebhookResponse. All parameters collected from forms and intents during the session. Parameters can be created, updated, or removed by the webhook. To remove a parameter from the session, the webhook should explicitly set the parameter value to null in WebhookResponse. The map is keyed by parameters' display names.

map<string, .google.protobuf.Value> parameters = 2;

Parameters
Name Description
key String
value Value
Returns
Type Description
SessionInfo.Builder

removeParameters(String key)

public SessionInfo.Builder removeParameters(String key)

Optional for WebhookRequest. Optional for WebhookResponse. All parameters collected from forms and intents during the session. Parameters can be created, updated, or removed by the webhook. To remove a parameter from the session, the webhook should explicitly set the parameter value to null in WebhookResponse. The map is keyed by parameters' display names.

map<string, .google.protobuf.Value> parameters = 2;

Parameter
Name Description
key String
Returns
Type Description
SessionInfo.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public SessionInfo.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
SessionInfo.Builder
Overrides

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public SessionInfo.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
SessionInfo.Builder
Overrides

setSession(String value)

public SessionInfo.Builder setSession(String value)

Always present for WebhookRequest. Ignored for WebhookResponse. The unique identifier of the session. This field can be used by the webhook to identify a session. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/sessions/<Session ID> or projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment ID>/sessions/<Session ID> if environment is specified.

string session = 1 [(.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The session to set.

Returns
Type Description
SessionInfo.Builder

This builder for chaining.

setSessionBytes(ByteString value)

public SessionInfo.Builder setSessionBytes(ByteString value)

Always present for WebhookRequest. Ignored for WebhookResponse. The unique identifier of the session. This field can be used by the webhook to identify a session. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/sessions/<Session ID> or projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment ID>/sessions/<Session ID> if environment is specified.

string session = 1 [(.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes for session to set.

Returns
Type Description
SessionInfo.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final SessionInfo.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
SessionInfo.Builder
Overrides