Schedule.fromJson constructor

Schedule.fromJson(
  1. Object? j
)

Implementation

factory Schedule.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return Schedule(
    cron: switch (json['cron']) {
      null => null,
      Object $1 => decodeString($1),
    },
    createPipelineJobRequest: switch (json['createPipelineJobRequest']) {
      null => null,
      Object $1 => CreatePipelineJobRequest.fromJson($1),
    },
    createModelMonitoringJobRequest:
        switch (json['createModelMonitoringJobRequest']) {
          null => null,
          Object $1 => CreateModelMonitoringJobRequest.fromJson($1),
        },
    createNotebookExecutionJobRequest:
        switch (json['createNotebookExecutionJobRequest']) {
          null => null,
          Object $1 => CreateNotebookExecutionJobRequest.fromJson($1),
        },
    name: switch (json['name']) {
      null => '',
      Object $1 => decodeString($1),
    },
    displayName: switch (json['displayName']) {
      null => '',
      Object $1 => decodeString($1),
    },
    startTime: switch (json['startTime']) {
      null => null,
      Object $1 => protobuf.Timestamp.fromJson($1),
    },
    endTime: switch (json['endTime']) {
      null => null,
      Object $1 => protobuf.Timestamp.fromJson($1),
    },
    maxRunCount: switch (json['maxRunCount']) {
      null => 0,
      Object $1 => decodeInt64($1),
    },
    startedRunCount: switch (json['startedRunCount']) {
      null => 0,
      Object $1 => decodeInt64($1),
    },
    state: switch (json['state']) {
      null => Schedule_State.$default,
      Object $1 => Schedule_State.fromJson($1),
    },
    createTime: switch (json['createTime']) {
      null => null,
      Object $1 => protobuf.Timestamp.fromJson($1),
    },
    updateTime: switch (json['updateTime']) {
      null => null,
      Object $1 => protobuf.Timestamp.fromJson($1),
    },
    nextRunTime: switch (json['nextRunTime']) {
      null => null,
      Object $1 => protobuf.Timestamp.fromJson($1),
    },
    lastPauseTime: switch (json['lastPauseTime']) {
      null => null,
      Object $1 => protobuf.Timestamp.fromJson($1),
    },
    lastResumeTime: switch (json['lastResumeTime']) {
      null => null,
      Object $1 => protobuf.Timestamp.fromJson($1),
    },
    maxConcurrentRunCount: switch (json['maxConcurrentRunCount']) {
      null => 0,
      Object $1 => decodeInt64($1),
    },
    allowQueueing: switch (json['allowQueueing']) {
      null => false,
      Object $1 => decodeBool($1),
    },
    catchUp: switch (json['catchUp']) {
      null => false,
      Object $1 => decodeBool($1),
    },
    lastScheduledRunResponse: switch (json['lastScheduledRunResponse']) {
      null => null,
      Object $1 => Schedule_RunResponse.fromJson($1),
    },
  );
}