/* Options: Date: 2024-11-24 14:27:02 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: CreateGuestPassRequest.* //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 CreateGuestPassRequestDto extends ApiDtoBase implements IConvertible { int? UserId; int? GuestPassTypeId; bool? Activated; DateTime? Expires; CreateGuestPassRequestDto({this.UserId,this.GuestPassTypeId,this.Activated,this.Expires}); CreateGuestPassRequestDto.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); UserId = json['UserId']; GuestPassTypeId = json['GuestPassTypeId']; Activated = json['Activated']; Expires = JsonConverters.fromJson(json['Expires'],'DateTime',context!); return this; } Map toJson() => super.toJson()..addAll({ 'UserId': UserId, 'GuestPassTypeId': GuestPassTypeId, 'Activated': Activated, 'Expires': JsonConverters.toJson(Expires,'DateTime',context!) }); getTypeName() => "CreateGuestPassRequestDto"; 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 CreateGuestPassResponseDto extends ApiResponseBase implements IConvertible { int? GuestPassId; CreateGuestPassResponseDto({this.GuestPassId}); CreateGuestPassResponseDto.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); GuestPassId = json['GuestPassId']; return this; } Map toJson() => super.toJson()..addAll({ 'GuestPassId': GuestPassId }); getTypeName() => "CreateGuestPassResponseDto"; TypeContext? context = _ctx; } class CreateGuestPassResponse extends CreateGuestPassResponseDto implements IConvertible { bool? Success; int? GuestPassId; String? Message; CreateGuestPassResponse({this.Success,this.GuestPassId,this.Message}); CreateGuestPassResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); Success = json['Success']; GuestPassId = json['GuestPassId']; Message = json['Message']; return this; } Map toJson() => super.toJson()..addAll({ 'Success': Success, 'GuestPassId': GuestPassId, 'Message': Message }); getTypeName() => "CreateGuestPassResponse"; TypeContext? context = _ctx; } // @Route("/club/guest-pass/create", "POST") class CreateGuestPassRequest extends CreateGuestPassRequestDto 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; /** * User ID */ // @ApiMember(DataType="string", Description="User ID", IsRequired=true, Name="UserId", ParameterType="query") int? UserId; /** * Store ID */ // @ApiMember(DataType="integer", Description="Store ID", IsRequired=true, Name="StoreId", ParameterType="query") int? StoreId; /** * Guest pass type to create. */ // @ApiMember(DataType="integer", Description="Guest pass type to create.", IsRequired=true, Name="GuestPassTypeId", ParameterType="query") int? GuestPassTypeId; /** * Activate this Guest Pass immediately? (True or False) */ // @ApiMember(DataType="bool", Description="Activate this Guest Pass immediately? (True or False)", IsRequired=true, Name="Activated", ParameterType="query") bool? Activated; /** * When will this pass expire? (leave blank for never) */ // @ApiMember(DataType="datetime", Description="When will this pass expire? (leave blank for never)", Name="Expires", ParameterType="query") DateTime? Expires; int? RestrictedId; RestrictedResourceType? RestrictedResourceType; CreateGuestPassRequest({this.ApiKey,this.UserId,this.StoreId,this.GuestPassTypeId,this.Activated,this.Expires,this.RestrictedId,this.RestrictedResourceType}); CreateGuestPassRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); ApiKey = json['ApiKey']; UserId = json['UserId']; StoreId = json['StoreId']; GuestPassTypeId = json['GuestPassTypeId']; Activated = json['Activated']; Expires = JsonConverters.fromJson(json['Expires'],'DateTime',context!); RestrictedId = json['RestrictedId']; RestrictedResourceType = JsonConverters.fromJson(json['RestrictedResourceType'],'RestrictedResourceType',context!); return this; } Map toJson() => super.toJson()..addAll({ 'ApiKey': ApiKey, 'UserId': UserId, 'StoreId': StoreId, 'GuestPassTypeId': GuestPassTypeId, 'Activated': Activated, 'Expires': JsonConverters.toJson(Expires,'DateTime',context!), 'RestrictedId': RestrictedId, 'RestrictedResourceType': JsonConverters.toJson(RestrictedResourceType,'RestrictedResourceType',context!) }); createResponse() => CreateGuestPassResponse(); getResponseTypeName() => "CreateGuestPassResponse"; getTypeName() => "CreateGuestPassRequest"; 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()), 'CreateGuestPassRequestDto': TypeInfo(TypeOf.Class, create:() => CreateGuestPassRequestDto()), 'ApiResponseBase': TypeInfo(TypeOf.Class, create:() => ApiResponseBase()), 'CreateGuestPassResponseDto': TypeInfo(TypeOf.Class, create:() => CreateGuestPassResponseDto()), 'CreateGuestPassResponse': TypeInfo(TypeOf.Class, create:() => CreateGuestPassResponse()), 'CreateGuestPassRequest': TypeInfo(TypeOf.Class, create:() => CreateGuestPassRequest()), });