sfgboxapi

<back to all web services

TenantsAutoQueryAdd

import 'package:servicestack/servicestack.dart';

class Tenants implements IConvertible
{
    // @DataMember(Order=1)
    // @required()
    int? id;

    // @DataMember(Order=2)
    // @required()
    // @References(typeof(Zones))
    int? mainZonesId;

    // @DataMember(Order=3)
    bool? isPublic;

    Tenants({this.id,this.mainZonesId,this.isPublic});
    Tenants.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        mainZonesId = json['mainZonesId'];
        isPublic = json['isPublic'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'mainZonesId': mainZonesId,
        'isPublic': isPublic
    };

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

class TenantsAutoQueryAdd implements ICreateDb<Tenants>, IConvertible
{
    // @DataMember(Order=2)
    int? mainZonesId;

    // @DataMember(Order=4)
    ResponseStatus? responseStatus;

    TenantsAutoQueryAdd({this.mainZonesId,this.responseStatus});
    TenantsAutoQueryAdd.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        mainZonesId = json['mainZonesId'];
        responseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'mainZonesId': mainZonesId,
        'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!)
    };

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

TypeContext _ctx = TypeContext(library: 'api_stage.smartfarmertech.com', types: <String, TypeInfo> {
    'Tenants': TypeInfo(TypeOf.Class, create:() => Tenants()),
    'TenantsAutoQueryAdd': TypeInfo(TypeOf.Class, create:() => TenantsAutoQueryAdd()),
});

Dart TenantsAutoQueryAdd DTOs

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

HTTP + OTHER

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

POST /jsonl/reply/TenantsAutoQueryAdd HTTP/1.1 
Host: api-stage.smartfarmertech.com 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"mainZonesId":0,"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"id":0,"mainZonesId":0,"isPublic":false}