-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
10bf7a8
commit 6a70c04
Showing
2,121 changed files
with
210,590 additions
and
200,957 deletions.
There are no files selected for viewing
156 changes: 156 additions & 0 deletions
156
Sources/code/application/models/AbuseReportAppModelClass.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,156 @@ | ||
import Foundation | ||
|
||
import Foundation | ||
public extension ApplicationClient { | ||
/* | ||
Model: AbuseReport | ||
Used By: Feedback | ||
*/ | ||
class AbuseReport: Codable { | ||
public var abused: Bool? | ||
|
||
public var dateMeta: DateMeta? | ||
|
||
public var description: String? | ||
|
||
public var entity: Entity? | ||
|
||
public var id: String? | ||
|
||
public var name: String? | ||
|
||
public var state: FeedbackState? | ||
|
||
public var tags: [TagMeta]? | ||
|
||
public enum CodingKeys: String, CodingKey { | ||
case abused | ||
|
||
case dateMeta = "date_meta" | ||
|
||
case description | ||
|
||
case entity | ||
|
||
case id | ||
|
||
case name | ||
|
||
case state | ||
|
||
case tags | ||
} | ||
|
||
public init(abused: Bool?, dateMeta: DateMeta?, description: String?, entity: Entity?, id: String?, name: String?, state: FeedbackState?, tags: [TagMeta]?) { | ||
self.abused = abused | ||
|
||
self.dateMeta = dateMeta | ||
|
||
self.description = description | ||
|
||
self.entity = entity | ||
|
||
self.id = id | ||
|
||
self.name = name | ||
|
||
self.state = state | ||
|
||
self.tags = tags | ||
} | ||
|
||
public func duplicate() -> AbuseReport { | ||
let dict = self.dictionary! | ||
let copy = AbuseReport(dictionary: dict)! | ||
return copy | ||
} | ||
|
||
required public init(from decoder: Decoder) throws { | ||
let container = try decoder.container(keyedBy: CodingKeys.self) | ||
|
||
do { | ||
abused = try container.decode(Bool.self, forKey: .abused) | ||
|
||
} catch DecodingError.typeMismatch(let type, let context) { | ||
print("Type '\(type)' mismatch:", context.debugDescription) | ||
print("codingPath:", context.codingPath) | ||
} catch {} | ||
|
||
do { | ||
dateMeta = try container.decode(DateMeta.self, forKey: .dateMeta) | ||
|
||
} catch DecodingError.typeMismatch(let type, let context) { | ||
print("Type '\(type)' mismatch:", context.debugDescription) | ||
print("codingPath:", context.codingPath) | ||
} catch {} | ||
|
||
do { | ||
description = try container.decode(String.self, forKey: .description) | ||
|
||
} catch DecodingError.typeMismatch(let type, let context) { | ||
print("Type '\(type)' mismatch:", context.debugDescription) | ||
print("codingPath:", context.codingPath) | ||
} catch {} | ||
|
||
do { | ||
entity = try container.decode(Entity.self, forKey: .entity) | ||
|
||
} catch DecodingError.typeMismatch(let type, let context) { | ||
print("Type '\(type)' mismatch:", context.debugDescription) | ||
print("codingPath:", context.codingPath) | ||
} catch {} | ||
|
||
do { | ||
id = try container.decode(String.self, forKey: .id) | ||
|
||
} catch DecodingError.typeMismatch(let type, let context) { | ||
print("Type '\(type)' mismatch:", context.debugDescription) | ||
print("codingPath:", context.codingPath) | ||
} catch {} | ||
|
||
do { | ||
name = try container.decode(String.self, forKey: .name) | ||
|
||
} catch DecodingError.typeMismatch(let type, let context) { | ||
print("Type '\(type)' mismatch:", context.debugDescription) | ||
print("codingPath:", context.codingPath) | ||
} catch {} | ||
|
||
do { | ||
state = try container.decode(FeedbackState.self, forKey: .state) | ||
|
||
} catch DecodingError.typeMismatch(let type, let context) { | ||
print("Type '\(type)' mismatch:", context.debugDescription) | ||
print("codingPath:", context.codingPath) | ||
} catch {} | ||
|
||
do { | ||
tags = try container.decode([TagMeta].self, forKey: .tags) | ||
|
||
} catch DecodingError.typeMismatch(let type, let context) { | ||
print("Type '\(type)' mismatch:", context.debugDescription) | ||
print("codingPath:", context.codingPath) | ||
} catch {} | ||
} | ||
|
||
public func encode(to encoder: Encoder) throws { | ||
var container = encoder.container(keyedBy: CodingKeys.self) | ||
|
||
try? container.encodeIfPresent(abused, forKey: .abused) | ||
|
||
try? container.encodeIfPresent(dateMeta, forKey: .dateMeta) | ||
|
||
try? container.encodeIfPresent(description, forKey: .description) | ||
|
||
try? container.encodeIfPresent(entity, forKey: .entity) | ||
|
||
try? container.encodeIfPresent(id, forKey: .id) | ||
|
||
try? container.encodeIfPresent(name, forKey: .name) | ||
|
||
try? container.encodeIfPresent(state, forKey: .state) | ||
|
||
try? container.encodeIfPresent(tags, forKey: .tags) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
import Foundation | ||
|
||
import Foundation | ||
public extension ApplicationClient { | ||
/* | ||
Model: Access | ||
Used By: Feedback | ||
*/ | ||
class Access: Codable { | ||
public var answer: Bool? | ||
|
||
public var askQuestion: Bool? | ||
|
||
public var comment: Bool? | ||
|
||
public var rnr: Bool? | ||
|
||
public enum CodingKeys: String, CodingKey { | ||
case answer | ||
|
||
case askQuestion = "ask_question" | ||
|
||
case comment | ||
|
||
case rnr | ||
} | ||
|
||
public init(answer: Bool?, askQuestion: Bool?, comment: Bool?, rnr: Bool?) { | ||
self.answer = answer | ||
|
||
self.askQuestion = askQuestion | ||
|
||
self.comment = comment | ||
|
||
self.rnr = rnr | ||
} | ||
|
||
public func duplicate() -> Access { | ||
let dict = self.dictionary! | ||
let copy = Access(dictionary: dict)! | ||
return copy | ||
} | ||
|
||
required public init(from decoder: Decoder) throws { | ||
let container = try decoder.container(keyedBy: CodingKeys.self) | ||
|
||
do { | ||
answer = try container.decode(Bool.self, forKey: .answer) | ||
|
||
} catch DecodingError.typeMismatch(let type, let context) { | ||
print("Type '\(type)' mismatch:", context.debugDescription) | ||
print("codingPath:", context.codingPath) | ||
} catch {} | ||
|
||
do { | ||
askQuestion = try container.decode(Bool.self, forKey: .askQuestion) | ||
|
||
} catch DecodingError.typeMismatch(let type, let context) { | ||
print("Type '\(type)' mismatch:", context.debugDescription) | ||
print("codingPath:", context.codingPath) | ||
} catch {} | ||
|
||
do { | ||
comment = try container.decode(Bool.self, forKey: .comment) | ||
|
||
} catch DecodingError.typeMismatch(let type, let context) { | ||
print("Type '\(type)' mismatch:", context.debugDescription) | ||
print("codingPath:", context.codingPath) | ||
} catch {} | ||
|
||
do { | ||
rnr = try container.decode(Bool.self, forKey: .rnr) | ||
|
||
} catch DecodingError.typeMismatch(let type, let context) { | ||
print("Type '\(type)' mismatch:", context.debugDescription) | ||
print("codingPath:", context.codingPath) | ||
} catch {} | ||
} | ||
|
||
public func encode(to encoder: Encoder) throws { | ||
var container = encoder.container(keyedBy: CodingKeys.self) | ||
|
||
try? container.encodeIfPresent(answer, forKey: .answer) | ||
|
||
try? container.encodeIfPresent(askQuestion, forKey: .askQuestion) | ||
|
||
try? container.encodeIfPresent(comment, forKey: .comment) | ||
|
||
try? container.encodeIfPresent(rnr, forKey: .rnr) | ||
} | ||
} | ||
} |
44 changes: 44 additions & 0 deletions
44
Sources/code/application/models/AccountkitAppModelClass.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import Foundation | ||
|
||
import Foundation | ||
public extension ApplicationClient { | ||
/* | ||
Model: Accountkit | ||
Used By: User | ||
*/ | ||
class Accountkit: Codable { | ||
public var appId: String? | ||
|
||
public enum CodingKeys: String, CodingKey { | ||
case appId = "app_id" | ||
} | ||
|
||
public init(appId: String?) { | ||
self.appId = appId | ||
} | ||
|
||
public func duplicate() -> Accountkit { | ||
let dict = self.dictionary! | ||
let copy = Accountkit(dictionary: dict)! | ||
return copy | ||
} | ||
|
||
required public init(from decoder: Decoder) throws { | ||
let container = try decoder.container(keyedBy: CodingKeys.self) | ||
|
||
do { | ||
appId = try container.decode(String.self, forKey: .appId) | ||
|
||
} catch DecodingError.typeMismatch(let type, let context) { | ||
print("Type '\(type)' mismatch:", context.debugDescription) | ||
print("codingPath:", context.codingPath) | ||
} catch {} | ||
} | ||
|
||
public func encode(to encoder: Encoder) throws { | ||
var container = encoder.container(keyedBy: CodingKeys.self) | ||
|
||
try? container.encodeIfPresent(appId, forKey: .appId) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
import Foundation | ||
|
||
import Foundation | ||
public extension ApplicationClient { | ||
/* | ||
Model: Action | ||
Used By: Content | ||
*/ | ||
class Action: Codable { | ||
public var page: ActionPage? | ||
|
||
public var popup: ActionPage? | ||
|
||
public var type: String? | ||
|
||
public enum CodingKeys: String, CodingKey { | ||
case page | ||
|
||
case popup | ||
|
||
case type | ||
} | ||
|
||
public init(page: ActionPage?, popup: ActionPage?, type: String?) { | ||
self.page = page | ||
|
||
self.popup = popup | ||
|
||
self.type = type | ||
} | ||
|
||
public func duplicate() -> Action { | ||
let dict = self.dictionary! | ||
let copy = Action(dictionary: dict)! | ||
return copy | ||
} | ||
|
||
required public init(from decoder: Decoder) throws { | ||
let container = try decoder.container(keyedBy: CodingKeys.self) | ||
|
||
do { | ||
page = try container.decode(ActionPage.self, forKey: .page) | ||
|
||
} catch DecodingError.typeMismatch(let type, let context) { | ||
print("Type '\(type)' mismatch:", context.debugDescription) | ||
print("codingPath:", context.codingPath) | ||
} catch {} | ||
|
||
do { | ||
popup = try container.decode(ActionPage.self, forKey: .popup) | ||
|
||
} catch DecodingError.typeMismatch(let type, let context) { | ||
print("Type '\(type)' mismatch:", context.debugDescription) | ||
print("codingPath:", context.codingPath) | ||
} catch {} | ||
|
||
do { | ||
type = try container.decode(String.self, forKey: .type) | ||
|
||
} catch DecodingError.typeMismatch(let type, let context) { | ||
print("Type '\(type)' mismatch:", context.debugDescription) | ||
print("codingPath:", context.codingPath) | ||
} catch {} | ||
} | ||
|
||
public func encode(to encoder: Encoder) throws { | ||
var container = encoder.container(keyedBy: CodingKeys.self) | ||
|
||
try? container.encodeIfPresent(page, forKey: .page) | ||
|
||
try? container.encodeIfPresent(popup, forKey: .popup) | ||
|
||
try? container.encodeIfPresent(type, forKey: .type) | ||
} | ||
} | ||
} |
Oops, something went wrong.