#[non_exhaustive]pub struct CreatePageRequestDataAttributes {
pub description: Option<String>,
pub tags: Option<Vec<String>>,
pub target: CreatePageRequestDataAttributesTarget,
pub title: String,
pub urgency: PageUrgency,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
Details about the On-Call Page you want to create.
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.description: Option<String>
A short summary of the issue or context.
Tags to help categorize or filter the page.
target: CreatePageRequestDataAttributesTarget
Information about the target to notify (such as a team or user).
title: String
The title of the page.
urgency: PageUrgency
On-Call Page urgency level.
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl CreatePageRequestDataAttributes
impl CreatePageRequestDataAttributes
Sourcepub fn new(
target: CreatePageRequestDataAttributesTarget,
title: String,
urgency: PageUrgency,
) -> CreatePageRequestDataAttributes
pub fn new( target: CreatePageRequestDataAttributesTarget, title: String, urgency: PageUrgency, ) -> CreatePageRequestDataAttributes
Examples found in repository?
examples/v2_on-call-paging_CreateOnCallPage.rs (lines 16-22)
13async fn main() {
14 let body = CreatePageRequest::new().data(
15 CreatePageRequestData::new(CreatePageRequestDataType::PAGES).attributes(
16 CreatePageRequestDataAttributes::new(
17 CreatePageRequestDataAttributesTarget::new()
18 .identifier("my-team".to_string())
19 .type_(OnCallPageTargetType::TEAM_HANDLE),
20 "Page title".to_string(),
21 PageUrgency::LOW,
22 )
23 .description("Page details.".to_string())
24 .tags(vec!["service:test".to_string()]),
25 ),
26 );
27 let configuration = datadog::Configuration::new();
28 let api = OnCallPagingAPI::with_config(configuration);
29 let resp = api.create_on_call_page(body).await;
30 if let Ok(value) = resp {
31 println!("{:#?}", value);
32 } else {
33 println!("{:#?}", resp.unwrap_err());
34 }
35}
Sourcepub fn description(self, value: String) -> Self
pub fn description(self, value: String) -> Self
Examples found in repository?
examples/v2_on-call-paging_CreateOnCallPage.rs (line 23)
13async fn main() {
14 let body = CreatePageRequest::new().data(
15 CreatePageRequestData::new(CreatePageRequestDataType::PAGES).attributes(
16 CreatePageRequestDataAttributes::new(
17 CreatePageRequestDataAttributesTarget::new()
18 .identifier("my-team".to_string())
19 .type_(OnCallPageTargetType::TEAM_HANDLE),
20 "Page title".to_string(),
21 PageUrgency::LOW,
22 )
23 .description("Page details.".to_string())
24 .tags(vec!["service:test".to_string()]),
25 ),
26 );
27 let configuration = datadog::Configuration::new();
28 let api = OnCallPagingAPI::with_config(configuration);
29 let resp = api.create_on_call_page(body).await;
30 if let Ok(value) = resp {
31 println!("{:#?}", value);
32 } else {
33 println!("{:#?}", resp.unwrap_err());
34 }
35}
Examples found in repository?
examples/v2_on-call-paging_CreateOnCallPage.rs (line 24)
13async fn main() {
14 let body = CreatePageRequest::new().data(
15 CreatePageRequestData::new(CreatePageRequestDataType::PAGES).attributes(
16 CreatePageRequestDataAttributes::new(
17 CreatePageRequestDataAttributesTarget::new()
18 .identifier("my-team".to_string())
19 .type_(OnCallPageTargetType::TEAM_HANDLE),
20 "Page title".to_string(),
21 PageUrgency::LOW,
22 )
23 .description("Page details.".to_string())
24 .tags(vec!["service:test".to_string()]),
25 ),
26 );
27 let configuration = datadog::Configuration::new();
28 let api = OnCallPagingAPI::with_config(configuration);
29 let resp = api.create_on_call_page(body).await;
30 if let Ok(value) = resp {
31 println!("{:#?}", value);
32 } else {
33 println!("{:#?}", resp.unwrap_err());
34 }
35}
pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
Source§impl Clone for CreatePageRequestDataAttributes
impl Clone for CreatePageRequestDataAttributes
Source§fn clone(&self) -> CreatePageRequestDataAttributes
fn clone(&self) -> CreatePageRequestDataAttributes
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 CreatePageRequestDataAttributes
impl<'de> Deserialize<'de> for CreatePageRequestDataAttributes
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 CreatePageRequestDataAttributes
impl PartialEq for CreatePageRequestDataAttributes
Source§fn eq(&self, other: &CreatePageRequestDataAttributes) -> bool
fn eq(&self, other: &CreatePageRequestDataAttributes) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.impl StructuralPartialEq for CreatePageRequestDataAttributes
Auto Trait Implementations§
impl Freeze for CreatePageRequestDataAttributes
impl RefUnwindSafe for CreatePageRequestDataAttributes
impl Send for CreatePageRequestDataAttributes
impl Sync for CreatePageRequestDataAttributes
impl Unpin for CreatePageRequestDataAttributes
impl UnwindSafe for CreatePageRequestDataAttributes
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