Required role: | Admin |
POST | /unassignroles |
---|
import 'package:servicestack/servicestack.dart';
// @DataContract
class UnAssignRolesResponse implements IMeta, IConvertible
{
// @DataMember(Order=1)
List<String>? AllRoles;
// @DataMember(Order=2)
List<String>? AllPermissions;
// @DataMember(Order=3)
Map<String,String?>? Meta;
// @DataMember(Order=4)
ResponseStatus? ResponseStatus;
UnAssignRolesResponse({this.AllRoles,this.AllPermissions,this.Meta,this.ResponseStatus});
UnAssignRolesResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
AllRoles = JsonConverters.fromJson(json['AllRoles'],'List<String>',context!);
AllPermissions = JsonConverters.fromJson(json['AllPermissions'],'List<String>',context!);
Meta = JsonConverters.toStringMap(json['Meta']);
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'AllRoles': JsonConverters.toJson(AllRoles,'List<String>',context!),
'AllPermissions': JsonConverters.toJson(AllPermissions,'List<String>',context!),
'Meta': Meta,
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
};
getTypeName() => "UnAssignRolesResponse";
TypeContext? context = _ctx;
}
// @DataContract
class UnAssignRoles implements IPost, IMeta, IConvertible
{
// @DataMember(Order=1)
String? UserName;
// @DataMember(Order=2)
List<String>? Permissions;
// @DataMember(Order=3)
List<String>? Roles;
// @DataMember(Order=4)
Map<String,String?>? Meta;
UnAssignRoles({this.UserName,this.Permissions,this.Roles,this.Meta});
UnAssignRoles.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
UserName = json['UserName'];
Permissions = JsonConverters.fromJson(json['Permissions'],'List<String>',context!);
Roles = JsonConverters.fromJson(json['Roles'],'List<String>',context!);
Meta = JsonConverters.toStringMap(json['Meta']);
return this;
}
Map<String, dynamic> toJson() => {
'UserName': UserName,
'Permissions': JsonConverters.toJson(Permissions,'List<String>',context!),
'Roles': JsonConverters.toJson(Roles,'List<String>',context!),
'Meta': Meta
};
getTypeName() => "UnAssignRoles";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'cip_reporting_preview.chargeitpro.com', types: <String, TypeInfo> {
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /unassignroles HTTP/1.1
Host: cip-reporting-preview.chargeitpro.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
UserName: String,
Permissions:
[
String
],
Roles:
[
String
],
Meta:
{
String: String
}
}
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { AllRoles: [ String ], AllPermissions: [ String ], Meta: { String: String }, ResponseStatus: { ErrorCode: String, Message: String, StackTrace: String, Errors: [ { ErrorCode: String, FieldName: String, Message: String, Meta: { String: String } } ], Meta: { String: String } } }