class crmProspectDetailsEditAccountViewResponse {
  List<String>? salutations;
  List<States>? states;
  String? error;
  AccountDetails? accountDetails;
  String? message;

  crmProspectDetailsEditAccountViewResponse(
      {this.salutations,
        this.states,
        this.error,
        this.accountDetails,
        this.message});

  crmProspectDetailsEditAccountViewResponse.fromJson(
      Map<String, dynamic> json) {
    salutations = json['salutations'].cast<String>();
    if (json['states'] != null) {
      states = <States>[];
      json['states'].forEach((v) {
        states!.add(new States.fromJson(v));
      });
    }
    error = json['error'];
    accountDetails = json['account_details'] != null
        ? new AccountDetails.fromJson(json['account_details'])
        : null;
    message = json['message'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['salutations'] = this.salutations;
    if (this.states != null) {
      data['states'] = this.states!.map((v) => v.toJson()).toList();
    }
    data['error'] = this.error;
    if (this.accountDetails != null) {
      data['account_details'] = this.accountDetails!.toJson();
    }
    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;
  }
}

class AccountDetails {
  String? id;
  String? tempId;
  String? ownerId;
  String? accManagerId;
  String? name;
  String? salutationName;
  String? subLocality;
  String? district;
  String? state;
  String? pincode;
  String? address;
  String? date;
  String? source;
  String? reference;
  String? segment;
  String? team;
  String? gstNumber;
  String? isExists;
  String? createdDatetime;
  String? updatedDatetime;

  AccountDetails(
      {this.id,
        this.tempId,
        this.ownerId,
        this.accManagerId,
        this.name,
        this.salutationName,
        this.subLocality,
        this.district,
        this.state,
        this.pincode,
        this.address,
        this.date,
        this.source,
        this.reference,
        this.segment,
        this.team,
        this.gstNumber,
        this.isExists,
        this.createdDatetime,
        this.updatedDatetime});

  AccountDetails.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    tempId = json['temp_id'];
    ownerId = json['owner_id'];
    accManagerId = json['acc_manager_id'];
    name = json['name'];
    salutationName = json['salutation_name'];
    subLocality = json['sub_locality'];
    district = json['district'];
    state = json['state'];
    pincode = json['pincode'];
    address = json['address'];
    date = json['date'];
    source = json['source'];
    reference = json['reference'];
    segment = json['segment'];
    team = json['team'];
    gstNumber = json['gst_number'];
    isExists = json['is_exists'];
    createdDatetime = json['created_datetime'];
    updatedDatetime = json['updated_datetime'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['temp_id'] = this.tempId;
    data['owner_id'] = this.ownerId;
    data['acc_manager_id'] = this.accManagerId;
    data['name'] = this.name;
    data['salutation_name'] = this.salutationName;
    data['sub_locality'] = this.subLocality;
    data['district'] = this.district;
    data['state'] = this.state;
    data['pincode'] = this.pincode;
    data['address'] = this.address;
    data['date'] = this.date;
    data['source'] = this.source;
    data['reference'] = this.reference;
    data['segment'] = this.segment;
    data['team'] = this.team;
    data['gst_number'] = this.gstNumber;
    data['is_exists'] = this.isExists;
    data['created_datetime'] = this.createdDatetime;
    data['updated_datetime'] = this.updatedDatetime;
    return data;
  }
}
