Struct google_api_proto::google::cloud::dialogflow::cx::v3beta1::webhook::GenericWebService
source · pub struct GenericWebService {
pub uri: String,
pub username: String,
pub password: String,
pub request_headers: BTreeMap<String, String>,
pub allowed_ca_certs: Vec<Bytes>,
pub oauth_config: Option<OAuthConfig>,
pub service_agent_auth: i32,
pub webhook_type: i32,
pub http_method: i32,
pub request_body: String,
pub parameter_mapping: BTreeMap<String, String>,
}
Expand description
Represents configuration for a generic web service.
Fields§
§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: BTreeMap<String, String>
The HTTP request headers to send together with webhook requests.
allowed_ca_certs: Vec<Bytes>
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'")
oauth_config: Option<OAuthConfig>
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.
service_agent_auth: i32
Optional. Indicate the auth token type generated from the Diglogflow service agent. The generated token is sent in the Authorization header.
webhook_type: i32
Optional. Type of the webhook.
http_method: i32
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: BTreeMap<String, String>
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
Implementations§
source§impl GenericWebService
impl GenericWebService
sourcepub fn webhook_type(&self) -> WebhookType
pub fn webhook_type(&self) -> WebhookType
Returns the enum value of webhook_type
, or the default if the field is set to an invalid enum value.
sourcepub fn set_webhook_type(&mut self, value: WebhookType)
pub fn set_webhook_type(&mut self, value: WebhookType)
Sets webhook_type
to the provided enum value.
sourcepub fn http_method(&self) -> HttpMethod
pub fn http_method(&self) -> HttpMethod
Returns the enum value of http_method
, or the default if the field is set to an invalid enum value.
sourcepub fn set_http_method(&mut self, value: HttpMethod)
pub fn set_http_method(&mut self, value: HttpMethod)
Sets http_method
to the provided enum value.
sourcepub fn service_agent_auth(&self) -> ServiceAgentAuth
pub fn service_agent_auth(&self) -> ServiceAgentAuth
Returns the enum value of service_agent_auth
, or the default if the field is set to an invalid enum value.
sourcepub fn set_service_agent_auth(&mut self, value: ServiceAgentAuth)
pub fn set_service_agent_auth(&mut self, value: ServiceAgentAuth)
Sets service_agent_auth
to the provided enum value.
Trait Implementations§
source§impl Clone for GenericWebService
impl Clone for GenericWebService
source§fn clone(&self) -> GenericWebService
fn clone(&self) -> GenericWebService
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for GenericWebService
impl Debug for GenericWebService
source§impl Default for GenericWebService
impl Default for GenericWebService
source§impl Message for GenericWebService
impl Message for GenericWebService
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for GenericWebService
impl PartialEq for GenericWebService
source§fn eq(&self, other: &GenericWebService) -> bool
fn eq(&self, other: &GenericWebService) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for GenericWebService
Auto Trait Implementations§
impl Freeze for GenericWebService
impl RefUnwindSafe for GenericWebService
impl Send for GenericWebService
impl Sync for GenericWebService
impl Unpin for GenericWebService
impl UnwindSafe for GenericWebService
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request