pub struct CreateApiKeyResponse {
pub created_at: DateTime<Utc>,
pub expires_at: Option<DateTime<Utc>>,
pub id: Uuid,
pub key: String,
pub key_prefix: String,
pub name: String,
pub rate_limit_override: Option<i32>,
pub scopes: Vec<ApiKeyScope>,
}Expand description
Response returned when creating an API key. The raw key is only shown once.
JSON schema
{
"description": "Response returned when creating an API key.\nThe raw key is only shown once.",
"type": "object",
"required": [
"created_at",
"id",
"key",
"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"
},
"key": {
"description": "The full raw API key (only returned at creation time).",
"type": "string"
},
"key_prefix": {
"description": "First characters for identification.",
"type": "string"
},
"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.
key: StringThe full raw API key (only returned at creation time).
key_prefix: StringFirst characters for identification.
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 CreateApiKeyResponse
impl CreateApiKeyResponse
pub fn builder() -> CreateApiKeyResponse
Trait Implementations§
Source§impl Clone for CreateApiKeyResponse
impl Clone for CreateApiKeyResponse
Source§impl Debug for CreateApiKeyResponse
impl Debug for CreateApiKeyResponse
Source§impl<'de> Deserialize<'de> for CreateApiKeyResponse
impl<'de> Deserialize<'de> for CreateApiKeyResponse
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<CreateApiKeyResponse> for CreateApiKeyResponse
impl From<CreateApiKeyResponse> for CreateApiKeyResponse
Source§fn from(value: CreateApiKeyResponse) -> Self
fn from(value: CreateApiKeyResponse) -> Self
Converts to this type from the input type.
Source§impl Serialize for CreateApiKeyResponse
impl Serialize for CreateApiKeyResponse
Source§impl TryFrom<CreateApiKeyResponse> for CreateApiKeyResponse
impl TryFrom<CreateApiKeyResponse> for CreateApiKeyResponse
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: CreateApiKeyResponse) -> Result<Self, ConversionError>
fn try_from(value: CreateApiKeyResponse) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for CreateApiKeyResponse
impl RefUnwindSafe for CreateApiKeyResponse
impl Send for CreateApiKeyResponse
impl Sync for CreateApiKeyResponse
impl Unpin for CreateApiKeyResponse
impl UnsafeUnpin for CreateApiKeyResponse
impl UnwindSafe for CreateApiKeyResponse
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