ClusterMetadata.fromJson constructor

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

Implementation

factory ClusterMetadata.fromJson(Map<String, dynamic> json) {
  return ClusterMetadata(
    addressId: json['AddressId'] as String?,
    clusterId: json['ClusterId'] as String?,
    clusterState: (json['ClusterState'] as String?)?.toClusterState(),
    creationDate: timeStampFromJson(json['CreationDate']),
    description: json['Description'] as String?,
    forwardingAddressId: json['ForwardingAddressId'] as String?,
    jobType: (json['JobType'] as String?)?.toJobType(),
    kmsKeyARN: json['KmsKeyARN'] as String?,
    notification: json['Notification'] != null
        ? Notification.fromJson(json['Notification'] as Map<String, dynamic>)
        : null,
    resources: json['Resources'] != null
        ? JobResource.fromJson(json['Resources'] as Map<String, dynamic>)
        : null,
    roleARN: json['RoleARN'] as String?,
    shippingOption: (json['ShippingOption'] as String?)?.toShippingOption(),
    snowballType: (json['SnowballType'] as String?)?.toSnowballType(),
    taxDocuments: json['TaxDocuments'] != null
        ? TaxDocuments.fromJson(json['TaxDocuments'] as Map<String, dynamic>)
        : null,
  );
}