#[non_exhaustive]pub struct SlackIntegrationChannel {
pub display: Option<SlackIntegrationChannelDisplay>,
pub name: Option<String>,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
The Slack channel configuration.
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.display: Option<SlackIntegrationChannelDisplay>
Configuration options for what is shown in an alert event message.
name: Option<String>
Your channel name.
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl SlackIntegrationChannel
impl SlackIntegrationChannel
Sourcepub fn new() -> SlackIntegrationChannel
pub fn new() -> SlackIntegrationChannel
Examples found in repository?
examples/v1_slack-integration_CreateSlackIntegrationChannel.rs (line 9)
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 9)
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 display(self, value: SlackIntegrationChannelDisplay) -> Self
pub fn display(self, value: SlackIntegrationChannelDisplay) -> Self
Examples found in repository?
examples/v1_slack-integration_CreateSlackIntegrationChannel.rs (lines 10-17)
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 (lines 10-17)
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 name(self, value: String) -> Self
pub fn name(self, value: String) -> Self
Examples found in repository?
examples/v1_slack-integration_CreateSlackIntegrationChannel.rs (line 18)
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 18)
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 SlackIntegrationChannel
impl Clone for SlackIntegrationChannel
Source§fn clone(&self) -> SlackIntegrationChannel
fn clone(&self) -> SlackIntegrationChannel
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 SlackIntegrationChannel
impl Debug for SlackIntegrationChannel
Source§impl Default for SlackIntegrationChannel
impl Default for SlackIntegrationChannel
Source§impl<'de> Deserialize<'de> for SlackIntegrationChannel
impl<'de> Deserialize<'de> for SlackIntegrationChannel
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 SlackIntegrationChannel
impl PartialEq for SlackIntegrationChannel
Source§impl Serialize for SlackIntegrationChannel
impl Serialize for SlackIntegrationChannel
impl StructuralPartialEq for SlackIntegrationChannel
Auto Trait Implementations§
impl Freeze for SlackIntegrationChannel
impl RefUnwindSafe for SlackIntegrationChannel
impl Send for SlackIntegrationChannel
impl Sync for SlackIntegrationChannel
impl Unpin for SlackIntegrationChannel
impl UnwindSafe for SlackIntegrationChannel
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