/* Options: Date: 2024-05-12 19:40:37 Version: 6.50 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://www.clubready.com/api/current //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: CheckUsernameRequest.* //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; } abstract class IApiResponse { int? StatusCode; String? Message; } class CheckUsernameResponse implements IApiResponse, IConvertible { bool? Valid; int? StatusCode; String? Message; CheckUsernameResponse({this.Valid,this.StatusCode,this.Message}); CheckUsernameResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Valid = json['Valid']; StatusCode = json['StatusCode']; Message = json['Message']; return this; } Map toJson() => { 'Valid': Valid, 'StatusCode': StatusCode, 'Message': Message }; getTypeName() => "CheckUsernameResponse"; TypeContext? context = _ctx; } // @Route("/users/checkusername", "POST") class CheckUsernameRequest extends ApiDtoBase 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; /** * StoreId OR ChainId is required */ // @ApiMember(DataType="integer", Description="StoreId OR ChainId is required", Name="StoreId", ParameterType="query") int? StoreId; /** * StoreId OR ChainId is required */ // @ApiMember(DataType="integer", Description="StoreId OR ChainId is required", Name="ChainId", ParameterType="query") int? ChainId; /** * Username should be between 4 and 255 characters long */ // @ApiMember(DataType="string", Description="Username should be between 4 and 255 characters long", IsRequired=true, Name="Username", ParameterType="query") String? Username; int? RestrictedId; RestrictedResourceType? RestrictedResourceType; CheckUsernameRequest({this.ApiKey,this.StoreId,this.ChainId,this.Username,this.RestrictedId,this.RestrictedResourceType}); CheckUsernameRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); ApiKey = json['ApiKey']; StoreId = json['StoreId']; ChainId = json['ChainId']; Username = json['Username']; RestrictedId = json['RestrictedId']; RestrictedResourceType = JsonConverters.fromJson(json['RestrictedResourceType'],'RestrictedResourceType',context!); return this; } Map toJson() => super.toJson()..addAll({ 'ApiKey': ApiKey, 'StoreId': StoreId, 'ChainId': ChainId, 'Username': Username, 'RestrictedId': RestrictedId, 'RestrictedResourceType': JsonConverters.toJson(RestrictedResourceType,'RestrictedResourceType',context!) }); createResponse() => CheckUsernameResponse(); getResponseTypeName() => "CheckUsernameResponse"; getTypeName() => "CheckUsernameRequest"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'www.clubready.com', types: { 'RestrictedResourceType': TypeInfo(TypeOf.Enum, enumValues:RestrictedResourceType.values), 'IRestrictedApiRequest': TypeInfo(TypeOf.Interface), 'IApiKeyEndpoint': TypeInfo(TypeOf.Interface), 'ApiDtoBase': TypeInfo(TypeOf.Class, create:() => ApiDtoBase()), 'IApiResponse': TypeInfo(TypeOf.Interface), 'CheckUsernameResponse': TypeInfo(TypeOf.Class, create:() => CheckUsernameResponse()), 'CheckUsernameRequest': TypeInfo(TypeOf.Class, create:() => CheckUsernameRequest()), });