/* Options: Date: 2024-07-03 12:49:59 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: CurrentUserQuery.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; class CustomFieldDataResponse implements IConvertible { int? Id; String? Column; String? Name; String? Description; String? Value; /** * 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; CustomFieldDataResponse({this.Id,this.Column,this.Name,this.Description,this.Value,this.DataType}); CustomFieldDataResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id']; Column = json['Column']; Name = json['Name']; Description = json['Description']; Value = json['Value']; DataType = json['DataType']; return this; } Map toJson() => { 'Id': Id, 'Column': Column, 'Name': Name, 'Description': Description, 'Value': Value, 'DataType': DataType }; getTypeName() => "CustomFieldDataResponse"; TypeContext? context = _ctx; } class UserProfileResponse implements IConvertible { String? Id; String? Firstname; String? Lastname; String? Phone; String? Email; UserProfileResponse({this.Id,this.Firstname,this.Lastname,this.Phone,this.Email}); UserProfileResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id']; Firstname = json['Firstname']; Lastname = json['Lastname']; Phone = json['Phone']; Email = json['Email']; return this; } Map toJson() => { 'Id': Id, 'Firstname': Firstname, 'Lastname': Lastname, 'Phone': Phone, 'Email': Email }; getTypeName() => "UserProfileResponse"; TypeContext? context = _ctx; } class AdminProfile implements IConvertible { String? CompanyId; String? Id; String? Firstname; String? Lastname; String? Email; String? WorkerId; String? Phone; AdminProfile({this.CompanyId,this.Id,this.Firstname,this.Lastname,this.Email,this.WorkerId,this.Phone}); AdminProfile.fromJson(Map json) { fromMap(json); } fromMap(Map json) { CompanyId = json['CompanyId']; Id = json['Id']; Firstname = json['Firstname']; Lastname = json['Lastname']; Email = json['Email']; WorkerId = json['WorkerId']; Phone = json['Phone']; return this; } Map toJson() => { 'CompanyId': CompanyId, 'Id': Id, 'Firstname': Firstname, 'Lastname': Lastname, 'Email': Email, 'WorkerId': WorkerId, 'Phone': Phone }; getTypeName() => "AdminProfile"; TypeContext? context = _ctx; } class CompanyCustomerResponse implements IConvertible { String? CompanyId; String? CustomerId; List? CustomFieldValues; CompanyCustomerResponse({this.CompanyId,this.CustomerId,this.CustomFieldValues}); CompanyCustomerResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { CompanyId = json['CompanyId']; CustomerId = json['CustomerId']; CustomFieldValues = JsonConverters.fromJson(json['CustomFieldValues'],'List',context!); return this; } Map toJson() => { 'CompanyId': CompanyId, 'CustomerId': CustomerId, 'CustomFieldValues': JsonConverters.toJson(CustomFieldValues,'List',context!) }; getTypeName() => "CompanyCustomerResponse"; TypeContext? context = _ctx; } class UserFavorites implements IConvertible { String? CompanyId; CompanyQueryResponse? Company; UserFavorites({this.CompanyId,this.Company}); UserFavorites.fromJson(Map json) { fromMap(json); } fromMap(Map json) { CompanyId = json['CompanyId']; Company = JsonConverters.fromJson(json['Company'],'CompanyQueryResponse',context!); return this; } Map toJson() => { 'CompanyId': CompanyId, 'Company': JsonConverters.toJson(Company,'CompanyQueryResponse',context!) }; getTypeName() => "UserFavorites"; TypeContext? context = _ctx; } class CurrentUserQueryResponse implements IConvertible { /** * The user id for your profile. */ // @ApiMember(Description="The user id for your profile.") String? UserId; List? Favorites; UserProfileResponse? UserProfile; UserProfileResponse? CustomerProfile; AdminProfile? AdminProfile; List? CompanyCustomers; CurrentUserQueryResponse({this.UserId,this.Favorites,this.UserProfile,this.CustomerProfile,this.AdminProfile,this.CompanyCustomers}); CurrentUserQueryResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { UserId = json['UserId']; Favorites = JsonConverters.fromJson(json['Favorites'],'List',context!); UserProfile = JsonConverters.fromJson(json['UserProfile'],'UserProfileResponse',context!); CustomerProfile = JsonConverters.fromJson(json['CustomerProfile'],'UserProfileResponse',context!); AdminProfile = JsonConverters.fromJson(json['AdminProfile'],'AdminProfile',context!); CompanyCustomers = JsonConverters.fromJson(json['CompanyCustomers'],'List',context!); return this; } Map toJson() => { 'UserId': UserId, 'Favorites': JsonConverters.toJson(Favorites,'List',context!), 'UserProfile': JsonConverters.toJson(UserProfile,'UserProfileResponse',context!), 'CustomerProfile': JsonConverters.toJson(CustomerProfile,'UserProfileResponse',context!), 'AdminProfile': JsonConverters.toJson(AdminProfile,'AdminProfile',context!), 'CompanyCustomers': JsonConverters.toJson(CompanyCustomers,'List',context!) }; getTypeName() => "CurrentUserQueryResponse"; TypeContext? context = _ctx; } // @Route("/users", "GET") // @ApiResponse(Description="Returned if the service was called without an existing session", StatusCode=401) // @ValidateRequest(Validator="IsAuthenticated") class CurrentUserQuery implements IReturn, IConvertible, IGet { /** * If you want to include the users favorites */ // @ApiMember(DataType="boolean", Description="If you want to include the users favorites", ParameterType="query") bool? IncludeFavorites; bool? IncludeCompanyCustomers; CurrentUserQuery({this.IncludeFavorites,this.IncludeCompanyCustomers}); CurrentUserQuery.fromJson(Map json) { fromMap(json); } fromMap(Map json) { IncludeFavorites = json['IncludeFavorites']; IncludeCompanyCustomers = json['IncludeCompanyCustomers']; return this; } Map toJson() => { 'IncludeFavorites': IncludeFavorites, 'IncludeCompanyCustomers': IncludeCompanyCustomers }; createResponse() => CurrentUserQueryResponse(); getResponseTypeName() => "CurrentUserQueryResponse"; getTypeName() => "CurrentUserQuery"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'api.bokamera.se', types: { 'CustomFieldDataResponse': TypeInfo(TypeOf.Class, create:() => CustomFieldDataResponse()), 'UserProfileResponse': TypeInfo(TypeOf.Class, create:() => UserProfileResponse()), 'AdminProfile': TypeInfo(TypeOf.Class, create:() => AdminProfile()), 'CompanyCustomerResponse': TypeInfo(TypeOf.Class, create:() => CompanyCustomerResponse()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'UserFavorites': TypeInfo(TypeOf.Class, create:() => UserFavorites()), 'CompanyQueryResponse': TypeInfo(TypeOf.Class, create:() => CompanyQueryResponse()), 'CurrentUserQueryResponse': TypeInfo(TypeOf.Class, create:() => CurrentUserQueryResponse()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'List': TypeInfo(TypeOf.Class, create:() => []), 'CurrentUserQuery': TypeInfo(TypeOf.Class, create:() => CurrentUserQuery()), });