/* Options: Date: 2024-11-21 12:08:57 Version: 8.23 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://api.bokamera.se //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: CreateSupportCase.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; abstract class ICompany { String? CompanyId; } class SupportCaseStatusResponse implements IConvertible { /** * The status id */ // @ApiMember(Description="The status id") int? Id; /** * The status name */ // @ApiMember(Description="The status name") String? Name; /** * The status description */ // @ApiMember(Description="The status description") String? Description; /** * The status icon */ // @ApiMember(Description="The status icon") String? Icon; /** * The status color */ // @ApiMember(Description="The status color") String? Color; SupportCaseStatusResponse({this.Id,this.Name,this.Description,this.Icon,this.Color}); SupportCaseStatusResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id']; Name = json['Name']; Description = json['Description']; Icon = json['Icon']; Color = json['Color']; return this; } Map toJson() => { 'Id': Id, 'Name': Name, 'Description': Description, 'Icon': Icon, 'Color': Color }; getTypeName() => "SupportCaseStatusResponse"; TypeContext? context = _ctx; } class SupportCaseTypeResponse implements IConvertible { /** * The type id */ // @ApiMember(Description="The type id") int? Id; /** * The type name */ // @ApiMember(Description="The type name") String? Name; /** * The type description */ // @ApiMember(Description="The type description") String? Description; SupportCaseTypeResponse({this.Id,this.Name,this.Description}); SupportCaseTypeResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id']; Name = json['Name']; Description = json['Description']; return this; } Map toJson() => { 'Id': Id, 'Name': Name, 'Description': Description }; getTypeName() => "SupportCaseTypeResponse"; TypeContext? context = _ctx; } class SupportCaseAreaResponse implements IConvertible { /** * The area id */ // @ApiMember(Description="The area id") int? Id; /** * The area name */ // @ApiMember(Description="The area name") String? Name; /** * The area description */ // @ApiMember(Description="The area description") String? Description; SupportCaseAreaResponse({this.Id,this.Name,this.Description}); SupportCaseAreaResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id']; Name = json['Name']; Description = json['Description']; return this; } Map toJson() => { 'Id': Id, 'Name': Name, 'Description': Description }; getTypeName() => "SupportCaseAreaResponse"; TypeContext? context = _ctx; } class SupportCaseCommentsResponse implements IConvertible { /** * The case id */ // @ApiMember(Description="The case id") int? SupportCaseId; /** * The comments id */ // @ApiMember(Description="The comments id") int? Id; /** * The case comment */ // @ApiMember(Description="The case comment") String? Comment; /** * The case comment created by */ // @ApiMember(Description="The case comment created by") String? CreatedBy; /** * The case comment created date */ // @ApiMember(Description="The case comment created date") DateTime? Created; SupportCaseCommentsResponse({this.SupportCaseId,this.Id,this.Comment,this.CreatedBy,this.Created}); SupportCaseCommentsResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { SupportCaseId = json['SupportCaseId']; Id = json['Id']; Comment = json['Comment']; CreatedBy = json['CreatedBy']; Created = JsonConverters.fromJson(json['Created'],'DateTime',context!); return this; } Map toJson() => { 'SupportCaseId': SupportCaseId, 'Id': Id, 'Comment': Comment, 'CreatedBy': CreatedBy, 'Created': JsonConverters.toJson(Created,'DateTime',context!) }; getTypeName() => "SupportCaseCommentsResponse"; TypeContext? context = _ctx; } class SupportCaseAttachmentResponse implements IConvertible { /** * The attachment id */ // @ApiMember(Description="The attachment id") int? Id; /** * The attachment file url */ // @ApiMember(Description="The attachment file url") String? FileUrl; SupportCaseAttachmentResponse({this.Id,this.FileUrl}); SupportCaseAttachmentResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id']; FileUrl = json['FileUrl']; return this; } Map toJson() => { 'Id': Id, 'FileUrl': FileUrl }; getTypeName() => "SupportCaseAttachmentResponse"; TypeContext? context = _ctx; } class SupportCaseQueryResponse implements IConvertible { /** * The support case id */ // @ApiMember(Description="The support case id") int? Id; /** * The company user id */ // @ApiMember(Description="The company user id") String? CompanyUserId; /** * The case title. */ // @ApiMember(Description="The case title.") String? Title; /** * The case description. */ // @ApiMember(Description="The case description.") String? Description; /** * The case status id. */ // @ApiMember(Description="The case status id.") int? CaseStatusId; /** * If the case type id. */ // @ApiMember(Description="If the case type id.") int? CaseTypeId; /** * If the case area id. */ // @ApiMember(Description="If the case area id.") int? CaseAreaId; /** * The case created by. */ // @ApiMember(Description="The case created by.") String? CreatedBy; /** * The case updated by. */ // @ApiMember(Description="The case updated by.") String? UpdatedBy; /** * The case solved by. */ // @ApiMember(Description="The case solved by.") String? SolvedBy; /** * If case updated date. */ // @ApiMember(Description="If case updated date.") DateTime? Updated; /** * If case created date. */ // @ApiMember(Description="If case created date.") DateTime? Created; /** * Who owns the support case. */ // @ApiMember(Description="Who owns the support case.") String? CaseOwner; /** * The case status information. */ // @ApiMember(Description="The case status information.") SupportCaseStatusResponse? CaseStatus; /** * The case type information. */ // @ApiMember(Description="The case type information.") SupportCaseTypeResponse? CaseType; /** * The case area information. */ // @ApiMember(Description="The case area information.") SupportCaseAreaResponse? CaseArea; /** * The case comments. */ // @ApiMember(Description="The case comments.") List? Comments; /** * The case attachments. */ // @ApiMember(Description="The case attachments.") List? Attachments; /** * The case status options to select from. */ // @ApiMember(Description="The case status options to select from.") List? CaseStatusOptions; /** * The case type options to select from. */ // @ApiMember(Description="The case type options to select from.") List? CaseTypeOptions; /** * The case area options to select from. */ // @ApiMember(Description="The case area options to select from.") List? CaseAreaOptions; SupportCaseQueryResponse({this.Id,this.CompanyUserId,this.Title,this.Description,this.CaseStatusId,this.CaseTypeId,this.CaseAreaId,this.CreatedBy,this.UpdatedBy,this.SolvedBy,this.Updated,this.Created,this.CaseOwner,this.CaseStatus,this.CaseType,this.CaseArea,this.Comments,this.Attachments,this.CaseStatusOptions,this.CaseTypeOptions,this.CaseAreaOptions}); SupportCaseQueryResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id']; CompanyUserId = json['CompanyUserId']; Title = json['Title']; Description = json['Description']; CaseStatusId = json['CaseStatusId']; CaseTypeId = json['CaseTypeId']; CaseAreaId = json['CaseAreaId']; CreatedBy = json['CreatedBy']; UpdatedBy = json['UpdatedBy']; SolvedBy = json['SolvedBy']; Updated = JsonConverters.fromJson(json['Updated'],'DateTime',context!); Created = JsonConverters.fromJson(json['Created'],'DateTime',context!); CaseOwner = json['CaseOwner']; CaseStatus = JsonConverters.fromJson(json['CaseStatus'],'SupportCaseStatusResponse',context!); CaseType = JsonConverters.fromJson(json['CaseType'],'SupportCaseTypeResponse',context!); CaseArea = JsonConverters.fromJson(json['CaseArea'],'SupportCaseAreaResponse',context!); Comments = JsonConverters.fromJson(json['Comments'],'List',context!); Attachments = JsonConverters.fromJson(json['Attachments'],'List',context!); CaseStatusOptions = JsonConverters.fromJson(json['CaseStatusOptions'],'List',context!); CaseTypeOptions = JsonConverters.fromJson(json['CaseTypeOptions'],'List',context!); CaseAreaOptions = JsonConverters.fromJson(json['CaseAreaOptions'],'List',context!); return this; } Map toJson() => { 'Id': Id, 'CompanyUserId': CompanyUserId, 'Title': Title, 'Description': Description, 'CaseStatusId': CaseStatusId, 'CaseTypeId': CaseTypeId, 'CaseAreaId': CaseAreaId, 'CreatedBy': CreatedBy, 'UpdatedBy': UpdatedBy, 'SolvedBy': SolvedBy, 'Updated': JsonConverters.toJson(Updated,'DateTime',context!), 'Created': JsonConverters.toJson(Created,'DateTime',context!), 'CaseOwner': CaseOwner, 'CaseStatus': JsonConverters.toJson(CaseStatus,'SupportCaseStatusResponse',context!), 'CaseType': JsonConverters.toJson(CaseType,'SupportCaseTypeResponse',context!), 'CaseArea': JsonConverters.toJson(CaseArea,'SupportCaseAreaResponse',context!), 'Comments': JsonConverters.toJson(Comments,'List',context!), 'Attachments': JsonConverters.toJson(Attachments,'List',context!), 'CaseStatusOptions': JsonConverters.toJson(CaseStatusOptions,'List',context!), 'CaseTypeOptions': JsonConverters.toJson(CaseTypeOptions,'List',context!), 'CaseAreaOptions': JsonConverters.toJson(CaseAreaOptions,'List',context!) }; getTypeName() => "SupportCaseQueryResponse"; TypeContext? context = _ctx; } // @Route("/support/cases", "POST") // @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401) // @ApiResponse(Description="You have too low privilegies to call this service", StatusCode=403) // @ValidateRequest(Validator="IsAuthenticated") class CreateSupportCase implements IReturn, ICompany, IConvertible, IPost { /** * Enter the company id, if blank company id and you are an admin, your company id will be used. */ // @ApiMember(Description="Enter the company id, if blank company id and you are an admin, your company id will be used.", IsRequired=true) String? CompanyId; /** * The case title. */ // @ApiMember(Description="The case title.") String? Title; /** * The case description. */ // @ApiMember(Description="The case description.") String? Description; /** * If the case type id. */ // @ApiMember(Description="If the case type id.") int? CaseTypeId; /** * If the case area id. */ // @ApiMember(Description="If the case area id.") int? CaseAreaId; CreateSupportCase({this.CompanyId,this.Title,this.Description,this.CaseTypeId,this.CaseAreaId}); CreateSupportCase.fromJson(Map json) { fromMap(json); } fromMap(Map json) { CompanyId = json['CompanyId']; Title = json['Title']; Description = json['Description']; CaseTypeId = json['CaseTypeId']; CaseAreaId = json['CaseAreaId']; return this; } Map toJson() => { 'CompanyId': CompanyId, 'Title': Title, 'Description': Description, 'CaseTypeId': CaseTypeId, 'CaseAreaId': CaseAreaId }; createResponse() => SupportCaseQueryResponse(); getResponseTypeName() => "SupportCaseQueryResponse"; getTypeName() => "CreateSupportCase"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'api.bokamera.se', types: { 'ICompany': TypeInfo(TypeOf.Interface), 'SupportCaseStatusResponse': TypeInfo(TypeOf.Class, create:() => SupportCaseStatusResponse()), 'SupportCaseTypeResponse': TypeInfo(TypeOf.Class, create:() => SupportCaseTypeResponse()), 'SupportCaseAreaResponse': TypeInfo(TypeOf.Class, create:() => SupportCaseAreaResponse()), 'SupportCaseCommentsResponse': TypeInfo(TypeOf.Class, create:() => SupportCaseCommentsResponse()), 'SupportCaseAttachmentResponse': TypeInfo(TypeOf.Class, create:() => SupportCaseAttachmentResponse()), 'SupportCaseQueryResponse': TypeInfo(TypeOf.Class, create:() => SupportCaseQueryResponse()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'List': TypeInfo(TypeOf.Class, create:() => []), 'List': TypeInfo(TypeOf.Class, create:() => []), 'List': TypeInfo(TypeOf.Class, create:() => []), 'List': TypeInfo(TypeOf.Class, create:() => []), 'CreateSupportCase': TypeInfo(TypeOf.Class, create:() => CreateSupportCase()), });