toJson method
Implementation
@override
Object toJson() {
return {
'name': name,
if (description.isNotDefault) 'description': description,
'filter': filter,
if (bucketName.isNotDefault) 'bucketName': bucketName,
if (disabled.isNotDefault) 'disabled': disabled,
if (metricDescriptor != null)
'metricDescriptor': metricDescriptor!.toJson(),
if (valueExtractor.isNotDefault) 'valueExtractor': valueExtractor,
if (labelExtractors.isNotDefault) 'labelExtractors': labelExtractors,
if (bucketOptions != null) 'bucketOptions': bucketOptions!.toJson(),
if (createTime != null) 'createTime': createTime!.toJson(),
if (updateTime != null) 'updateTime': updateTime!.toJson(),
if (version.isNotDefault) 'version': version.toJson(),
};
}