toJson method

  1. @override
Object toJson()
override

Implementation

@override
Object toJson() => {
  if (name.isNotDefault) 'name': name,
  if (title.isNotDefault) 'title': title,
  if (producerProjectId.isNotDefault) 'producerProjectId': producerProjectId,
  if (id.isNotDefault) 'id': id,
  if (apis.isNotDefault) 'apis': encodeList(apis),
  if (types.isNotDefault) 'types': encodeList(types),
  if (enums.isNotDefault) 'enums': encodeList(enums),
  if (documentation != null) 'documentation': documentation!.toJson(),
  if (backend != null) 'backend': backend!.toJson(),
  if (http != null) 'http': http!.toJson(),
  if (quota != null) 'quota': quota!.toJson(),
  if (authentication != null) 'authentication': authentication!.toJson(),
  if (context != null) 'context': context!.toJson(),
  if (usage != null) 'usage': usage!.toJson(),
  if (endpoints.isNotDefault) 'endpoints': encodeList(endpoints),
  if (control != null) 'control': control!.toJson(),
  if (logs.isNotDefault) 'logs': encodeList(logs),
  if (metrics.isNotDefault) 'metrics': encodeList(metrics),
  if (monitoredResources.isNotDefault)
    'monitoredResources': encodeList(monitoredResources),
  if (billing != null) 'billing': billing!.toJson(),
  if (logging != null) 'logging': logging!.toJson(),
  if (monitoring != null) 'monitoring': monitoring!.toJson(),
  if (systemParameters != null)
    'systemParameters': systemParameters!.toJson(),
  if (sourceInfo != null) 'sourceInfo': sourceInfo!.toJson(),
  if (publishing != null) 'publishing': publishing!.toJson(),
  if (configVersion != null) 'configVersion': configVersion!.toJson(),
};