class Sms {
  int? code;
  SmsDetails? details;
  String? message;
  bool? status;

  Sms({this.code, this.details, this.message, this.status});

  factory Sms.fromJson(Map<String, dynamic> json) {
    return Sms(
      code: json['code'] as int?,
      details: json['details'] != null
          ? SmsDetails.fromJson(json['details'] as Map<String, dynamic>)
          : null,
      message: json['message'] as String?,
      status: json['status'] as bool?,
    );
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['code'] = code;
    if (details != null) {
      data['details'] = details!.toJson();
    }
    data['message'] = message;
    data['status'] = status;
    return data;
  }
}

class SmsDetails {
  int? providerId;
  int? templateTypeId;
  String? templateName;
  int? templateId;
  String? providerApi;
  String? content;
  int? defaultProvider;
  int? passkey;

  SmsDetails({
    this.providerId,
    this.templateTypeId,
    this.templateName,
    this.templateId,
    this.providerApi,
    this.content,
    this.defaultProvider,
    this.passkey,
  });

  factory SmsDetails.fromJson(Map<String, dynamic> json) {
    return SmsDetails(
      providerId: json['providerid'] as int?,
      templateTypeId: json['templatetypeid'] as int?,
      templateName: json['templatename'] as String?,
      templateId: json['templateid'] as int?,
      providerApi: json['providerapi'] as String?,
      content: json['content'] as String?,
      defaultProvider: json['defaultprovider'] as int?,
      passkey: json['passkey'] as int?,
    );
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['providerid'] = providerId;
    data['templatetypeid'] = templateTypeId;
    data['templatename'] = templateName;
    data['templateid'] = templateId;
    data['providerapi'] = providerApi;
    data['content'] = content;
    data['defaultprovider'] = defaultProvider;
    data['passkey'] = passkey;
    return data;
  }
}