/* Options: Date: 2024-11-24 13:43:31 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: CreateUserNoteRequest.* //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 CreateUserNoteRequestDto extends ApiDtoBase implements IConvertible { int? UserId; String? Subject; String? Text; int? PostedBy; CreateUserNoteRequestDto({this.UserId,this.Subject,this.Text,this.PostedBy}); CreateUserNoteRequestDto.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); UserId = json['UserId']; Subject = json['Subject']; Text = json['Text']; PostedBy = json['PostedBy']; return this; } Map toJson() => super.toJson()..addAll({ 'UserId': UserId, 'Subject': Subject, 'Text': Text, 'PostedBy': PostedBy }); getTypeName() => "CreateUserNoteRequestDto"; 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 CreateUserNoteResponseDto extends ApiResponseBase implements IConvertible { int? NoteId; CreateUserNoteResponseDto({this.NoteId}); CreateUserNoteResponseDto.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); NoteId = json['NoteId']; return this; } Map toJson() => super.toJson()..addAll({ 'NoteId': NoteId }); getTypeName() => "CreateUserNoteResponseDto"; TypeContext? context = _ctx; } class CreateUserNoteResponse extends CreateUserNoteResponseDto implements IConvertible { bool? Success; String? Message; int? NoteId; CreateUserNoteResponse({this.Success,this.Message,this.NoteId}); CreateUserNoteResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); Success = json['Success']; Message = json['Message']; NoteId = json['NoteId']; return this; } Map toJson() => super.toJson()..addAll({ 'Success': Success, 'Message': Message, 'NoteId': NoteId }); getTypeName() => "CreateUserNoteResponse"; TypeContext? context = _ctx; } // @Route("/users/{UserId}/notes/create", "POST") class CreateUserNoteRequest extends CreateUserNoteRequestDto 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; /** * Create note for this ClubReady User ID */ // @ApiMember(DataType="integer", Description="Create note for this ClubReady User ID", IsRequired=true, Name="UserId", ParameterType="query") int? UserId; /** * Subject of the note (Up to 255 characters) */ // @ApiMember(DataType="string", Description="Subject of the note (Up to 255 characters)", IsRequired=true, Name="Subject", ParameterType="query") String? Subject; /** * Text body of the note (Up to 2000 characters) */ // @ApiMember(DataType="string", Description="Text body of the note (Up to 2000 characters)", IsRequired=true, Name="Text", ParameterType="query") String? Text; /** * Note is being posted by this ClubReady User ID. */ // @ApiMember(DataType="integer", Description="Note is being posted by this ClubReady User ID.", Name="PostedBy", ParameterType="query") int? PostedBy; int? RestrictedId; RestrictedResourceType? RestrictedResourceType; CreateUserNoteRequest({this.ApiKey,this.StoreId,this.UserId,this.Subject,this.Text,this.PostedBy,this.RestrictedId,this.RestrictedResourceType}); CreateUserNoteRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); ApiKey = json['ApiKey']; StoreId = json['StoreId']; UserId = json['UserId']; Subject = json['Subject']; Text = json['Text']; PostedBy = json['PostedBy']; RestrictedId = json['RestrictedId']; RestrictedResourceType = JsonConverters.fromJson(json['RestrictedResourceType'],'RestrictedResourceType',context!); return this; } Map toJson() => super.toJson()..addAll({ 'ApiKey': ApiKey, 'StoreId': StoreId, 'UserId': UserId, 'Subject': Subject, 'Text': Text, 'PostedBy': PostedBy, 'RestrictedId': RestrictedId, 'RestrictedResourceType': JsonConverters.toJson(RestrictedResourceType,'RestrictedResourceType',context!) }); createResponse() => CreateUserNoteResponse(); getResponseTypeName() => "CreateUserNoteResponse"; getTypeName() => "CreateUserNoteRequest"; 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()), 'CreateUserNoteRequestDto': TypeInfo(TypeOf.Class, create:() => CreateUserNoteRequestDto()), 'ApiResponseBase': TypeInfo(TypeOf.Class, create:() => ApiResponseBase()), 'CreateUserNoteResponseDto': TypeInfo(TypeOf.Class, create:() => CreateUserNoteResponseDto()), 'CreateUserNoteResponse': TypeInfo(TypeOf.Class, create:() => CreateUserNoteResponse()), 'CreateUserNoteRequest': TypeInfo(TypeOf.Class, create:() => CreateUserNoteRequest()), });