/* Options: Date: 2024-11-24 14:03:45 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: GetGuestPassTypesRequest.* //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 GetGuestPassTypesRequestDto extends ApiDtoBase implements IConvertible { GetGuestPassTypesRequestDto(); GetGuestPassTypesRequestDto.fromJson(Map json) : super.fromJson(json); fromMap(Map json) { super.fromMap(json); return this; } Map toJson() => super.toJson(); getTypeName() => "GetGuestPassTypesRequestDto"; TypeContext? context = _ctx; } class GuestPassTypeDto implements IConvertible { int? GuestPassTypeId; int? ChainId; int? StoreId; String? PassName; int? DurationDays; bool? ExpirationEditable; int? MaxDurationDays; bool? AutoActivateWhenIssued; bool? IssueBarcodeWhenActivated; String? TagWhenActivated; int? MaxIssuedCount; bool? IsDeleted; int? InactiveCount; int? ActiveCount; int? ExpiredCount; int? TotalCount; GuestPassTypeDto({this.GuestPassTypeId,this.ChainId,this.StoreId,this.PassName,this.DurationDays,this.ExpirationEditable,this.MaxDurationDays,this.AutoActivateWhenIssued,this.IssueBarcodeWhenActivated,this.TagWhenActivated,this.MaxIssuedCount,this.IsDeleted,this.InactiveCount,this.ActiveCount,this.ExpiredCount,this.TotalCount}); GuestPassTypeDto.fromJson(Map json) { fromMap(json); } fromMap(Map json) { GuestPassTypeId = json['GuestPassTypeId']; ChainId = json['ChainId']; StoreId = json['StoreId']; PassName = json['PassName']; DurationDays = json['DurationDays']; ExpirationEditable = json['ExpirationEditable']; MaxDurationDays = json['MaxDurationDays']; AutoActivateWhenIssued = json['AutoActivateWhenIssued']; IssueBarcodeWhenActivated = json['IssueBarcodeWhenActivated']; TagWhenActivated = json['TagWhenActivated']; MaxIssuedCount = json['MaxIssuedCount']; IsDeleted = json['IsDeleted']; InactiveCount = json['InactiveCount']; ActiveCount = json['ActiveCount']; ExpiredCount = json['ExpiredCount']; TotalCount = json['TotalCount']; return this; } Map toJson() => { 'GuestPassTypeId': GuestPassTypeId, 'ChainId': ChainId, 'StoreId': StoreId, 'PassName': PassName, 'DurationDays': DurationDays, 'ExpirationEditable': ExpirationEditable, 'MaxDurationDays': MaxDurationDays, 'AutoActivateWhenIssued': AutoActivateWhenIssued, 'IssueBarcodeWhenActivated': IssueBarcodeWhenActivated, 'TagWhenActivated': TagWhenActivated, 'MaxIssuedCount': MaxIssuedCount, 'IsDeleted': IsDeleted, 'InactiveCount': InactiveCount, 'ActiveCount': ActiveCount, 'ExpiredCount': ExpiredCount, 'TotalCount': TotalCount }; getTypeName() => "GuestPassTypeDto"; 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 GetGuestPassTypesResponseDto extends ApiResponseBase implements IConvertible { List? GuestPassTypes; GetGuestPassTypesResponseDto({this.GuestPassTypes}); GetGuestPassTypesResponseDto.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); GuestPassTypes = JsonConverters.fromJson(json['GuestPassTypes'],'List',context!); return this; } Map toJson() => super.toJson()..addAll({ 'GuestPassTypes': JsonConverters.toJson(GuestPassTypes,'List',context!) }); getTypeName() => "GetGuestPassTypesResponseDto"; TypeContext? context = _ctx; } class GetGuestPassTypesResponse extends GetGuestPassTypesResponseDto implements IConvertible { List? GuestPassTypes; GetGuestPassTypesResponse({this.GuestPassTypes}); GetGuestPassTypesResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); GuestPassTypes = JsonConverters.fromJson(json['GuestPassTypes'],'List',context!); return this; } Map toJson() => super.toJson()..addAll({ 'GuestPassTypes': JsonConverters.toJson(GuestPassTypes,'List',context!) }); getTypeName() => "GetGuestPassTypesResponse"; TypeContext? context = _ctx; } // @Route("/club/guest-pass/types", "GET") class GetGuestPassTypesRequest extends GetGuestPassTypesRequestDto 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; /** * Either StoreId or ChainId is required */ // @ApiMember(DataType="integer", Description="Either StoreId or ChainId is required", Name="StoreId", ParameterType="query") int? StoreId; /** * Either StoreId or ChainId is required */ // @ApiMember(DataType="integer", Description="Either StoreId or ChainId is required", Name="ChainId", ParameterType="query") int? ChainId; int? RestrictedId; RestrictedResourceType? RestrictedResourceType; GetGuestPassTypesRequest({this.ApiKey,this.StoreId,this.ChainId,this.RestrictedId,this.RestrictedResourceType}); GetGuestPassTypesRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); ApiKey = json['ApiKey']; StoreId = json['StoreId']; ChainId = json['ChainId']; RestrictedId = json['RestrictedId']; RestrictedResourceType = JsonConverters.fromJson(json['RestrictedResourceType'],'RestrictedResourceType',context!); return this; } Map toJson() => super.toJson()..addAll({ 'ApiKey': ApiKey, 'StoreId': StoreId, 'ChainId': ChainId, 'RestrictedId': RestrictedId, 'RestrictedResourceType': JsonConverters.toJson(RestrictedResourceType,'RestrictedResourceType',context!) }); createResponse() => GetGuestPassTypesResponse(); getResponseTypeName() => "GetGuestPassTypesResponse"; getTypeName() => "GetGuestPassTypesRequest"; 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()), 'GetGuestPassTypesRequestDto': TypeInfo(TypeOf.Class, create:() => GetGuestPassTypesRequestDto()), 'GuestPassTypeDto': TypeInfo(TypeOf.Class, create:() => GuestPassTypeDto()), 'ApiResponseBase': TypeInfo(TypeOf.Class, create:() => ApiResponseBase()), 'GetGuestPassTypesResponseDto': TypeInfo(TypeOf.Class, create:() => GetGuestPassTypesResponseDto()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'GetGuestPassTypesResponse': TypeInfo(TypeOf.Class, create:() => GetGuestPassTypesResponse()), 'GetGuestPassTypesRequest': TypeInfo(TypeOf.Class, create:() => GetGuestPassTypesRequest()), });