#[non_exhaustive]pub struct AuthNMappingUpdateData {
pub attributes: Option<AuthNMappingUpdateAttributes>,
pub id: String,
pub relationships: Option<AuthNMappingUpdateRelationships>,
pub type_: AuthNMappingsType,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
Data for updating an AuthN Mapping.
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<AuthNMappingUpdateAttributes>
Key/Value pair of attributes used for update request.
id: String
ID of the AuthN Mapping.
relationships: Option<AuthNMappingUpdateRelationships>
Relationship of AuthN Mapping update object to a Role or Team.
type_: AuthNMappingsType
AuthN Mappings resource type.
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl AuthNMappingUpdateData
impl AuthNMappingUpdateData
Sourcepub fn new(id: String, type_: AuthNMappingsType) -> AuthNMappingUpdateData
pub fn new(id: String, type_: AuthNMappingsType) -> AuthNMappingUpdateData
Examples found in repository?
examples/v2_authn-mappings_UpdateAuthNMapping.rs (lines 22-25)
15async fn main() {
16 // there is a valid "authn_mapping" in the system
17 let authn_mapping_data_id = std::env::var("AUTHN_MAPPING_DATA_ID").unwrap();
18
19 // there is a valid "role" in the system
20 let role_data_id = std::env::var("ROLE_DATA_ID").unwrap();
21 let body = AuthNMappingUpdateRequest::new(
22 AuthNMappingUpdateData::new(
23 authn_mapping_data_id.clone(),
24 AuthNMappingsType::AUTHN_MAPPINGS,
25 )
26 .attributes(
27 AuthNMappingUpdateAttributes::new()
28 .attribute_key("member-of".to_string())
29 .attribute_value("Development".to_string()),
30 )
31 .relationships(
32 AuthNMappingUpdateRelationships::AuthNMappingRelationshipToRole(Box::new(
33 AuthNMappingRelationshipToRole::new(
34 RelationshipToRole::new().data(
35 RelationshipToRoleData::new()
36 .id(role_data_id.clone())
37 .type_(RolesType::ROLES),
38 ),
39 ),
40 )),
41 ),
42 );
43 let configuration = datadog::Configuration::new();
44 let api = AuthNMappingsAPI::with_config(configuration);
45 let resp = api
46 .update_authn_mapping(authn_mapping_data_id.clone(), body)
47 .await;
48 if let Ok(value) = resp {
49 println!("{:#?}", value);
50 } else {
51 println!("{:#?}", resp.unwrap_err());
52 }
53}
Sourcepub fn attributes(self, value: AuthNMappingUpdateAttributes) -> Self
pub fn attributes(self, value: AuthNMappingUpdateAttributes) -> Self
Examples found in repository?
examples/v2_authn-mappings_UpdateAuthNMapping.rs (lines 26-30)
15async fn main() {
16 // there is a valid "authn_mapping" in the system
17 let authn_mapping_data_id = std::env::var("AUTHN_MAPPING_DATA_ID").unwrap();
18
19 // there is a valid "role" in the system
20 let role_data_id = std::env::var("ROLE_DATA_ID").unwrap();
21 let body = AuthNMappingUpdateRequest::new(
22 AuthNMappingUpdateData::new(
23 authn_mapping_data_id.clone(),
24 AuthNMappingsType::AUTHN_MAPPINGS,
25 )
26 .attributes(
27 AuthNMappingUpdateAttributes::new()
28 .attribute_key("member-of".to_string())
29 .attribute_value("Development".to_string()),
30 )
31 .relationships(
32 AuthNMappingUpdateRelationships::AuthNMappingRelationshipToRole(Box::new(
33 AuthNMappingRelationshipToRole::new(
34 RelationshipToRole::new().data(
35 RelationshipToRoleData::new()
36 .id(role_data_id.clone())
37 .type_(RolesType::ROLES),
38 ),
39 ),
40 )),
41 ),
42 );
43 let configuration = datadog::Configuration::new();
44 let api = AuthNMappingsAPI::with_config(configuration);
45 let resp = api
46 .update_authn_mapping(authn_mapping_data_id.clone(), body)
47 .await;
48 if let Ok(value) = resp {
49 println!("{:#?}", value);
50 } else {
51 println!("{:#?}", resp.unwrap_err());
52 }
53}
Sourcepub fn relationships(self, value: AuthNMappingUpdateRelationships) -> Self
pub fn relationships(self, value: AuthNMappingUpdateRelationships) -> Self
Examples found in repository?
examples/v2_authn-mappings_UpdateAuthNMapping.rs (lines 31-41)
15async fn main() {
16 // there is a valid "authn_mapping" in the system
17 let authn_mapping_data_id = std::env::var("AUTHN_MAPPING_DATA_ID").unwrap();
18
19 // there is a valid "role" in the system
20 let role_data_id = std::env::var("ROLE_DATA_ID").unwrap();
21 let body = AuthNMappingUpdateRequest::new(
22 AuthNMappingUpdateData::new(
23 authn_mapping_data_id.clone(),
24 AuthNMappingsType::AUTHN_MAPPINGS,
25 )
26 .attributes(
27 AuthNMappingUpdateAttributes::new()
28 .attribute_key("member-of".to_string())
29 .attribute_value("Development".to_string()),
30 )
31 .relationships(
32 AuthNMappingUpdateRelationships::AuthNMappingRelationshipToRole(Box::new(
33 AuthNMappingRelationshipToRole::new(
34 RelationshipToRole::new().data(
35 RelationshipToRoleData::new()
36 .id(role_data_id.clone())
37 .type_(RolesType::ROLES),
38 ),
39 ),
40 )),
41 ),
42 );
43 let configuration = datadog::Configuration::new();
44 let api = AuthNMappingsAPI::with_config(configuration);
45 let resp = api
46 .update_authn_mapping(authn_mapping_data_id.clone(), body)
47 .await;
48 if let Ok(value) = resp {
49 println!("{:#?}", value);
50 } else {
51 println!("{:#?}", resp.unwrap_err());
52 }
53}
pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
Source§impl Clone for AuthNMappingUpdateData
impl Clone for AuthNMappingUpdateData
Source§fn clone(&self) -> AuthNMappingUpdateData
fn clone(&self) -> AuthNMappingUpdateData
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 AuthNMappingUpdateData
impl Debug for AuthNMappingUpdateData
Source§impl<'de> Deserialize<'de> for AuthNMappingUpdateData
impl<'de> Deserialize<'de> for AuthNMappingUpdateData
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 AuthNMappingUpdateData
impl PartialEq for AuthNMappingUpdateData
Source§impl Serialize for AuthNMappingUpdateData
impl Serialize for AuthNMappingUpdateData
impl StructuralPartialEq for AuthNMappingUpdateData
Auto Trait Implementations§
impl Freeze for AuthNMappingUpdateData
impl RefUnwindSafe for AuthNMappingUpdateData
impl Send for AuthNMappingUpdateData
impl Sync for AuthNMappingUpdateData
impl Unpin for AuthNMappingUpdateData
impl UnwindSafe for AuthNMappingUpdateData
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