put method

Future<XRPCResponse<RepoPutRecordOutput>> put({
  1. required LabelerPolicies policies,
  2. ULabelerServiceLabels? labels,
  3. DateTime? createdAt,
  4. List<ReasonType>? reasonTypes,
  5. List<SubjectType>? subjectTypes,
  6. List<String>? subjectCollections,
  7. String rkey = 'self',
  8. bool? validate,
  9. String? swapRecord,
  10. String? swapCommit,
  11. Map<String, String>? $headers,
  12. Map<String, String>? $unknown,
})

Implementation

Future<XRPCResponse<RepoPutRecordOutput>> put({
  required LabelerPolicies policies,
  ULabelerServiceLabels? labels,
  DateTime? createdAt,
  List<ReasonType>? reasonTypes,
  List<SubjectType>? subjectTypes,
  List<String>? subjectCollections,
  String rkey = 'self',
  bool? validate,
  String? swapRecord,
  String? swapCommit,
  Map<String, String>? $headers,
  Map<String, String>? $unknown,
}) async => await comAtprotoRepoPutRecord(
  repo: _ctx.repo,
  collection: ids.appBskyLabelerService,
  rkey: rkey,
  validate: validate,
  record: {
    ...?$unknown,
    'policies': policies.toJson(),
    if (labels != null) 'labels': labels.toJson(),
    'createdAt': iso8601(createdAt),
    if (reasonTypes != null)
      'reasonTypes': reasonTypes.map((e) => e.toJson()).toList(),
    if (subjectTypes != null)
      'subjectTypes': subjectTypes.map((e) => e.toJson()).toList(),
    if (subjectCollections != null) 'subjectCollections': subjectCollections,
  },
  swapRecord: swapRecord,
  swapCommit: swapCommit,
  $ctx: _ctx,
  $headers: $headers,
);