Label constructor
- @JsonSerializable(includeIfNull: false)
const
Label(
{ - @Default(comAtprotoLabelDefsLabel) @JsonKey(name: r'$type') String $type,
- @Default(0) int ver,
- required String src,
- required String uri,
- String? cid,
- required String val,
- @Default(false) bool neg,
- required DateTime cts,
- DateTime? exp,
- List<int>? sig,
- @JsonKey(name: r'$unknown') Map<String, dynamic>? $unknown,
})
Implementation
@JsonSerializable(includeIfNull: false)
const factory Label({
/// The unique namespace for this lex object.
///
/// `com.atproto.label.defs#label`
@Default(comAtprotoLabelDefsLabel) @JsonKey(name: r'$type') String $type,
/// The AT Protocol version of the label object.
@Default(0) 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.
@Default(false) bool neg,
/// Timestamp when this label was created.
required DateTime cts,
/// Timestamp at which this label expires (no longer applies).
DateTime? exp,
/// Signature of dag-cbor encoded label.
List<int>? sig,
/// Contains unknown objects not defined in Lexicon.
@JsonKey(name: r'$unknown') Map<String, dynamic>? $unknown,
}) = _Label;