#[non_exhaustive]pub struct TeamCreateAttributes {
pub avatar: Option<Option<String>>,
pub banner: Option<Option<i64>>,
pub description: Option<String>,
pub handle: String,
pub hidden_modules: Option<Vec<String>>,
pub name: String,
pub visible_modules: Option<Vec<String>>,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
Team creation attributes
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.avatar: Option<Option<String>>
Unicode representation of the avatar for the team, limited to a single grapheme
Banner selection for the team
description: Option<String>
Free-form markdown description/content for the team’s homepage
handle: String
The team’s identifier
Collection of hidden modules for the team
name: String
The name of the team
visible_modules: Option<Vec<String>>
Collection of visible modules for the team
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl TeamCreateAttributes
impl TeamCreateAttributes
Sourcepub fn new(handle: String, name: String) -> TeamCreateAttributes
pub fn new(handle: String, name: String) -> TeamCreateAttributes
Examples found in repository?
examples/v2_teams_CreateTeam.rs (lines 15-18)
12async fn main() {
13 let body = TeamCreateRequest::new(
14 TeamCreate::new(
15 TeamCreateAttributes::new(
16 "test-handle-a0fc0297eb519635".to_string(),
17 "test-name-a0fc0297eb519635".to_string(),
18 ),
19 TeamType::TEAM,
20 )
21 .relationships(TeamCreateRelationships::new().users(RelationshipToUsers::new(vec![]))),
22 );
23 let configuration = datadog::Configuration::new();
24 let api = TeamsAPI::with_config(configuration);
25 let resp = api.create_team(body).await;
26 if let Ok(value) = resp {
27 println!("{:#?}", value);
28 } else {
29 println!("{:#?}", resp.unwrap_err());
30 }
31}
More examples
examples/v2_teams_CreateTeam_252121814.rs (lines 12-15)
10async fn main() {
11 let body = TeamCreateRequest::new(TeamCreate::new(
12 TeamCreateAttributes::new(
13 "test-handle-a0fc0297eb519635".to_string(),
14 "test-name-a0fc0297eb519635".to_string(),
15 )
16 .avatar(Some("🥑".to_string()))
17 .banner(Some(7))
18 .hidden_modules(vec!["m3".to_string()])
19 .visible_modules(vec!["m1".to_string(), "m2".to_string()]),
20 TeamType::TEAM,
21 ));
22 let configuration = datadog::Configuration::new();
23 let api = TeamsAPI::with_config(configuration);
24 let resp = api.create_team(body).await;
25 if let Ok(value) = resp {
26 println!("{:#?}", value);
27 } else {
28 println!("{:#?}", resp.unwrap_err());
29 }
30}
Sourcepub fn avatar(self, value: Option<String>) -> Self
pub fn avatar(self, value: Option<String>) -> Self
Examples found in repository?
examples/v2_teams_CreateTeam_252121814.rs (line 16)
10async fn main() {
11 let body = TeamCreateRequest::new(TeamCreate::new(
12 TeamCreateAttributes::new(
13 "test-handle-a0fc0297eb519635".to_string(),
14 "test-name-a0fc0297eb519635".to_string(),
15 )
16 .avatar(Some("🥑".to_string()))
17 .banner(Some(7))
18 .hidden_modules(vec!["m3".to_string()])
19 .visible_modules(vec!["m1".to_string(), "m2".to_string()]),
20 TeamType::TEAM,
21 ));
22 let configuration = datadog::Configuration::new();
23 let api = TeamsAPI::with_config(configuration);
24 let resp = api.create_team(body).await;
25 if let Ok(value) = resp {
26 println!("{:#?}", value);
27 } else {
28 println!("{:#?}", resp.unwrap_err());
29 }
30}
Examples found in repository?
examples/v2_teams_CreateTeam_252121814.rs (line 17)
10async fn main() {
11 let body = TeamCreateRequest::new(TeamCreate::new(
12 TeamCreateAttributes::new(
13 "test-handle-a0fc0297eb519635".to_string(),
14 "test-name-a0fc0297eb519635".to_string(),
15 )
16 .avatar(Some("🥑".to_string()))
17 .banner(Some(7))
18 .hidden_modules(vec!["m3".to_string()])
19 .visible_modules(vec!["m1".to_string(), "m2".to_string()]),
20 TeamType::TEAM,
21 ));
22 let configuration = datadog::Configuration::new();
23 let api = TeamsAPI::with_config(configuration);
24 let resp = api.create_team(body).await;
25 if let Ok(value) = resp {
26 println!("{:#?}", value);
27 } else {
28 println!("{:#?}", resp.unwrap_err());
29 }
30}
pub fn description(self, value: String) -> Self
Examples found in repository?
examples/v2_teams_CreateTeam_252121814.rs (line 18)
10async fn main() {
11 let body = TeamCreateRequest::new(TeamCreate::new(
12 TeamCreateAttributes::new(
13 "test-handle-a0fc0297eb519635".to_string(),
14 "test-name-a0fc0297eb519635".to_string(),
15 )
16 .avatar(Some("🥑".to_string()))
17 .banner(Some(7))
18 .hidden_modules(vec!["m3".to_string()])
19 .visible_modules(vec!["m1".to_string(), "m2".to_string()]),
20 TeamType::TEAM,
21 ));
22 let configuration = datadog::Configuration::new();
23 let api = TeamsAPI::with_config(configuration);
24 let resp = api.create_team(body).await;
25 if let Ok(value) = resp {
26 println!("{:#?}", value);
27 } else {
28 println!("{:#?}", resp.unwrap_err());
29 }
30}
Sourcepub fn visible_modules(self, value: Vec<String>) -> Self
pub fn visible_modules(self, value: Vec<String>) -> Self
Examples found in repository?
examples/v2_teams_CreateTeam_252121814.rs (line 19)
10async fn main() {
11 let body = TeamCreateRequest::new(TeamCreate::new(
12 TeamCreateAttributes::new(
13 "test-handle-a0fc0297eb519635".to_string(),
14 "test-name-a0fc0297eb519635".to_string(),
15 )
16 .avatar(Some("🥑".to_string()))
17 .banner(Some(7))
18 .hidden_modules(vec!["m3".to_string()])
19 .visible_modules(vec!["m1".to_string(), "m2".to_string()]),
20 TeamType::TEAM,
21 ));
22 let configuration = datadog::Configuration::new();
23 let api = TeamsAPI::with_config(configuration);
24 let resp = api.create_team(body).await;
25 if let Ok(value) = resp {
26 println!("{:#?}", value);
27 } else {
28 println!("{:#?}", resp.unwrap_err());
29 }
30}
pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
Source§impl Clone for TeamCreateAttributes
impl Clone for TeamCreateAttributes
Source§fn clone(&self) -> TeamCreateAttributes
fn clone(&self) -> TeamCreateAttributes
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 TeamCreateAttributes
impl Debug for TeamCreateAttributes
Source§impl<'de> Deserialize<'de> for TeamCreateAttributes
impl<'de> Deserialize<'de> for TeamCreateAttributes
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 TeamCreateAttributes
impl PartialEq for TeamCreateAttributes
Source§impl Serialize for TeamCreateAttributes
impl Serialize for TeamCreateAttributes
impl StructuralPartialEq for TeamCreateAttributes
Auto Trait Implementations§
impl Freeze for TeamCreateAttributes
impl RefUnwindSafe for TeamCreateAttributes
impl Send for TeamCreateAttributes
impl Sync for TeamCreateAttributes
impl Unpin for TeamCreateAttributes
impl UnwindSafe for TeamCreateAttributes
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