Contexts

google.cloud.dialogflow.v2. Contexts

Represents a Contexts

Constructor

new Contexts(rpcImpl, requestDelimitedopt, responseDelimitedopt)

Constructs a new Contexts service.

Parameters:
Name Type Attributes Default Description
rpcImpl $protobuf.RPCImpl

RPC implementation

requestDelimited boolean <optional>
false

Whether requests are length-delimited

responseDelimited boolean <optional>
false

Whether responses are length-delimited

Extends

  • $protobuf.rpc.Service

Methods

(static) create(rpcImpl, requestDelimitedopt, responseDelimitedopt) → {Contexts}

Creates new Contexts service using the specified rpc implementation.

Parameters:
Name Type Attributes Default Description
rpcImpl $protobuf.RPCImpl

RPC implementation

requestDelimited boolean <optional>
false

Whether requests are length-delimited

responseDelimited boolean <optional>
false

Whether responses are length-delimited

Returns:
Type Description
Contexts

RPC service. Useful where requests and/or responses are streamed.

createContext(request, callback) → {undefined}

Calls CreateContext.

Parameters:
Name Type Description
request google.cloud.dialogflow.v2.ICreateContextRequest

CreateContextRequest message or plain object

callback google.cloud.dialogflow.v2.Contexts.CreateContextCallback

Node-style callback called with the error, if any, and Context

Returns:
Type Description
undefined

createContext(request) → {Promise.<google.cloud.dialogflow.v2.Context>}

Calls CreateContext.

Parameters:
Name Type Description
request google.cloud.dialogflow.v2.ICreateContextRequest

CreateContextRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.dialogflow.v2.Context>

Promise

deleteAllContexts(request, callback) → {undefined}

Calls DeleteAllContexts.

Parameters:
Name Type Description
request google.cloud.dialogflow.v2.IDeleteAllContextsRequest

DeleteAllContextsRequest message or plain object

callback google.cloud.dialogflow.v2.Contexts.DeleteAllContextsCallback

Node-style callback called with the error, if any, and Empty

Returns:
Type Description
undefined

deleteAllContexts(request) → {Promise.<google.protobuf.Empty>}

Calls DeleteAllContexts.

Parameters:
Name Type Description
request google.cloud.dialogflow.v2.IDeleteAllContextsRequest

DeleteAllContextsRequest message or plain object

Returns:
Type Description
Promise.<google.protobuf.Empty>

Promise

deleteContext(request, callback) → {undefined}

Calls DeleteContext.

Parameters:
Name Type Description
request google.cloud.dialogflow.v2.IDeleteContextRequest

DeleteContextRequest message or plain object

callback google.cloud.dialogflow.v2.Contexts.DeleteContextCallback

Node-style callback called with the error, if any, and Empty

Returns:
Type Description
undefined

deleteContext(request) → {Promise.<google.protobuf.Empty>}

Calls DeleteContext.

Parameters:
Name Type Description
request google.cloud.dialogflow.v2.IDeleteContextRequest

DeleteContextRequest message or plain object

Returns:
Type Description
Promise.<google.protobuf.Empty>

Promise

getContext(request, callback) → {undefined}

Calls GetContext.

Parameters:
Name Type Description
request google.cloud.dialogflow.v2.IGetContextRequest

GetContextRequest message or plain object

callback google.cloud.dialogflow.v2.Contexts.GetContextCallback

Node-style callback called with the error, if any, and Context

Returns:
Type Description
undefined

getContext(request) → {Promise.<google.cloud.dialogflow.v2.Context>}

Calls GetContext.

Parameters:
Name Type Description
request google.cloud.dialogflow.v2.IGetContextRequest

GetContextRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.dialogflow.v2.Context>

Promise

listContexts(request, callback) → {undefined}

Calls ListContexts.

Parameters:
Name Type Description
request google.cloud.dialogflow.v2.IListContextsRequest

ListContextsRequest message or plain object

callback google.cloud.dialogflow.v2.Contexts.ListContextsCallback

Node-style callback called with the error, if any, and ListContextsResponse

Returns:
Type Description
undefined

listContexts(request) → {Promise.<google.cloud.dialogflow.v2.ListContextsResponse>}

Calls ListContexts.

Parameters:
Name Type Description
request google.cloud.dialogflow.v2.IListContextsRequest

ListContextsRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.dialogflow.v2.ListContextsResponse>

Promise

updateContext(request, callback) → {undefined}

Calls UpdateContext.

Parameters:
Name Type Description
request google.cloud.dialogflow.v2.IUpdateContextRequest

UpdateContextRequest message or plain object

callback google.cloud.dialogflow.v2.Contexts.UpdateContextCallback

Node-style callback called with the error, if any, and Context

Returns:
Type Description
undefined

updateContext(request) → {Promise.<google.cloud.dialogflow.v2.Context>}

Calls UpdateContext.

Parameters:
Name Type Description
request google.cloud.dialogflow.v2.IUpdateContextRequest

UpdateContextRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.dialogflow.v2.Context>

Promise

Type Definitions

CreateContextCallback(error, responseopt)

Callback as used by google.cloud.dialogflow.v2.Contexts#createContext.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.dialogflow.v2.Context <optional>

Context

DeleteAllContextsCallback(error, responseopt)

Callback as used by google.cloud.dialogflow.v2.Contexts#deleteAllContexts.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.protobuf.Empty <optional>

Empty

DeleteContextCallback(error, responseopt)

Callback as used by google.cloud.dialogflow.v2.Contexts#deleteContext.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.protobuf.Empty <optional>

Empty

GetContextCallback(error, responseopt)

Callback as used by google.cloud.dialogflow.v2.Contexts#getContext.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.dialogflow.v2.Context <optional>

Context

ListContextsCallback(error, responseopt)

Callback as used by google.cloud.dialogflow.v2.Contexts#listContexts.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.dialogflow.v2.ListContextsResponse <optional>

ListContextsResponse

UpdateContextCallback(error, responseopt)

Callback as used by google.cloud.dialogflow.v2.Contexts#updateContext.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.dialogflow.v2.Context <optional>

Context