#[non_exhaustive]pub struct NotificationConfig {
pub topic: String,
pub message_format: MessageFormat,
/* private fields */
}Available on crate features
conversation-profiles or conversations only.Expand description
Defines notification behavior.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.topic: StringName of the Pub/Sub topic to publish conversation events like CONVERSATION_STARTED as serialized ConversationEvent protos.
For telephony integration to receive notification, make sure either this
topic is in the same project as the conversation or you grant
service-<Conversation Project Number>@gcp-sa-dialogflow.iam.gserviceaccount.com the Dialogflow Service Agent role in the topic project.
For chat integration to receive notification, make sure API caller has been
granted the Dialogflow Service Agent role for the topic.
Format: projects/<Project ID>/locations/<Location ID>/topics/<Topic ID>.
message_format: MessageFormatFormat of message.
Implementations§
Source§impl NotificationConfig
impl NotificationConfig
pub fn new() -> Self
Sourcepub fn set_message_format<T: Into<MessageFormat>>(self, v: T) -> Self
pub fn set_message_format<T: Into<MessageFormat>>(self, v: T) -> Self
Sets the value of message_format.
§Example
ⓘ
use google_cloud_dialogflow_v2::model::notification_config::MessageFormat;
let x0 = NotificationConfig::new().set_message_format(MessageFormat::Proto);
let x1 = NotificationConfig::new().set_message_format(MessageFormat::Json);Trait Implementations§
Source§impl Clone for NotificationConfig
impl Clone for NotificationConfig
Source§fn clone(&self) -> NotificationConfig
fn clone(&self) -> NotificationConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NotificationConfig
impl Debug for NotificationConfig
Source§impl Default for NotificationConfig
impl Default for NotificationConfig
Source§fn default() -> NotificationConfig
fn default() -> NotificationConfig
Returns the “default value” for a type. Read more
Source§impl Message for NotificationConfig
impl Message for NotificationConfig
Source§impl PartialEq for NotificationConfig
impl PartialEq for NotificationConfig
impl StructuralPartialEq for NotificationConfig
Auto Trait Implementations§
impl Freeze for NotificationConfig
impl RefUnwindSafe for NotificationConfig
impl Send for NotificationConfig
impl Sync for NotificationConfig
impl Unpin for NotificationConfig
impl UnwindSafe for NotificationConfig
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
Mutably borrows from an owned value. Read more