/* Options: Date: 2024-11-24 13:50:14 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: GetCustomCategoriesUserRequest.* //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 GetCustomCategoriesUserRequestDto extends ApiDtoBase implements IConvertible { int? UserId; int? CustomCategoryId; GetCustomCategoriesUserRequestDto({this.UserId,this.CustomCategoryId}); GetCustomCategoriesUserRequestDto.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); UserId = json['UserId']; CustomCategoryId = json['CustomCategoryId']; return this; } Map toJson() => super.toJson()..addAll({ 'UserId': UserId, 'CustomCategoryId': CustomCategoryId }); getTypeName() => "GetCustomCategoriesUserRequestDto"; TypeContext? context = _ctx; } class CustomCategoryItemInfo implements IConvertible { int? CustomCategoryId; String? CustomCategoryName; int? CustomCategoryItemId; String? CustomCategoryItemName; CustomCategoryItemInfo({this.CustomCategoryId,this.CustomCategoryName,this.CustomCategoryItemId,this.CustomCategoryItemName}); CustomCategoryItemInfo.fromJson(Map json) { fromMap(json); } fromMap(Map json) { CustomCategoryId = json['CustomCategoryId']; CustomCategoryName = json['CustomCategoryName']; CustomCategoryItemId = json['CustomCategoryItemId']; CustomCategoryItemName = json['CustomCategoryItemName']; return this; } Map toJson() => { 'CustomCategoryId': CustomCategoryId, 'CustomCategoryName': CustomCategoryName, 'CustomCategoryItemId': CustomCategoryItemId, 'CustomCategoryItemName': CustomCategoryItemName }; getTypeName() => "CustomCategoryItemInfo"; 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 GetCustomCategoriesUserResponseDto extends ApiResponseBase implements IConvertible { int? UserId; List? CustomCategories; GetCustomCategoriesUserResponseDto({this.UserId,this.CustomCategories}); GetCustomCategoriesUserResponseDto.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); UserId = json['UserId']; CustomCategories = JsonConverters.fromJson(json['CustomCategories'],'List',context!); return this; } Map toJson() => super.toJson()..addAll({ 'UserId': UserId, 'CustomCategories': JsonConverters.toJson(CustomCategories,'List',context!) }); getTypeName() => "GetCustomCategoriesUserResponseDto"; TypeContext? context = _ctx; } class GetCustomCategoriesUserResponse extends GetCustomCategoriesUserResponseDto implements IConvertible { int? UserId; List? CustomCategories; GetCustomCategoriesUserResponse({this.UserId,this.CustomCategories}); GetCustomCategoriesUserResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); UserId = json['UserId']; CustomCategories = JsonConverters.fromJson(json['CustomCategories'],'List',context!); return this; } Map toJson() => super.toJson()..addAll({ 'UserId': UserId, 'CustomCategories': JsonConverters.toJson(CustomCategories,'List',context!) }); getTypeName() => "GetCustomCategoriesUserResponse"; TypeContext? context = _ctx; } // @Route("/users/custom-category", "GET") class GetCustomCategoriesUserRequest extends GetCustomCategoriesUserRequestDto 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; /** * ClubReady Club ID (StoreID internally) */ // @ApiMember(DataType="integer", Description="ClubReady Club ID (StoreID internally)", 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; /** * ClubReady User ID */ // @ApiMember(DataType="integer", Description="ClubReady User ID", IsRequired=true, Name="UserId", ParameterType="query") int? UserId; /** * Custom Category ID */ // @ApiMember(DataType="integer", Description="Custom Category ID", Name="CustomCategoryId", ParameterType="query") int? CustomCategoryId; int? RestrictedId; RestrictedResourceType? RestrictedResourceType; GetCustomCategoriesUserRequest({this.ApiKey,this.StoreId,this.ChainId,this.UserId,this.CustomCategoryId,this.RestrictedId,this.RestrictedResourceType}); GetCustomCategoriesUserRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); ApiKey = json['ApiKey']; StoreId = json['StoreId']; ChainId = json['ChainId']; UserId = json['UserId']; CustomCategoryId = json['CustomCategoryId']; RestrictedId = json['RestrictedId']; RestrictedResourceType = JsonConverters.fromJson(json['RestrictedResourceType'],'RestrictedResourceType',context!); return this; } Map toJson() => super.toJson()..addAll({ 'ApiKey': ApiKey, 'StoreId': StoreId, 'ChainId': ChainId, 'UserId': UserId, 'CustomCategoryId': CustomCategoryId, 'RestrictedId': RestrictedId, 'RestrictedResourceType': JsonConverters.toJson(RestrictedResourceType,'RestrictedResourceType',context!) }); createResponse() => GetCustomCategoriesUserResponse(); getResponseTypeName() => "GetCustomCategoriesUserResponse"; getTypeName() => "GetCustomCategoriesUserRequest"; 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()), 'GetCustomCategoriesUserRequestDto': TypeInfo(TypeOf.Class, create:() => GetCustomCategoriesUserRequestDto()), 'CustomCategoryItemInfo': TypeInfo(TypeOf.Class, create:() => CustomCategoryItemInfo()), 'ApiResponseBase': TypeInfo(TypeOf.Class, create:() => ApiResponseBase()), 'GetCustomCategoriesUserResponseDto': TypeInfo(TypeOf.Class, create:() => GetCustomCategoriesUserResponseDto()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'GetCustomCategoriesUserResponse': TypeInfo(TypeOf.Class, create:() => GetCustomCategoriesUserResponse()), 'GetCustomCategoriesUserRequest': TypeInfo(TypeOf.Class, create:() => GetCustomCategoriesUserRequest()), });