/* Options: Date: 2024-11-24 13:50:29 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: GetReferralTypesRequest.* //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 ApiGenericType implements IConvertible { int? Id; String? Name; int? StoreId; int? ChainId; ApiGenericType({this.Id,this.Name,this.StoreId,this.ChainId}); ApiGenericType.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id']; Name = json['Name']; StoreId = json['StoreId']; ChainId = json['ChainId']; return this; } Map toJson() => { 'Id': Id, 'Name': Name, 'StoreId': StoreId, 'ChainId': ChainId }; getTypeName() => "ApiGenericType"; TypeContext? context = _ctx; } class GetReferralTypesResponseDto implements IConvertible { List? ReferralTypes; GetReferralTypesResponseDto({this.ReferralTypes}); GetReferralTypesResponseDto.fromJson(Map json) { fromMap(json); } fromMap(Map json) { ReferralTypes = JsonConverters.fromJson(json['ReferralTypes'],'List',context!); return this; } Map toJson() => { 'ReferralTypes': JsonConverters.toJson(ReferralTypes,'List',context!) }; getTypeName() => "GetReferralTypesResponseDto"; TypeContext? context = _ctx; } class GetReferralTypesResponse extends GetReferralTypesResponseDto implements IConvertible { List? ReferralTypes; GetReferralTypesResponse({this.ReferralTypes}); GetReferralTypesResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); ReferralTypes = JsonConverters.fromJson(json['ReferralTypes'],'List',context!); return this; } Map toJson() => super.toJson()..addAll({ 'ReferralTypes': JsonConverters.toJson(ReferralTypes,'List',context!) }); getTypeName() => "GetReferralTypesResponse"; TypeContext? context = _ctx; } // @Route("/club/referral-types", "GET") class GetReferralTypesRequest 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; /** * Either StoreId or ChainId is required */ // @ApiMember(DataType="integer", Description="Either StoreId or ChainId is required", Name="ChainId", ParameterType="query") int? ChainId; /** * Either StoreId or ChainId is required */ // @ApiMember(DataType="integer", Description="Either StoreId or ChainId is required", Name="StoreId", ParameterType="query") int? StoreId; int? RestrictedId; RestrictedResourceType? RestrictedResourceType; GetReferralTypesRequest({this.ApiKey,this.ChainId,this.StoreId,this.RestrictedId,this.RestrictedResourceType}); GetReferralTypesRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); ApiKey = json['ApiKey']; ChainId = json['ChainId']; StoreId = json['StoreId']; RestrictedId = json['RestrictedId']; RestrictedResourceType = JsonConverters.fromJson(json['RestrictedResourceType'],'RestrictedResourceType',context!); return this; } Map toJson() => super.toJson()..addAll({ 'ApiKey': ApiKey, 'ChainId': ChainId, 'StoreId': StoreId, 'RestrictedId': RestrictedId, 'RestrictedResourceType': JsonConverters.toJson(RestrictedResourceType,'RestrictedResourceType',context!) }); createResponse() => GetReferralTypesResponse(); getResponseTypeName() => "GetReferralTypesResponse"; getTypeName() => "GetReferralTypesRequest"; 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()), 'ApiGenericType': TypeInfo(TypeOf.Class, create:() => ApiGenericType()), 'GetReferralTypesResponseDto': TypeInfo(TypeOf.Class, create:() => GetReferralTypesResponseDto()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'GetReferralTypesResponse': TypeInfo(TypeOf.Class, create:() => GetReferralTypesResponse()), 'GetReferralTypesRequest': TypeInfo(TypeOf.Class, create:() => GetReferralTypesRequest()), });