pub struct SecurityLevelsResource<'a> { /* private fields */ }Expand description
client.security_levels()
Implementations§
Source§impl<'a> SecurityLevelsResource<'a>
impl<'a> SecurityLevelsResource<'a>
Sourcepub fn create(
&self,
id: impl Display,
body: &PostSecuritylevelsIdBody,
) -> Result<PostSecuritylevelsIdResponse>
pub fn create( &self, id: impl Display, body: &PostSecuritylevelsIdBody, ) -> Result<PostSecuritylevelsIdResponse>
Create a new security Level
POST /securitylevels/{id}
Create a new Security level
§Example
let body = models::PostSecuritylevelsIdBody {
name: Some("Hauskreis Nord".into()),
..Default::default()
};
let result = client.security_levels().create(1, &body)?;
println!("{}", result.name);Sourcepub fn delete(&self, id: impl Display) -> Result<()>
pub fn delete(&self, id: impl Display) -> Result<()>
Delete the Security Level
DELETE /securitylevels/{id}
Delete a security level
Use Self::delete_with to pass query parameters.
§Example
client.security_levels().delete(1)?;Sourcepub fn delete_with(
&self,
id: impl Display,
query: &DeleteSecuritylevelsIdQuery,
) -> Result<()>
pub fn delete_with( &self, id: impl Display, query: &DeleteSecuritylevelsIdQuery, ) -> Result<()>
Delete the Security Level
Like Self::delete, with query parameters.
DELETE /securitylevels/{id}
Delete a security level
Sourcepub fn get(&self, id: impl Display) -> Result<SecurityLevel>
pub fn get(&self, id: impl Display) -> Result<SecurityLevel>
Get a particular security level
GET /securitylevels/{id}
Get a particular Security Level
§Example
let security_level = client.security_levels().get(1)?;
println!("{}", security_level.name);Sourcepub fn list(&self) -> Result<Vec<SecurityLevel>>
pub fn list(&self) -> Result<Vec<SecurityLevel>>
get all securitylevels
GET /securitylevels
§Example
for security_level in client.security_levels().list()? {
println!("{}", security_level.name);
}Sourcepub fn patch(
&self,
id: impl Display,
body: &PatchSecuritylevelsIdBody,
) -> Result<PatchSecuritylevelsIdResponse>
pub fn patch( &self, id: impl Display, body: &PatchSecuritylevelsIdBody, ) -> Result<PatchSecuritylevelsIdResponse>
Update the security level
PATCH /securitylevels/{id}
Change the Security Level
Use Self::patch_with to pass query parameters.
§Example
let body = models::PatchSecuritylevelsIdBody {
name: Some("Hauskreis Nord".into()),
..Default::default()
};
let result = client.security_levels().patch(1, &body)?;
println!("{}", result.name);Sourcepub fn patch_with(
&self,
id: impl Display,
query: &PatchSecuritylevelsIdQuery,
body: &PatchSecuritylevelsIdBody,
) -> Result<PatchSecuritylevelsIdResponse>
pub fn patch_with( &self, id: impl Display, query: &PatchSecuritylevelsIdQuery, body: &PatchSecuritylevelsIdBody, ) -> Result<PatchSecuritylevelsIdResponse>
Update the security level
Like Self::patch, with query parameters.
PATCH /securitylevels/{id}
Change the Security Level
Trait Implementations§
Source§impl<'a> Clone for SecurityLevelsResource<'a>
impl<'a> Clone for SecurityLevelsResource<'a>
impl<'a> Copy for SecurityLevelsResource<'a>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for SecurityLevelsResource<'a>
impl<'a> !UnwindSafe for SecurityLevelsResource<'a>
impl<'a> Freeze for SecurityLevelsResource<'a>
impl<'a> Send for SecurityLevelsResource<'a>
impl<'a> Sync for SecurityLevelsResource<'a>
impl<'a> Unpin for SecurityLevelsResource<'a>
impl<'a> UnsafeUnpin for SecurityLevelsResource<'a>
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