/* Options: Date: 2024-11-21 16:51:52 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: UpdateUser.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; enum KeyCloakRealm { BookMore, BookMoreAdmin, SuperAdmin, } class UpdateCustomerProfile implements IConvertible { String? Firstname; String? Lastname; String? Phone; String? Email; UpdateCustomerProfile({this.Firstname,this.Lastname,this.Phone,this.Email}); UpdateCustomerProfile.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Firstname = json['Firstname']; Lastname = json['Lastname']; Phone = json['Phone']; Email = json['Email']; return this; } Map toJson() => { 'Firstname': Firstname, 'Lastname': Lastname, 'Phone': Phone, 'Email': Email }; getTypeName() => "UpdateCustomerProfile"; TypeContext? context = _ctx; } class UpdateAdminProfile implements IConvertible { String? Firstname; String? Lastname; String? Phone; String? Email; UpdateAdminProfile({this.Firstname,this.Lastname,this.Phone,this.Email}); UpdateAdminProfile.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Firstname = json['Firstname']; Lastname = json['Lastname']; Phone = json['Phone']; Email = json['Email']; return this; } Map toJson() => { 'Firstname': Firstname, 'Lastname': Lastname, 'Phone': Phone, 'Email': Email }; getTypeName() => "UpdateAdminProfile"; 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 UpdateUserResponse implements IConvertible { dynamic? ResponseStatus; /** * The user id for your profile. */ // @ApiMember(Description="The user id for your profile.", IsRequired=true) String? UserId; UserProfileResponse? UserProfile; AdminProfile? AdminProfile; bool? IsSentConfirmationUpdateEmail; UpdateUserResponse({this.ResponseStatus,this.UserId,this.UserProfile,this.AdminProfile,this.IsSentConfirmationUpdateEmail}); UpdateUserResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'dynamic',context!); UserId = json['UserId']; UserProfile = JsonConverters.fromJson(json['UserProfile'],'UserProfileResponse',context!); AdminProfile = JsonConverters.fromJson(json['AdminProfile'],'AdminProfile',context!); IsSentConfirmationUpdateEmail = json['IsSentConfirmationUpdateEmail']; return this; } Map toJson() => { 'ResponseStatus': JsonConverters.toJson(ResponseStatus,'dynamic',context!), 'UserId': UserId, 'UserProfile': JsonConverters.toJson(UserProfile,'UserProfileResponse',context!), 'AdminProfile': JsonConverters.toJson(AdminProfile,'AdminProfile',context!), 'IsSentConfirmationUpdateEmail': IsSentConfirmationUpdateEmail }; getTypeName() => "UpdateUserResponse"; TypeContext? context = _ctx; } // @Route("/users", "PUT") // @ApiResponse(Description="Returned if there is a validation error on the input parameters", StatusCode=400) // @ApiResponse(Description="Returned if the current user is not allowed to perform the action", StatusCode=401) // @ValidateRequest(Validator="IsAuthenticated") class UpdateUser implements IReturn, IConvertible, IPut { /** * The user id for your profile. */ // @ApiMember(Description="The user id for your profile.") String? UserId; String? NewEmail; UpdateCustomerProfile? UserProfile; UpdateAdminProfile? AdminProfile; /** * The user realm for identity server. BookMore = 1, BookMoreAdmin = 2 */ // @ApiMember(Description="The user realm for identity server. BookMore = 1, BookMoreAdmin = 2 ", IsRequired=true) KeyCloakRealm? Realm; UpdateUser({this.UserId,this.NewEmail,this.UserProfile,this.AdminProfile,this.Realm}); UpdateUser.fromJson(Map json) { fromMap(json); } fromMap(Map json) { UserId = json['UserId']; NewEmail = json['NewEmail']; UserProfile = JsonConverters.fromJson(json['UserProfile'],'UpdateCustomerProfile',context!); AdminProfile = JsonConverters.fromJson(json['AdminProfile'],'UpdateAdminProfile',context!); Realm = JsonConverters.fromJson(json['Realm'],'KeyCloakRealm',context!); return this; } Map toJson() => { 'UserId': UserId, 'NewEmail': NewEmail, 'UserProfile': JsonConverters.toJson(UserProfile,'UpdateCustomerProfile',context!), 'AdminProfile': JsonConverters.toJson(AdminProfile,'UpdateAdminProfile',context!), 'Realm': JsonConverters.toJson(Realm,'KeyCloakRealm',context!) }; createResponse() => UpdateUserResponse(); getResponseTypeName() => "UpdateUserResponse"; getTypeName() => "UpdateUser"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'api.bokamera.se', types: { 'KeyCloakRealm': TypeInfo(TypeOf.Enum, enumValues:KeyCloakRealm.values), 'UpdateCustomerProfile': TypeInfo(TypeOf.Class, create:() => UpdateCustomerProfile()), 'UpdateAdminProfile': TypeInfo(TypeOf.Class, create:() => UpdateAdminProfile()), 'UserProfileResponse': TypeInfo(TypeOf.Class, create:() => UserProfileResponse()), 'AdminProfile': TypeInfo(TypeOf.Class, create:() => AdminProfile()), 'UpdateUserResponse': TypeInfo(TypeOf.Class, create:() => UpdateUserResponse()), 'UpdateUser': TypeInfo(TypeOf.Class, create:() => UpdateUser()), });