/* Options: Date: 2024-11-24 13:41:37 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: CreateClassScheduleRequest.* //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 CreateClassScheduleRequestDto extends ApiDtoBase implements IConvertible { int? ClassId; DateTime? ClassDateTime; int? TrainerId; String? AlternateClassName; CreateClassScheduleRequestDto({this.ClassId,this.ClassDateTime,this.TrainerId,this.AlternateClassName}); CreateClassScheduleRequestDto.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); ClassId = json['ClassId']; ClassDateTime = JsonConverters.fromJson(json['ClassDateTime'],'DateTime',context!); TrainerId = json['TrainerId']; AlternateClassName = json['AlternateClassName']; return this; } Map toJson() => super.toJson()..addAll({ 'ClassId': ClassId, 'ClassDateTime': JsonConverters.toJson(ClassDateTime,'DateTime',context!), 'TrainerId': TrainerId, 'AlternateClassName': AlternateClassName }); getTypeName() => "CreateClassScheduleRequestDto"; TypeContext? context = _ctx; } class ApiResponseBase implements IConvertible { bool? Success; String? Message; ApiResponseBase({this.Success,this.Message}); ApiResponseBase.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Success = json['Success']; Message = json['Message']; return this; } Map toJson() => { 'Success': Success, 'Message': Message }; getTypeName() => "ApiResponseBase"; TypeContext? context = _ctx; } class CreateClassScheduleResponseDto extends ApiResponseBase implements IConvertible { int? ClassScheduleId; CreateClassScheduleResponseDto({this.ClassScheduleId}); CreateClassScheduleResponseDto.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); ClassScheduleId = json['ClassScheduleId']; return this; } Map toJson() => super.toJson()..addAll({ 'ClassScheduleId': ClassScheduleId }); getTypeName() => "CreateClassScheduleResponseDto"; TypeContext? context = _ctx; } class CreateClassScheduleResponse extends CreateClassScheduleResponseDto implements IConvertible { bool? Success; int? ClassScheduleId; String? Message; CreateClassScheduleResponse({this.Success,this.ClassScheduleId,this.Message}); CreateClassScheduleResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); Success = json['Success']; ClassScheduleId = json['ClassScheduleId']; Message = json['Message']; return this; } Map toJson() => super.toJson()..addAll({ 'Success': Success, 'ClassScheduleId': ClassScheduleId, 'Message': Message }); getTypeName() => "CreateClassScheduleResponse"; TypeContext? context = _ctx; } // @Route("/scheduling/class-schedule", "POST") class CreateClassScheduleRequest extends CreateClassScheduleRequestDto implements IReturn, 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; /** * Store ID */ // @ApiMember(DataType="integer", Description="Store ID", IsRequired=true, Name="StoreId", ParameterType="query") int? StoreId; /** * Class ID */ // @ApiMember(DataType="integer", Description="Class ID", IsRequired=true, Name="ClassId", ParameterType="query") int? ClassId; /** * Date and Time for Class */ // @ApiMember(DataType="date-time", Description="Date and Time for Class", IsRequired=true, Name="ClassDateTime", ParameterType="query") DateTime? ClassDateTime; /** * Trainer ID */ // @ApiMember(DataType="integer", Description="Trainer ID", Name="TrainerId", ParameterType="query") int? TrainerId; /** * Alternate Class Name */ // @ApiMember(DataType="string", Description="Alternate Class Name", Name="AlternateClassName", ParameterType="query") String? AlternateClassName; int? RestrictedId; RestrictedResourceType? RestrictedResourceType; CreateClassScheduleRequest({this.ApiKey,this.StoreId,this.ClassId,this.ClassDateTime,this.TrainerId,this.AlternateClassName,this.RestrictedId,this.RestrictedResourceType}); CreateClassScheduleRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); ApiKey = json['ApiKey']; StoreId = json['StoreId']; ClassId = json['ClassId']; ClassDateTime = JsonConverters.fromJson(json['ClassDateTime'],'DateTime',context!); TrainerId = json['TrainerId']; AlternateClassName = json['AlternateClassName']; RestrictedId = json['RestrictedId']; RestrictedResourceType = JsonConverters.fromJson(json['RestrictedResourceType'],'RestrictedResourceType',context!); return this; } Map toJson() => super.toJson()..addAll({ 'ApiKey': ApiKey, 'StoreId': StoreId, 'ClassId': ClassId, 'ClassDateTime': JsonConverters.toJson(ClassDateTime,'DateTime',context!), 'TrainerId': TrainerId, 'AlternateClassName': AlternateClassName, 'RestrictedId': RestrictedId, 'RestrictedResourceType': JsonConverters.toJson(RestrictedResourceType,'RestrictedResourceType',context!) }); createResponse() => CreateClassScheduleResponse(); getResponseTypeName() => "CreateClassScheduleResponse"; getTypeName() => "CreateClassScheduleRequest"; 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()), 'CreateClassScheduleRequestDto': TypeInfo(TypeOf.Class, create:() => CreateClassScheduleRequestDto()), 'ApiResponseBase': TypeInfo(TypeOf.Class, create:() => ApiResponseBase()), 'CreateClassScheduleResponseDto': TypeInfo(TypeOf.Class, create:() => CreateClassScheduleResponseDto()), 'CreateClassScheduleResponse': TypeInfo(TypeOf.Class, create:() => CreateClassScheduleResponse()), 'CreateClassScheduleRequest': TypeInfo(TypeOf.Class, create:() => CreateClassScheduleRequest()), });