toJson method

  1. @override
Object toJson()
override

Implementation

@override
Object toJson() => {
  if (dedicatedResources case final dedicatedResources?)
    'dedicatedResources': dedicatedResources.toJson(),
  if (automaticResources case final automaticResources?)
    'automaticResources': automaticResources.toJson(),
  if (sharedResources case final sharedResources?)
    'sharedResources': sharedResources,
  if (fullFineTunedResources case final fullFineTunedResources?)
    'fullFineTunedResources': fullFineTunedResources.toJson(),
  if (id.isNotDefault) 'id': id,
  if (model.isNotDefault) 'model': model,
  if (modelVersionId.isNotDefault) 'modelVersionId': modelVersionId,
  if (displayName.isNotDefault) 'displayName': displayName,
  if (createTime case final createTime?) 'createTime': createTime.toJson(),
  if (explanationSpec case final explanationSpec?)
    'explanationSpec': explanationSpec.toJson(),
  if (disableExplanations.isNotDefault)
    'disableExplanations': disableExplanations,
  if (serviceAccount.isNotDefault) 'serviceAccount': serviceAccount,
  if (enableContainerLogging.isNotDefault)
    'enableContainerLogging': enableContainerLogging,
  if (disableContainerLogging.isNotDefault)
    'disableContainerLogging': disableContainerLogging,
  if (enableAccessLogging.isNotDefault)
    'enableAccessLogging': enableAccessLogging,
  if (privateEndpoints case final privateEndpoints?)
    'privateEndpoints': privateEndpoints.toJson(),
  if (fasterDeploymentConfig case final fasterDeploymentConfig?)
    'fasterDeploymentConfig': fasterDeploymentConfig.toJson(),
  if (rolloutOptions case final rolloutOptions?)
    'rolloutOptions': rolloutOptions.toJson(),
  if (status case final status?) 'status': status.toJson(),
  if (systemLabels.isNotDefault) 'systemLabels': systemLabels,
  if (checkpointId.isNotDefault) 'checkpointId': checkpointId,
  if (speculativeDecodingSpec case final speculativeDecodingSpec?)
    'speculativeDecodingSpec': speculativeDecodingSpec.toJson(),
};