class commonAddAccountsViewResponse {
  List<States>? states;
  List<String>? accountTypes;
  String? error;
  String? message;

  commonAddAccountsViewResponse({
    this.states,

    this.accountTypes,
    this.error,
    this.message,
  });

  commonAddAccountsViewResponse.fromJson(Map<String, dynamic> json) {
    if (json['states'] != null) {
      states = <States>[];
      json['states'].forEach((v) {
        states!.add(new States.fromJson(v));
      });
    }

    if(json['account_types']!=null){

      accountTypes = json['account_types'].cast<String>();
    }

    error = json['error'];
    message = json['message'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.states != null) {
      data['states'] = this.states!.map((v) => v.toJson()).toList();
    }

    if(this.accountTypes!=null){

      data['account_types'] = this.accountTypes;
    }
    data['error'] = this.error;
    data['message'] = this.message;
    return data;
  }
}

class States {
  String? id;
  String? name;

  States({this.id, this.name});

  States.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    name = json['name'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['name'] = this.name;
    return data;
  }
}
