Label constructor
const
Label({
- @Default.new('com.atproto.label.defs#label') String $type,
- int? ver,
- required String src,
- required String uri,
- String? cid,
- required String val,
- bool? neg,
- @JsonKey.new(toJson: iso8601) required DateTime cts,
- @JsonKey.new(toJson: iso8601) DateTime? exp,
- Map<
String, dynamic> ? sig, - Map<
String, dynamic> ? $unknown,
Implementation
@JsonSerializable(includeIfNull: false)
const factory Label({
@Default('com.atproto.label.defs#label') String $type,
/// The AT Protocol version of the label object.
int? ver,
/// DID of the actor who created this label.
required String src,
/// AT URI of the record, repository (account), or other resource that this label applies to.
required String uri,
/// Optionally, CID specifying the specific version of 'uri' resource this label applies to.
String? cid,
/// The short string name of the value or type of this label.
required String val,
/// If true, this is a negation label, overwriting a previous label.
bool? neg,
/// Timestamp when this label was created.
@JsonKey(toJson: iso8601) required DateTime cts,
/// Timestamp at which this label expires (no longer applies).
@JsonKey(toJson: iso8601) DateTime? exp,
/// Signature of dag-cbor encoded label.
Map<String, dynamic>? sig,
Map<String, dynamic>? $unknown,
}) = _Label;