import 'dart:convert';

class SSOAuthModel {
  String? status;
  List<dynamic>? message;
  Data? data;

  SSOAuthModel({
    this.status,
    this.message,
    this.data,
  });

  factory SSOAuthModel.fromRawJson(String str) => SSOAuthModel.fromJson(json.decode(str));

  String toRawJson() => json.encode(toJson());

  factory SSOAuthModel.fromJson(Map<String, dynamic> json) => SSOAuthModel(
    status: json["status"],
    message: json["message"] == null ? [] : List<dynamic>.from(json["message"]!.map((x) => x)),
    data: json["data"] == null ? null : Data.fromJson(json["data"]),
  );

  Map<String, dynamic> toJson() => {
    "status": status,
    "message": message == null ? [] : List<dynamic>.from(message!.map((x) => x)),
    "data": data?.toJson(),
  };
}

class Data {
  String? accessToken;
  String? idToken;
  int? expiresIn;
  String? refreshToken;
  String? postBackUrl;

  Data({
    this.accessToken,
    this.idToken,
    this.expiresIn,
    this.refreshToken,
    this.postBackUrl,
  });

  factory Data.fromRawJson(String str) => Data.fromJson(json.decode(str));

  String toRawJson() => json.encode(toJson());

  factory Data.fromJson(Map<String, dynamic> json) => Data(
    accessToken: json["accessToken"],
    idToken: json["idToken"],
    expiresIn: json["expiresIn"],
    refreshToken: json["refreshToken"],
    postBackUrl: json["postBackUrl"],
  );

  Map<String, dynamic> toJson() => {
    "accessToken": accessToken,
    "idToken": idToken,
    "expiresIn": expiresIn,
    "refreshToken": refreshToken,
    "postBackUrl": postBackUrl,
  };
}
