CreateRequest.fromJson constructor

CreateRequest.fromJson(
  1. Map<String, Object?> json
)

Implementation

factory CreateRequest.fromJson(Map<String, Object?> json) => CreateRequest(
      constraints: json["constraints"] == null
          ? null
          : ConstraintsInput.fromJson(
              (json["constraints"] as Map).cast<String, Object?>(),
            ),
      display: json["display"] == null
          ? null
          : DisplayInput.fromJson(
              (json["display"] as Map).cast<String, Object?>(),
            ),
      subject: json["subject"] == null
          ? null
          : inttegro_file.PartyInput.fromJson(
              (json["subject"] as Map).cast<String, Object?>(),
            ),
      recipient: json["recipient"] == null
          ? null
          : inttegro_file.PartyInput.fromJson(
              (json["recipient"] as Map).cast<String, Object?>(),
            ),
      resource: json["resource"] == null
          ? null
          : inttegro_file.ResourceInput.fromJson(
              (json["resource"] as Map).cast<String, Object?>(),
            ),
      requester: json["requester"] == null
          ? null
          : inttegro_file.ActorInput.fromJson(
              (json["requester"] as Map).cast<String, Object?>(),
            ),
      attempts: json["attempts"] == null
          ? null
          : AttemptsRequest.fromJson(
              (json["attempts"] as Map).cast<String, Object?>(),
            ),
      customData: json["custom_data"] == null
          ? null
          : core.CustomData.fromJson(json["custom_data"]),
      expiresAt: json["expires_at"] == null
          ? null
          : decodeDateTime(json["expires_at"]),
      purpose: json["purpose"] as String,
    );