| All Verbs | /api/dimensionvalues/{DimensionId} |
|---|
import 'package:servicestack/servicestack.dart';
class DimensionValueModel implements IConvertible
{
/**
* Id of the dimension value.
*/
// @ApiMember(DataType="Guid", Description="Id of the dimension value.", Name="DimensionValueId", ParameterType="body")
String? DimensionValueId;
/**
* Dimension Id this value is for.
*/
// @ApiMember(Description="Dimension Id this value is for.", ParameterType="body")
String? DimensionId;
/**
* Name of the dimension value.
*/
// @ApiMember(Description="Name of the dimension value.", ParameterType="body")
String? Name;
/**
* Description of the dimension value.
*/
// @ApiMember(Description="Description of the dimension value.", ParameterType="body")
String? Description;
/**
* Short Name for the dimension value.
*/
// @ApiMember(Description="Short Name for the dimension value.", ParameterType="body")
String? ShortName;
/**
* Id of the colour associated.
*/
// @ApiMember(Description="Id of the colour associated.", ParameterType="body")
String? TrafficLightId;
/**
* Colour associated with the dimension value.
*/
// @ApiMember(Description="Colour associated with the dimension value.", ParameterType="body")
String? TrafficLightColour;
/**
* Id that links this dimension value to an object.
*/
// @ApiMember(Description="Id that links this dimension value to an object.", ParameterType="body")
String? ObjectConnectionId;
/**
* Owner Id of the dimension value.
*/
// @ApiMember(Description="Owner Id of the dimension value.", ParameterType="body")
String? OwnerContactId;
/**
* Record status of the dimension value.
*/
// @ApiMember(Description="Record status of the dimension value.", ParameterType="body")
String? RecordStatus;
DimensionValueModel({this.DimensionValueId,this.DimensionId,this.Name,this.Description,this.ShortName,this.TrafficLightId,this.TrafficLightColour,this.ObjectConnectionId,this.OwnerContactId,this.RecordStatus});
DimensionValueModel.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
DimensionValueId = json['DimensionValueId'];
DimensionId = json['DimensionId'];
Name = json['Name'];
Description = json['Description'];
ShortName = json['ShortName'];
TrafficLightId = json['TrafficLightId'];
TrafficLightColour = json['TrafficLightColour'];
ObjectConnectionId = json['ObjectConnectionId'];
OwnerContactId = json['OwnerContactId'];
RecordStatus = json['RecordStatus'];
return this;
}
Map<String, dynamic> toJson() => {
'DimensionValueId': DimensionValueId,
'DimensionId': DimensionId,
'Name': Name,
'Description': Description,
'ShortName': ShortName,
'TrafficLightId': TrafficLightId,
'TrafficLightColour': TrafficLightColour,
'ObjectConnectionId': ObjectConnectionId,
'OwnerContactId': OwnerContactId,
'RecordStatus': RecordStatus
};
getTypeName() => "DimensionValueModel";
TypeContext? context = _ctx;
}
// @ApiResponse(Description="A list of dimension values")
class GetDimensionValuesListResponse implements IConvertible
{
/**
* List of dimensionValues.
*/
// @ApiMember(DataType="List<DimensionValueModel>", Description="List of dimensionValues.", Name="DimensionValues", ParameterType="query")
List<DimensionValueModel>? DimensionValues;
ResponseStatus? ResponseStatus;
GetDimensionValuesListResponse({this.DimensionValues,this.ResponseStatus});
GetDimensionValuesListResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
DimensionValues = JsonConverters.fromJson(json['DimensionValues'],'List<DimensionValueModel>',context!);
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'DimensionValues': JsonConverters.toJson(DimensionValues,'List<DimensionValueModel>',context!),
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
};
getTypeName() => "GetDimensionValuesListResponse";
TypeContext? context = _ctx;
}
/**
* Get a list of dimensionValues for a specified dimension
*/
// @Api(Description="Get a list of dimensionValues for a specified dimension")
class GetDimensionValuesList implements IConvertible
{
/**
* Licensee Id to retrieve dimensionValues for.
*/
// @ApiMember(DataType="Guid", Description="Licensee Id to retrieve dimensionValues for.", Name="LicenseeId", ParameterType="query")
String? LicenseeId;
/**
* Dimension Id to retrieve dimensionValues for.
*/
// @ApiMember(DataType="Guid", Description="Dimension Id to retrieve dimensionValues for.", Name="DimensionId", ParameterType="query")
String? DimensionId;
/**
* RecordStatus of dimensionValues to retrieve. If not set 'A' active dimensionValues are retrieved.
*/
// @ApiMember(DataType="string", Description="RecordStatus of dimensionValues to retrieve. If not set 'A' active dimensionValues are retrieved.", Name="RecordStatus", ParameterType="query")
String? RecordStatus;
GetDimensionValuesList({this.LicenseeId,this.DimensionId,this.RecordStatus});
GetDimensionValuesList.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
LicenseeId = json['LicenseeId'];
DimensionId = json['DimensionId'];
RecordStatus = json['RecordStatus'];
return this;
}
Map<String, dynamic> toJson() => {
'LicenseeId': LicenseeId,
'DimensionId': DimensionId,
'RecordStatus': RecordStatus
};
getTypeName() => "GetDimensionValuesList";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'pfapi.pstpf.com.au', types: <String, TypeInfo> {
'DimensionValueModel': TypeInfo(TypeOf.Class, create:() => DimensionValueModel()),
'GetDimensionValuesListResponse': TypeInfo(TypeOf.Class, create:() => GetDimensionValuesListResponse()),
'List<DimensionValueModel>': TypeInfo(TypeOf.Class, create:() => <DimensionValueModel>[]),
'GetDimensionValuesList': TypeInfo(TypeOf.Class, create:() => GetDimensionValuesList()),
});
Dart GetDimensionValuesList 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.
POST /api/dimensionvalues/{DimensionId} HTTP/1.1
Host: pfapi.pstpf.com.au
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"LicenseeId":"00000000-0000-0000-0000-000000000000","DimensionId":"00000000-0000-0000-0000-000000000000","RecordStatus":"String"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"DimensionValues":[{"DimensionValueId":"00000000-0000-0000-0000-000000000000","DimensionId":"00000000-0000-0000-0000-000000000000","Name":"String","Description":"String","ShortName":"String","TrafficLightId":"00000000-0000-0000-0000-000000000000","TrafficLightColour":"String","ObjectConnectionId":"00000000-0000-0000-0000-000000000000","OwnerContactId":"00000000-0000-0000-0000-000000000000","RecordStatus":"String"}],"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}