Google Cloud Dialogflow Cx V3 Client - Class GenericWebService (0.2.1)

Reference documentation and code samples for the Google Cloud Dialogflow Cx V3 Client class GenericWebService.

Represents configuration for a generic web service.

Generated from protobuf message google.cloud.dialogflow.cx.v3.Webhook.GenericWebService

Namespace

Google \ Cloud \ Dialogflow \ Cx \ V3 \ Webhook

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ uri string

Required. The webhook URI for receiving POST requests. It must use https protocol.

↳ username string

The user name for HTTP Basic authentication.

↳ password string

The password for HTTP Basic authentication.

↳ request_headers array|Google\Protobuf\Internal\MapField

The HTTP request headers to send together with webhook requests.

↳ allowed_ca_certs array

Optional. Specifies a list of allowed custom CA certificates (in DER format) for HTTPS verification. This overrides the default SSL trust store. If this is empty or unspecified, Dialogflow will use Google's default trust store to verify certificates. N.B. Make sure the HTTPS server certificates are signed with "subject alt name". For instance a certificate can be self-signed using the following command, openssl x509 -req -days 200 -in example.com.csr \ -signkey example.com.key \ -out example.com.crt \ -extfile <(printf "\nsubjectAltName='DNS:www.example.com'")

↳ webhook_type int

Optional. Type of the webhook.

↳ http_method int

Optional. HTTP method for the flexible webhook calls. Standard webhook always uses POST.

↳ request_body string

Optional. Defines a custom JSON object as request body to send to flexible webhook.

↳ parameter_mapping array|Google\Protobuf\Internal\MapField

Optional. Maps the values extracted from specific fields of the flexible webhook response into session parameters. - Key: session parameter name - Value: field path in the webhook response

getUri

Required. The webhook URI for receiving POST requests. It must use https protocol.

Returns
TypeDescription
string

setUri

Required. The webhook URI for receiving POST requests. It must use https protocol.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getUsername

The user name for HTTP Basic authentication.

Returns
TypeDescription
string

setUsername

The user name for HTTP Basic authentication.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getPassword

The password for HTTP Basic authentication.

Returns
TypeDescription
string

setPassword

The password for HTTP Basic authentication.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getRequestHeaders

The HTTP request headers to send together with webhook requests.

Returns
TypeDescription
Google\Protobuf\Internal\MapField

setRequestHeaders

The HTTP request headers to send together with webhook requests.

Parameter
NameDescription
var array|Google\Protobuf\Internal\MapField
Returns
TypeDescription
$this

getAllowedCaCerts

Optional. Specifies a list of allowed custom CA certificates (in DER format) for HTTPS verification. This overrides the default SSL trust store. If this is empty or unspecified, Dialogflow will use Google's default trust store to verify certificates. N.B. Make sure the HTTPS server certificates are signed with "subject alt name". For instance a certificate can be self-signed using the following command,

   openssl x509 -req -days 200 -in example.com.csr \
     -signkey example.com.key \
     -out example.com.crt \
     -extfile <(printf "\nsubjectAltName='DNS:www.example.com'")
Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setAllowedCaCerts

Optional. Specifies a list of allowed custom CA certificates (in DER format) for HTTPS verification. This overrides the default SSL trust store. If this is empty or unspecified, Dialogflow will use Google's default trust store to verify certificates. N.B. Make sure the HTTPS server certificates are signed with "subject alt name". For instance a certificate can be self-signed using the following command,

   openssl x509 -req -days 200 -in example.com.csr \
     -signkey example.com.key \
     -out example.com.crt \
     -extfile <(printf "\nsubjectAltName='DNS:www.example.com'")
Parameter
NameDescription
var string[]
Returns
TypeDescription
$this

getWebhookType

Optional. Type of the webhook.

Returns
TypeDescription
int

setWebhookType

Optional. Type of the webhook.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getHttpMethod

Optional. HTTP method for the flexible webhook calls. Standard webhook always uses POST.

Returns
TypeDescription
int

setHttpMethod

Optional. HTTP method for the flexible webhook calls. Standard webhook always uses POST.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getRequestBody

Optional. Defines a custom JSON object as request body to send to flexible webhook.

Returns
TypeDescription
string

setRequestBody

Optional. Defines a custom JSON object as request body to send to flexible webhook.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getParameterMapping

Optional. Maps the values extracted from specific fields of the flexible webhook response into session parameters.

  • Key: session parameter name
  • Value: field path in the webhook response
Returns
TypeDescription
Google\Protobuf\Internal\MapField

setParameterMapping

Optional. Maps the values extracted from specific fields of the flexible webhook response into session parameters.

  • Key: session parameter name
  • Value: field path in the webhook response
Parameter
NameDescription
var array|Google\Protobuf\Internal\MapField
Returns
TypeDescription
$this