/* Options: Date: 2025-05-10 02:23:48 SwiftVersion: 5.0 Version: 8.40 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://active-ewebservice.biz/aeservices30/api //BaseClass: //AddModelExtensions: True //AddServiceStackTypes: True IncludeTypes: GetSchedulingInstructorsRequest.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: True //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack /** * GetSchedulingInstructorsRequires active-e Lesson Scheduling Service */ // @Route("/GetSchedulingInstructors", "GET") // @DataContract public class GetSchedulingInstructorsRequest : BaseRequest, IReturn { public typealias Return = GetSchedulingInstructorsResponse /** * Instructor ID to lookup. If sent, other parameters will be ignored. */ // @DataMember // @ApiMember(DataType="integer", Description="Instructor ID to lookup. If sent, other parameters will be ignored.", Format="int32", Name="InstructorId", ParameterType="query") public var instructorId:Int? /** * If sent, only instructors who teach lessons with the passed grouping will be returned. */ // @DataMember // @ApiMember(DataType="integer", Description="If sent, only instructors who teach lessons with the passed grouping will be returned.", Format="int64", Name="GroupingId", ParameterType="query") public var groupingId:Int? /** * If sent, only instructors who teach lessons with the passed type will be returned. */ // @DataMember // @ApiMember(DataType="integer", Description="If sent, only instructors who teach lessons with the passed type will be returned.", Format="int64", Name="TypeId", ParameterType="query") public var typeId:Int? /** * If sent, only instructors who have an availability record at the passed location will be returned. */ // @DataMember // @ApiMember(DataType="integer", Description="If sent, only instructors who have an availability record at the passed location will be returned.", Format="int64", Name="LocationId", ParameterType="query") public var locationId:Int? /** * If true, basic Availability Info will be included in the response */ // @DataMember // @ApiMember(DataType="boolean", Description="If true, basic Availability Info will be included in the response", Name="IncludeAvailabilityInfo", ParameterType="query") public var includeAvailabilityInfo:Bool required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case instructorId case groupingId case typeId case locationId case includeAvailabilityInfo } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) instructorId = try container.decodeIfPresent(Int.self, forKey: .instructorId) groupingId = try container.decodeIfPresent(Int.self, forKey: .groupingId) typeId = try container.decodeIfPresent(Int.self, forKey: .typeId) locationId = try container.decodeIfPresent(Int.self, forKey: .locationId) includeAvailabilityInfo = try container.decodeIfPresent(Bool.self, forKey: .includeAvailabilityInfo) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if instructorId != nil { try container.encode(instructorId, forKey: .instructorId) } if groupingId != nil { try container.encode(groupingId, forKey: .groupingId) } if typeId != nil { try container.encode(typeId, forKey: .typeId) } if locationId != nil { try container.encode(locationId, forKey: .locationId) } if includeAvailabilityInfo != nil { try container.encode(includeAvailabilityInfo, forKey: .includeAvailabilityInfo) } } } // @DataContract public class GetSchedulingInstructorsResponse : BaseResponse { // @DataMember public var instructors:[InstructorInfo] = [] required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case instructors } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) instructors = try container.decodeIfPresent([InstructorInfo].self, forKey: .instructors) ?? [] } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if instructors.count > 0 { try container.encode(instructors, forKey: .instructors) } } } // @DataContract public class BaseRequest : Codable { /** * This is your AIM API Key provided by Tri-Tech */ // @DataMember // @ApiMember(DataType="string", Description="This is your AIM API Key provided by Tri-Tech", IsRequired=true, Name="ApiKey", ParameterType="header") public var apiKey:String // @DataMember // @ApiMember(DataType="string", Name="OAuthToken", ParameterType="header") public var oAuthToken:String required public init(){} } // @DataContract public class InstructorInfo : Codable { // @DataMember public var id:Int // @DataMember public var name:String // @DataMember public var email:String // @DataMember public var topic:String // @DataMember public var availabilityInfo:InstructorAvailabilityInfo required public init(){} } public class InstructorAvailabilityInfo : Codable { // @DataMember public var sunday:Bool // @DataMember public var monday:Bool // @DataMember public var tuesday:Bool // @DataMember public var wednesday:Bool // @DataMember public var thursday:Bool // @DataMember public var friday:Bool // @DataMember public var saturday:Bool required public init(){} } // @DataContract public class BaseResponse : Codable { /** * */ // @DataMember // @ApiMember(DataType="BaseResponseResult", Description="", Name="Status", ParameterType="body") public var status:BaseResponseResult required public init(){} }