/* Options: Date: 2024-11-24 14:06:14 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: GetGuestPassesRequest.* //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 GetGuestPassRequestDto extends ApiDtoBase implements IConvertible { int? UserId; GetGuestPassRequestDto({this.UserId}); GetGuestPassRequestDto.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); UserId = json['UserId']; return this; } Map toJson() => super.toJson()..addAll({ 'UserId': UserId }); getTypeName() => "GetGuestPassRequestDto"; TypeContext? context = _ctx; } class GuestPassSimple implements IConvertible { int? GuestPassId; int? GuestPassTypeId; int? StoreId; DateTime? ActivatedOn; DateTime? Expires; GuestPassSimple({this.GuestPassId,this.GuestPassTypeId,this.StoreId,this.ActivatedOn,this.Expires}); GuestPassSimple.fromJson(Map json) { fromMap(json); } fromMap(Map json) { GuestPassId = json['GuestPassId']; GuestPassTypeId = json['GuestPassTypeId']; StoreId = json['StoreId']; ActivatedOn = JsonConverters.fromJson(json['ActivatedOn'],'DateTime',context!); Expires = JsonConverters.fromJson(json['Expires'],'DateTime',context!); return this; } Map toJson() => { 'GuestPassId': GuestPassId, 'GuestPassTypeId': GuestPassTypeId, 'StoreId': StoreId, 'ActivatedOn': JsonConverters.toJson(ActivatedOn,'DateTime',context!), 'Expires': JsonConverters.toJson(Expires,'DateTime',context!) }; getTypeName() => "GuestPassSimple"; 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 GetGuestPassResponseDto extends ApiResponseBase implements IConvertible { List? GuestPasses; GetGuestPassResponseDto({this.GuestPasses}); GetGuestPassResponseDto.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); GuestPasses = JsonConverters.fromJson(json['GuestPasses'],'List',context!); return this; } Map toJson() => super.toJson()..addAll({ 'GuestPasses': JsonConverters.toJson(GuestPasses,'List',context!) }); getTypeName() => "GetGuestPassResponseDto"; TypeContext? context = _ctx; } class GetGuestPassesResponse extends GetGuestPassResponseDto implements IConvertible { bool? Success; String? Message; List? GuestPasses; GetGuestPassesResponse({this.Success,this.Message,this.GuestPasses}); GetGuestPassesResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); Success = json['Success']; Message = json['Message']; GuestPasses = JsonConverters.fromJson(json['GuestPasses'],'List',context!); return this; } Map toJson() => super.toJson()..addAll({ 'Success': Success, 'Message': Message, 'GuestPasses': JsonConverters.toJson(GuestPasses,'List',context!) }); getTypeName() => "GetGuestPassesResponse"; TypeContext? context = _ctx; } // @Route("/club/guest-pass/get", "GET") class GetGuestPassesRequest extends GetGuestPassRequestDto 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; /** * User ID */ // @ApiMember(DataType="integer", Description="User ID", IsRequired=true, Name="UserId", ParameterType="query") int? UserId; int? RestrictedId; RestrictedResourceType? RestrictedResourceType; GetGuestPassesRequest({this.ApiKey,this.StoreId,this.UserId,this.RestrictedId,this.RestrictedResourceType}); GetGuestPassesRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); ApiKey = json['ApiKey']; StoreId = json['StoreId']; UserId = json['UserId']; RestrictedId = json['RestrictedId']; RestrictedResourceType = JsonConverters.fromJson(json['RestrictedResourceType'],'RestrictedResourceType',context!); return this; } Map toJson() => super.toJson()..addAll({ 'ApiKey': ApiKey, 'StoreId': StoreId, 'UserId': UserId, 'RestrictedId': RestrictedId, 'RestrictedResourceType': JsonConverters.toJson(RestrictedResourceType,'RestrictedResourceType',context!) }); createResponse() => GetGuestPassesResponse(); getResponseTypeName() => "GetGuestPassesResponse"; getTypeName() => "GetGuestPassesRequest"; 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()), 'GetGuestPassRequestDto': TypeInfo(TypeOf.Class, create:() => GetGuestPassRequestDto()), 'GuestPassSimple': TypeInfo(TypeOf.Class, create:() => GuestPassSimple()), 'ApiResponseBase': TypeInfo(TypeOf.Class, create:() => ApiResponseBase()), 'GetGuestPassResponseDto': TypeInfo(TypeOf.Class, create:() => GetGuestPassResponseDto()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'GetGuestPassesResponse': TypeInfo(TypeOf.Class, create:() => GetGuestPassesResponse()), 'GetGuestPassesRequest': TypeInfo(TypeOf.Class, create:() => GetGuestPassesRequest()), });