pub struct ApiKeyResponse {
pub created_at: DateTime<Utc>,
pub expires_at: Option<DateTime<Utc>>,
pub id: Uuid,
pub is_active: bool,
pub key_prefix: String,
pub last_used_at: Option<DateTime<Utc>>,
pub name: String,
pub rate_limit_override: Option<i32>,
pub scopes: Vec<ApiKeyScope>,
}Expand description
API key summary (never includes the hash or raw key).
JSON schema
{
"description": "API key summary (never includes the hash or raw key).",
"type": "object",
"required": [
"created_at",
"id",
"is_active",
"key_prefix",
"name",
"scopes"
],
"properties": {
"created_at": {
"description": "Creation date.",
"type": "string",
"format": "date-time"
},
"expires_at": {
"description": "Expiration date.",
"type": [
"string",
"null"
],
"format": "date-time"
},
"id": {
"description": "API key ID.",
"type": "string",
"format": "uuid"
},
"is_active": {
"description": "Whether the key is active.",
"type": "boolean"
},
"key_prefix": {
"description": "First characters for identification.",
"type": "string"
},
"last_used_at": {
"description": "Last used date.",
"type": [
"string",
"null"
],
"format": "date-time"
},
"name": {
"description": "Key name.",
"type": "string"
},
"rate_limit_override": {
"description": "Per-key rate limit override (requests per minute), if set.",
"type": [
"integer",
"null"
],
"format": "int32",
"minimum": 0.0
},
"scopes": {
"description": "Granted scopes.",
"type": "array",
"items": {
"$ref": "#/components/schemas/ApiKeyScope"
}
}
}
}
```ignore
</details>Fields§
§created_at: DateTime<Utc>Creation date.
expires_at: Option<DateTime<Utc>>Expiration date.
id: UuidAPI key ID.
is_active: boolWhether the key is active.
key_prefix: StringFirst characters for identification.
last_used_at: Option<DateTime<Utc>>Last used date.
name: StringKey name.
rate_limit_override: Option<i32>Per-key rate limit override (requests per minute), if set.
scopes: Vec<ApiKeyScope>Granted scopes.
Implementations§
Source§impl ApiKeyResponse
impl ApiKeyResponse
pub fn builder() -> ApiKeyResponse
Trait Implementations§
Source§impl Clone for ApiKeyResponse
impl Clone for ApiKeyResponse
Source§impl Debug for ApiKeyResponse
impl Debug for ApiKeyResponse
Source§impl<'de> Deserialize<'de> for ApiKeyResponse
impl<'de> Deserialize<'de> for ApiKeyResponse
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 From<ApiKeyResponse> for ApiKeyResponse
impl From<ApiKeyResponse> for ApiKeyResponse
Source§fn from(value: ApiKeyResponse) -> Self
fn from(value: ApiKeyResponse) -> Self
Converts to this type from the input type.
Source§impl Serialize for ApiKeyResponse
impl Serialize for ApiKeyResponse
Source§impl TryFrom<ApiKeyResponse> for ApiKeyResponse
impl TryFrom<ApiKeyResponse> for ApiKeyResponse
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: ApiKeyResponse) -> Result<Self, ConversionError>
fn try_from(value: ApiKeyResponse) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for ApiKeyResponse
impl RefUnwindSafe for ApiKeyResponse
impl Send for ApiKeyResponse
impl Sync for ApiKeyResponse
impl Unpin for ApiKeyResponse
impl UnsafeUnpin for ApiKeyResponse
impl UnwindSafe for ApiKeyResponse
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