toJson method
Implementation
@override
Object toJson() => {
if (name.isNotDefault) 'name': name,
'displayName': displayName,
if (description.isNotDefault) 'description': description,
if (metadataSchemaUri.isNotDefault) 'metadataSchemaUri': metadataSchemaUri,
if (metadata case final $1?) 'metadata': $1.toJson(),
if (deployedIndexes.isNotDefault)
'deployedIndexes': [for (final i in deployedIndexes) i.toJson()],
if (etag.isNotDefault) 'etag': etag,
if (labels.isNotDefault) 'labels': labels,
'createTime': ?createTime?.toJson(),
'updateTime': ?updateTime?.toJson(),
'indexStats': ?indexStats?.toJson(),
if (indexUpdateMethod.isNotDefault)
'indexUpdateMethod': indexUpdateMethod.toJson(),
'encryptionSpec': ?encryptionSpec?.toJson(),
if (satisfiesPzs.isNotDefault) 'satisfiesPzs': satisfiesPzs,
if (satisfiesPzi.isNotDefault) 'satisfiesPzi': satisfiesPzi,
};