/* Options: Date: 2025-05-10 02:25:42 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: GetSchedulingGroupingsRequest.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: True //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack /** * GetSchedulingGroupingsRequires active-e Lesson Scheduling Service */ // @Route("/GetSchedulingGroupings", "GET") // @DataContract public class GetSchedulingGroupingsRequest : BaseRequest, IReturn { public typealias Return = GetSchedulingGroupingsResponse /** * Grouping ID to look up. If sent, all other parameters will be ignored. */ // @DataMember // @ApiMember(DataType="integer", Description="Grouping ID to look up. If sent, all other parameters will be ignored.", Format="int64", Name="GroupingId", ParameterType="query") public var groupingId:Int? /** * If sent, only groupings with at least one lesson type taught by the sent instructor will be returned. */ // @DataMember // @ApiMember(DataType="integer", Description="If sent, only groupings with at least one lesson type taught by the sent instructor will be returned.", Format="int32", Name="InstructorId", ParameterType="query") public var instructorId:Int? /** * If sent, only groupings taught at the sent location will be returned. */ // @DataMember // @ApiMember(DataType="integer", Description="If sent, only groupings 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 groupings containing Private Lesson Types will be returned. If Group, only groupings containing Group Lesson Types will be returned. */ // @DataMember // @ApiMember(DataType="integer", Description="If sent, should be Private or Group. If Private, only groupings containing Private Lesson Types will be returned. If Group, only groupings containing 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 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) 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 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 GetSchedulingGroupingsResponse : BaseResponse { // @DataMember public var groupings:[GroupingInfo] = [] required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case groupings } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) groupings = try container.decodeIfPresent([GroupingInfo].self, forKey: .groupings) ?? [] } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if groupings.count > 0 { try container.encode(groupings, forKey: .groupings) } } } // @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 GroupingInfo : Codable { // @DataMember public var id:Int // @DataMember public var desc: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(){} }