Skip to content

Instantly share code, notes, and snippets.

@dimohamdy
Created January 15, 2019 12:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dimohamdy/a595e56720183c2e3d249ebe693bc8ec to your computer and use it in GitHub Desktop.
Save dimohamdy/a595e56720183c2e3d249ebe693bc8ec to your computer and use it in GitHub Desktop.
LoginConfig Model
//
// LoginConfig.swift
//
// Create by Ahmed Tawfik on 15/1/2019
// Copyright © 2019. All rights reserved.
// Model file generated using JSONExport: https://github.com/Ahmed-Ali/JSONExport
import Foundation
struct LoginConfig : Codable {
let showButton : Bool?
let showLabel : Bool?
enum CodingKeys: String, CodingKey {
case showButton = "show_button"
case showLabel = "show_label"
}
init(from decoder: Decoder) throws {
let values = try decoder.container(keyedBy: CodingKeys.self)
showButton = try values.decodeIfPresent(Bool.self, forKey: .showButton)
showLabel = try values.decodeIfPresent(Bool.self, forKey: .showLabel)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment