PUT | /RestApi/Sitefinity/mobile-formats/content-types/toggle |
---|
import 'package:servicestack/servicestack.dart';
class MobileFormatContentTypeDto implements IConvertible
{
String? ContentTypeDisplayName;
String? ContentTypeName;
String? ContentTypeFullname;
bool? Active;
MobileFormatContentTypeDto({this.ContentTypeDisplayName,this.ContentTypeName,this.ContentTypeFullname,this.Active});
MobileFormatContentTypeDto.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ContentTypeDisplayName = json['ContentTypeDisplayName'];
ContentTypeName = json['ContentTypeName'];
ContentTypeFullname = json['ContentTypeFullname'];
Active = json['Active'];
return this;
}
Map<String, dynamic> toJson() => {
'ContentTypeDisplayName': ContentTypeDisplayName,
'ContentTypeName': ContentTypeName,
'ContentTypeFullname': ContentTypeFullname,
'Active': Active
};
getTypeName() => "MobileFormatContentTypeDto";
TypeContext? context = _ctx;
}
class ToggleMobileFormatsContentTypesDto implements IConvertible
{
String? SiteId;
List<MobileFormatContentTypeDto>? MobileFormatContentTypes;
ToggleMobileFormatsContentTypesDto({this.SiteId,this.MobileFormatContentTypes});
ToggleMobileFormatsContentTypesDto.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
SiteId = json['SiteId'];
MobileFormatContentTypes = JsonConverters.fromJson(json['MobileFormatContentTypes'],'List<MobileFormatContentTypeDto>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'SiteId': SiteId,
'MobileFormatContentTypes': JsonConverters.toJson(MobileFormatContentTypes,'List<MobileFormatContentTypeDto>',context!)
};
getTypeName() => "ToggleMobileFormatsContentTypesDto";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'www.asg.com.au', types: <String, TypeInfo> {
'MobileFormatContentTypeDto': TypeInfo(TypeOf.Class, create:() => MobileFormatContentTypeDto()),
'ToggleMobileFormatsContentTypesDto': TypeInfo(TypeOf.Class, create:() => ToggleMobileFormatsContentTypesDto()),
'List<MobileFormatContentTypeDto>': TypeInfo(TypeOf.Class, create:() => <MobileFormatContentTypeDto>[]),
});
Dart ToggleMobileFormatsContentTypesDto DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
PUT /RestApi/Sitefinity/mobile-formats/content-types/toggle HTTP/1.1
Host: www.asg.com.au
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"SiteId":"String"}