-
Notifications
You must be signed in to change notification settings - Fork 278
/
Services.swift
52 lines (39 loc) · 1014 Bytes
/
Services.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//
// Services.swift
// HomeAssistant
//
// Created by Robbie Trencheny on 4/5/16.
// Copyright © 2016 Robbie Trencheny. All rights reserved.
//
import Foundation
import ObjectMapper
class ServicesResponse: Mappable {
var Domain: String?
var Services: [String : ServiceDefinition] = [:]
required init?(map: Map){
}
func mapping(map: Map) {
Domain <- map["domain"]
Services <- map["services"]
}
}
class ServiceDefinition: Mappable {
var Description: String?
var Fields: [String : ServiceField] = [:]
required init?(map: Map){
}
func mapping(map: Map) {
Description <- map["description"]
Fields <- map["fields"]
}
}
class ServiceField: Mappable {
var Description: String?
var Example: AnyObject?
required init?(map: Map){
}
func mapping(map: Map) {
Description <- map["description"]
Example <- map["example"]
}
}