#[non_exhaustive]pub struct AuthNMappingUpdateRequest {
pub data: AuthNMappingUpdateData,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
Request to update 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.data: AuthNMappingUpdateData
Data for updating an AuthN Mapping.
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl AuthNMappingUpdateRequest
impl AuthNMappingUpdateRequest
Sourcepub fn new(data: AuthNMappingUpdateData) -> AuthNMappingUpdateRequest
pub fn new(data: AuthNMappingUpdateData) -> AuthNMappingUpdateRequest
Examples found in repository?
examples/v2_authn-mappings_UpdateAuthNMapping.rs (lines 21-42)
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 AuthNMappingUpdateRequest
impl Clone for AuthNMappingUpdateRequest
Source§fn clone(&self) -> AuthNMappingUpdateRequest
fn clone(&self) -> AuthNMappingUpdateRequest
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 AuthNMappingUpdateRequest
impl Debug for AuthNMappingUpdateRequest
Source§impl<'de> Deserialize<'de> for AuthNMappingUpdateRequest
impl<'de> Deserialize<'de> for AuthNMappingUpdateRequest
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
impl StructuralPartialEq for AuthNMappingUpdateRequest
Auto Trait Implementations§
impl Freeze for AuthNMappingUpdateRequest
impl RefUnwindSafe for AuthNMappingUpdateRequest
impl Send for AuthNMappingUpdateRequest
impl Sync for AuthNMappingUpdateRequest
impl Unpin for AuthNMappingUpdateRequest
impl UnwindSafe for AuthNMappingUpdateRequest
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