#[non_exhaustive]pub struct UserTeamUpdate {
pub attributes: Option<UserTeamAttributes>,
pub type_: UserTeamType,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}Expand description
A user’s relationship with 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.attributes: Option<UserTeamAttributes>Team membership attributes
type_: UserTeamTypeTeam membership type
additional_properties: BTreeMap<String, Value>Implementations§
source§impl UserTeamUpdate
impl UserTeamUpdate
sourcepub fn new(type_: UserTeamType) -> UserTeamUpdate
pub fn new(type_: UserTeamType) -> UserTeamUpdate
Examples found in repository?
examples/v2_teams_UpdateTeamMembership.rs (line 14)
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
async fn main() {
let body = UserTeamUpdateRequest::new(
UserTeamUpdate::new(UserTeamType::TEAM_MEMBERSHIPS)
.attributes(UserTeamAttributes::new().role(Some(UserTeamRole::ADMIN))),
);
let configuration = datadog::Configuration::new();
let api = TeamsAPI::with_config(configuration);
let resp = api
.update_team_membership("team_id".to_string(), "user_id".to_string(), body)
.await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}sourcepub fn attributes(self, value: UserTeamAttributes) -> Self
pub fn attributes(self, value: UserTeamAttributes) -> Self
Examples found in repository?
examples/v2_teams_UpdateTeamMembership.rs (line 15)
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
async fn main() {
let body = UserTeamUpdateRequest::new(
UserTeamUpdate::new(UserTeamType::TEAM_MEMBERSHIPS)
.attributes(UserTeamAttributes::new().role(Some(UserTeamRole::ADMIN))),
);
let configuration = datadog::Configuration::new();
let api = TeamsAPI::with_config(configuration);
let resp = api
.update_team_membership("team_id".to_string(), "user_id".to_string(), 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 UserTeamUpdate
impl Clone for UserTeamUpdate
source§fn clone(&self) -> UserTeamUpdate
fn clone(&self) -> UserTeamUpdate
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 UserTeamUpdate
impl Debug for UserTeamUpdate
source§impl<'de> Deserialize<'de> for UserTeamUpdate
impl<'de> Deserialize<'de> for UserTeamUpdate
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 UserTeamUpdate
impl PartialEq for UserTeamUpdate
source§impl Serialize for UserTeamUpdate
impl Serialize for UserTeamUpdate
impl StructuralPartialEq for UserTeamUpdate
Auto Trait Implementations§
impl Freeze for UserTeamUpdate
impl RefUnwindSafe for UserTeamUpdate
impl Send for UserTeamUpdate
impl Sync for UserTeamUpdate
impl Unpin for UserTeamUpdate
impl UnwindSafe for UserTeamUpdate
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)