Label constructor

  1. @JsonSerializable(includeIfNull: false)
const Label({
  1. @Default('com.atproto.label.defs#label') String $type,
  2. int? ver,
  3. required String src,
  4. required String uri,
  5. String? cid,
  6. required String val,
  7. bool? neg,
  8. required DateTime cts,
  9. DateTime? exp,
  10. Map<String, dynamic>? sig,
  11. 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.
  required DateTime cts,

  /// Timestamp at which this label expires (no longer applies).
  DateTime? exp,

  /// Signature of dag-cbor encoded label.
  Map<String, dynamic>? sig,

  Map<String, dynamic>? $unknown,
}) = _Label;