/* Options: Date: 2024-09-30 10:29:27 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: DeleteCustomField.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; abstract class ICompany { String? CompanyId; } class CustomFieldServices implements IConvertible { int? Id; /** * Name of the service */ // @ApiMember(Description="Name of the service") String? Name; /** * The image url of the service */ // @ApiMember(Description="The image url of the service") Uri? ImageUrl; CustomFieldServices({this.Id,this.Name,this.ImageUrl}); CustomFieldServices.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id']; Name = json['Name']; ImageUrl = JsonConverters.fromJson(json['ImageUrl'],'Uri',context!); return this; } Map toJson() => { 'Id': Id, 'Name': Name, 'ImageUrl': JsonConverters.toJson(ImageUrl,'Uri',context!) }; getTypeName() => "CustomFieldServices"; TypeContext? context = _ctx; } class CustomFieldLookupResponse implements IConvertible { int? Id; bool? Active; int? SortOrder; String? Value; CustomFieldLookupResponse({this.Id,this.Active,this.SortOrder,this.Value}); CustomFieldLookupResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id']; Active = json['Active']; SortOrder = json['SortOrder']; Value = json['Value']; return this; } Map toJson() => { 'Id': Id, 'Active': Active, 'SortOrder': SortOrder, 'Value': Value }; getTypeName() => "CustomFieldLookupResponse"; TypeContext? context = _ctx; } class CustomFieldQueryResponse implements IConvertible { /** * Custom field id */ // @ApiMember(Description="Custom field id") int? Id; /** * Reference to company that owns the custom field configuration */ // @ApiMember(Description="Reference to company that owns the custom field configuration") String? CompanyId; /** * Group id */ // @ApiMember(Description="Group id") int? GroupId; /** * Field id */ // @ApiMember(Description="Field id") int? FieldId; /** * Configuration name. Example: 'Number of persons'. */ // @ApiMember(Description="Configuration name. Example: 'Number of persons'.") String? Name; /** * Field width. Example: 20 */ // @ApiMember(Description="Field width. Example: 20") int? Width; /** * Column in database where to store the information. Example: 'TextField1' */ // @ApiMember(Description="Column in database where to store the information. Example: 'TextField1'") String? Column; /** * Custom field description. Example: 'For how many persons is this booking?' */ // @ApiMember(Description="Custom field description. Example: 'For how many persons is this booking?'") String? Description; /** * Data field of custom field. Valid values are: TextBox, ... Example: 'TextBox' */ // @ApiMember(Description="Data field of custom field. Valid values are: TextBox, ... Example: 'TextBox'") String? DataType; /** * Default value of the field. Example: '3' */ // @ApiMember(Description="Default value of the field. Example: '3'") String? DefaultValue; /** * Determines if the field is required to have a value or not */ // @ApiMember(Description="Determines if the field is required to have a value or not") bool? IsMandatory; /** * Error message shown to the user if the field data is required but not entered */ // @ApiMember(Description="Error message shown to the user if the field data is required but not entered") String? MandatoryErrorMessage; /** * Max lenght of the field */ // @ApiMember(Description="Max lenght of the field") int? MaxLength; /** * If the field should have multiple lines */ // @ApiMember(Description="If the field should have multiple lines") bool? MultipleLineText; /** * Regular expression used for validation of the field */ // @ApiMember(Description="Regular expression used for validation of the field") String? RegEx; /** * Regular expression id for validation of the field */ // @ApiMember(Description="Regular expression id for validation of the field") int? RegExId; /** * Error message shown if the regular expression validation failed */ // @ApiMember(Description="Error message shown if the regular expression validation failed") String? RegExErrorMessage; /** * If the field is visible to the customer */ // @ApiMember(Description="If the field is visible to the customer") bool? IsPublic; /** * If the field should be hidden in lists */ // @ApiMember(Description="If the field should be hidden in lists") bool? IsHidden; /** * Table to which the field belongs */ // @ApiMember(Description="Table to which the field belongs") String? Table; /** * The values to select from if Datatype is DropDown for this custom field */ // @ApiMember(Description="The values to select from if Datatype is DropDown for this custom field") List? Values; /** * The services that is connected to the custom field */ // @ApiMember(Description="The services that is connected to the custom field") List? Services; CustomFieldQueryResponse({this.Id,this.CompanyId,this.GroupId,this.FieldId,this.Name,this.Width,this.Column,this.Description,this.DataType,this.DefaultValue,this.IsMandatory,this.MandatoryErrorMessage,this.MaxLength,this.MultipleLineText,this.RegEx,this.RegExId,this.RegExErrorMessage,this.IsPublic,this.IsHidden,this.Table,this.Values,this.Services}); CustomFieldQueryResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id']; CompanyId = json['CompanyId']; GroupId = json['GroupId']; FieldId = json['FieldId']; Name = json['Name']; Width = json['Width']; Column = json['Column']; Description = json['Description']; DataType = json['DataType']; DefaultValue = json['DefaultValue']; IsMandatory = json['IsMandatory']; MandatoryErrorMessage = json['MandatoryErrorMessage']; MaxLength = json['MaxLength']; MultipleLineText = json['MultipleLineText']; RegEx = json['RegEx']; RegExId = json['RegExId']; RegExErrorMessage = json['RegExErrorMessage']; IsPublic = json['IsPublic']; IsHidden = json['IsHidden']; Table = json['Table']; Values = JsonConverters.fromJson(json['Values'],'List',context!); Services = JsonConverters.fromJson(json['Services'],'List',context!); return this; } Map toJson() => { 'Id': Id, 'CompanyId': CompanyId, 'GroupId': GroupId, 'FieldId': FieldId, 'Name': Name, 'Width': Width, 'Column': Column, 'Description': Description, 'DataType': DataType, 'DefaultValue': DefaultValue, 'IsMandatory': IsMandatory, 'MandatoryErrorMessage': MandatoryErrorMessage, 'MaxLength': MaxLength, 'MultipleLineText': MultipleLineText, 'RegEx': RegEx, 'RegExId': RegExId, 'RegExErrorMessage': RegExErrorMessage, 'IsPublic': IsPublic, 'IsHidden': IsHidden, 'Table': Table, 'Values': JsonConverters.toJson(Values,'List',context!), 'Services': JsonConverters.toJson(Services,'List',context!) }; getTypeName() => "CustomFieldQueryResponse"; TypeContext? context = _ctx; } // @Route("/customfields/{Id}", "DELETE") // @ValidateRequest(Validator="IsAuthenticated") class DeleteCustomField implements IReturn, ICompany, IConvertible, IDelete { /** * 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; /** * Id of the custom field to delete */ // @ApiMember(Description="Id of the custom field to delete", IsRequired=true, ParameterType="path") int? Id; DeleteCustomField({this.CompanyId,this.Id}); DeleteCustomField.fromJson(Map json) { fromMap(json); } fromMap(Map json) { CompanyId = json['CompanyId']; Id = json['Id']; return this; } Map toJson() => { 'CompanyId': CompanyId, 'Id': Id }; createResponse() => CustomFieldQueryResponse(); getResponseTypeName() => "CustomFieldQueryResponse"; getTypeName() => "DeleteCustomField"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'api.bokamera.se', types: { 'ICompany': TypeInfo(TypeOf.Interface), 'CustomFieldServices': TypeInfo(TypeOf.Class, create:() => CustomFieldServices()), 'Uri': TypeInfo(TypeOf.Class, create:() => Uri()), 'CustomFieldLookupResponse': TypeInfo(TypeOf.Class, create:() => CustomFieldLookupResponse()), 'CustomFieldQueryResponse': TypeInfo(TypeOf.Class, create:() => CustomFieldQueryResponse()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'List': TypeInfo(TypeOf.Class, create:() => []), 'DeleteCustomField': TypeInfo(TypeOf.Class, create:() => DeleteCustomField()), });