PromptDetail class

Constructors

PromptDetail({String? createdAt, List<String> labels = const [], String? lastUpdatedAt, String? name, String? prompt, List<String> tags = const [], String? type, int? version, List<VersionView> versionHistory = const []})
Returns a new PromptDetail instance.

Properties

createdAt ↔ String?
CreatedAt is when version 1 was written, RFC 3339 UTC. Appending a version does not move it.
getter/setter pair
hashCode → int
The hash code for this object.
no setteroverride
labels ↔ List<String>
Labels is the current version's free-form taxonomy. [] when none, never null.
getter/setter pair
lastUpdatedAt ↔ String?
UpdatedAt is when the current version was appended, RFC 3339 UTC. Equal to createdAt for a prompt that has only ever had one version.
getter/setter pair
name ↔ String?
Name is the prompt's org-unique handle and the URL segment it is addressed by.
getter/setter pair
prompt ↔ String?
Prompt is the CURRENT version's template body — the only content this service returns. Earlier versions are listed in versionHistory by number and date, and their bodies are not served in bulk.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
tags ↔ List<String>
Tags is the second free-form taxonomy, same rules as Labels.
getter/setter pair
type ↔ String?
Type labels the current version's kind; "text" unless the creator said otherwise.
getter/setter pair
version ↔ int?
Version is the current version number, starting at 1 and incremented by one on every create against an existing name.
getter/setter pair
versionHistory ↔ List<VersionView>
Versions is the history METADATA, newest first, capped at the last 100 — no bodies, so a long history cannot inflate this response. It always includes the current version as its first entry.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
override

Static Methods

fromJson(dynamic value) → PromptDetail?
Returns a new PromptDetail instance and imports its values from value if it's a Map, null otherwise.
listFromJson(dynamic json, {bool growable = false}) → List<PromptDetail>
mapFromJson(dynamic json) → Map<String, PromptDetail>
mapListFromJson(dynamic json, {bool growable = false}) → Map<String, List<PromptDetail>>

Constants

requiredKeys → const Set<String>
The list of required keys that must be present in a JSON.