Power.Dev Hangfire Services

<back to all web services

ProductioDataSyncRequest

The following routes are available for this service:
POST/production-data-sync
import 'package:servicestack/servicestack.dart';

enum ProductionSourceType
{
    undefined,
    Solar,
    Wind,
    Hybrid,
}

class ProductioDataSyncRequest implements IConvertible
{
    int? coordId;
    ProductionSourceType? sourceType;
    int? month;

    ProductioDataSyncRequest({this.coordId,this.sourceType,this.month});
    ProductioDataSyncRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        coordId = json['coordId'];
        sourceType = JsonConverters.fromJson(json['sourceType'],'ProductionSourceType',context!);
        month = json['month'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'coordId': coordId,
        'sourceType': JsonConverters.toJson(sourceType,'ProductionSourceType',context!),
        'month': month
    };

    getTypeName() => "ProductioDataSyncRequest";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'catalog_jobs_dev.power.dev', types: <String, TypeInfo> {
    'ProductionSourceType': TypeInfo(TypeOf.Enum, enumValues:ProductionSourceType.values),
    'ProductioDataSyncRequest': TypeInfo(TypeOf.Class, create:() => ProductioDataSyncRequest()),
});

Dart ProductioDataSyncRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /production-data-sync HTTP/1.1 
Host: catalog-jobs-dev.power.dev 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<ProductioDataSyncRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/powerDev.ISO.ServiceModels">
  <CoordId>0</CoordId>
  <Month>0</Month>
  <SourceType>undefined</SourceType>
</ProductioDataSyncRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<z:anyType xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/" />