#[non_exhaustive]pub struct TeamCreateRequest {
pub data: TeamCreate,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
Request to create a team
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.data: TeamCreate
Team create
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl TeamCreateRequest
impl TeamCreateRequest
Sourcepub fn new(data: TeamCreate) -> TeamCreateRequest
pub fn new(data: TeamCreate) -> TeamCreateRequest
Examples found in repository?
examples/v2_teams_CreateTeam.rs (lines 13-22)
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 11-21)
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 TeamCreateRequest
impl Clone for TeamCreateRequest
Source§fn clone(&self) -> TeamCreateRequest
fn clone(&self) -> TeamCreateRequest
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 TeamCreateRequest
impl Debug for TeamCreateRequest
Source§impl<'de> Deserialize<'de> for TeamCreateRequest
impl<'de> Deserialize<'de> for TeamCreateRequest
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 TeamCreateRequest
impl PartialEq for TeamCreateRequest
Source§impl Serialize for TeamCreateRequest
impl Serialize for TeamCreateRequest
impl StructuralPartialEq for TeamCreateRequest
Auto Trait Implementations§
impl Freeze for TeamCreateRequest
impl RefUnwindSafe for TeamCreateRequest
impl Send for TeamCreateRequest
impl Sync for TeamCreateRequest
impl Unpin for TeamCreateRequest
impl UnwindSafe for TeamCreateRequest
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