/* Options: Date: 2024-06-26 10:36:20 Version: 8.23 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://testapi.bokamera.se //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: CreateBookingLogItem.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; abstract class ICompany { String? CompanyId; } class BookingLogEventTypeResponse implements IConvertible { /** * The event type id */ // @ApiMember(Description="The event type id") int? Id; /** * The event type name */ // @ApiMember(Description="The event type name") String? Name; /** * The event type description */ // @ApiMember(Description="The event type description") String? Description; BookingLogEventTypeResponse({this.Id,this.Name,this.Description}); BookingLogEventTypeResponse.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() => "BookingLogEventTypeResponse"; TypeContext? context = _ctx; } class BookingLogQueryResponse implements IConvertible { /** * The booking log id */ // @ApiMember(Description="The booking log id") int? Id; /** * The booking id */ // @ApiMember(Description="The booking id") int? BookingId; /** * The type of event */ // @ApiMember(Description="The type of event") int? EventTypeId; /** * The type of event */ // @ApiMember(Description="The type of event") BookingLogEventTypeResponse? EventType; /** * Comments that could be added to the event log item */ // @ApiMember(Description="Comments that could be added to the event log item") String? Comments; /** * The user created the event */ // @ApiMember(Description="The user created the event") String? UserName; /** * Then date when the event occured */ // @ApiMember(Description="Then date when the event occured") DateTime? Created; BookingLogQueryResponse({this.Id,this.BookingId,this.EventTypeId,this.EventType,this.Comments,this.UserName,this.Created}); BookingLogQueryResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id']; BookingId = json['BookingId']; EventTypeId = json['EventTypeId']; EventType = JsonConverters.fromJson(json['EventType'],'BookingLogEventTypeResponse',context!); Comments = json['Comments']; UserName = json['UserName']; Created = JsonConverters.fromJson(json['Created'],'DateTime',context!); return this; } Map toJson() => { 'Id': Id, 'BookingId': BookingId, 'EventTypeId': EventTypeId, 'EventType': JsonConverters.toJson(EventType,'BookingLogEventTypeResponse',context!), 'Comments': Comments, 'UserName': UserName, 'Created': JsonConverters.toJson(Created,'DateTime',context!) }; getTypeName() => "BookingLogQueryResponse"; TypeContext? context = _ctx; } // @Route("/bookinglog", "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) class CreateBookingLogItem implements IReturn, ICompany, IConvertible, IPost { /** * The company id, if empty will use the company id for the user you are logged in with. */ // @ApiMember(Description="The company id, if empty will use the company id for the user you are logged in with.") String? CompanyId; /** * The booking id */ // @ApiMember(Description="The booking id", IsRequired=true) int? BookingId; /** * The type of event */ // @ApiMember(Description="The type of event", IsRequired=true) int? EventTypeId; /** * Comments that could be added to the event log item */ // @ApiMember(Description="Comments that could be added to the event log item", IsRequired=true) String? Comments; /** * Then date when the event occured, leave blank if current datetime */ // @ApiMember(Description="Then date when the event occured, leave blank if current datetime", IsRequired=true) DateTime? Created; CreateBookingLogItem({this.CompanyId,this.BookingId,this.EventTypeId,this.Comments,this.Created}); CreateBookingLogItem.fromJson(Map json) { fromMap(json); } fromMap(Map json) { CompanyId = json['CompanyId']; BookingId = json['BookingId']; EventTypeId = json['EventTypeId']; Comments = json['Comments']; Created = JsonConverters.fromJson(json['Created'],'DateTime',context!); return this; } Map toJson() => { 'CompanyId': CompanyId, 'BookingId': BookingId, 'EventTypeId': EventTypeId, 'Comments': Comments, 'Created': JsonConverters.toJson(Created,'DateTime',context!) }; createResponse() => BookingLogQueryResponse(); getResponseTypeName() => "BookingLogQueryResponse"; getTypeName() => "CreateBookingLogItem"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'testapi.bokamera.se', types: { 'ICompany': TypeInfo(TypeOf.Interface), 'BookingLogEventTypeResponse': TypeInfo(TypeOf.Class, create:() => BookingLogEventTypeResponse()), 'BookingLogQueryResponse': TypeInfo(TypeOf.Class, create:() => BookingLogQueryResponse()), 'CreateBookingLogItem': TypeInfo(TypeOf.Class, create:() => CreateBookingLogItem()), });