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: String
ID 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
sourceimpl 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
sourceimpl Clone for Authorization
impl Clone for Authorization
sourcefn clone(&self) -> Authorization
fn clone(&self) -> Authorization
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for Authorization
impl Debug for Authorization
sourceimpl Default for Authorization
impl Default for Authorization
sourcefn default() -> Authorization
fn default() -> Authorization
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for Authorization
impl<'de> Deserialize<'de> for Authorization
sourcefn 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
sourceimpl PartialEq<Authorization> for Authorization
impl PartialEq<Authorization> for Authorization
sourcefn 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 ==
. Read more
sourcefn ne(&self, other: &Authorization) -> bool
fn ne(&self, other: &Authorization) -> bool
This method tests for !=
.
sourceimpl 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more