/* Options: Date: 2024-11-24 13:36:01 Version: 6.50 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://clubready.com/api/current //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: GetClassScheduleRequest.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; enum RestrictedResourceType { Store, Chain, User, Undefined, } abstract class IRestrictedApiRequest extends IApiKeyEndpoint { int? RestrictedId; RestrictedResourceType? RestrictedResourceType; } abstract class IApiKeyEndpoint { String? ApiKey; } class ApiDtoBase implements IConvertible { String? ApiKey; int? StoreId; int? ChainId; ApiDtoBase({this.ApiKey,this.StoreId,this.ChainId}); ApiDtoBase.fromJson(Map json) { fromMap(json); } fromMap(Map json) { ApiKey = json['ApiKey']; StoreId = json['StoreId']; ChainId = json['ChainId']; return this; } Map toJson() => { 'ApiKey': ApiKey, 'StoreId': StoreId, 'ChainId': ChainId }; getTypeName() => "ApiDtoBase"; TypeContext? context = _ctx; } class GetClassScheduleRequestDto extends ApiDtoBase implements IConvertible { DateTime? FromDate; DateTime? ToDate; int? FilterByCategoryId; GetClassScheduleRequestDto({this.FromDate,this.ToDate,this.FilterByCategoryId}); GetClassScheduleRequestDto.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); FromDate = JsonConverters.fromJson(json['FromDate'],'DateTime',context!); ToDate = JsonConverters.fromJson(json['ToDate'],'DateTime',context!); FilterByCategoryId = json['FilterByCategoryId']; return this; } Map toJson() => super.toJson()..addAll({ 'FromDate': JsonConverters.toJson(FromDate,'DateTime',context!), 'ToDate': JsonConverters.toJson(ToDate,'DateTime',context!), 'FilterByCategoryId': FilterByCategoryId }); getTypeName() => "GetClassScheduleRequestDto"; TypeContext? context = _ctx; } /** * Get a list of classes for a locations. Specify ToDate / FromDate (max 7 days) to get a list of classes within a date range. Omitting dates will retrieve classes for today. */ // @Route("/scheduling/class-schedule", "GET") // @Route("/v2/{Apikey}/club/{StoreID}/classschedule", "GET") // @Api(Description="Get a list of classes for a locations. Specify ToDate / FromDate (max 7 days) to get a list of classes within a date range. Omitting dates will retrieve classes for today.") class GetClassScheduleRequest extends GetClassScheduleRequestDto implements IRestrictedApiRequest, IConvertible { /** * Api Key - grants access to resources */ // @ApiMember(DataType="string", Description="Api Key - grants access to resources", IsRequired=true, Name="ApiKey", ParameterType="query") String? ApiKey; /** * StoreID */ // @ApiMember(DataType="integer", Description="StoreID", IsRequired=true, Name="StoreID", ParameterType="query") int? StoreId; /** * From Date (if blank, defaults to today; format: YYYY-MM-DD) */ // @ApiMember(DataType="date", Description="From Date (if blank, defaults to today; format: YYYY-MM-DD)", Name="FromDate", ParameterType="query") DateTime? FromDate; /** * To Date (max 7 days; format: YYYY-MM-DD) */ // @ApiMember(DataType="date", Description="To Date (max 7 days; format: YYYY-MM-DD)", IsRequired=true, Name="ToDate", ParameterType="query") DateTime? ToDate; /** * Id of Category Names to filter results by */ // @ApiMember(DataType="int", Description="Id of Category Names to filter results by", Name="FilterByCategoryId", ParameterType="query") int? FilterByCategoryId; int? RestrictedId; RestrictedResourceType? RestrictedResourceType; GetClassScheduleRequest({this.ApiKey,this.StoreId,this.FromDate,this.ToDate,this.FilterByCategoryId,this.RestrictedId,this.RestrictedResourceType}); GetClassScheduleRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); ApiKey = json['ApiKey']; StoreId = json['StoreId']; FromDate = JsonConverters.fromJson(json['FromDate'],'DateTime',context!); ToDate = JsonConverters.fromJson(json['ToDate'],'DateTime',context!); FilterByCategoryId = json['FilterByCategoryId']; RestrictedId = json['RestrictedId']; RestrictedResourceType = JsonConverters.fromJson(json['RestrictedResourceType'],'RestrictedResourceType',context!); return this; } Map toJson() => super.toJson()..addAll({ 'ApiKey': ApiKey, 'StoreId': StoreId, 'FromDate': JsonConverters.toJson(FromDate,'DateTime',context!), 'ToDate': JsonConverters.toJson(ToDate,'DateTime',context!), 'FilterByCategoryId': FilterByCategoryId, 'RestrictedId': RestrictedId, 'RestrictedResourceType': JsonConverters.toJson(RestrictedResourceType,'RestrictedResourceType',context!) }); getTypeName() => "GetClassScheduleRequest"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'clubready.com', types: { 'RestrictedResourceType': TypeInfo(TypeOf.Enum, enumValues:RestrictedResourceType.values), 'IRestrictedApiRequest': TypeInfo(TypeOf.Interface), 'IApiKeyEndpoint': TypeInfo(TypeOf.Interface), 'ApiDtoBase': TypeInfo(TypeOf.Class, create:() => ApiDtoBase()), 'GetClassScheduleRequestDto': TypeInfo(TypeOf.Class, create:() => GetClassScheduleRequestDto()), 'GetClassScheduleRequest': TypeInfo(TypeOf.Class, create:() => GetClassScheduleRequest()), });