#[non_exhaustive]pub struct SlackIntegrationChannelDisplay {
pub message: Option<bool>,
pub mute_buttons: Option<bool>,
pub notified: Option<bool>,
pub snapshot: Option<bool>,
pub tags: Option<bool>,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
Configuration options for what is shown in an alert event message.
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.message: Option<bool>
Show the main body of the alert event.
Show interactive buttons to mute the alerting monitor.
notified: Option<bool>
Show the list of @-handles in the alert event.
snapshot: Option<bool>
Show the alert event’s snapshot image.
Show the scopes on which the monitor alerted.
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl SlackIntegrationChannelDisplay
impl SlackIntegrationChannelDisplay
Sourcepub fn new() -> SlackIntegrationChannelDisplay
pub fn new() -> SlackIntegrationChannelDisplay
Examples found in repository?
examples/v1_slack-integration_CreateSlackIntegrationChannel.rs (line 11)
8async fn main() {
9 let body = SlackIntegrationChannel::new()
10 .display(
11 SlackIntegrationChannelDisplay::new()
12 .message(true)
13 .mute_buttons(false)
14 .notified(true)
15 .snapshot(true)
16 .tags(true),
17 )
18 .name("#general".to_string());
19 let configuration = datadog::Configuration::new();
20 let api = SlackIntegrationAPI::with_config(configuration);
21 let resp = api
22 .create_slack_integration_channel("account_name".to_string(), body)
23 .await;
24 if let Ok(value) = resp {
25 println!("{:#?}", value);
26 } else {
27 println!("{:#?}", resp.unwrap_err());
28 }
29}
More examples
examples/v1_slack-integration_UpdateSlackIntegrationChannel.rs (line 11)
8async fn main() {
9 let body = SlackIntegrationChannel::new()
10 .display(
11 SlackIntegrationChannelDisplay::new()
12 .message(true)
13 .mute_buttons(false)
14 .notified(true)
15 .snapshot(true)
16 .tags(true),
17 )
18 .name("#general".to_string());
19 let configuration = datadog::Configuration::new();
20 let api = SlackIntegrationAPI::with_config(configuration);
21 let resp = api
22 .update_slack_integration_channel(
23 "account_name".to_string(),
24 "channel_name".to_string(),
25 body,
26 )
27 .await;
28 if let Ok(value) = resp {
29 println!("{:#?}", value);
30 } else {
31 println!("{:#?}", resp.unwrap_err());
32 }
33}
Sourcepub fn message(self, value: bool) -> Self
pub fn message(self, value: bool) -> Self
Examples found in repository?
examples/v1_slack-integration_CreateSlackIntegrationChannel.rs (line 12)
8async fn main() {
9 let body = SlackIntegrationChannel::new()
10 .display(
11 SlackIntegrationChannelDisplay::new()
12 .message(true)
13 .mute_buttons(false)
14 .notified(true)
15 .snapshot(true)
16 .tags(true),
17 )
18 .name("#general".to_string());
19 let configuration = datadog::Configuration::new();
20 let api = SlackIntegrationAPI::with_config(configuration);
21 let resp = api
22 .create_slack_integration_channel("account_name".to_string(), body)
23 .await;
24 if let Ok(value) = resp {
25 println!("{:#?}", value);
26 } else {
27 println!("{:#?}", resp.unwrap_err());
28 }
29}
More examples
examples/v1_slack-integration_UpdateSlackIntegrationChannel.rs (line 12)
8async fn main() {
9 let body = SlackIntegrationChannel::new()
10 .display(
11 SlackIntegrationChannelDisplay::new()
12 .message(true)
13 .mute_buttons(false)
14 .notified(true)
15 .snapshot(true)
16 .tags(true),
17 )
18 .name("#general".to_string());
19 let configuration = datadog::Configuration::new();
20 let api = SlackIntegrationAPI::with_config(configuration);
21 let resp = api
22 .update_slack_integration_channel(
23 "account_name".to_string(),
24 "channel_name".to_string(),
25 body,
26 )
27 .await;
28 if let Ok(value) = resp {
29 println!("{:#?}", value);
30 } else {
31 println!("{:#?}", resp.unwrap_err());
32 }
33}
Examples found in repository?
examples/v1_slack-integration_CreateSlackIntegrationChannel.rs (line 13)
8async fn main() {
9 let body = SlackIntegrationChannel::new()
10 .display(
11 SlackIntegrationChannelDisplay::new()
12 .message(true)
13 .mute_buttons(false)
14 .notified(true)
15 .snapshot(true)
16 .tags(true),
17 )
18 .name("#general".to_string());
19 let configuration = datadog::Configuration::new();
20 let api = SlackIntegrationAPI::with_config(configuration);
21 let resp = api
22 .create_slack_integration_channel("account_name".to_string(), body)
23 .await;
24 if let Ok(value) = resp {
25 println!("{:#?}", value);
26 } else {
27 println!("{:#?}", resp.unwrap_err());
28 }
29}
More examples
examples/v1_slack-integration_UpdateSlackIntegrationChannel.rs (line 13)
8async fn main() {
9 let body = SlackIntegrationChannel::new()
10 .display(
11 SlackIntegrationChannelDisplay::new()
12 .message(true)
13 .mute_buttons(false)
14 .notified(true)
15 .snapshot(true)
16 .tags(true),
17 )
18 .name("#general".to_string());
19 let configuration = datadog::Configuration::new();
20 let api = SlackIntegrationAPI::with_config(configuration);
21 let resp = api
22 .update_slack_integration_channel(
23 "account_name".to_string(),
24 "channel_name".to_string(),
25 body,
26 )
27 .await;
28 if let Ok(value) = resp {
29 println!("{:#?}", value);
30 } else {
31 println!("{:#?}", resp.unwrap_err());
32 }
33}
Sourcepub fn notified(self, value: bool) -> Self
pub fn notified(self, value: bool) -> Self
Examples found in repository?
examples/v1_slack-integration_CreateSlackIntegrationChannel.rs (line 14)
8async fn main() {
9 let body = SlackIntegrationChannel::new()
10 .display(
11 SlackIntegrationChannelDisplay::new()
12 .message(true)
13 .mute_buttons(false)
14 .notified(true)
15 .snapshot(true)
16 .tags(true),
17 )
18 .name("#general".to_string());
19 let configuration = datadog::Configuration::new();
20 let api = SlackIntegrationAPI::with_config(configuration);
21 let resp = api
22 .create_slack_integration_channel("account_name".to_string(), body)
23 .await;
24 if let Ok(value) = resp {
25 println!("{:#?}", value);
26 } else {
27 println!("{:#?}", resp.unwrap_err());
28 }
29}
More examples
examples/v1_slack-integration_UpdateSlackIntegrationChannel.rs (line 14)
8async fn main() {
9 let body = SlackIntegrationChannel::new()
10 .display(
11 SlackIntegrationChannelDisplay::new()
12 .message(true)
13 .mute_buttons(false)
14 .notified(true)
15 .snapshot(true)
16 .tags(true),
17 )
18 .name("#general".to_string());
19 let configuration = datadog::Configuration::new();
20 let api = SlackIntegrationAPI::with_config(configuration);
21 let resp = api
22 .update_slack_integration_channel(
23 "account_name".to_string(),
24 "channel_name".to_string(),
25 body,
26 )
27 .await;
28 if let Ok(value) = resp {
29 println!("{:#?}", value);
30 } else {
31 println!("{:#?}", resp.unwrap_err());
32 }
33}
Sourcepub fn snapshot(self, value: bool) -> Self
pub fn snapshot(self, value: bool) -> Self
Examples found in repository?
examples/v1_slack-integration_CreateSlackIntegrationChannel.rs (line 15)
8async fn main() {
9 let body = SlackIntegrationChannel::new()
10 .display(
11 SlackIntegrationChannelDisplay::new()
12 .message(true)
13 .mute_buttons(false)
14 .notified(true)
15 .snapshot(true)
16 .tags(true),
17 )
18 .name("#general".to_string());
19 let configuration = datadog::Configuration::new();
20 let api = SlackIntegrationAPI::with_config(configuration);
21 let resp = api
22 .create_slack_integration_channel("account_name".to_string(), body)
23 .await;
24 if let Ok(value) = resp {
25 println!("{:#?}", value);
26 } else {
27 println!("{:#?}", resp.unwrap_err());
28 }
29}
More examples
examples/v1_slack-integration_UpdateSlackIntegrationChannel.rs (line 15)
8async fn main() {
9 let body = SlackIntegrationChannel::new()
10 .display(
11 SlackIntegrationChannelDisplay::new()
12 .message(true)
13 .mute_buttons(false)
14 .notified(true)
15 .snapshot(true)
16 .tags(true),
17 )
18 .name("#general".to_string());
19 let configuration = datadog::Configuration::new();
20 let api = SlackIntegrationAPI::with_config(configuration);
21 let resp = api
22 .update_slack_integration_channel(
23 "account_name".to_string(),
24 "channel_name".to_string(),
25 body,
26 )
27 .await;
28 if let Ok(value) = resp {
29 println!("{:#?}", value);
30 } else {
31 println!("{:#?}", resp.unwrap_err());
32 }
33}
Examples found in repository?
examples/v1_slack-integration_CreateSlackIntegrationChannel.rs (line 16)
8async fn main() {
9 let body = SlackIntegrationChannel::new()
10 .display(
11 SlackIntegrationChannelDisplay::new()
12 .message(true)
13 .mute_buttons(false)
14 .notified(true)
15 .snapshot(true)
16 .tags(true),
17 )
18 .name("#general".to_string());
19 let configuration = datadog::Configuration::new();
20 let api = SlackIntegrationAPI::with_config(configuration);
21 let resp = api
22 .create_slack_integration_channel("account_name".to_string(), body)
23 .await;
24 if let Ok(value) = resp {
25 println!("{:#?}", value);
26 } else {
27 println!("{:#?}", resp.unwrap_err());
28 }
29}
More examples
examples/v1_slack-integration_UpdateSlackIntegrationChannel.rs (line 16)
8async fn main() {
9 let body = SlackIntegrationChannel::new()
10 .display(
11 SlackIntegrationChannelDisplay::new()
12 .message(true)
13 .mute_buttons(false)
14 .notified(true)
15 .snapshot(true)
16 .tags(true),
17 )
18 .name("#general".to_string());
19 let configuration = datadog::Configuration::new();
20 let api = SlackIntegrationAPI::with_config(configuration);
21 let resp = api
22 .update_slack_integration_channel(
23 "account_name".to_string(),
24 "channel_name".to_string(),
25 body,
26 )
27 .await;
28 if let Ok(value) = resp {
29 println!("{:#?}", value);
30 } else {
31 println!("{:#?}", resp.unwrap_err());
32 }
33}
pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
Source§impl Clone for SlackIntegrationChannelDisplay
impl Clone for SlackIntegrationChannelDisplay
Source§fn clone(&self) -> SlackIntegrationChannelDisplay
fn clone(&self) -> SlackIntegrationChannelDisplay
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<'de> Deserialize<'de> for SlackIntegrationChannelDisplay
impl<'de> Deserialize<'de> for SlackIntegrationChannelDisplay
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for SlackIntegrationChannelDisplay
impl PartialEq for SlackIntegrationChannelDisplay
Source§fn eq(&self, other: &SlackIntegrationChannelDisplay) -> bool
fn eq(&self, other: &SlackIntegrationChannelDisplay) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.impl StructuralPartialEq for SlackIntegrationChannelDisplay
Auto Trait Implementations§
impl Freeze for SlackIntegrationChannelDisplay
impl RefUnwindSafe for SlackIntegrationChannelDisplay
impl Send for SlackIntegrationChannelDisplay
impl Sync for SlackIntegrationChannelDisplay
impl Unpin for SlackIntegrationChannelDisplay
impl UnwindSafe for SlackIntegrationChannelDisplay
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