GoodMemGoodMem
ReferenceSdkRustTypes

UserEnrollmentResponse

Rust struct goodmem::models::UserEnrollmentResponse: declaration, fields or variants, and implementations.

All types

Struct UserEnrollmentResponse

goodmem::models::UserEnrollmentResponse

Non-secret lifecycle metadata for a human user's one-time enrollment credential.

pub struct UserEnrollmentResponse {
    pub enrollment_id: String,
    pub user_id: String,
    pub credential_prefix: String,
    pub status: UserEnrollmentResponseStatus,
    pub expires_at: i64,
    pub consumed_api_key_id: Option<String>,
    pub created_at: i64,
    pub consumed_at: Option<i64>,
    pub revoked_at: Option<i64>,
    pub created_by_id: String,
    pub revoked_by_id: Option<String>,
}

Referenced types: UserEnrollmentResponseStatus.

Fields

enrollment_id

pub enrollment_id: String

OUTPUT_ONLY; immutable enrollment UUID. Wire name: enrollmentId.

user_id

pub user_id: String

OUTPUT_ONLY; UUID of the human user invited to enroll. Wire name: userId.

credential_prefix

pub credential_prefix: String

OUTPUT_ONLY; non-secret prefix that identifies the enrollment credential safely. Wire name: credentialPrefix.

status

pub status: UserEnrollmentResponseStatus

OUTPUT_ONLY; current derived enrollment lifecycle state. Wire name: status.

expires_at

pub expires_at: i64

OUTPUT_ONLY; exclusive completion deadline in milliseconds since epoch. Wire name: expiresAt.

consumed_api_key_id

pub consumed_api_key_id: Option<String>

OUTPUT_ONLY; initial API-key UUID, present after consumption. Wire name: consumedApiKeyId.

created_at

pub created_at: i64

OUTPUT_ONLY; enrollment issuance time in milliseconds since epoch. Wire name: createdAt.

consumed_at

pub consumed_at: Option<i64>

OUTPUT_ONLY; first-completion time, absent before consumption. Wire name: consumedAt.

revoked_at

pub revoked_at: Option<i64>

OUTPUT_ONLY; permanent revocation time, absent while unrevoked. Wire name: revokedAt.

created_by_id

pub created_by_id: String

OUTPUT_ONLY; exact principal or API-key actor that issued the enrollment. Wire name: createdById.

revoked_by_id

pub revoked_by_id: Option<String>

OUTPUT_ONLY; exact revoking actor UUID, absent while unrevoked. Wire name: revokedById.

Implementations

validate

pub fn validate(&self) -> crate::Result<()>

Validate the request before sending, without making an HTTP call.

Trait implementations

  • Clone (derived)
  • Default (derived)
  • PartialEq (derived)
  • Serialize (derived)
  • impl<'de> Deserialize<'de> for UserEnrollmentResponse
  • impl std::fmt::Debug for UserEnrollmentResponse

On this page