toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
    json[r'id'] = this.id;
    json[r'userId'] = this.userId;
    json[r'basicAuth'] = this.basicAuth;
  if (this.name != null) {
    json[r'name'] = this.name;
  } else {
    json[r'name'] = null;
  }
  if (this.phoneId != null) {
    json[r'phoneId'] = this.phoneId;
  } else {
    json[r'phoneId'] = null;
  }
  if (this.inboxId != null) {
    json[r'inboxId'] = this.inboxId;
  } else {
    json[r'inboxId'] = null;
  }
  if (this.requestBodyTemplate != null) {
    json[r'requestBodyTemplate'] = this.requestBodyTemplate;
  } else {
    json[r'requestBodyTemplate'] = null;
  }
    json[r'url'] = this.url;
    json[r'method'] = this.method;
    json[r'payloadJsonSchema'] = this.payloadJsonSchema;
  if (this.createdAt != null) {
    json[r'createdAt'] = this.createdAt!.toUtc().toIso8601String();
  } else {
    json[r'createdAt'] = null;
  }
    json[r'updatedAt'] = this.updatedAt.toUtc().toIso8601String();
  if (this.eventName != null) {
    json[r'eventName'] = this.eventName;
  } else {
    json[r'eventName'] = null;
  }
  if (this.requestHeaders != null) {
    json[r'requestHeaders'] = this.requestHeaders;
  } else {
    json[r'requestHeaders'] = null;
  }
  if (this.ignoreInsecureSslCertificates != null) {
    json[r'ignoreInsecureSslCertificates'] = this.ignoreInsecureSslCertificates;
  } else {
    json[r'ignoreInsecureSslCertificates'] = null;
  }
  if (this.useStaticIpRange != null) {
    json[r'useStaticIpRange'] = this.useStaticIpRange;
  } else {
    json[r'useStaticIpRange'] = null;
  }
  return json;
}