Struct datadog_api_client::datadogV2::model::model_team_create::TeamCreate
source · #[non_exhaustive]pub struct TeamCreate {
pub attributes: TeamCreateAttributes,
pub relationships: Option<TeamCreateRelationships>,
pub type_: TeamType,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}Expand description
Team 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.attributes: TeamCreateAttributesTeam creation attributes
relationships: Option<TeamCreateRelationships>Relationships formed with the team on creation
type_: TeamTypeTeam type
additional_properties: BTreeMap<String, Value>Implementations§
source§impl TeamCreate
impl TeamCreate
sourcepub fn new(attributes: TeamCreateAttributes, type_: TeamType) -> TeamCreate
pub fn new(attributes: TeamCreateAttributes, type_: TeamType) -> TeamCreate
Examples found in repository?
examples/v2_teams_CreateTeam.rs (lines 14-20)
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
async fn main() {
let body = TeamCreateRequest::new(
TeamCreate::new(
TeamCreateAttributes::new(
"test-handle-a0fc0297eb519635".to_string(),
"test-name-a0fc0297eb519635".to_string(),
),
TeamType::TEAM,
)
.relationships(TeamCreateRelationships::new().users(RelationshipToUsers::new(vec![]))),
);
let configuration = datadog::Configuration::new();
let api = TeamsAPI::with_config(configuration);
let resp = api.create_team(body).await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}More examples
examples/v2_teams_CreateTeam_252121814.rs (lines 11-21)
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
async fn main() {
let body = TeamCreateRequest::new(TeamCreate::new(
TeamCreateAttributes::new(
"test-handle-a0fc0297eb519635".to_string(),
"test-name-a0fc0297eb519635".to_string(),
)
.avatar(Some("🥑".to_string()))
.banner(Some(7))
.hidden_modules(vec!["m3".to_string()])
.visible_modules(vec!["m1".to_string(), "m2".to_string()]),
TeamType::TEAM,
));
let configuration = datadog::Configuration::new();
let api = TeamsAPI::with_config(configuration);
let resp = api.create_team(body).await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}sourcepub fn relationships(self, value: TeamCreateRelationships) -> Self
pub fn relationships(self, value: TeamCreateRelationships) -> Self
Examples found in repository?
examples/v2_teams_CreateTeam.rs (line 21)
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
async fn main() {
let body = TeamCreateRequest::new(
TeamCreate::new(
TeamCreateAttributes::new(
"test-handle-a0fc0297eb519635".to_string(),
"test-name-a0fc0297eb519635".to_string(),
),
TeamType::TEAM,
)
.relationships(TeamCreateRelationships::new().users(RelationshipToUsers::new(vec![]))),
);
let configuration = datadog::Configuration::new();
let api = TeamsAPI::with_config(configuration);
let resp = api.create_team(body).await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
source§impl Clone for TeamCreate
impl Clone for TeamCreate
source§fn clone(&self) -> TeamCreate
fn clone(&self) -> TeamCreate
Returns a copy 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 TeamCreate
impl Debug for TeamCreate
source§impl<'de> Deserialize<'de> for TeamCreate
impl<'de> Deserialize<'de> for TeamCreate
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 TeamCreate
impl PartialEq for TeamCreate
source§impl Serialize for TeamCreate
impl Serialize for TeamCreate
impl StructuralPartialEq for TeamCreate
Auto Trait Implementations§
impl Freeze for TeamCreate
impl RefUnwindSafe for TeamCreate
impl Send for TeamCreate
impl Sync for TeamCreate
impl Unpin for TeamCreate
impl UnwindSafe for TeamCreate
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)