| PUT | /RestApi/lists-api/items |
|---|
import 'package:servicestack/servicestack.dart';
class SpecificListsGetRequest implements IConvertible
{
List<String>? Ids;
String? Provider;
SpecificListsGetRequest({this.Ids,this.Provider});
SpecificListsGetRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Ids = JsonConverters.fromJson(json['Ids'],'List<String>',context!);
Provider = json['Provider'];
return this;
}
Map<String, dynamic> toJson() => {
'Ids': JsonConverters.toJson(Ids,'List<String>',context!),
'Provider': Provider
};
getTypeName() => "SpecificListsGetRequest";
TypeContext? context = _ctx;
}
class ItemsTargetLanguageStatusProxy implements IConvertible
{
String? Code;
String? Name;
bool? SomeItemsHaveIncompatiblePendingTranslations;
bool? AllItemsHaveIncompatiblePendingTranslations;
ItemsTargetLanguageStatusProxy({this.Code,this.Name,this.SomeItemsHaveIncompatiblePendingTranslations,this.AllItemsHaveIncompatiblePendingTranslations});
ItemsTargetLanguageStatusProxy.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Code = json['Code'];
Name = json['Name'];
SomeItemsHaveIncompatiblePendingTranslations = json['SomeItemsHaveIncompatiblePendingTranslations'];
AllItemsHaveIncompatiblePendingTranslations = json['AllItemsHaveIncompatiblePendingTranslations'];
return this;
}
Map<String, dynamic> toJson() => {
'Code': Code,
'Name': Name,
'SomeItemsHaveIncompatiblePendingTranslations': SomeItemsHaveIncompatiblePendingTranslations,
'AllItemsHaveIncompatiblePendingTranslations': AllItemsHaveIncompatiblePendingTranslations
};
getTypeName() => "ItemsTargetLanguageStatusProxy";
TypeContext? context = _ctx;
}
// @DataContract
class CollectionContext<T> implements IConvertible
{
// @DataMember
int? TotalCount;
// @DataMember
bool? IsGeneric;
// @DataMember
Map<String,String?>? Context;
// @DataMember
List<ItemsTargetLanguageStatusProxy>? Items;
CollectionContext({this.TotalCount,this.IsGeneric,this.Context,this.Items});
CollectionContext.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
TotalCount = json['TotalCount'];
IsGeneric = json['IsGeneric'];
Context = JsonConverters.fromJson(json['Context'],'Map<String,String?>',context!);
Items = JsonConverters.fromJson(json['Items'],'List<ItemsTargetLanguageStatusProxy>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'TotalCount': TotalCount,
'IsGeneric': IsGeneric,
'Context': JsonConverters.toJson(Context,'Map<String,String?>',context!),
'Items': JsonConverters.toJson(Items,'List<ItemsTargetLanguageStatusProxy>',context!)
};
getTypeName() => "CollectionContext<$T>";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'www.imglobal.com', types: <String, TypeInfo> {
'SpecificListsGetRequest': TypeInfo(TypeOf.Class, create:() => SpecificListsGetRequest()),
'ItemsTargetLanguageStatusProxy': TypeInfo(TypeOf.Class, create:() => ItemsTargetLanguageStatusProxy()),
'CollectionContext<T>': TypeInfo(TypeOf.Class, create:() => CollectionContext<T>()),
'Map<String,String?>': TypeInfo(TypeOf.Class, create:() => Map<String,String?>()),
'List<ItemsTargetLanguageStatusProxy>': TypeInfo(TypeOf.Class, create:() => <ItemsTargetLanguageStatusProxy>[]),
});
Dart SpecificListsGetRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
PUT /RestApi/lists-api/items HTTP/1.1
Host: www.imglobal.com
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"Ids":["00000000-0000-0000-0000-000000000000"],"Provider":"String"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"TotalCount":0,"IsGeneric":false,"Items":[]}