/* Options: Date: 2025-05-10 00:37:22 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: GetSchedulingTypesRequest.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: True //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack /** * GetSchedulingTypesRequires active-e Lesson Scheduling Service */ // @Route("/GetSchedulingTypes", "GET") // @DataContract public class GetSchedulingTypesRequest : BaseRequest, IReturn { public typealias Return = GetSchedulingTypesResponse /** * Type ID to look up. If sent, all other parameters will be ignored. */ // @DataMember // @ApiMember(DataType="integer", Description="Type ID to look up. If sent, all other parameters will be ignored.", Format="int64", Name="TypeId", ParameterType="query") public var typeId:Int? /** * If sent, only types in the sent grouping will be returned. */ // @DataMember // @ApiMember(DataType="integer", Description="If sent, only types in the sent grouping will be returned.", Format="int64", Name="GroupingId", ParameterType="query") public var groupingId:Int? /** * If sent, only types taught by the sent instructor will be returned. */ // @DataMember // @ApiMember(DataType="integer", Description="If sent, only types taught by the sent instructor will be returned.", Format="int32", Name="InstructorId", ParameterType="query") public var instructorId:Int? /** * If sent, only types taught at the sent location will be returned. */ // @DataMember // @ApiMember(DataType="integer", Description="If sent, only types taught at the sent location will be returned.", Format="int64", Name="LocationId", ParameterType="query") public var locationId:Int? /** * If sent, should be Private or Group. If Private, only Private Lesson Types will be returned. If Group, only Group Lesson Types will be returned. */ // @DataMember // @ApiMember(DataType="integer", Description="If sent, should be Private or Group. If Private, only Private Lesson Types will be returned. If Group, only Group Lesson Types will be returned.", Format="int64", Name="MembershipType", ParameterType="query") public var membershipType:String required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case typeId case groupingId case instructorId case locationId case membershipType } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) typeId = try container.decodeIfPresent(Int.self, forKey: .typeId) groupingId = try container.decodeIfPresent(Int.self, forKey: .groupingId) instructorId = try container.decodeIfPresent(Int.self, forKey: .instructorId) locationId = try container.decodeIfPresent(Int.self, forKey: .locationId) membershipType = try container.decodeIfPresent(String.self, forKey: .membershipType) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if typeId != nil { try container.encode(typeId, forKey: .typeId) } if groupingId != nil { try container.encode(groupingId, forKey: .groupingId) } if instructorId != nil { try container.encode(instructorId, forKey: .instructorId) } if locationId != nil { try container.encode(locationId, forKey: .locationId) } if membershipType != nil { try container.encode(membershipType, forKey: .membershipType) } } } // @DataContract public class GetSchedulingTypesResponse : BaseResponse { // @DataMember public var types:[TypeInfo] = [] required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case types } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) types = try container.decodeIfPresent([TypeInfo].self, forKey: .types) ?? [] } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if types.count > 0 { try container.encode(types, forKey: .types) } } } // @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 TypeInfo : Codable { // @DataMember public var id:Int // @DataMember public var desc:String // @DataMember public var length:Int // @DataMember public var topic:String // @DataMember public var recurranceType:String // @DataMember public var membershipType:String // @DataMember public var rate:Double // @DataMember public var groupingId:Int? // @DataMember public var groupingDesc:String required public init(){} } // @DataContract public class BaseResponse : Codable { /** * */ // @DataMember // @ApiMember(DataType="BaseResponseResult", Description="", Name="Status", ParameterType="body") public var status:BaseResponseResult required public init(){} }