/* Options: Date: 2024-11-24 13:43:27 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: CreateClassBookingRequest.* //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 CreateClassBookingRequestDto extends ApiDtoBase implements IConvertible { int? UserId; int? ScheduleId; bool? AllowWaitList; CreateClassBookingRequestDto({this.UserId,this.ScheduleId,this.AllowWaitList}); CreateClassBookingRequestDto.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); UserId = json['UserId']; ScheduleId = json['ScheduleId']; AllowWaitList = json['AllowWaitList']; return this; } Map toJson() => super.toJson()..addAll({ 'UserId': UserId, 'ScheduleId': ScheduleId, 'AllowWaitList': AllowWaitList }); getTypeName() => "CreateClassBookingRequestDto"; TypeContext? context = _ctx; } class CreateClassBookingResponseDto implements IConvertible { int? BookingId; String? Message; CreateClassBookingResponseDto({this.BookingId,this.Message}); CreateClassBookingResponseDto.fromJson(Map json) { fromMap(json); } fromMap(Map json) { BookingId = json['BookingId']; Message = json['Message']; return this; } Map toJson() => { 'BookingId': BookingId, 'Message': Message }; getTypeName() => "CreateClassBookingResponseDto"; TypeContext? context = _ctx; } class CreateClassBookingResponse extends CreateClassBookingResponseDto implements IConvertible { int? BookingId; String? Message; CreateClassBookingResponse({this.BookingId,this.Message}); CreateClassBookingResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); BookingId = json['BookingId']; Message = json['Message']; return this; } Map toJson() => super.toJson()..addAll({ 'BookingId': BookingId, 'Message': Message }); getTypeName() => "CreateClassBookingResponse"; TypeContext? context = _ctx; } // @Route("/scheduling/class-booking", "POST") // @Route("/v2/{ApiKey}/club/{StoreId}/booking", "POST") // @Route("/v2/{ApiKey}/club/{StoreId}/class-booking", "POST") class CreateClassBookingRequest extends CreateClassBookingRequestDto 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; /** * UserID */ // @ApiMember(DataType="string", Description="UserID", IsRequired=true, Name="UserId", ParameterType="query") int? UserId; /** * Store ID */ // @ApiMember(DataType="integer", Description="Store ID", IsRequired=true, Name="StoreId", ParameterType="query") int? StoreId; /** * Class Schedule ID */ // @ApiMember(DataType="integer", Description="Class Schedule ID", IsRequired=true, Name="ScheduleId", ParameterType="query") int? ScheduleId; /** * Put user in wait list when possible */ // @ApiMember(DataType="bool", Description="Put user in wait list when possible", Name="AllowWaitList", ParameterType="query") bool? AllowWaitList; int? RestrictedId; RestrictedResourceType? RestrictedResourceType; CreateClassBookingRequest({this.ApiKey,this.UserId,this.StoreId,this.ScheduleId,this.AllowWaitList,this.RestrictedId,this.RestrictedResourceType}); CreateClassBookingRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); ApiKey = json['ApiKey']; UserId = json['UserId']; StoreId = json['StoreId']; ScheduleId = json['ScheduleId']; AllowWaitList = json['AllowWaitList']; RestrictedId = json['RestrictedId']; RestrictedResourceType = JsonConverters.fromJson(json['RestrictedResourceType'],'RestrictedResourceType',context!); return this; } Map toJson() => super.toJson()..addAll({ 'ApiKey': ApiKey, 'UserId': UserId, 'StoreId': StoreId, 'ScheduleId': ScheduleId, 'AllowWaitList': AllowWaitList, 'RestrictedId': RestrictedId, 'RestrictedResourceType': JsonConverters.toJson(RestrictedResourceType,'RestrictedResourceType',context!) }); createResponse() => CreateClassBookingResponse(); getResponseTypeName() => "CreateClassBookingResponse"; getTypeName() => "CreateClassBookingRequest"; 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()), 'CreateClassBookingRequestDto': TypeInfo(TypeOf.Class, create:() => CreateClassBookingRequestDto()), 'CreateClassBookingResponseDto': TypeInfo(TypeOf.Class, create:() => CreateClassBookingResponseDto()), 'CreateClassBookingResponse': TypeInfo(TypeOf.Class, create:() => CreateClassBookingResponse()), 'CreateClassBookingRequest': TypeInfo(TypeOf.Class, create:() => CreateClassBookingRequest()), });