/* Options: Date: 2024-11-24 14:26:10 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: UsersListRequest.* //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 UsersListRequestDto extends ApiDtoBase implements IConvertible { String? Segment; String? ActivityDate; String? ActivityOperator; UsersListRequestDto({this.Segment,this.ActivityDate,this.ActivityOperator}); UsersListRequestDto.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); Segment = json['Segment']; ActivityDate = json['ActivityDate']; ActivityOperator = json['ActivityOperator']; return this; } Map toJson() => super.toJson()..addAll({ 'Segment': Segment, 'ActivityDate': ActivityDate, 'ActivityOperator': ActivityOperator }); getTypeName() => "UsersListRequestDto"; TypeContext? context = _ctx; } // @Route("/users", "GET") class UsersListRequest extends UsersListRequestDto 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; /** * 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; /** * Date to use for filter */ // @ApiMember(DataType="Date", Description="Date to use for filter", IsRequired=true, Name="ActivityDate", ParameterType="query") String? ActivityDate; /** * The operator to use when comparing ActivityDate. Options are GT,EQ and LT for Greater Than, Equal and Less Than. Defaults to GT if not provided. */ // @ApiMember(DataType="String", Description="The operator to use when comparing ActivityDate. Options are GT,EQ and LT for Greater Than, Equal and Less Than. Defaults to GT if not provided.", Name="ActivityOperator", ParameterType="query") String? ActivityOperator; /** * Filter by a specific segment. Types: Prospects, Active, Inactive, All, PastDue */ // @ApiMember(DataType="string", Description="Filter by a specific segment. Types: Prospects, Active, Inactive, All, PastDue", Name="Segment", ParameterType="query") String? Segment; int? RestrictedId; RestrictedResourceType? RestrictedResourceType; /** * Version 2 adds email and mobile phone to output */ // @ApiMember(DataType="string", Description="Version 2 adds email and mobile phone to output", Name="Version", ParameterType="query") int? Version; UsersListRequest({this.ApiKey,this.StoreId,this.ChainId,this.ActivityDate,this.ActivityOperator,this.Segment,this.RestrictedId,this.RestrictedResourceType,this.Version}); UsersListRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); ApiKey = json['ApiKey']; StoreId = json['StoreId']; ChainId = json['ChainId']; ActivityDate = json['ActivityDate']; ActivityOperator = json['ActivityOperator']; Segment = json['Segment']; RestrictedId = json['RestrictedId']; RestrictedResourceType = JsonConverters.fromJson(json['RestrictedResourceType'],'RestrictedResourceType',context!); Version = json['Version']; return this; } Map toJson() => super.toJson()..addAll({ 'ApiKey': ApiKey, 'StoreId': StoreId, 'ChainId': ChainId, 'ActivityDate': ActivityDate, 'ActivityOperator': ActivityOperator, 'Segment': Segment, 'RestrictedId': RestrictedId, 'RestrictedResourceType': JsonConverters.toJson(RestrictedResourceType,'RestrictedResourceType',context!), 'Version': Version }); getTypeName() => "UsersListRequest"; 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()), 'UsersListRequestDto': TypeInfo(TypeOf.Class, create:() => UsersListRequestDto()), 'UsersListRequest': TypeInfo(TypeOf.Class, create:() => UsersListRequest()), });