/* Options: Date: 2024-11-24 14:23:05 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: CreateUserNotesRequest.* //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 SubmittedNote implements IConvertible { int? UserId; String? Subject; String? Text; SubmittedNote({this.UserId,this.Subject,this.Text}); SubmittedNote.fromJson(Map json) { fromMap(json); } fromMap(Map json) { UserId = json['UserId']; Subject = json['Subject']; Text = json['Text']; return this; } Map toJson() => { 'UserId': UserId, 'Subject': Subject, 'Text': Text }; getTypeName() => "SubmittedNote"; TypeContext? context = _ctx; } class CreateUserNotesRequestDto extends ApiDtoBase implements IConvertible { int? PostedBy; List? UserNotes; CreateUserNotesRequestDto({this.PostedBy,this.UserNotes}); CreateUserNotesRequestDto.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); PostedBy = json['PostedBy']; UserNotes = JsonConverters.fromJson(json['UserNotes'],'List',context!); return this; } Map toJson() => super.toJson()..addAll({ 'PostedBy': PostedBy, 'UserNotes': JsonConverters.toJson(UserNotes,'List',context!) }); getTypeName() => "CreateUserNotesRequestDto"; 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 CreateUserNotesResponseDto extends ApiResponseBase implements IConvertible { List? NoteIds; CreateUserNotesResponseDto({this.NoteIds}); CreateUserNotesResponseDto.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); NoteIds = JsonConverters.fromJson(json['NoteIds'],'List',context!); return this; } Map toJson() => super.toJson()..addAll({ 'NoteIds': JsonConverters.toJson(NoteIds,'List',context!) }); getTypeName() => "CreateUserNotesResponseDto"; TypeContext? context = _ctx; } class CreateUserNotesResponse extends CreateUserNotesResponseDto implements IConvertible { List? NoteIds; CreateUserNotesResponse({this.NoteIds}); CreateUserNotesResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); NoteIds = JsonConverters.fromJson(json['NoteIds'],'List',context!); return this; } Map toJson() => super.toJson()..addAll({ 'NoteIds': JsonConverters.toJson(NoteIds,'List',context!) }); getTypeName() => "CreateUserNotesResponse"; TypeContext? context = _ctx; } // @Route("/users/notes/create", "POST") class CreateUserNotesRequest extends CreateUserNotesRequestDto 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)", IsRequired=true, Name="StoreId", ParameterType="query") int? StoreId; /** * Notes are being posted by this ClubReady User ID. */ // @ApiMember(DataType="integer", Description="Notes are being posted by this ClubReady User ID.", Name="PostedBy", ParameterType="query") int? PostedBy; /** * Create notes */ // @ApiMember(Description="Create notes", IsRequired=true, Name="UserNotes") List? UserNotes; int? RestrictedId; RestrictedResourceType? RestrictedResourceType; CreateUserNotesRequest({this.ApiKey,this.StoreId,this.PostedBy,this.UserNotes,this.RestrictedId,this.RestrictedResourceType}); CreateUserNotesRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); ApiKey = json['ApiKey']; StoreId = json['StoreId']; PostedBy = json['PostedBy']; UserNotes = JsonConverters.fromJson(json['UserNotes'],'List',context!); RestrictedId = json['RestrictedId']; RestrictedResourceType = JsonConverters.fromJson(json['RestrictedResourceType'],'RestrictedResourceType',context!); return this; } Map toJson() => super.toJson()..addAll({ 'ApiKey': ApiKey, 'StoreId': StoreId, 'PostedBy': PostedBy, 'UserNotes': JsonConverters.toJson(UserNotes,'List',context!), 'RestrictedId': RestrictedId, 'RestrictedResourceType': JsonConverters.toJson(RestrictedResourceType,'RestrictedResourceType',context!) }); createResponse() => CreateUserNotesResponse(); getResponseTypeName() => "CreateUserNotesResponse"; getTypeName() => "CreateUserNotesRequest"; 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()), 'SubmittedNote': TypeInfo(TypeOf.Class, create:() => SubmittedNote()), 'CreateUserNotesRequestDto': TypeInfo(TypeOf.Class, create:() => CreateUserNotesRequestDto()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'ApiResponseBase': TypeInfo(TypeOf.Class, create:() => ApiResponseBase()), 'CreateUserNotesResponseDto': TypeInfo(TypeOf.Class, create:() => CreateUserNotesResponseDto()), 'CreateUserNotesResponse': TypeInfo(TypeOf.Class, create:() => CreateUserNotesResponse()), 'CreateUserNotesRequest': TypeInfo(TypeOf.Class, create:() => CreateUserNotesRequest()), });