toJson method

  1. @override
Object toJson()
override

Implementation

@override
Object toJson() {
  return {
    if (name.isNotDefault) 'name': name,
    'displayName': displayName,
    if (description.isNotDefault) 'description': description,
    if (spec != null) 'spec': spec!.toJson(),
    if (createTime != null) 'createTime': createTime!.toJson(),
    if (updateTime != null) 'updateTime': updateTime!.toJson(),
    if (etag.isNotDefault) 'etag': etag,
    if (contextSpec != null) 'contextSpec': contextSpec!.toJson(),
    if (encryptionSpec != null) 'encryptionSpec': encryptionSpec!.toJson(),
    if (labels.isNotDefault) 'labels': labels,
  };
}