# Dialogflow API . projects . locations . agents . webhooks

## Instance Methods

Close httplib2 connections.

Creates a webhook in the specified agent.

Deletes the specified webhook.

Retrieves the specified webhook.

Returns the list of all webhooks in the specified agent.

Retrieves the next page of results.

Updates the specified webhook.

### Method Details

`close()`

    Close httplib2 connections.

`create(parent, body=None, x__xgafv=None)`

    Creates a webhook in the specified agent.

    Args:
      parent: string, Required. The agent to create a webhook for. Format: `projects//locations//agents/`. (required)
      body: object, The request body.
        The object takes the form of:

    { # Webhooks host the developer's business logic. During a session, webhooks allow the developer to use the data extracted by Dialogflow's natural language processing to generate dynamic responses, validate collected data, or trigger actions on the backend.
      "disabled": True or False, # Indicates whether the webhook is disabled.
      "displayName": "A String", # Required. The human-readable name of the webhook, unique within the agent.
      "genericWebService": { # Represents configuration for a generic web service. # Configuration for a generic web service.
        "allowedCaCerts": [ # 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'") ```
          "A String",
        ],
        "httpMethod": "A String", # Optional. HTTP method for the flexible webhook calls. Standard webhook always uses POST.
        "oauthConfig": { # Represents configuration of OAuth client credential flow for 3rd party API authentication. # Optional. The OAuth configuration of the webhook. If specified, Dialogflow will initiate the OAuth client credential flow to exchange an access token from the 3rd party platform and put it in the auth header.
          "clientId": "A String", # Required. The client ID provided by the 3rd party platform.
          "clientSecret": "A String", # Optional. The client secret provided by the 3rd party platform.
          "scopes": [ # Optional. The OAuth scopes to grant.
            "A String",
          ],
          "secretVersionForClientSecret": "A String", # Optional. The name of the SecretManager secret version resource storing the client secret. If this field is set, the `client_secret` field will be ignored. Format: `projects/{project}/secrets/{secret}/versions/{version}`
          "tokenEndpoint": "A String", # Required. The token endpoint provided by the 3rd party platform to exchange an access token.
        },
        "parameterMapping": { # 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
          "a_key": "A String",
        },
        "password": "A String", # The password for HTTP Basic authentication.
        "requestBody": "A String", # Optional. Defines a custom JSON object as request body to send to flexible webhook.
        "requestHeaders": { # The HTTP request headers to send together with webhook requests.
          "a_key": "A String",
        },
        "secretVersionForUsernamePassword": "A String", # Optional. The SecretManager secret version resource storing the username:password pair for HTTP Basic authentication. Format: `projects/{project}/secrets/{secret}/versions/{version}`
        "secretVersionsForRequestHeaders": { # Optional. The HTTP request headers to send together with webhook requests. Header values are stored in SecretManager secret versions. When the same header name is specified in both `request_headers` and `secret_versions_for_request_headers`, the value in `secret_versions_for_request_headers` will be used.
          "a_key": { # Represents the value of an HTTP header stored in a SecretManager secret version.
            "secretVersion": "A String", # Required. The SecretManager secret version resource storing the header value. Format: `projects/{project}/secrets/{secret}/versions/{version}`
          },
        },
        "serviceAccountAuthConfig": { # Configuration for authentication using a service account. # Optional. Configuration for service account authentication.
          "serviceAccount": "A String", # Required. The email address of the service account used to authenticate the webhook call. Dialogflow uses this service account to exchange an access token and the access token is then sent in the `Authorization` header of the webhook request. The service account must have the `roles/iam.serviceAccountTokenCreator` role granted to the [Dialogflow service agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
        },
        "serviceAgentAuth": "A String", # Optional. Indicate the auth token type generated from the [Diglogflow service agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). The generated token is sent in the Authorization header.
        "uri": "A String", # Required. The webhook URI for receiving POST requests. It must use https protocol.
        "username": "A String", # The user name for HTTP Basic authentication.
        "webhookType": "A String", # Optional. Type of the webhook.
      },
      "name": "A String", # The unique identifier of the webhook. Required for the Webhooks.UpdateWebhook method. Webhooks.CreateWebhook populates the name automatically. Format: `projects//locations//agents//webhooks/`.
      "serviceDirectory": { # Represents configuration for a [Service Directory](https://cloud.google.com/service-directory) service. # Configuration for a [Service Directory](https://cloud.google.com/service-directory) service.
        "genericWebService": { # Represents configuration for a generic web service. # Generic Service configuration of this webhook.
          "allowedCaCerts": [ # 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'") ```
            "A String",
          ],
          "httpMethod": "A String", # Optional. HTTP method for the flexible webhook calls. Standard webhook always uses POST.
          "oauthConfig": { # Represents configuration of OAuth client credential flow for 3rd party API authentication. # Optional. The OAuth configuration of the webhook. If specified, Dialogflow will initiate the OAuth client credential flow to exchange an access token from the 3rd party platform and put it in the auth header.
            "clientId": "A String", # Required. The client ID provided by the 3rd party platform.
            "clientSecret": "A String", # Optional. The client secret provided by the 3rd party platform.
            "scopes": [ # Optional. The OAuth scopes to grant.
              "A String",
            ],
            "secretVersionForClientSecret": "A String", # Optional. The name of the SecretManager secret version resource storing the client secret. If this field is set, the `client_secret` field will be ignored. Format: `projects/{project}/secrets/{secret}/versions/{version}`
            "tokenEndpoint": "A String", # Required. The token endpoint provided by the 3rd party platform to exchange an access token.
          },
          "parameterMapping": { # 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
            "a_key": "A String",
          },
          "password": "A String", # The password for HTTP Basic authentication.
          "requestBody": "A String", # Optional. Defines a custom JSON object as request body to send to flexible webhook.
          "requestHeaders": { # The HTTP request headers to send together with webhook requests.
            "a_key": "A String",
          },
          "secretVersionForUsernamePassword": "A String", # Optional. The SecretManager secret version resource storing the username:password pair for HTTP Basic authentication. Format: `projects/{project}/secrets/{secret}/versions/{version}`
          "secretVersionsForRequestHeaders": { # Optional. The HTTP request headers to send together with webhook requests. Header values are stored in SecretManager secret versions. When the same header name is specified in both `request_headers` and `secret_versions_for_request_headers`, the value in `secret_versions_for_request_headers` will be used.
            "a_key": { # Represents the value of an HTTP header stored in a SecretManager secret version.
              "secretVersion": "A String", # Required. The SecretManager secret version resource storing the header value. Format: `projects/{project}/secrets/{secret}/versions/{version}`
            },
          },
          "serviceAccountAuthConfig": { # Configuration for authentication using a service account. # Optional. Configuration for service account authentication.
            "serviceAccount": "A String", # Required. The email address of the service account used to authenticate the webhook call. Dialogflow uses this service account to exchange an access token and the access token is then sent in the `Authorization` header of the webhook request. The service account must have the `roles/iam.serviceAccountTokenCreator` role granted to the [Dialogflow service agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
          },
          "serviceAgentAuth": "A String", # Optional. Indicate the auth token type generated from the [Diglogflow service agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). The generated token is sent in the Authorization header.
          "uri": "A String", # Required. The webhook URI for receiving POST requests. It must use https protocol.
          "username": "A String", # The user name for HTTP Basic authentication.
          "webhookType": "A String", # Optional. Type of the webhook.
        },
        "service": "A String", # Required. The name of [Service Directory](https://cloud.google.com/service-directory) service. Format: `projects//locations//namespaces//services/`. `Location ID` of the service directory must be the same as the location of the agent.
      },
      "timeout": "A String", # Webhook execution timeout. Execution is considered failed if Dialogflow doesn't receive a response from webhook at the end of the timeout period. Defaults to 5 seconds, maximum allowed timeout is 30 seconds.
    }

      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # Webhooks host the developer's business logic. During a session, webhooks allow the developer to use the data extracted by Dialogflow's natural language processing to generate dynamic responses, validate collected data, or trigger actions on the backend.
      "disabled": True or False, # Indicates whether the webhook is disabled.
      "displayName": "A String", # Required. The human-readable name of the webhook, unique within the agent.
      "genericWebService": { # Represents configuration for a generic web service. # Configuration for a generic web service.
        "allowedCaCerts": [ # 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'") ```
          "A String",
        ],
        "httpMethod": "A String", # Optional. HTTP method for the flexible webhook calls. Standard webhook always uses POST.
        "oauthConfig": { # Represents configuration of OAuth client credential flow for 3rd party API authentication. # Optional. The OAuth configuration of the webhook. If specified, Dialogflow will initiate the OAuth client credential flow to exchange an access token from the 3rd party platform and put it in the auth header.
          "clientId": "A String", # Required. The client ID provided by the 3rd party platform.
          "clientSecret": "A String", # Optional. The client secret provided by the 3rd party platform.
          "scopes": [ # Optional. The OAuth scopes to grant.
            "A String",
          ],
          "secretVersionForClientSecret": "A String", # Optional. The name of the SecretManager secret version resource storing the client secret. If this field is set, the `client_secret` field will be ignored. Format: `projects/{project}/secrets/{secret}/versions/{version}`
          "tokenEndpoint": "A String", # Required. The token endpoint provided by the 3rd party platform to exchange an access token.
        },
        "parameterMapping": { # 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
          "a_key": "A String",
        },
        "password": "A String", # The password for HTTP Basic authentication.
        "requestBody": "A String", # Optional. Defines a custom JSON object as request body to send to flexible webhook.
        "requestHeaders": { # The HTTP request headers to send together with webhook requests.
          "a_key": "A String",
        },
        "secretVersionForUsernamePassword": "A String", # Optional. The SecretManager secret version resource storing the username:password pair for HTTP Basic authentication. Format: `projects/{project}/secrets/{secret}/versions/{version}`
        "secretVersionsForRequestHeaders": { # Optional. The HTTP request headers to send together with webhook requests. Header values are stored in SecretManager secret versions. When the same header name is specified in both `request_headers` and `secret_versions_for_request_headers`, the value in `secret_versions_for_request_headers` will be used.
          "a_key": { # Represents the value of an HTTP header stored in a SecretManager secret version.
            "secretVersion": "A String", # Required. The SecretManager secret version resource storing the header value. Format: `projects/{project}/secrets/{secret}/versions/{version}`
          },
        },
        "serviceAccountAuthConfig": { # Configuration for authentication using a service account. # Optional. Configuration for service account authentication.
          "serviceAccount": "A String", # Required. The email address of the service account used to authenticate the webhook call. Dialogflow uses this service account to exchange an access token and the access token is then sent in the `Authorization` header of the webhook request. The service account must have the `roles/iam.serviceAccountTokenCreator` role granted to the [Dialogflow service agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
        },
        "serviceAgentAuth": "A String", # Optional. Indicate the auth token type generated from the [Diglogflow service agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). The generated token is sent in the Authorization header.
        "uri": "A String", # Required. The webhook URI for receiving POST requests. It must use https protocol.
        "username": "A String", # The user name for HTTP Basic authentication.
        "webhookType": "A String", # Optional. Type of the webhook.
      },
      "name": "A String", # The unique identifier of the webhook. Required for the Webhooks.UpdateWebhook method. Webhooks.CreateWebhook populates the name automatically. Format: `projects//locations//agents//webhooks/`.
      "serviceDirectory": { # Represents configuration for a [Service Directory](https://cloud.google.com/service-directory) service. # Configuration for a [Service Directory](https://cloud.google.com/service-directory) service.
        "genericWebService": { # Represents configuration for a generic web service. # Generic Service configuration of this webhook.
          "allowedCaCerts": [ # 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'") ```
            "A String",
          ],
          "httpMethod": "A String", # Optional. HTTP method for the flexible webhook calls. Standard webhook always uses POST.
          "oauthConfig": { # Represents configuration of OAuth client credential flow for 3rd party API authentication. # Optional. The OAuth configuration of the webhook. If specified, Dialogflow will initiate the OAuth client credential flow to exchange an access token from the 3rd party platform and put it in the auth header.
            "clientId": "A String", # Required. The client ID provided by the 3rd party platform.
            "clientSecret": "A String", # Optional. The client secret provided by the 3rd party platform.
            "scopes": [ # Optional. The OAuth scopes to grant.
              "A String",
            ],
            "secretVersionForClientSecret": "A String", # Optional. The name of the SecretManager secret version resource storing the client secret. If this field is set, the `client_secret` field will be ignored. Format: `projects/{project}/secrets/{secret}/versions/{version}`
            "tokenEndpoint": "A String", # Required. The token endpoint provided by the 3rd party platform to exchange an access token.
          },
          "parameterMapping": { # 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
            "a_key": "A String",
          },
          "password": "A String", # The password for HTTP Basic authentication.
          "requestBody": "A String", # Optional. Defines a custom JSON object as request body to send to flexible webhook.
          "requestHeaders": { # The HTTP request headers to send together with webhook requests.
            "a_key": "A String",
          },
          "secretVersionForUsernamePassword": "A String", # Optional. The SecretManager secret version resource storing the username:password pair for HTTP Basic authentication. Format: `projects/{project}/secrets/{secret}/versions/{version}`
          "secretVersionsForRequestHeaders": { # Optional. The HTTP request headers to send together with webhook requests. Header values are stored in SecretManager secret versions. When the same header name is specified in both `request_headers` and `secret_versions_for_request_headers`, the value in `secret_versions_for_request_headers` will be used.
            "a_key": { # Represents the value of an HTTP header stored in a SecretManager secret version.
              "secretVersion": "A String", # Required. The SecretManager secret version resource storing the header value. Format: `projects/{project}/secrets/{secret}/versions/{version}`
            },
          },
          "serviceAccountAuthConfig": { # Configuration for authentication using a service account. # Optional. Configuration for service account authentication.
            "serviceAccount": "A String", # Required. The email address of the service account used to authenticate the webhook call. Dialogflow uses this service account to exchange an access token and the access token is then sent in the `Authorization` header of the webhook request. The service account must have the `roles/iam.serviceAccountTokenCreator` role granted to the [Dialogflow service agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
          },
          "serviceAgentAuth": "A String", # Optional. Indicate the auth token type generated from the [Diglogflow service agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). The generated token is sent in the Authorization header.
          "uri": "A String", # Required. The webhook URI for receiving POST requests. It must use https protocol.
          "username": "A String", # The user name for HTTP Basic authentication.
          "webhookType": "A String", # Optional. Type of the webhook.
        },
        "service": "A String", # Required. The name of [Service Directory](https://cloud.google.com/service-directory) service. Format: `projects//locations//namespaces//services/`. `Location ID` of the service directory must be the same as the location of the agent.
      },
      "timeout": "A String", # Webhook execution timeout. Execution is considered failed if Dialogflow doesn't receive a response from webhook at the end of the timeout period. Defaults to 5 seconds, maximum allowed timeout is 30 seconds.
    }

`delete(name, force=None, x__xgafv=None)`

    Deletes the specified webhook.

    Args:
      name: string, Required. The name of the webhook to delete. Format: `projects//locations//agents//webhooks/`. (required)
      force: boolean, This field has no effect for webhook not being used. For webhooks that are used by pages/flows/transition route groups: * If `force` is set to false, an error will be returned with message indicating the referenced resources. * If `force` is set to true, Dialogflow will remove the webhook, as well as any references to the webhook (i.e. Webhook and tagin fulfillments that point to this webhook will be removed).
      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
    }

`get(name, x__xgafv=None)`

    Retrieves the specified webhook.

    Args:
      name: string, Required. The name of the webhook. Format: `projects//locations//agents//webhooks/`. (required)
      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # Webhooks host the developer's business logic. During a session, webhooks allow the developer to use the data extracted by Dialogflow's natural language processing to generate dynamic responses, validate collected data, or trigger actions on the backend.
      "disabled": True or False, # Indicates whether the webhook is disabled.
      "displayName": "A String", # Required. The human-readable name of the webhook, unique within the agent.
      "genericWebService": { # Represents configuration for a generic web service. # Configuration for a generic web service.
        "allowedCaCerts": [ # 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'") ```
          "A String",
        ],
        "httpMethod": "A String", # Optional. HTTP method for the flexible webhook calls. Standard webhook always uses POST.
        "oauthConfig": { # Represents configuration of OAuth client credential flow for 3rd party API authentication. # Optional. The OAuth configuration of the webhook. If specified, Dialogflow will initiate the OAuth client credential flow to exchange an access token from the 3rd party platform and put it in the auth header.
          "clientId": "A String", # Required. The client ID provided by the 3rd party platform.
          "clientSecret": "A String", # Optional. The client secret provided by the 3rd party platform.
          "scopes": [ # Optional. The OAuth scopes to grant.
            "A String",
          ],
          "secretVersionForClientSecret": "A String", # Optional. The name of the SecretManager secret version resource storing the client secret. If this field is set, the `client_secret` field will be ignored. Format: `projects/{project}/secrets/{secret}/versions/{version}`
          "tokenEndpoint": "A String", # Required. The token endpoint provided by the 3rd party platform to exchange an access token.
        },
        "parameterMapping": { # 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
          "a_key": "A String",
        },
        "password": "A String", # The password for HTTP Basic authentication.
        "requestBody": "A String", # Optional. Defines a custom JSON object as request body to send to flexible webhook.
        "requestHeaders": { # The HTTP request headers to send together with webhook requests.
          "a_key": "A String",
        },
        "secretVersionForUsernamePassword": "A String", # Optional. The SecretManager secret version resource storing the username:password pair for HTTP Basic authentication. Format: `projects/{project}/secrets/{secret}/versions/{version}`
        "secretVersionsForRequestHeaders": { # Optional. The HTTP request headers to send together with webhook requests. Header values are stored in SecretManager secret versions. When the same header name is specified in both `request_headers` and `secret_versions_for_request_headers`, the value in `secret_versions_for_request_headers` will be used.
          "a_key": { # Represents the value of an HTTP header stored in a SecretManager secret version.
            "secretVersion": "A String", # Required. The SecretManager secret version resource storing the header value. Format: `projects/{project}/secrets/{secret}/versions/{version}`
          },
        },
        "serviceAccountAuthConfig": { # Configuration for authentication using a service account. # Optional. Configuration for service account authentication.
          "serviceAccount": "A String", # Required. The email address of the service account used to authenticate the webhook call. Dialogflow uses this service account to exchange an access token and the access token is then sent in the `Authorization` header of the webhook request. The service account must have the `roles/iam.serviceAccountTokenCreator` role granted to the [Dialogflow service agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
        },
        "serviceAgentAuth": "A String", # Optional. Indicate the auth token type generated from the [Diglogflow service agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). The generated token is sent in the Authorization header.
        "uri": "A String", # Required. The webhook URI for receiving POST requests. It must use https protocol.
        "username": "A String", # The user name for HTTP Basic authentication.
        "webhookType": "A String", # Optional. Type of the webhook.
      },
      "name": "A String", # The unique identifier of the webhook. Required for the Webhooks.UpdateWebhook method. Webhooks.CreateWebhook populates the name automatically. Format: `projects//locations//agents//webhooks/`.
      "serviceDirectory": { # Represents configuration for a [Service Directory](https://cloud.google.com/service-directory) service. # Configuration for a [Service Directory](https://cloud.google.com/service-directory) service.
        "genericWebService": { # Represents configuration for a generic web service. # Generic Service configuration of this webhook.
          "allowedCaCerts": [ # 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'") ```
            "A String",
          ],
          "httpMethod": "A String", # Optional. HTTP method for the flexible webhook calls. Standard webhook always uses POST.
          "oauthConfig": { # Represents configuration of OAuth client credential flow for 3rd party API authentication. # Optional. The OAuth configuration of the webhook. If specified, Dialogflow will initiate the OAuth client credential flow to exchange an access token from the 3rd party platform and put it in the auth header.
            "clientId": "A String", # Required. The client ID provided by the 3rd party platform.
            "clientSecret": "A String", # Optional. The client secret provided by the 3rd party platform.
            "scopes": [ # Optional. The OAuth scopes to grant.
              "A String",
            ],
            "secretVersionForClientSecret": "A String", # Optional. The name of the SecretManager secret version resource storing the client secret. If this field is set, the `client_secret` field will be ignored. Format: `projects/{project}/secrets/{secret}/versions/{version}`
            "tokenEndpoint": "A String", # Required. The token endpoint provided by the 3rd party platform to exchange an access token.
          },
          "parameterMapping": { # 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
            "a_key": "A String",
          },
          "password": "A String", # The password for HTTP Basic authentication.
          "requestBody": "A String", # Optional. Defines a custom JSON object as request body to send to flexible webhook.
          "requestHeaders": { # The HTTP request headers to send together with webhook requests.
            "a_key": "A String",
          },
          "secretVersionForUsernamePassword": "A String", # Optional. The SecretManager secret version resource storing the username:password pair for HTTP Basic authentication. Format: `projects/{project}/secrets/{secret}/versions/{version}`
          "secretVersionsForRequestHeaders": { # Optional. The HTTP request headers to send together with webhook requests. Header values are stored in SecretManager secret versions. When the same header name is specified in both `request_headers` and `secret_versions_for_request_headers`, the value in `secret_versions_for_request_headers` will be used.
            "a_key": { # Represents the value of an HTTP header stored in a SecretManager secret version.
              "secretVersion": "A String", # Required. The SecretManager secret version resource storing the header value. Format: `projects/{project}/secrets/{secret}/versions/{version}`
            },
          },
          "serviceAccountAuthConfig": { # Configuration for authentication using a service account. # Optional. Configuration for service account authentication.
            "serviceAccount": "A String", # Required. The email address of the service account used to authenticate the webhook call. Dialogflow uses this service account to exchange an access token and the access token is then sent in the `Authorization` header of the webhook request. The service account must have the `roles/iam.serviceAccountTokenCreator` role granted to the [Dialogflow service agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
          },
          "serviceAgentAuth": "A String", # Optional. Indicate the auth token type generated from the [Diglogflow service agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). The generated token is sent in the Authorization header.
          "uri": "A String", # Required. The webhook URI for receiving POST requests. It must use https protocol.
          "username": "A String", # The user name for HTTP Basic authentication.
          "webhookType": "A String", # Optional. Type of the webhook.
        },
        "service": "A String", # Required. The name of [Service Directory](https://cloud.google.com/service-directory) service. Format: `projects//locations//namespaces//services/`. `Location ID` of the service directory must be the same as the location of the agent.
      },
      "timeout": "A String", # Webhook execution timeout. Execution is considered failed if Dialogflow doesn't receive a response from webhook at the end of the timeout period. Defaults to 5 seconds, maximum allowed timeout is 30 seconds.
    }

`list(parent, pageSize=None, pageToken=None, x__xgafv=None)`

    Returns the list of all webhooks in the specified agent.

    Args:
      parent: string, Required. The agent to list all webhooks for. Format: `projects//locations//agents/`. (required)
      pageSize: integer, The maximum number of items to return in a single page. By default 100 and at most 1000.
      pageToken: string, The next_page_token value returned from a previous list request.
      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # The response message for Webhooks.ListWebhooks.
      "nextPageToken": "A String", # Token to retrieve the next page of results, or empty if there are no more results in the list.
      "webhooks": [ # The list of webhooks. There will be a maximum number of items returned based on the page_size field in the request.
        { # Webhooks host the developer's business logic. During a session, webhooks allow the developer to use the data extracted by Dialogflow's natural language processing to generate dynamic responses, validate collected data, or trigger actions on the backend.
          "disabled": True or False, # Indicates whether the webhook is disabled.
          "displayName": "A String", # Required. The human-readable name of the webhook, unique within the agent.
          "genericWebService": { # Represents configuration for a generic web service. # Configuration for a generic web service.
            "allowedCaCerts": [ # 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'") ```
              "A String",
            ],
            "httpMethod": "A String", # Optional. HTTP method for the flexible webhook calls. Standard webhook always uses POST.
            "oauthConfig": { # Represents configuration of OAuth client credential flow for 3rd party API authentication. # Optional. The OAuth configuration of the webhook. If specified, Dialogflow will initiate the OAuth client credential flow to exchange an access token from the 3rd party platform and put it in the auth header.
              "clientId": "A String", # Required. The client ID provided by the 3rd party platform.
              "clientSecret": "A String", # Optional. The client secret provided by the 3rd party platform.
              "scopes": [ # Optional. The OAuth scopes to grant.
                "A String",
              ],
              "secretVersionForClientSecret": "A String", # Optional. The name of the SecretManager secret version resource storing the client secret. If this field is set, the `client_secret` field will be ignored. Format: `projects/{project}/secrets/{secret}/versions/{version}`
              "tokenEndpoint": "A String", # Required. The token endpoint provided by the 3rd party platform to exchange an access token.
            },
            "parameterMapping": { # 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
              "a_key": "A String",
            },
            "password": "A String", # The password for HTTP Basic authentication.
            "requestBody": "A String", # Optional. Defines a custom JSON object as request body to send to flexible webhook.
            "requestHeaders": { # The HTTP request headers to send together with webhook requests.
              "a_key": "A String",
            },
            "secretVersionForUsernamePassword": "A String", # Optional. The SecretManager secret version resource storing the username:password pair for HTTP Basic authentication. Format: `projects/{project}/secrets/{secret}/versions/{version}`
            "secretVersionsForRequestHeaders": { # Optional. The HTTP request headers to send together with webhook requests. Header values are stored in SecretManager secret versions. When the same header name is specified in both `request_headers` and `secret_versions_for_request_headers`, the value in `secret_versions_for_request_headers` will be used.
              "a_key": { # Represents the value of an HTTP header stored in a SecretManager secret version.
                "secretVersion": "A String", # Required. The SecretManager secret version resource storing the header value. Format: `projects/{project}/secrets/{secret}/versions/{version}`
              },
            },
            "serviceAccountAuthConfig": { # Configuration for authentication using a service account. # Optional. Configuration for service account authentication.
              "serviceAccount": "A String", # Required. The email address of the service account used to authenticate the webhook call. Dialogflow uses this service account to exchange an access token and the access token is then sent in the `Authorization` header of the webhook request. The service account must have the `roles/iam.serviceAccountTokenCreator` role granted to the [Dialogflow service agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
            },
            "serviceAgentAuth": "A String", # Optional. Indicate the auth token type generated from the [Diglogflow service agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). The generated token is sent in the Authorization header.
            "uri": "A String", # Required. The webhook URI for receiving POST requests. It must use https protocol.
            "username": "A String", # The user name for HTTP Basic authentication.
            "webhookType": "A String", # Optional. Type of the webhook.
          },
          "name": "A String", # The unique identifier of the webhook. Required for the Webhooks.UpdateWebhook method. Webhooks.CreateWebhook populates the name automatically. Format: `projects//locations//agents//webhooks/`.
          "serviceDirectory": { # Represents configuration for a [Service Directory](https://cloud.google.com/service-directory) service. # Configuration for a [Service Directory](https://cloud.google.com/service-directory) service.
            "genericWebService": { # Represents configuration for a generic web service. # Generic Service configuration of this webhook.
              "allowedCaCerts": [ # 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'") ```
                "A String",
              ],
              "httpMethod": "A String", # Optional. HTTP method for the flexible webhook calls. Standard webhook always uses POST.
              "oauthConfig": { # Represents configuration of OAuth client credential flow for 3rd party API authentication. # Optional. The OAuth configuration of the webhook. If specified, Dialogflow will initiate the OAuth client credential flow to exchange an access token from the 3rd party platform and put it in the auth header.
                "clientId": "A String", # Required. The client ID provided by the 3rd party platform.
                "clientSecret": "A String", # Optional. The client secret provided by the 3rd party platform.
                "scopes": [ # Optional. The OAuth scopes to grant.
                  "A String",
                ],
                "secretVersionForClientSecret": "A String", # Optional. The name of the SecretManager secret version resource storing the client secret. If this field is set, the `client_secret` field will be ignored. Format: `projects/{project}/secrets/{secret}/versions/{version}`
                "tokenEndpoint": "A String", # Required. The token endpoint provided by the 3rd party platform to exchange an access token.
              },
              "parameterMapping": { # 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
                "a_key": "A String",
              },
              "password": "A String", # The password for HTTP Basic authentication.
              "requestBody": "A String", # Optional. Defines a custom JSON object as request body to send to flexible webhook.
              "requestHeaders": { # The HTTP request headers to send together with webhook requests.
                "a_key": "A String",
              },
              "secretVersionForUsernamePassword": "A String", # Optional. The SecretManager secret version resource storing the username:password pair for HTTP Basic authentication. Format: `projects/{project}/secrets/{secret}/versions/{version}`
              "secretVersionsForRequestHeaders": { # Optional. The HTTP request headers to send together with webhook requests. Header values are stored in SecretManager secret versions. When the same header name is specified in both `request_headers` and `secret_versions_for_request_headers`, the value in `secret_versions_for_request_headers` will be used.
                "a_key": { # Represents the value of an HTTP header stored in a SecretManager secret version.
                  "secretVersion": "A String", # Required. The SecretManager secret version resource storing the header value. Format: `projects/{project}/secrets/{secret}/versions/{version}`
                },
              },
              "serviceAccountAuthConfig": { # Configuration for authentication using a service account. # Optional. Configuration for service account authentication.
                "serviceAccount": "A String", # Required. The email address of the service account used to authenticate the webhook call. Dialogflow uses this service account to exchange an access token and the access token is then sent in the `Authorization` header of the webhook request. The service account must have the `roles/iam.serviceAccountTokenCreator` role granted to the [Dialogflow service agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
              },
              "serviceAgentAuth": "A String", # Optional. Indicate the auth token type generated from the [Diglogflow service agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). The generated token is sent in the Authorization header.
              "uri": "A String", # Required. The webhook URI for receiving POST requests. It must use https protocol.
              "username": "A String", # The user name for HTTP Basic authentication.
              "webhookType": "A String", # Optional. Type of the webhook.
            },
            "service": "A String", # Required. The name of [Service Directory](https://cloud.google.com/service-directory) service. Format: `projects//locations//namespaces//services/`. `Location ID` of the service directory must be the same as the location of the agent.
          },
          "timeout": "A String", # Webhook execution timeout. Execution is considered failed if Dialogflow doesn't receive a response from webhook at the end of the timeout period. Defaults to 5 seconds, maximum allowed timeout is 30 seconds.
        },
      ],
    }

`list_next()`

    Retrieves the next page of results.

            Args:
              previous_request: The request for the previous page. (required)
              previous_response: The response from the request for the previous page. (required)

            Returns:
              A request object that you can call 'execute()' on to request the next
              page. Returns None if there are no more items in the collection.

`patch(name, body=None, updateMask=None, x__xgafv=None)`

    Updates the specified webhook.

    Args:
      name: string, The unique identifier of the webhook. Required for the Webhooks.UpdateWebhook method. Webhooks.CreateWebhook populates the name automatically. Format: `projects//locations//agents//webhooks/`. (required)
      body: object, The request body.
        The object takes the form of:

    { # Webhooks host the developer's business logic. During a session, webhooks allow the developer to use the data extracted by Dialogflow's natural language processing to generate dynamic responses, validate collected data, or trigger actions on the backend.
      "disabled": True or False, # Indicates whether the webhook is disabled.
      "displayName": "A String", # Required. The human-readable name of the webhook, unique within the agent.
      "genericWebService": { # Represents configuration for a generic web service. # Configuration for a generic web service.
        "allowedCaCerts": [ # 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'") ```
          "A String",
        ],
        "httpMethod": "A String", # Optional. HTTP method for the flexible webhook calls. Standard webhook always uses POST.
        "oauthConfig": { # Represents configuration of OAuth client credential flow for 3rd party API authentication. # Optional. The OAuth configuration of the webhook. If specified, Dialogflow will initiate the OAuth client credential flow to exchange an access token from the 3rd party platform and put it in the auth header.
          "clientId": "A String", # Required. The client ID provided by the 3rd party platform.
          "clientSecret": "A String", # Optional. The client secret provided by the 3rd party platform.
          "scopes": [ # Optional. The OAuth scopes to grant.
            "A String",
          ],
          "secretVersionForClientSecret": "A String", # Optional. The name of the SecretManager secret version resource storing the client secret. If this field is set, the `client_secret` field will be ignored. Format: `projects/{project}/secrets/{secret}/versions/{version}`
          "tokenEndpoint": "A String", # Required. The token endpoint provided by the 3rd party platform to exchange an access token.
        },
        "parameterMapping": { # 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
          "a_key": "A String",
        },
        "password": "A String", # The password for HTTP Basic authentication.
        "requestBody": "A String", # Optional. Defines a custom JSON object as request body to send to flexible webhook.
        "requestHeaders": { # The HTTP request headers to send together with webhook requests.
          "a_key": "A String",
        },
        "secretVersionForUsernamePassword": "A String", # Optional. The SecretManager secret version resource storing the username:password pair for HTTP Basic authentication. Format: `projects/{project}/secrets/{secret}/versions/{version}`
        "secretVersionsForRequestHeaders": { # Optional. The HTTP request headers to send together with webhook requests. Header values are stored in SecretManager secret versions. When the same header name is specified in both `request_headers` and `secret_versions_for_request_headers`, the value in `secret_versions_for_request_headers` will be used.
          "a_key": { # Represents the value of an HTTP header stored in a SecretManager secret version.
            "secretVersion": "A String", # Required. The SecretManager secret version resource storing the header value. Format: `projects/{project}/secrets/{secret}/versions/{version}`
          },
        },
        "serviceAccountAuthConfig": { # Configuration for authentication using a service account. # Optional. Configuration for service account authentication.
          "serviceAccount": "A String", # Required. The email address of the service account used to authenticate the webhook call. Dialogflow uses this service account to exchange an access token and the access token is then sent in the `Authorization` header of the webhook request. The service account must have the `roles/iam.serviceAccountTokenCreator` role granted to the [Dialogflow service agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
        },
        "serviceAgentAuth": "A String", # Optional. Indicate the auth token type generated from the [Diglogflow service agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). The generated token is sent in the Authorization header.
        "uri": "A String", # Required. The webhook URI for receiving POST requests. It must use https protocol.
        "username": "A String", # The user name for HTTP Basic authentication.
        "webhookType": "A String", # Optional. Type of the webhook.
      },
      "name": "A String", # The unique identifier of the webhook. Required for the Webhooks.UpdateWebhook method. Webhooks.CreateWebhook populates the name automatically. Format: `projects//locations//agents//webhooks/`.
      "serviceDirectory": { # Represents configuration for a [Service Directory](https://cloud.google.com/service-directory) service. # Configuration for a [Service Directory](https://cloud.google.com/service-directory) service.
        "genericWebService": { # Represents configuration for a generic web service. # Generic Service configuration of this webhook.
          "allowedCaCerts": [ # 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'") ```
            "A String",
          ],
          "httpMethod": "A String", # Optional. HTTP method for the flexible webhook calls. Standard webhook always uses POST.
          "oauthConfig": { # Represents configuration of OAuth client credential flow for 3rd party API authentication. # Optional. The OAuth configuration of the webhook. If specified, Dialogflow will initiate the OAuth client credential flow to exchange an access token from the 3rd party platform and put it in the auth header.
            "clientId": "A String", # Required. The client ID provided by the 3rd party platform.
            "clientSecret": "A String", # Optional. The client secret provided by the 3rd party platform.
            "scopes": [ # Optional. The OAuth scopes to grant.
              "A String",
            ],
            "secretVersionForClientSecret": "A String", # Optional. The name of the SecretManager secret version resource storing the client secret. If this field is set, the `client_secret` field will be ignored. Format: `projects/{project}/secrets/{secret}/versions/{version}`
            "tokenEndpoint": "A String", # Required. The token endpoint provided by the 3rd party platform to exchange an access token.
          },
          "parameterMapping": { # 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
            "a_key": "A String",
          },
          "password": "A String", # The password for HTTP Basic authentication.
          "requestBody": "A String", # Optional. Defines a custom JSON object as request body to send to flexible webhook.
          "requestHeaders": { # The HTTP request headers to send together with webhook requests.
            "a_key": "A String",
          },
          "secretVersionForUsernamePassword": "A String", # Optional. The SecretManager secret version resource storing the username:password pair for HTTP Basic authentication. Format: `projects/{project}/secrets/{secret}/versions/{version}`
          "secretVersionsForRequestHeaders": { # Optional. The HTTP request headers to send together with webhook requests. Header values are stored in SecretManager secret versions. When the same header name is specified in both `request_headers` and `secret_versions_for_request_headers`, the value in `secret_versions_for_request_headers` will be used.
            "a_key": { # Represents the value of an HTTP header stored in a SecretManager secret version.
              "secretVersion": "A String", # Required. The SecretManager secret version resource storing the header value. Format: `projects/{project}/secrets/{secret}/versions/{version}`
            },
          },
          "serviceAccountAuthConfig": { # Configuration for authentication using a service account. # Optional. Configuration for service account authentication.
            "serviceAccount": "A String", # Required. The email address of the service account used to authenticate the webhook call. Dialogflow uses this service account to exchange an access token and the access token is then sent in the `Authorization` header of the webhook request. The service account must have the `roles/iam.serviceAccountTokenCreator` role granted to the [Dialogflow service agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
          },
          "serviceAgentAuth": "A String", # Optional. Indicate the auth token type generated from the [Diglogflow service agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). The generated token is sent in the Authorization header.
          "uri": "A String", # Required. The webhook URI for receiving POST requests. It must use https protocol.
          "username": "A String", # The user name for HTTP Basic authentication.
          "webhookType": "A String", # Optional. Type of the webhook.
        },
        "service": "A String", # Required. The name of [Service Directory](https://cloud.google.com/service-directory) service. Format: `projects//locations//namespaces//services/`. `Location ID` of the service directory must be the same as the location of the agent.
      },
      "timeout": "A String", # Webhook execution timeout. Execution is considered failed if Dialogflow doesn't receive a response from webhook at the end of the timeout period. Defaults to 5 seconds, maximum allowed timeout is 30 seconds.
    }

      updateMask: string, The mask to control which fields get updated. If the mask is not present, all fields will be updated.
      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # Webhooks host the developer's business logic. During a session, webhooks allow the developer to use the data extracted by Dialogflow's natural language processing to generate dynamic responses, validate collected data, or trigger actions on the backend.
      "disabled": True or False, # Indicates whether the webhook is disabled.
      "displayName": "A String", # Required. The human-readable name of the webhook, unique within the agent.
      "genericWebService": { # Represents configuration for a generic web service. # Configuration for a generic web service.
        "allowedCaCerts": [ # 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'") ```
          "A String",
        ],
        "httpMethod": "A String", # Optional. HTTP method for the flexible webhook calls. Standard webhook always uses POST.
        "oauthConfig": { # Represents configuration of OAuth client credential flow for 3rd party API authentication. # Optional. The OAuth configuration of the webhook. If specified, Dialogflow will initiate the OAuth client credential flow to exchange an access token from the 3rd party platform and put it in the auth header.
          "clientId": "A String", # Required. The client ID provided by the 3rd party platform.
          "clientSecret": "A String", # Optional. The client secret provided by the 3rd party platform.
          "scopes": [ # Optional. The OAuth scopes to grant.
            "A String",
          ],
          "secretVersionForClientSecret": "A String", # Optional. The name of the SecretManager secret version resource storing the client secret. If this field is set, the `client_secret` field will be ignored. Format: `projects/{project}/secrets/{secret}/versions/{version}`
          "tokenEndpoint": "A String", # Required. The token endpoint provided by the 3rd party platform to exchange an access token.
        },
        "parameterMapping": { # 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
          "a_key": "A String",
        },
        "password": "A String", # The password for HTTP Basic authentication.
        "requestBody": "A String", # Optional. Defines a custom JSON object as request body to send to flexible webhook.
        "requestHeaders": { # The HTTP request headers to send together with webhook requests.
          "a_key": "A String",
        },
        "secretVersionForUsernamePassword": "A String", # Optional. The SecretManager secret version resource storing the username:password pair for HTTP Basic authentication. Format: `projects/{project}/secrets/{secret}/versions/{version}`
        "secretVersionsForRequestHeaders": { # Optional. The HTTP request headers to send together with webhook requests. Header values are stored in SecretManager secret versions. When the same header name is specified in both `request_headers` and `secret_versions_for_request_headers`, the value in `secret_versions_for_request_headers` will be used.
          "a_key": { # Represents the value of an HTTP header stored in a SecretManager secret version.
            "secretVersion": "A String", # Required. The SecretManager secret version resource storing the header value. Format: `projects/{project}/secrets/{secret}/versions/{version}`
          },
        },
        "serviceAccountAuthConfig": { # Configuration for authentication using a service account. # Optional. Configuration for service account authentication.
          "serviceAccount": "A String", # Required. The email address of the service account used to authenticate the webhook call. Dialogflow uses this service account to exchange an access token and the access token is then sent in the `Authorization` header of the webhook request. The service account must have the `roles/iam.serviceAccountTokenCreator` role granted to the [Dialogflow service agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
        },
        "serviceAgentAuth": "A String", # Optional. Indicate the auth token type generated from the [Diglogflow service agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). The generated token is sent in the Authorization header.
        "uri": "A String", # Required. The webhook URI for receiving POST requests. It must use https protocol.
        "username": "A String", # The user name for HTTP Basic authentication.
        "webhookType": "A String", # Optional. Type of the webhook.
      },
      "name": "A String", # The unique identifier of the webhook. Required for the Webhooks.UpdateWebhook method. Webhooks.CreateWebhook populates the name automatically. Format: `projects//locations//agents//webhooks/`.
      "serviceDirectory": { # Represents configuration for a [Service Directory](https://cloud.google.com/service-directory) service. # Configuration for a [Service Directory](https://cloud.google.com/service-directory) service.
        "genericWebService": { # Represents configuration for a generic web service. # Generic Service configuration of this webhook.
          "allowedCaCerts": [ # 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'") ```
            "A String",
          ],
          "httpMethod": "A String", # Optional. HTTP method for the flexible webhook calls. Standard webhook always uses POST.
          "oauthConfig": { # Represents configuration of OAuth client credential flow for 3rd party API authentication. # Optional. The OAuth configuration of the webhook. If specified, Dialogflow will initiate the OAuth client credential flow to exchange an access token from the 3rd party platform and put it in the auth header.
            "clientId": "A String", # Required. The client ID provided by the 3rd party platform.
            "clientSecret": "A String", # Optional. The client secret provided by the 3rd party platform.
            "scopes": [ # Optional. The OAuth scopes to grant.
              "A String",
            ],
            "secretVersionForClientSecret": "A String", # Optional. The name of the SecretManager secret version resource storing the client secret. If this field is set, the `client_secret` field will be ignored. Format: `projects/{project}/secrets/{secret}/versions/{version}`
            "tokenEndpoint": "A String", # Required. The token endpoint provided by the 3rd party platform to exchange an access token.
          },
          "parameterMapping": { # 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
            "a_key": "A String",
          },
          "password": "A String", # The password for HTTP Basic authentication.
          "requestBody": "A String", # Optional. Defines a custom JSON object as request body to send to flexible webhook.
          "requestHeaders": { # The HTTP request headers to send together with webhook requests.
            "a_key": "A String",
          },
          "secretVersionForUsernamePassword": "A String", # Optional. The SecretManager secret version resource storing the username:password pair for HTTP Basic authentication. Format: `projects/{project}/secrets/{secret}/versions/{version}`
          "secretVersionsForRequestHeaders": { # Optional. The HTTP request headers to send together with webhook requests. Header values are stored in SecretManager secret versions. When the same header name is specified in both `request_headers` and `secret_versions_for_request_headers`, the value in `secret_versions_for_request_headers` will be used.
            "a_key": { # Represents the value of an HTTP header stored in a SecretManager secret version.
              "secretVersion": "A String", # Required. The SecretManager secret version resource storing the header value. Format: `projects/{project}/secrets/{secret}/versions/{version}`
            },
          },
          "serviceAccountAuthConfig": { # Configuration for authentication using a service account. # Optional. Configuration for service account authentication.
            "serviceAccount": "A String", # Required. The email address of the service account used to authenticate the webhook call. Dialogflow uses this service account to exchange an access token and the access token is then sent in the `Authorization` header of the webhook request. The service account must have the `roles/iam.serviceAccountTokenCreator` role granted to the [Dialogflow service agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
          },
          "serviceAgentAuth": "A String", # Optional. Indicate the auth token type generated from the [Diglogflow service agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). The generated token is sent in the Authorization header.
          "uri": "A String", # Required. The webhook URI for receiving POST requests. It must use https protocol.
          "username": "A String", # The user name for HTTP Basic authentication.
          "webhookType": "A String", # Optional. Type of the webhook.
        },
        "service": "A String", # Required. The name of [Service Directory](https://cloud.google.com/service-directory) service. Format: `projects//locations//namespaces//services/`. `Location ID` of the service directory must be the same as the location of the agent.
      },
      "timeout": "A String", # Webhook execution timeout. Execution is considered failed if Dialogflow doesn't receive a response from webhook at the end of the timeout period. Defaults to 5 seconds, maximum allowed timeout is 30 seconds.
    }