/* Options: Date: 2025-12-06 06:17:15 Version: 8.0 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://1fetch.api.client.prod.86degrees.com //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: CalculateDistance.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; class ApiServiceRequest implements IServiceRequest, IHasApiKey, IConvertible { /** * The API Key required for authentication */ // @ApiMember(DataType="string", Description="The API Key required for authentication", IsRequired=true) String? ApiKey; ApiServiceRequest({this.ApiKey}); ApiServiceRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { ApiKey = json['ApiKey']; return this; } Map toJson() => { 'ApiKey': ApiKey }; getTypeName() => "ApiServiceRequest"; TypeContext? context = _ctx; } abstract class IServiceRequest { } abstract class IHasApiKey { String? ApiKey; } abstract class ILogRequest { } class Coordinate implements IConvertible { /** * The Latitude */ // @ApiMember(Description="The Latitude", IsRequired=true) double? Latitude; /** * The Longitude */ // @ApiMember(Description="The Longitude", IsRequired=true) double? Longitude; Coordinate({this.Latitude,this.Longitude}); Coordinate.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Latitude = JsonConverters.toDouble(json['Latitude']); Longitude = JsonConverters.toDouble(json['Longitude']); return this; } Map toJson() => { 'Latitude': Latitude, 'Longitude': Longitude }; getTypeName() => "Coordinate"; TypeContext? context = _ctx; } class ApiServiceResponse implements IServiceResponse, IConvertible { /** * Information about the response. */ // @ApiMember(Description="Information about the response.", IsRequired=true) String? Description; /** * Heading or summary of the response. */ // @ApiMember(Description="Heading or summary of the response.", IsRequired=true) String? Heading; /** * Did the intended operation for this response complete successfully? */ // @ApiMember(DataType="boolean", Description="Did the intended operation for this response complete successfully?", IsRequired=true) bool? WasSuccessful; ApiServiceResponse({this.Description,this.Heading,this.WasSuccessful}); ApiServiceResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Description = json['Description']; Heading = json['Heading']; WasSuccessful = json['WasSuccessful']; return this; } Map toJson() => { 'Description': Description, 'Heading': Heading, 'WasSuccessful': WasSuccessful }; getTypeName() => "ApiServiceResponse"; TypeContext? context = _ctx; } class CalculateDistanceResponse extends ApiServiceResponse implements IConvertible { /** * A list of the distances between each point, returned in order that the points were provided */ // @ApiMember(Description="A list of the distances between each point, returned in order that the points were provided") List? PointDistances; /** * The total distance between all points */ // @ApiMember(Description="The total distance between all points") double? TotalDistance; CalculateDistanceResponse({this.PointDistances,this.TotalDistance}); CalculateDistanceResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); PointDistances = JsonConverters.fromJson(json['PointDistances'],'List',context!); TotalDistance = JsonConverters.toDouble(json['TotalDistance']); return this; } Map toJson() => super.toJson()..addAll({ 'PointDistances': JsonConverters.toJson(PointDistances,'List',context!), 'TotalDistance': TotalDistance }); getTypeName() => "CalculateDistanceResponse"; TypeContext? context = _ctx; } // @Route("/calculatedistance", "POST") class CalculateDistance extends ApiServiceRequest implements IReturn, ILogRequest, IConvertible, IPost { /** * Array of coordinates */ // @ApiMember(Description="Array of coordinates", IsRequired=true) List? Coordinates; CalculateDistance({this.Coordinates}); CalculateDistance.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); Coordinates = JsonConverters.fromJson(json['Coordinates'],'List',context!); return this; } Map toJson() => super.toJson()..addAll({ 'Coordinates': JsonConverters.toJson(Coordinates,'List',context!) }); createResponse() => CalculateDistanceResponse(); getResponseTypeName() => "CalculateDistanceResponse"; getTypeName() => "CalculateDistance"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: '1fetch.api.client.prod.86degrees.com', types: { 'ApiServiceRequest': TypeInfo(TypeOf.Class, create:() => ApiServiceRequest()), 'IServiceRequest': TypeInfo(TypeOf.Interface), 'IHasApiKey': TypeInfo(TypeOf.Interface), 'ILogRequest': TypeInfo(TypeOf.Interface), 'Coordinate': TypeInfo(TypeOf.Class, create:() => Coordinate()), 'ApiServiceResponse': TypeInfo(TypeOf.Class, create:() => ApiServiceResponse()), 'CalculateDistanceResponse': TypeInfo(TypeOf.Class, create:() => CalculateDistanceResponse()), 'CalculateDistance': TypeInfo(TypeOf.Class, create:() => CalculateDistance()), 'List': TypeInfo(TypeOf.Class, create:() => []), });