/* Options: Date: 2024-11-24 14:55:12 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: SearchUsersRequest.* //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 SearchUsersRequestDto extends ApiDtoBase implements IConvertible { String? Barcode; String? FirstName; String? LastName; String? Email; String? Phone; int? UserType; int? Page; SearchUsersRequestDto({this.Barcode,this.FirstName,this.LastName,this.Email,this.Phone,this.UserType,this.Page}); SearchUsersRequestDto.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); Barcode = json['Barcode']; FirstName = json['FirstName']; LastName = json['LastName']; Email = json['Email']; Phone = json['Phone']; UserType = json['UserType']; Page = json['Page']; return this; } Map toJson() => super.toJson()..addAll({ 'Barcode': Barcode, 'FirstName': FirstName, 'LastName': LastName, 'Email': Email, 'Phone': Phone, 'UserType': UserType, 'Page': Page }); getTypeName() => "SearchUsersRequestDto"; TypeContext? context = _ctx; } // @Route("/users/find", "GET") class SearchUsersRequest extends SearchUsersRequestDto implements 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; /** * Filter by First Name */ // @ApiMember(DataType="string", Description="Filter by First Name", Name="FirstName", ParameterType="query") String? FirstName; /** * Filter by Last Name */ // @ApiMember(DataType="string", Description="Filter by Last Name", Name="LastName", ParameterType="query") String? LastName; /** * 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="string", Description="StoreId OR ChainId is required", Name="ChainId", ParameterType="query") int? ChainId; /** * Filter by barcode */ // @ApiMember(DataType="string", Description="Filter by barcode", Name="Barcode", ParameterType="query") String? Barcode; /** * Filter by Email Address */ // @ApiMember(DataType="string", Description="Filter by Email Address", Name="Email", ParameterType="query") String? Email; /** * Filter by Phone Number */ // @ApiMember(DataType="string", Description="Filter by Phone Number", Name="Phone", ParameterType="query") String? Phone; /** * Filter by ClubReady User Type */ // @ApiMember(DataType="integer", Description="Filter by ClubReady User Type", Name="UserType", ParameterType="query") int? UserType; /** * Page of users to retrieve. Pulls back 100 users per page. */ // @ApiMember(DataType="integer", Description="Page of users to retrieve. Pulls back 100 users per page.", Name="Page", ParameterType="query") int? Page; int? RestrictedId; RestrictedResourceType? RestrictedResourceType; SearchUsersRequest({this.ApiKey,this.FirstName,this.LastName,this.StoreId,this.ChainId,this.Barcode,this.Email,this.Phone,this.UserType,this.Page,this.RestrictedId,this.RestrictedResourceType}); SearchUsersRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); ApiKey = json['ApiKey']; FirstName = json['FirstName']; LastName = json['LastName']; StoreId = json['StoreId']; ChainId = json['ChainId']; Barcode = json['Barcode']; Email = json['Email']; Phone = json['Phone']; UserType = json['UserType']; Page = json['Page']; RestrictedId = json['RestrictedId']; RestrictedResourceType = JsonConverters.fromJson(json['RestrictedResourceType'],'RestrictedResourceType',context!); return this; } Map toJson() => super.toJson()..addAll({ 'ApiKey': ApiKey, 'FirstName': FirstName, 'LastName': LastName, 'StoreId': StoreId, 'ChainId': ChainId, 'Barcode': Barcode, 'Email': Email, 'Phone': Phone, 'UserType': UserType, 'Page': Page, 'RestrictedId': RestrictedId, 'RestrictedResourceType': JsonConverters.toJson(RestrictedResourceType,'RestrictedResourceType',context!) }); getTypeName() => "SearchUsersRequest"; 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()), 'SearchUsersRequestDto': TypeInfo(TypeOf.Class, create:() => SearchUsersRequestDto()), 'SearchUsersRequest': TypeInfo(TypeOf.Class, create:() => SearchUsersRequest()), });