#[non_exhaustive]pub struct UserCreateAttributes {
pub email: String,
pub name: Option<String>,
pub title: Option<String>,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
Attributes of the created user.
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.email: String
The email of the user.
name: Option<String>
The name of the user.
title: Option<String>
The title of the user.
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl UserCreateAttributes
impl UserCreateAttributes
Sourcepub fn new(email: String) -> UserCreateAttributes
pub fn new(email: String) -> UserCreateAttributes
Examples found in repository?
examples/v2_users_CreateUser.rs (line 12)
10async fn main() {
11 let body = UserCreateRequest::new(UserCreateData::new(
12 UserCreateAttributes::new("Example-User@datadoghq.com".to_string())
13 .name("Datadog API Client Python".to_string()),
14 UsersType::USERS,
15 ));
16 let configuration = datadog::Configuration::new();
17 let api = UsersAPI::with_config(configuration);
18 let resp = api.create_user(body).await;
19 if let Ok(value) = resp {
20 println!("{:#?}", value);
21 } else {
22 println!("{:#?}", resp.unwrap_err());
23 }
24}
Sourcepub fn name(self, value: String) -> Self
pub fn name(self, value: String) -> Self
Examples found in repository?
examples/v2_users_CreateUser.rs (line 13)
10async fn main() {
11 let body = UserCreateRequest::new(UserCreateData::new(
12 UserCreateAttributes::new("Example-User@datadoghq.com".to_string())
13 .name("Datadog API Client Python".to_string()),
14 UsersType::USERS,
15 ));
16 let configuration = datadog::Configuration::new();
17 let api = UsersAPI::with_config(configuration);
18 let resp = api.create_user(body).await;
19 if let Ok(value) = resp {
20 println!("{:#?}", value);
21 } else {
22 println!("{:#?}", resp.unwrap_err());
23 }
24}
pub fn title(self, value: String) -> Self
pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
Source§impl Clone for UserCreateAttributes
impl Clone for UserCreateAttributes
Source§fn clone(&self) -> UserCreateAttributes
fn clone(&self) -> UserCreateAttributes
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 UserCreateAttributes
impl Debug for UserCreateAttributes
Source§impl<'de> Deserialize<'de> for UserCreateAttributes
impl<'de> Deserialize<'de> for UserCreateAttributes
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 UserCreateAttributes
impl PartialEq for UserCreateAttributes
Source§impl Serialize for UserCreateAttributes
impl Serialize for UserCreateAttributes
impl StructuralPartialEq for UserCreateAttributes
Auto Trait Implementations§
impl Freeze for UserCreateAttributes
impl RefUnwindSafe for UserCreateAttributes
impl Send for UserCreateAttributes
impl Sync for UserCreateAttributes
impl Unpin for UserCreateAttributes
impl UnwindSafe for UserCreateAttributes
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