/* Options: Date: 2024-07-03 14:11:42 Version: 8.23 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://api.bokamera.se //Package: //GlobalNamespace: dtos //AddPropertyAccessors: True //SettersReturnThis: True //AddServiceStackTypes: True //AddResponseStatus: False //AddDescriptionAsComments: True //AddImplicitVersion: IncludeTypes: CustomFieldQuery.* //ExcludeTypes: //TreatTypesAsStrings: //DefaultImports: java.math.*,java.util.*,net.servicestack.client.*,com.google.gson.annotations.*,com.google.gson.reflect.* */ import java.math.*; import java.util.*; import net.servicestack.client.*; import com.google.gson.annotations.*; import com.google.gson.reflect.*; public class dtos { @Route(Path="/customfields", Verbs="GET") @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") public static class CustomFieldQuery extends QueryDb implements IReturn>, ICompany { /** * One or multiple id's of custom fields to find */ @ApiMember(Description="One or multiple id's of custom fields to find", ParameterType="query") public ArrayList Ids = null; /** * Company id to find custom fields for */ @ApiMember(Description="Company id to find custom fields for", ParameterType="query") public UUID CompanyId = null; /** * Table to which the custom field belongs to */ @ApiMember(Description="Table to which the custom field belongs to", ParameterType="query") public String Table = null; /** * Active or removed fields, empty parameter includes both */ @ApiMember(Description="Active or removed fields, empty parameter includes both", ParameterType="query") public Boolean Active = null; /** * If you want to include the custom fields values to select from when using dropdown as datatype */ @ApiMember(Description="If you want to include the custom fields values to select from when using dropdown as datatype", ParameterType="query") public Boolean IncludeCustomFieldValues = null; /** * If you want to include the connected services for the custom field */ @ApiMember(DataType="bool", Description="If you want to include the connected services for the custom field", ParameterType="query") public Boolean IncludeConnectedServices = null; public ArrayList getIds() { return Ids; } public CustomFieldQuery setIds(ArrayList value) { this.Ids = value; return this; } public UUID getCompanyId() { return CompanyId; } public CustomFieldQuery setCompanyId(UUID value) { this.CompanyId = value; return this; } public String getTable() { return Table; } public CustomFieldQuery setTable(String value) { this.Table = value; return this; } public Boolean isActive() { return Active; } public CustomFieldQuery setActive(Boolean value) { this.Active = value; return this; } public Boolean isIncludeCustomFieldValues() { return IncludeCustomFieldValues; } public CustomFieldQuery setIncludeCustomFieldValues(Boolean value) { this.IncludeCustomFieldValues = value; return this; } public Boolean isIncludeConnectedServices() { return IncludeConnectedServices; } public CustomFieldQuery setIncludeConnectedServices(Boolean value) { this.IncludeConnectedServices = value; return this; } private static Object responseType = new TypeToken>(){}.getType(); public Object getResponseType() { return responseType; } } @DataContract public static class QueryResponse { @DataMember(Order=1) public Integer Offset = null; @DataMember(Order=2) public Integer Total = null; @DataMember(Order=3) public ArrayList Results = null; @DataMember(Order=4) public HashMap Meta = null; @DataMember(Order=5) public ResponseStatus ResponseStatus = null; public Integer getOffset() { return Offset; } public QueryResponse setOffset(Integer value) { this.Offset = value; return this; } public Integer getTotal() { return Total; } public QueryResponse setTotal(Integer value) { this.Total = value; return this; } public ArrayList getResults() { return Results; } public QueryResponse setResults(ArrayList value) { this.Results = value; return this; } public HashMap getMeta() { return Meta; } public QueryResponse setMeta(HashMap value) { this.Meta = value; return this; } public ResponseStatus getResponseStatus() { return ResponseStatus; } public QueryResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; } } public static class QueryDb extends QueryBase { } public static interface ICompany { public UUID CompanyId = null; } public static class CustomFieldConfig extends BaseModel { @Ignore() public ArrayList Values = null; public CustomField CustomField = null; @Ignore() public RegEx RegEx = null; @Ignore() public ArrayList Services = null; public ArrayList CustomFieldServiceRelation = null; @Required() public UUID CompanyId = null; public Integer Id = null; public Integer GroupId = null; @Required() public Integer FieldId = null; @Required() public Integer IconId = null; public Integer RegExId = null; @Required() public String Name = null; @Required() public String Description = null; @Required() public String Datatype = null; @Required() public Integer MaxLength = null; @Required() public Boolean IsPublic = null; @Required() public Boolean IsHidden = null; @Required() public Boolean IsMandatory = null; public String DefaultValue = null; public String RegExErrorMessage = null; public String MandatoryErrorMessage = null; public Integer Width = null; @Required() public Boolean MultipleLineText = null; public Date ModifiedDate = null; public ArrayList getValues() { return Values; } public CustomFieldConfig setValues(ArrayList value) { this.Values = value; return this; } public CustomField getCustomField() { return CustomField; } public CustomFieldConfig setCustomField(CustomField value) { this.CustomField = value; return this; } public RegEx getRegEx() { return RegEx; } public CustomFieldConfig setRegEx(RegEx value) { this.RegEx = value; return this; } public ArrayList getServices() { return Services; } public CustomFieldConfig setServices(ArrayList value) { this.Services = value; return this; } public ArrayList getCustomFieldServiceRelation() { return CustomFieldServiceRelation; } public CustomFieldConfig setCustomFieldServiceRelation(ArrayList value) { this.CustomFieldServiceRelation = value; return this; } public UUID getCompanyId() { return CompanyId; } public CustomFieldConfig setCompanyId(UUID value) { this.CompanyId = value; return this; } public Integer getId() { return Id; } public CustomFieldConfig setId(Integer value) { this.Id = value; return this; } public Integer getGroupId() { return GroupId; } public CustomFieldConfig setGroupId(Integer value) { this.GroupId = value; return this; } public Integer getFieldId() { return FieldId; } public CustomFieldConfig setFieldId(Integer value) { this.FieldId = value; return this; } public Integer getIconId() { return IconId; } public CustomFieldConfig setIconId(Integer value) { this.IconId = value; return this; } public Integer getRegExId() { return RegExId; } public CustomFieldConfig setRegExId(Integer value) { this.RegExId = value; return this; } public String getName() { return Name; } public CustomFieldConfig setName(String value) { this.Name = value; return this; } public String getDescription() { return Description; } public CustomFieldConfig setDescription(String value) { this.Description = value; return this; } public String getDatatype() { return Datatype; } public CustomFieldConfig setDatatype(String value) { this.Datatype = value; return this; } public Integer getMaxLength() { return MaxLength; } public CustomFieldConfig setMaxLength(Integer value) { this.MaxLength = value; return this; } public Boolean getIsPublic() { return IsPublic; } public CustomFieldConfig setIsPublic(Boolean value) { this.IsPublic = value; return this; } public Boolean getIsHidden() { return IsHidden; } public CustomFieldConfig setIsHidden(Boolean value) { this.IsHidden = value; return this; } public Boolean getIsMandatory() { return IsMandatory; } public CustomFieldConfig setIsMandatory(Boolean value) { this.IsMandatory = value; return this; } public String getDefaultValue() { return DefaultValue; } public CustomFieldConfig setDefaultValue(String value) { this.DefaultValue = value; return this; } public String getRegExErrorMessage() { return RegExErrorMessage; } public CustomFieldConfig setRegExErrorMessage(String value) { this.RegExErrorMessage = value; return this; } public String getMandatoryErrorMessage() { return MandatoryErrorMessage; } public CustomFieldConfig setMandatoryErrorMessage(String value) { this.MandatoryErrorMessage = value; return this; } public Integer getWidth() { return Width; } public CustomFieldConfig setWidth(Integer value) { this.Width = value; return this; } public Boolean isMultipleLineText() { return MultipleLineText; } public CustomFieldConfig setMultipleLineText(Boolean value) { this.MultipleLineText = value; return this; } public Date getModifiedDate() { return ModifiedDate; } public CustomFieldConfig setModifiedDate(Date value) { this.ModifiedDate = value; return this; } } public static class CustomFieldServices { public Integer Id = null; /** * Name of the service */ @ApiMember(Description="Name of the service") public String Name = null; /** * The image url of the service */ @ApiMember(Description="The image url of the service") public Uri ImageUrl = null; public Integer getId() { return Id; } public CustomFieldServices setId(Integer value) { this.Id = value; return this; } public String getName() { return Name; } public CustomFieldServices setName(String value) { this.Name = value; return this; } public Uri getImageUrl() { return ImageUrl; } public CustomFieldServices setImageUrl(Uri value) { this.ImageUrl = value; return this; } } public static class CustomFieldLookupResponse { public Integer Id = null; public Boolean Active = null; public Integer SortOrder = null; public String Value = null; public Integer getId() { return Id; } public CustomFieldLookupResponse setId(Integer value) { this.Id = value; return this; } public Boolean isActive() { return Active; } public CustomFieldLookupResponse setActive(Boolean value) { this.Active = value; return this; } public Integer getSortOrder() { return SortOrder; } public CustomFieldLookupResponse setSortOrder(Integer value) { this.SortOrder = value; return this; } public String getValue() { return Value; } public CustomFieldLookupResponse setValue(String value) { this.Value = value; return this; } } @DataContract public static class QueryBase { /** * Skip over a given number of elements in a sequence and then return the remainder. Use this when you need paging.

Example:
?skip=10&orderBy=Id */ @DataMember(Order=1) public Integer Skip = null; /** * Return a given number of elements in a sequence and then skip over the remainder. Use this when you need paging.

Example:
?take=20 */ @DataMember(Order=2) public Integer Take = null; /** * Comma separated list of fields to order by. Prefix the field name with a minus if you wan't to invert the sort for that field.

Example:
?orderBy=Id,-Age,FirstName */ @DataMember(Order=3) public String OrderBy = null; /** * Comma separated list of fields to order by in descending order. Prefix the field name with a minus if you wan't to invert the sort for that field.

Example:
?orderByDesc=Id,-Age,FirstName */ @DataMember(Order=4) public String OrderByDesc = null; /** * Include any of the aggregates AVG, COUNT, FIRST, LAST, MAX, MIN, SUM in your result set. The results will be returned in the meta field.

Example:
?include=COUNT(*) as Total

or multiple fields with
?include=Count(*) Total, Min(Age), AVG(Age) AverageAge

or unique with
?include=COUNT(DISTINCT LivingStatus) as UniqueStatus */ @DataMember(Order=5) public String Include = null; @DataMember(Order=6) public String Fields = null; @DataMember(Order=7) public HashMap Meta = null; public Integer getSkip() { return Skip; } public QueryBase setSkip(Integer value) { this.Skip = value; return this; } public Integer getTake() { return Take; } public QueryBase setTake(Integer value) { this.Take = value; return this; } public String getOrderBy() { return OrderBy; } public QueryBase setOrderBy(String value) { this.OrderBy = value; return this; } public String getOrderByDesc() { return OrderByDesc; } public QueryBase setOrderByDesc(String value) { this.OrderByDesc = value; return this; } public String getInclude() { return Include; } public QueryBase setInclude(String value) { this.Include = value; return this; } public String getFields() { return Fields; } public QueryBase setFields(String value) { this.Fields = value; return this; } public HashMap getMeta() { return Meta; } public QueryBase setMeta(HashMap value) { this.Meta = value; return this; } } public static class BaseModel { } public static class CustomFieldValue extends BaseModel { @Required() public UUID CompanyId = null; public Integer Id = null; @Required() public String Value = null; @Required() public Boolean Active = null; public Short SortOrder = null; public Date ModifiedDate = null; public UUID getCompanyId() { return CompanyId; } public CustomFieldValue setCompanyId(UUID value) { this.CompanyId = value; return this; } public Integer getId() { return Id; } public CustomFieldValue setId(Integer value) { this.Id = value; return this; } public String getValue() { return Value; } public CustomFieldValue setValue(String value) { this.Value = value; return this; } public Boolean isActive() { return Active; } public CustomFieldValue setActive(Boolean value) { this.Active = value; return this; } public Short getSortOrder() { return SortOrder; } public CustomFieldValue setSortOrder(Short value) { this.SortOrder = value; return this; } public Date getModifiedDate() { return ModifiedDate; } public CustomFieldValue setModifiedDate(Date value) { this.ModifiedDate = value; return this; } } public static class CustomField extends BaseModel { @Required() public String Table = null; @Required() public String Column = null; @Required() public String DataType = null; @Required() public String Description = null; @Required() public Boolean Active = null; public Date ModifiedDate = null; public Integer Id = null; public String getTable() { return Table; } public CustomField setTable(String value) { this.Table = value; return this; } public String getColumn() { return Column; } public CustomField setColumn(String value) { this.Column = value; return this; } public String getDataType() { return DataType; } public CustomField setDataType(String value) { this.DataType = value; return this; } public String getDescription() { return Description; } public CustomField setDescription(String value) { this.Description = value; return this; } public Boolean isActive() { return Active; } public CustomField setActive(Boolean value) { this.Active = value; return this; } public Date getModifiedDate() { return ModifiedDate; } public CustomField setModifiedDate(Date value) { this.ModifiedDate = value; return this; } public Integer getId() { return Id; } public CustomField setId(Integer value) { this.Id = value; return this; } } public static class RegEx extends BaseModel { @Required() public String Name = null; @Required() public String Description = null; @Required() public String RegExCode = null; public String ErrorMessage = null; public Date ModifiedDate = null; public Integer Id = null; public String getName() { return Name; } public RegEx setName(String value) { this.Name = value; return this; } public String getDescription() { return Description; } public RegEx setDescription(String value) { this.Description = value; return this; } public String getRegExCode() { return RegExCode; } public RegEx setRegExCode(String value) { this.RegExCode = value; return this; } public String getErrorMessage() { return ErrorMessage; } public RegEx setErrorMessage(String value) { this.ErrorMessage = value; return this; } public Date getModifiedDate() { return ModifiedDate; } public RegEx setModifiedDate(Date value) { this.ModifiedDate = value; return this; } public Integer getId() { return Id; } public RegEx setId(Integer value) { this.Id = value; return this; } } public static class CustomFieldServiceRelation extends BaseModel { @Required() public UUID CompanyId = null; public Integer Id = null; @Required() public Integer CustomFieldConfigId = null; @Required() public Integer ServiceId = null; public Date ModifiedDate = null; public UUID getCompanyId() { return CompanyId; } public CustomFieldServiceRelation setCompanyId(UUID value) { this.CompanyId = value; return this; } public Integer getId() { return Id; } public CustomFieldServiceRelation setId(Integer value) { this.Id = value; return this; } public Integer getCustomFieldConfigId() { return CustomFieldConfigId; } public CustomFieldServiceRelation setCustomFieldConfigId(Integer value) { this.CustomFieldConfigId = value; return this; } public Integer getServiceId() { return ServiceId; } public CustomFieldServiceRelation setServiceId(Integer value) { this.ServiceId = value; return this; } public Date getModifiedDate() { return ModifiedDate; } public CustomFieldServiceRelation setModifiedDate(Date value) { this.ModifiedDate = value; return this; } } public static class CustomFieldQueryResponse { /** * Custom field id */ @ApiMember(Description="Custom field id") public Integer Id = null; /** * Reference to company that owns the custom field configuration */ @ApiMember(Description="Reference to company that owns the custom field configuration") public UUID CompanyId = null; /** * Group id */ @ApiMember(Description="Group id") public Integer GroupId = null; /** * Field id */ @ApiMember(Description="Field id") public Integer FieldId = null; /** * Configuration name. Example: 'Number of persons'. */ @ApiMember(Description="Configuration name. Example: 'Number of persons'.") public String Name = null; /** * Field width. Example: 20 */ @ApiMember(Description="Field width. Example: 20") public Integer Width = null; /** * Column in database where to store the information. Example: 'TextField1' */ @ApiMember(Description="Column in database where to store the information. Example: 'TextField1'") public String Column = null; /** * Custom field description. Example: 'For how many persons is this booking?' */ @ApiMember(Description="Custom field description. Example: 'For how many persons is this booking?'") public String Description = null; /** * Data field of custom field. Valid values are: TextBox, ... Example: 'TextBox' */ @ApiMember(Description="Data field of custom field. Valid values are: TextBox, ... Example: 'TextBox'") public String DataType = null; /** * Default value of the field. Example: '3' */ @ApiMember(Description="Default value of the field. Example: '3'") public String DefaultValue = null; /** * 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") public Boolean IsMandatory = null; /** * 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") public String MandatoryErrorMessage = null; /** * Max lenght of the field */ @ApiMember(Description="Max lenght of the field") public Integer MaxLength = null; /** * If the field should have multiple lines */ @ApiMember(Description="If the field should have multiple lines") public Boolean MultipleLineText = null; /** * Regular expression used for validation of the field */ @ApiMember(Description="Regular expression used for validation of the field") public String RegEx = null; /** * Regular expression id for validation of the field */ @ApiMember(Description="Regular expression id for validation of the field") public Integer RegExId = null; /** * Error message shown if the regular expression validation failed */ @ApiMember(Description="Error message shown if the regular expression validation failed") public String RegExErrorMessage = null; /** * If the field is visible to the customer */ @ApiMember(Description="If the field is visible to the customer") public Boolean IsPublic = null; /** * If the field should be hidden in lists */ @ApiMember(Description="If the field should be hidden in lists") public Boolean IsHidden = null; /** * Table to which the field belongs */ @ApiMember(Description="Table to which the field belongs") public String Table = null; /** * 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") public ArrayList Values = null; /** * The services that is connected to the custom field */ @ApiMember(Description="The services that is connected to the custom field") public ArrayList Services = null; public Integer getId() { return Id; } public CustomFieldQueryResponse setId(Integer value) { this.Id = value; return this; } public UUID getCompanyId() { return CompanyId; } public CustomFieldQueryResponse setCompanyId(UUID value) { this.CompanyId = value; return this; } public Integer getGroupId() { return GroupId; } public CustomFieldQueryResponse setGroupId(Integer value) { this.GroupId = value; return this; } public Integer getFieldId() { return FieldId; } public CustomFieldQueryResponse setFieldId(Integer value) { this.FieldId = value; return this; } public String getName() { return Name; } public CustomFieldQueryResponse setName(String value) { this.Name = value; return this; } public Integer getWidth() { return Width; } public CustomFieldQueryResponse setWidth(Integer value) { this.Width = value; return this; } public String getColumn() { return Column; } public CustomFieldQueryResponse setColumn(String value) { this.Column = value; return this; } public String getDescription() { return Description; } public CustomFieldQueryResponse setDescription(String value) { this.Description = value; return this; } public String getDataType() { return DataType; } public CustomFieldQueryResponse setDataType(String value) { this.DataType = value; return this; } public String getDefaultValue() { return DefaultValue; } public CustomFieldQueryResponse setDefaultValue(String value) { this.DefaultValue = value; return this; } public Boolean getIsMandatory() { return IsMandatory; } public CustomFieldQueryResponse setIsMandatory(Boolean value) { this.IsMandatory = value; return this; } public String getMandatoryErrorMessage() { return MandatoryErrorMessage; } public CustomFieldQueryResponse setMandatoryErrorMessage(String value) { this.MandatoryErrorMessage = value; return this; } public Integer getMaxLength() { return MaxLength; } public CustomFieldQueryResponse setMaxLength(Integer value) { this.MaxLength = value; return this; } public Boolean isMultipleLineText() { return MultipleLineText; } public CustomFieldQueryResponse setMultipleLineText(Boolean value) { this.MultipleLineText = value; return this; } public String getRegEx() { return RegEx; } public CustomFieldQueryResponse setRegEx(String value) { this.RegEx = value; return this; } public Integer getRegExId() { return RegExId; } public CustomFieldQueryResponse setRegExId(Integer value) { this.RegExId = value; return this; } public String getRegExErrorMessage() { return RegExErrorMessage; } public CustomFieldQueryResponse setRegExErrorMessage(String value) { this.RegExErrorMessage = value; return this; } public Boolean getIsPublic() { return IsPublic; } public CustomFieldQueryResponse setIsPublic(Boolean value) { this.IsPublic = value; return this; } public Boolean getIsHidden() { return IsHidden; } public CustomFieldQueryResponse setIsHidden(Boolean value) { this.IsHidden = value; return this; } public String getTable() { return Table; } public CustomFieldQueryResponse setTable(String value) { this.Table = value; return this; } public ArrayList getValues() { return Values; } public CustomFieldQueryResponse setValues(ArrayList value) { this.Values = value; return this; } public ArrayList getServices() { return Services; } public CustomFieldQueryResponse setServices(ArrayList value) { this.Services = value; return this; } } }