| GET | /v1/projectlocation/byproject/{ProjectID} |
|---|
import 'package:servicestack/servicestack.dart';
class ProjectLocationArea implements IConvertible
{
int? ProjectLocationAreaID;
int? ProjectLocationID;
String? Name;
double? Measurement;
String? MeasurementUnit;
String? Notes;
int? DisplayOrder;
bool? Active;
String? CreatedBy;
DateTime? CreatedAt;
DateTime? UpdatedAt;
ProjectLocationArea({this.ProjectLocationAreaID,this.ProjectLocationID,this.Name,this.Measurement,this.MeasurementUnit,this.Notes,this.DisplayOrder,this.Active,this.CreatedBy,this.CreatedAt,this.UpdatedAt});
ProjectLocationArea.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ProjectLocationAreaID = json['ProjectLocationAreaID'];
ProjectLocationID = json['ProjectLocationID'];
Name = json['Name'];
Measurement = JsonConverters.toDouble(json['Measurement']);
MeasurementUnit = json['MeasurementUnit'];
Notes = json['Notes'];
DisplayOrder = json['DisplayOrder'];
Active = json['Active'];
CreatedBy = json['CreatedBy'];
CreatedAt = JsonConverters.fromJson(json['CreatedAt'],'DateTime',context!);
UpdatedAt = JsonConverters.fromJson(json['UpdatedAt'],'DateTime',context!);
return this;
}
Map<String, dynamic> toJson() => {
'ProjectLocationAreaID': ProjectLocationAreaID,
'ProjectLocationID': ProjectLocationID,
'Name': Name,
'Measurement': Measurement,
'MeasurementUnit': MeasurementUnit,
'Notes': Notes,
'DisplayOrder': DisplayOrder,
'Active': Active,
'CreatedBy': CreatedBy,
'CreatedAt': JsonConverters.toJson(CreatedAt,'DateTime',context!),
'UpdatedAt': JsonConverters.toJson(UpdatedAt,'DateTime',context!)
};
getTypeName() => "ProjectLocationArea";
TypeContext? context = _ctx;
}
class ProjectLocationEquipment implements IConvertible
{
int? ProjectLocationEquipmentID;
int? ProjectLocationID;
String? Name;
String? Description;
String? Manufacturer;
String? Model;
String? SerialNumber;
String? AssetTag;
String? Notes;
bool? Active;
String? CreatedBy;
DateTime? CreatedAt;
DateTime? UpdatedAt;
ProjectLocationEquipment({this.ProjectLocationEquipmentID,this.ProjectLocationID,this.Name,this.Description,this.Manufacturer,this.Model,this.SerialNumber,this.AssetTag,this.Notes,this.Active,this.CreatedBy,this.CreatedAt,this.UpdatedAt});
ProjectLocationEquipment.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ProjectLocationEquipmentID = json['ProjectLocationEquipmentID'];
ProjectLocationID = json['ProjectLocationID'];
Name = json['Name'];
Description = json['Description'];
Manufacturer = json['Manufacturer'];
Model = json['Model'];
SerialNumber = json['SerialNumber'];
AssetTag = json['AssetTag'];
Notes = json['Notes'];
Active = json['Active'];
CreatedBy = json['CreatedBy'];
CreatedAt = JsonConverters.fromJson(json['CreatedAt'],'DateTime',context!);
UpdatedAt = JsonConverters.fromJson(json['UpdatedAt'],'DateTime',context!);
return this;
}
Map<String, dynamic> toJson() => {
'ProjectLocationEquipmentID': ProjectLocationEquipmentID,
'ProjectLocationID': ProjectLocationID,
'Name': Name,
'Description': Description,
'Manufacturer': Manufacturer,
'Model': Model,
'SerialNumber': SerialNumber,
'AssetTag': AssetTag,
'Notes': Notes,
'Active': Active,
'CreatedBy': CreatedBy,
'CreatedAt': JsonConverters.toJson(CreatedAt,'DateTime',context!),
'UpdatedAt': JsonConverters.toJson(UpdatedAt,'DateTime',context!)
};
getTypeName() => "ProjectLocationEquipment";
TypeContext? context = _ctx;
}
class ProjectLocationSiteDetail implements IConvertible
{
int? ProjectLocationSiteDetailID;
int? ProjectLocationID;
String? DetailType;
String? Label;
String? Value;
bool? IsSensitive;
int? EncVersion;
bool? HasValue;
String? Notes;
int? DisplayOrder;
bool? Active;
String? CreatedBy;
DateTime? CreatedAt;
DateTime? UpdatedAt;
ProjectLocationSiteDetail({this.ProjectLocationSiteDetailID,this.ProjectLocationID,this.DetailType,this.Label,this.Value,this.IsSensitive,this.EncVersion,this.HasValue,this.Notes,this.DisplayOrder,this.Active,this.CreatedBy,this.CreatedAt,this.UpdatedAt});
ProjectLocationSiteDetail.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ProjectLocationSiteDetailID = json['ProjectLocationSiteDetailID'];
ProjectLocationID = json['ProjectLocationID'];
DetailType = json['DetailType'];
Label = json['Label'];
Value = json['Value'];
IsSensitive = json['IsSensitive'];
EncVersion = json['EncVersion'];
HasValue = json['HasValue'];
Notes = json['Notes'];
DisplayOrder = json['DisplayOrder'];
Active = json['Active'];
CreatedBy = json['CreatedBy'];
CreatedAt = JsonConverters.fromJson(json['CreatedAt'],'DateTime',context!);
UpdatedAt = JsonConverters.fromJson(json['UpdatedAt'],'DateTime',context!);
return this;
}
Map<String, dynamic> toJson() => {
'ProjectLocationSiteDetailID': ProjectLocationSiteDetailID,
'ProjectLocationID': ProjectLocationID,
'DetailType': DetailType,
'Label': Label,
'Value': Value,
'IsSensitive': IsSensitive,
'EncVersion': EncVersion,
'HasValue': HasValue,
'Notes': Notes,
'DisplayOrder': DisplayOrder,
'Active': Active,
'CreatedBy': CreatedBy,
'CreatedAt': JsonConverters.toJson(CreatedAt,'DateTime',context!),
'UpdatedAt': JsonConverters.toJson(UpdatedAt,'DateTime',context!)
};
getTypeName() => "ProjectLocationSiteDetail";
TypeContext? context = _ctx;
}
class ProjectLocationAttachment implements IConvertible
{
int? ProjectLocationAttachmentID;
int? ProjectLocationID;
int? ProjectLocationAreaID;
String? Kind;
String? DocTitle;
String? FileName;
String? Url;
String? MimeType;
DateTime? UploadDate;
String? UploadedBy;
bool? Active;
ProjectLocationAttachment({this.ProjectLocationAttachmentID,this.ProjectLocationID,this.ProjectLocationAreaID,this.Kind,this.DocTitle,this.FileName,this.Url,this.MimeType,this.UploadDate,this.UploadedBy,this.Active});
ProjectLocationAttachment.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ProjectLocationAttachmentID = json['ProjectLocationAttachmentID'];
ProjectLocationID = json['ProjectLocationID'];
ProjectLocationAreaID = json['ProjectLocationAreaID'];
Kind = json['Kind'];
DocTitle = json['DocTitle'];
FileName = json['FileName'];
Url = json['Url'];
MimeType = json['MimeType'];
UploadDate = JsonConverters.fromJson(json['UploadDate'],'DateTime',context!);
UploadedBy = json['UploadedBy'];
Active = json['Active'];
return this;
}
Map<String, dynamic> toJson() => {
'ProjectLocationAttachmentID': ProjectLocationAttachmentID,
'ProjectLocationID': ProjectLocationID,
'ProjectLocationAreaID': ProjectLocationAreaID,
'Kind': Kind,
'DocTitle': DocTitle,
'FileName': FileName,
'Url': Url,
'MimeType': MimeType,
'UploadDate': JsonConverters.toJson(UploadDate,'DateTime',context!),
'UploadedBy': UploadedBy,
'Active': Active
};
getTypeName() => "ProjectLocationAttachment";
TypeContext? context = _ctx;
}
class ProjectLocation implements IConvertible
{
int? ProjectLocationID;
int? ProjectID;
String? Name;
String? Address1;
String? Address2;
String? City;
String? State;
String? Zip;
double? Latitude;
double? Longitude;
double? TotalArea;
String? AreaUnit;
String? AccessInstructions;
bool? IsPrimary;
int? DisplayOrder;
bool? Active;
String? CreatedBy;
DateTime? CreatedAt;
DateTime? UpdatedAt;
List<ProjectLocationArea>? Areas = [];
List<ProjectLocationEquipment>? Equipment = [];
List<ProjectLocationSiteDetail>? SiteDetails = [];
List<ProjectLocationAttachment>? Attachments = [];
ProjectLocation({this.ProjectLocationID,this.ProjectID,this.Name,this.Address1,this.Address2,this.City,this.State,this.Zip,this.Latitude,this.Longitude,this.TotalArea,this.AreaUnit,this.AccessInstructions,this.IsPrimary,this.DisplayOrder,this.Active,this.CreatedBy,this.CreatedAt,this.UpdatedAt,this.Areas,this.Equipment,this.SiteDetails,this.Attachments});
ProjectLocation.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ProjectLocationID = json['ProjectLocationID'];
ProjectID = json['ProjectID'];
Name = json['Name'];
Address1 = json['Address1'];
Address2 = json['Address2'];
City = json['City'];
State = json['State'];
Zip = json['Zip'];
Latitude = JsonConverters.toDouble(json['Latitude']);
Longitude = JsonConverters.toDouble(json['Longitude']);
TotalArea = JsonConverters.toDouble(json['TotalArea']);
AreaUnit = json['AreaUnit'];
AccessInstructions = json['AccessInstructions'];
IsPrimary = json['IsPrimary'];
DisplayOrder = json['DisplayOrder'];
Active = json['Active'];
CreatedBy = json['CreatedBy'];
CreatedAt = JsonConverters.fromJson(json['CreatedAt'],'DateTime',context!);
UpdatedAt = JsonConverters.fromJson(json['UpdatedAt'],'DateTime',context!);
Areas = JsonConverters.fromJson(json['Areas'],'List<ProjectLocationArea>',context!);
Equipment = JsonConverters.fromJson(json['Equipment'],'List<ProjectLocationEquipment>',context!);
SiteDetails = JsonConverters.fromJson(json['SiteDetails'],'List<ProjectLocationSiteDetail>',context!);
Attachments = JsonConverters.fromJson(json['Attachments'],'List<ProjectLocationAttachment>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'ProjectLocationID': ProjectLocationID,
'ProjectID': ProjectID,
'Name': Name,
'Address1': Address1,
'Address2': Address2,
'City': City,
'State': State,
'Zip': Zip,
'Latitude': Latitude,
'Longitude': Longitude,
'TotalArea': TotalArea,
'AreaUnit': AreaUnit,
'AccessInstructions': AccessInstructions,
'IsPrimary': IsPrimary,
'DisplayOrder': DisplayOrder,
'Active': Active,
'CreatedBy': CreatedBy,
'CreatedAt': JsonConverters.toJson(CreatedAt,'DateTime',context!),
'UpdatedAt': JsonConverters.toJson(UpdatedAt,'DateTime',context!),
'Areas': JsonConverters.toJson(Areas,'List<ProjectLocationArea>',context!),
'Equipment': JsonConverters.toJson(Equipment,'List<ProjectLocationEquipment>',context!),
'SiteDetails': JsonConverters.toJson(SiteDetails,'List<ProjectLocationSiteDetail>',context!),
'Attachments': JsonConverters.toJson(Attachments,'List<ProjectLocationAttachment>',context!)
};
getTypeName() => "ProjectLocation";
TypeContext? context = _ctx;
}
class ProjectLocationResponse implements IConvertible
{
List<ProjectLocation>? Locations = [];
List<ProjectLocationArea>? Areas = [];
List<ProjectLocationEquipment>? Equipment = [];
List<ProjectLocationSiteDetail>? SiteDetails = [];
List<ProjectLocationAttachment>? Attachments = [];
ProjectLocationSiteDetail? SiteDetail;
ResponseStatus? ResponseStatus;
ProjectLocationResponse({this.Locations,this.Areas,this.Equipment,this.SiteDetails,this.Attachments,this.SiteDetail,this.ResponseStatus});
ProjectLocationResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Locations = JsonConverters.fromJson(json['Locations'],'List<ProjectLocation>',context!);
Areas = JsonConverters.fromJson(json['Areas'],'List<ProjectLocationArea>',context!);
Equipment = JsonConverters.fromJson(json['Equipment'],'List<ProjectLocationEquipment>',context!);
SiteDetails = JsonConverters.fromJson(json['SiteDetails'],'List<ProjectLocationSiteDetail>',context!);
Attachments = JsonConverters.fromJson(json['Attachments'],'List<ProjectLocationAttachment>',context!);
SiteDetail = JsonConverters.fromJson(json['SiteDetail'],'ProjectLocationSiteDetail',context!);
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Locations': JsonConverters.toJson(Locations,'List<ProjectLocation>',context!),
'Areas': JsonConverters.toJson(Areas,'List<ProjectLocationArea>',context!),
'Equipment': JsonConverters.toJson(Equipment,'List<ProjectLocationEquipment>',context!),
'SiteDetails': JsonConverters.toJson(SiteDetails,'List<ProjectLocationSiteDetail>',context!),
'Attachments': JsonConverters.toJson(Attachments,'List<ProjectLocationAttachment>',context!),
'SiteDetail': JsonConverters.toJson(SiteDetail,'ProjectLocationSiteDetail',context!),
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
};
getTypeName() => "ProjectLocationResponse";
TypeContext? context = _ctx;
}
class ProjectLocationListRequest implements IConvertible
{
int? ProjectID;
ProjectLocationListRequest({this.ProjectID});
ProjectLocationListRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ProjectID = json['ProjectID'];
return this;
}
Map<String, dynamic> toJson() => {
'ProjectID': ProjectID
};
getTypeName() => "ProjectLocationListRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'ProjectLocationArea': TypeInfo(TypeOf.Class, create:() => ProjectLocationArea()),
'ProjectLocationEquipment': TypeInfo(TypeOf.Class, create:() => ProjectLocationEquipment()),
'ProjectLocationSiteDetail': TypeInfo(TypeOf.Class, create:() => ProjectLocationSiteDetail()),
'ProjectLocationAttachment': TypeInfo(TypeOf.Class, create:() => ProjectLocationAttachment()),
'ProjectLocation': TypeInfo(TypeOf.Class, create:() => ProjectLocation()),
'List<ProjectLocationArea>': TypeInfo(TypeOf.Class, create:() => <ProjectLocationArea>[]),
'List<ProjectLocationEquipment>': TypeInfo(TypeOf.Class, create:() => <ProjectLocationEquipment>[]),
'List<ProjectLocationSiteDetail>': TypeInfo(TypeOf.Class, create:() => <ProjectLocationSiteDetail>[]),
'List<ProjectLocationAttachment>': TypeInfo(TypeOf.Class, create:() => <ProjectLocationAttachment>[]),
'ProjectLocationResponse': TypeInfo(TypeOf.Class, create:() => ProjectLocationResponse()),
'List<ProjectLocation>': TypeInfo(TypeOf.Class, create:() => <ProjectLocation>[]),
'ProjectLocationListRequest': TypeInfo(TypeOf.Class, create:() => ProjectLocationListRequest()),
});
Dart ProjectLocationListRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v1/projectlocation/byproject/{ProjectID} HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"Locations":[{"ProjectLocationID":0,"ProjectID":0,"Name":"String","Address1":"String","Address2":"String","City":"String","State":"String","Zip":"String","Latitude":0,"Longitude":0,"TotalArea":0,"AreaUnit":"String","AccessInstructions":"String","IsPrimary":false,"DisplayOrder":0,"Active":false,"CreatedBy":"String","CreatedAt":"0001-01-01T00:00:00.0000000","UpdatedAt":"0001-01-01T00:00:00.0000000","Areas":[{"ProjectLocationAreaID":0,"ProjectLocationID":0,"Name":"String","Measurement":0,"MeasurementUnit":"String","Notes":"String","DisplayOrder":0,"Active":false,"CreatedBy":"String","CreatedAt":"0001-01-01T00:00:00.0000000","UpdatedAt":"0001-01-01T00:00:00.0000000"}],"Equipment":[{"ProjectLocationEquipmentID":0,"ProjectLocationID":0,"Name":"String","Description":"String","Manufacturer":"String","Model":"String","SerialNumber":"String","AssetTag":"String","Notes":"String","Active":false,"CreatedBy":"String","CreatedAt":"0001-01-01T00:00:00.0000000","UpdatedAt":"0001-01-01T00:00:00.0000000"}],"SiteDetails":[{"ProjectLocationSiteDetailID":0,"ProjectLocationID":0,"DetailType":"String","Label":"String","Value":"String","IsSensitive":false,"EncVersion":0,"HasValue":false,"Notes":"String","DisplayOrder":0,"Active":false,"CreatedBy":"String","CreatedAt":"0001-01-01T00:00:00.0000000","UpdatedAt":"0001-01-01T00:00:00.0000000"}],"Attachments":[{"ProjectLocationAttachmentID":0,"ProjectLocationID":0,"ProjectLocationAreaID":0,"Kind":"String","DocTitle":"String","FileName":"String","Url":"String","MimeType":"String","UploadDate":"0001-01-01T00:00:00.0000000","UploadedBy":"String","Active":false}]}],"Areas":[{"ProjectLocationAreaID":0,"ProjectLocationID":0,"Name":"String","Measurement":0,"MeasurementUnit":"String","Notes":"String","DisplayOrder":0,"Active":false,"CreatedBy":"String","CreatedAt":"0001-01-01T00:00:00.0000000","UpdatedAt":"0001-01-01T00:00:00.0000000"}],"Equipment":[{"ProjectLocationEquipmentID":0,"ProjectLocationID":0,"Name":"String","Description":"String","Manufacturer":"String","Model":"String","SerialNumber":"String","AssetTag":"String","Notes":"String","Active":false,"CreatedBy":"String","CreatedAt":"0001-01-01T00:00:00.0000000","UpdatedAt":"0001-01-01T00:00:00.0000000"}],"SiteDetails":[{"ProjectLocationSiteDetailID":0,"ProjectLocationID":0,"DetailType":"String","Label":"String","Value":"String","IsSensitive":false,"EncVersion":0,"HasValue":false,"Notes":"String","DisplayOrder":0,"Active":false,"CreatedBy":"String","CreatedAt":"0001-01-01T00:00:00.0000000","UpdatedAt":"0001-01-01T00:00:00.0000000"}],"Attachments":[{"ProjectLocationAttachmentID":0,"ProjectLocationID":0,"ProjectLocationAreaID":0,"Kind":"String","DocTitle":"String","FileName":"String","Url":"String","MimeType":"String","UploadDate":"0001-01-01T00:00:00.0000000","UploadedBy":"String","Active":false}],"SiteDetail":{"ProjectLocationSiteDetailID":0,"ProjectLocationID":0,"DetailType":"String","Label":"String","Value":"String","IsSensitive":false,"EncVersion":0,"HasValue":false,"Notes":"String","DisplayOrder":0,"Active":false,"CreatedBy":"String","CreatedAt":"0001-01-01T00:00:00.0000000","UpdatedAt":"0001-01-01T00:00:00.0000000"},"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}