toJson method

  1. @override
Object toJson()
override

Implementation

@override
Object toJson() {
  return {
    if (dedicatedResources != null)
      'dedicatedResources': dedicatedResources!.toJson(),
    if (automaticResources != null)
      'automaticResources': automaticResources!.toJson(),
    if (sharedResources != null) 'sharedResources': sharedResources,
    if (id.isNotDefault) 'id': id,
    if (model.isNotDefault) 'model': model,
    if (modelVersionId.isNotDefault) 'modelVersionId': modelVersionId,
    if (displayName.isNotDefault) 'displayName': displayName,
    if (createTime != null) 'createTime': createTime!.toJson(),
    if (explanationSpec != null) '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 != null)
      'privateEndpoints': privateEndpoints!.toJson(),
    if (fasterDeploymentConfig != null)
      'fasterDeploymentConfig': fasterDeploymentConfig!.toJson(),
    if (rolloutOptions != null) 'rolloutOptions': rolloutOptions!.toJson(),
    if (status != null) 'status': status!.toJson(),
    if (systemLabels.isNotDefault) 'systemLabels': systemLabels,
    if (checkpointId.isNotDefault) 'checkpointId': checkpointId,
    if (speculativeDecodingSpec != null)
      'speculativeDecodingSpec': speculativeDecodingSpec!.toJson(),
  };
}