Struct influxdb2::models::authorization::Authorization
source · pub struct Authorization {
pub status: Option<Status>,
pub description: Option<String>,
pub created_at: Option<String>,
pub updated_at: Option<String>,
pub org_id: String,
pub permissions: Vec<Permission>,
pub id: Option<String>,
pub token: Option<String>,
pub user_id: Option<String>,
pub user: Option<String>,
pub org: Option<String>,
pub links: Option<AuthorizationAllOfLinks>,
}Expand description
Authorization to create
Fields§
§status: Option<Status>If inactive the token is inactive and requests using the token will be rejected.
description: Option<String>A description of the token.
created_at: Option<String>Auth created_at
updated_at: Option<String>Auth updated_at
org_id: StringID of org that authorization is scoped to.
permissions: Vec<Permission>List of permissions for an auth. An auth must have at least one Permission.
id: Option<String>Auth ID.
token: Option<String>Passed via the Authorization Header and Token Authentication type.
user_id: Option<String>ID of user that created and owns the token.
user: Option<String>Name of user that created and owns the token.
org: Option<String>Name of the org token is scoped to.
links: Option<AuthorizationAllOfLinks>Links
Implementations§
source§impl Authorization
impl Authorization
sourcepub fn new(org_id: String, permissions: Vec<Permission>) -> Self
pub fn new(org_id: String, permissions: Vec<Permission>) -> Self
Returns an Authorization with the given orgID and permissions
Trait Implementations§
source§impl Clone for Authorization
impl Clone for Authorization
source§fn clone(&self) -> Authorization
fn clone(&self) -> Authorization
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 Authorization
impl Debug for Authorization
source§impl Default for Authorization
impl Default for Authorization
source§fn default() -> Authorization
fn default() -> Authorization
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for Authorization
impl<'de> Deserialize<'de> for Authorization
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 Authorization
impl PartialEq for Authorization
source§fn eq(&self, other: &Authorization) -> bool
fn eq(&self, other: &Authorization) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl Serialize for Authorization
impl Serialize for Authorization
impl StructuralPartialEq for Authorization
Auto Trait Implementations§
impl RefUnwindSafe for Authorization
impl Send for Authorization
impl Sync for Authorization
impl Unpin for Authorization
impl UnwindSafe for Authorization
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