toolsOzoneQueueCreateQueue function

Future<XRPCResponse<QueueCreateQueueOutput>> toolsOzoneQueueCreateQueue({
  1. required String name,
  2. required List<QueueCreateQueueSubjectTypes> subjectTypes,
  3. String? collection,
  4. required List<String> reportTypes,
  5. String? description,
  6. required ServiceContext $ctx,
  7. String? $service,
  8. Map<String, String>? $headers,
  9. Map<String, String>? $unknown,
})

Create a new moderation queue. Will fail if the queue configuration conflicts with an existing queue.

Implementation

Future<XRPCResponse<QueueCreateQueueOutput>> toolsOzoneQueueCreateQueue({
  required String name,
  required List<QueueCreateQueueSubjectTypes> subjectTypes,
  String? collection,
  required List<String> reportTypes,
  String? description,
  required ServiceContext $ctx,
  String? $service,
  Map<String, String>? $headers,
  Map<String, String>? $unknown,
}) async => await $ctx.post(
  ns.toolsOzoneQueueCreateQueue,
  service: $service,
  headers: {'Content-type': 'application/json', ...?$headers},
  body: {
    ...?$unknown,
    'name': name,
    'subjectTypes': subjectTypes.map((e) => e.toJson()).toList(),
    if (collection != null) 'collection': collection,
    'reportTypes': reportTypes,
    if (description != null) 'description': description,
  },
  to: const QueueCreateQueueOutputConverter().fromJson,
);