CreateWorldGenerationJobResponse.fromJson constructor

CreateWorldGenerationJobResponse.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory CreateWorldGenerationJobResponse.fromJson(Map<String, dynamic> json) {
  return CreateWorldGenerationJobResponse(
    arn: json['arn'] as String?,
    clientRequestToken: json['clientRequestToken'] as String?,
    createdAt: timeStampFromJson(json['createdAt']),
    failureCode:
        (json['failureCode'] as String?)?.toWorldGenerationJobErrorCode(),
    status: (json['status'] as String?)?.toWorldGenerationJobStatus(),
    tags: (json['tags'] as Map<String, dynamic>?)
        ?.map((k, e) => MapEntry(k, e as String)),
    template: json['template'] as String?,
    worldCount: json['worldCount'] != null
        ? WorldCount.fromJson(json['worldCount'] as Map<String, dynamic>)
        : null,
    worldTags: (json['worldTags'] as Map<String, dynamic>?)
        ?.map((k, e) => MapEntry(k, e as String)),
  );
}