class crmLeadDetailsEditAccountViewResponse {
  List<Teams>? teams;
  AccountDetails? accountDetails;
  String? error;
  String? message;

  crmLeadDetailsEditAccountViewResponse(
      {this.teams, this.accountDetails, this.error, this.message});

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

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.teams != null) {
      data['teams'] = this.teams!.map((v) => v.toJson()).toList();
    }
    if (this.accountDetails != null) {
      data['account_details'] = this.accountDetails!.toJson();
    }
    data['error'] = this.error;
    data['message'] = this.message;
    return data;
  }
}

class Teams {
  String? id;
  String? name;

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

  Teams.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? team;
  String? segment;
  String? name;

  AccountDetails({this.team, this.segment, this.name});

  AccountDetails.fromJson(Map<String, dynamic> json) {
    team = json['team'];
    segment = json['segment'];
    name = json['name'];
  }

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