toJson method

  1. @override
Object toJson()
override

Implementation

@override
Object toJson() => {
  if (persistentResourceId.isNotDefault)
    'persistentResourceId': persistentResourceId,
  'workerPoolSpecs': encodeList(workerPoolSpecs),
  if (scheduling != null) 'scheduling': scheduling!.toJson(),
  if (serviceAccount.isNotDefault) 'serviceAccount': serviceAccount,
  if (network.isNotDefault) 'network': network,
  if (reservedIpRanges.isNotDefault) 'reservedIpRanges': reservedIpRanges,
  if (pscInterfaceConfig != null)
    'pscInterfaceConfig': pscInterfaceConfig!.toJson(),
  if (baseOutputDirectory != null)
    'baseOutputDirectory': baseOutputDirectory!.toJson(),
  if (protectedArtifactLocationId.isNotDefault)
    'protectedArtifactLocationId': protectedArtifactLocationId,
  if (tensorboard.isNotDefault) 'tensorboard': tensorboard,
  if (enableWebAccess.isNotDefault) 'enableWebAccess': enableWebAccess,
  if (enableDashboardAccess.isNotDefault)
    'enableDashboardAccess': enableDashboardAccess,
  if (experiment.isNotDefault) 'experiment': experiment,
  if (experimentRun.isNotDefault) 'experimentRun': experimentRun,
  if (models.isNotDefault) 'models': models,
};