factory SourceAuth.fromJson(Map<String, dynamic> json) { return SourceAuth( type: (json['type'] as String).toSourceAuthType(), resource: json['resource'] as String?, ); }