KnowledgeBases

google.cloud.dialogflow.v2. KnowledgeBases

Represents a KnowledgeBases

Constructor

new KnowledgeBases(rpcImpl, requestDelimitedopt, responseDelimitedopt)

Constructs a new KnowledgeBases 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) → {KnowledgeBases}

Creates new KnowledgeBases 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
KnowledgeBases

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

createKnowledgeBase(request, callback) → {undefined}

Calls CreateKnowledgeBase.

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

CreateKnowledgeBaseRequest message or plain object

callback google.cloud.dialogflow.v2.KnowledgeBases.CreateKnowledgeBaseCallback

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

Returns:
Type Description
undefined

createKnowledgeBase(request) → {Promise.<google.cloud.dialogflow.v2.KnowledgeBase>}

Calls CreateKnowledgeBase.

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

CreateKnowledgeBaseRequest message or plain object

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

Promise

deleteKnowledgeBase(request, callback) → {undefined}

Calls DeleteKnowledgeBase.

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

DeleteKnowledgeBaseRequest message or plain object

callback google.cloud.dialogflow.v2.KnowledgeBases.DeleteKnowledgeBaseCallback

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

Returns:
Type Description
undefined

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

Calls DeleteKnowledgeBase.

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

DeleteKnowledgeBaseRequest message or plain object

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

Promise

getKnowledgeBase(request, callback) → {undefined}

Calls GetKnowledgeBase.

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

GetKnowledgeBaseRequest message or plain object

callback google.cloud.dialogflow.v2.KnowledgeBases.GetKnowledgeBaseCallback

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

Returns:
Type Description
undefined

getKnowledgeBase(request) → {Promise.<google.cloud.dialogflow.v2.KnowledgeBase>}

Calls GetKnowledgeBase.

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

GetKnowledgeBaseRequest message or plain object

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

Promise

listKnowledgeBases(request, callback) → {undefined}

Calls ListKnowledgeBases.

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

ListKnowledgeBasesRequest message or plain object

callback google.cloud.dialogflow.v2.KnowledgeBases.ListKnowledgeBasesCallback

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

Returns:
Type Description
undefined

listKnowledgeBases(request) → {Promise.<google.cloud.dialogflow.v2.ListKnowledgeBasesResponse>}

Calls ListKnowledgeBases.

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

ListKnowledgeBasesRequest message or plain object

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

Promise

updateKnowledgeBase(request, callback) → {undefined}

Calls UpdateKnowledgeBase.

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

UpdateKnowledgeBaseRequest message or plain object

callback google.cloud.dialogflow.v2.KnowledgeBases.UpdateKnowledgeBaseCallback

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

Returns:
Type Description
undefined

updateKnowledgeBase(request) → {Promise.<google.cloud.dialogflow.v2.KnowledgeBase>}

Calls UpdateKnowledgeBase.

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

UpdateKnowledgeBaseRequest message or plain object

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

Promise

Type Definitions

CreateKnowledgeBaseCallback(error, responseopt)

Callback as used by google.cloud.dialogflow.v2.KnowledgeBases#createKnowledgeBase.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

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

KnowledgeBase

DeleteKnowledgeBaseCallback(error, responseopt)

Callback as used by google.cloud.dialogflow.v2.KnowledgeBases#deleteKnowledgeBase.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.protobuf.Empty <optional>

Empty

GetKnowledgeBaseCallback(error, responseopt)

Callback as used by google.cloud.dialogflow.v2.KnowledgeBases#getKnowledgeBase.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

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

KnowledgeBase

ListKnowledgeBasesCallback(error, responseopt)

Callback as used by google.cloud.dialogflow.v2.KnowledgeBases#listKnowledgeBases.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

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

ListKnowledgeBasesResponse

UpdateKnowledgeBaseCallback(error, responseopt)

Callback as used by google.cloud.dialogflow.v2.KnowledgeBases#updateKnowledgeBase.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

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

KnowledgeBase