Skip to content

ApiKeyCreationResult

Namespace AgentPrism · Assembly AgentPrism.Abstractions.dll

The result of a key creation operation.

public sealed record ApiKeyCreationResult : IEquatable<ApiKeyCreationResult>

objectApiKeyCreationResult

IEquatable<ApiKeyCreationResult>

object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

The raw key is returned ONLY here, at creation time.

public ApiKeyCreationResult()

The raw key value. Cannot be produced again after this call; the consumer must show it immediately and not store it.

public required string PlaintextKey { get; init; }

string

The saved view, which carries no raw value.

public required ApiKeyRecord Record { get; init; }

ApiKeyRecord

public override bool Equals(object? obj)

obj object?

bool

public bool Equals(ApiKeyCreationResult? other)

other ApiKeyCreationResult?

bool

public override int GetHashCode()

int

Returns a description that carries no raw key.

public override string ToString()

string

The type name and the saved record; never the raw value.

A record’s compiler-generated ToString prints every property, and this one holds the only copy of the raw key that will ever exist.

operator ==(ApiKeyCreationResult?, ApiKeyCreationResult?)

Section titled “ operator ==(ApiKeyCreationResult?, ApiKeyCreationResult?)”
public static bool operator ==(ApiKeyCreationResult? left, ApiKeyCreationResult? right)

left ApiKeyCreationResult?

right ApiKeyCreationResult?

bool

operator !=(ApiKeyCreationResult?, ApiKeyCreationResult?)

Section titled “ operator !=(ApiKeyCreationResult?, ApiKeyCreationResult?)”
public static bool operator !=(ApiKeyCreationResult? left, ApiKeyCreationResult? right)

left ApiKeyCreationResult?

right ApiKeyCreationResult?

bool