Commit constructor

  1. @JsonSerializable(includeIfNull: false)
const Commit({
  1. @Default(comAtprotoSyncSubscribeReposCommit) @JsonKey(name: r'$type') String $type,
  2. required int seq,
  3. required bool tooBig,
  4. required String repo,
  5. required String commit,
  6. required String rev,
  7. String? since,
  8. required List<int> blocks,
  9. @RepoOpConverter() required List<RepoOp> ops,
  10. required List<String> blobs,
  11. required DateTime time,
  12. @JsonKey(name: r'$unknown') Map<String, dynamic>? $unknown,
})

Implementation

@JsonSerializable(includeIfNull: false)
const factory Commit({
  /// The unique namespace for this lex object.
  ///
  /// `com.atproto.sync.subscribeRepos#commit`
  @Default(comAtprotoSyncSubscribeReposCommit)
  @JsonKey(name: r'$type')
  String $type,

  /// The stream sequence number of this message.
  required int seq,

  /// Indicates that this commit contained too many ops, or data size
  /// was too large. Consumers will need to make a separate request to
  /// get missing data.
  required bool tooBig,

  /// The repo this event comes from.
  required String repo,

  /// Repo commit object CID.
  required String commit,

  /// The rev of the emitted commit. Note that this information is also
  /// in the commit object included in blocks, unless this is a tooBig
  /// event.
  required String rev,

  /// The rev of the last emitted commit from this repo (if any).
  String? since,

  /// CAR file containing relevant blocks, as a diff since the previous
  /// repo state.
  required List<int> blocks,
  @RepoOpConverter() required List<RepoOp> ops,
  required List<String> blobs,

  /// Timestamp of when this message was originally broadcast.
  required DateTime time,

  /// Contains unknown objects not defined in Lexicon.
  @JsonKey(name: r'$unknown') Map<String, dynamic>? $unknown,
}) = _Commit;