Files
sdk/lib/model/finetune_job.dart
zeekay f06a939f82 Regenerate: the AI surface says what it answers
288 of hanzoai/ai's 294 operations now declare a response, against 1 before.
GET /v1/models, POST /v1/chat/completions, /v1/embeddings, /v1/messages —
every address a client actually calls — used to reach this client untyped,
because cloud's relay carried an operation's sentence and dropped the shapes
it named. It carries both now.

Fleet-wide the document goes from 69% to 81% of operations declaring what
comes back, which is where the ~208 new models here come from.
2026-08-28 15:52:12 -07:00

611 lines
23 KiB
Dart

//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of hanzoai.cloud;
class FinetuneJob {
/// Returns a new [FinetuneJob] instance.
FinetuneJob({
this.baseModel,
this.costCents,
this.crName,
this.createdBy,
this.createdTime,
this.dataset,
this.deployUrl,
this.deployedModel,
this.displayName,
this.error,
this.finishedTime,
this.gpuCount,
this.gpuSeconds,
this.gpuType,
this.hyperparams,
this.message,
this.metered,
this.method,
this.name,
this.namespace,
this.numNodes,
this.outputUri,
this.owner,
this.preset,
this.progress,
this.runtime,
this.startedTime,
this.status,
this.task,
this.updatedTime,
});
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
String? baseModel;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
int? costCents;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
String? crName;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
String? createdBy;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
String? createdTime;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
String? dataset;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
String? deployUrl;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
String? deployedModel;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
String? displayName;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
String? error;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
String? finishedTime;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
int? gpuCount;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
int? gpuSeconds;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
String? gpuType;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
String? hyperparams;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
String? message;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
bool? metered;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
String? method;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
String? name;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
String? namespace;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
int? numNodes;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
String? outputUri;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
String? owner;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
String? preset;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
int? progress;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
String? runtime;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
String? startedTime;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
String? status;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
String? task;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
String? updatedTime;
@override
bool operator ==(Object other) => identical(this, other) || other is FinetuneJob &&
other.baseModel == baseModel &&
other.costCents == costCents &&
other.crName == crName &&
other.createdBy == createdBy &&
other.createdTime == createdTime &&
other.dataset == dataset &&
other.deployUrl == deployUrl &&
other.deployedModel == deployedModel &&
other.displayName == displayName &&
other.error == error &&
other.finishedTime == finishedTime &&
other.gpuCount == gpuCount &&
other.gpuSeconds == gpuSeconds &&
other.gpuType == gpuType &&
other.hyperparams == hyperparams &&
other.message == message &&
other.metered == metered &&
other.method == method &&
other.name == name &&
other.namespace == namespace &&
other.numNodes == numNodes &&
other.outputUri == outputUri &&
other.owner == owner &&
other.preset == preset &&
other.progress == progress &&
other.runtime == runtime &&
other.startedTime == startedTime &&
other.status == status &&
other.task == task &&
other.updatedTime == updatedTime;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(baseModel == null ? 0 : baseModel!.hashCode) +
(costCents == null ? 0 : costCents!.hashCode) +
(crName == null ? 0 : crName!.hashCode) +
(createdBy == null ? 0 : createdBy!.hashCode) +
(createdTime == null ? 0 : createdTime!.hashCode) +
(dataset == null ? 0 : dataset!.hashCode) +
(deployUrl == null ? 0 : deployUrl!.hashCode) +
(deployedModel == null ? 0 : deployedModel!.hashCode) +
(displayName == null ? 0 : displayName!.hashCode) +
(error == null ? 0 : error!.hashCode) +
(finishedTime == null ? 0 : finishedTime!.hashCode) +
(gpuCount == null ? 0 : gpuCount!.hashCode) +
(gpuSeconds == null ? 0 : gpuSeconds!.hashCode) +
(gpuType == null ? 0 : gpuType!.hashCode) +
(hyperparams == null ? 0 : hyperparams!.hashCode) +
(message == null ? 0 : message!.hashCode) +
(metered == null ? 0 : metered!.hashCode) +
(method == null ? 0 : method!.hashCode) +
(name == null ? 0 : name!.hashCode) +
(namespace == null ? 0 : namespace!.hashCode) +
(numNodes == null ? 0 : numNodes!.hashCode) +
(outputUri == null ? 0 : outputUri!.hashCode) +
(owner == null ? 0 : owner!.hashCode) +
(preset == null ? 0 : preset!.hashCode) +
(progress == null ? 0 : progress!.hashCode) +
(runtime == null ? 0 : runtime!.hashCode) +
(startedTime == null ? 0 : startedTime!.hashCode) +
(status == null ? 0 : status!.hashCode) +
(task == null ? 0 : task!.hashCode) +
(updatedTime == null ? 0 : updatedTime!.hashCode);
@override
String toString() => 'FinetuneJob[baseModel=$baseModel, costCents=$costCents, crName=$crName, createdBy=$createdBy, createdTime=$createdTime, dataset=$dataset, deployUrl=$deployUrl, deployedModel=$deployedModel, displayName=$displayName, error=$error, finishedTime=$finishedTime, gpuCount=$gpuCount, gpuSeconds=$gpuSeconds, gpuType=$gpuType, hyperparams=$hyperparams, message=$message, metered=$metered, method=$method, name=$name, namespace=$namespace, numNodes=$numNodes, outputUri=$outputUri, owner=$owner, preset=$preset, progress=$progress, runtime=$runtime, startedTime=$startedTime, status=$status, task=$task, updatedTime=$updatedTime]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (this.baseModel != null) {
json[r'baseModel'] = this.baseModel;
} else {
json[r'baseModel'] = null;
}
if (this.costCents != null) {
json[r'costCents'] = this.costCents;
} else {
json[r'costCents'] = null;
}
if (this.crName != null) {
json[r'crName'] = this.crName;
} else {
json[r'crName'] = null;
}
if (this.createdBy != null) {
json[r'createdBy'] = this.createdBy;
} else {
json[r'createdBy'] = null;
}
if (this.createdTime != null) {
json[r'createdTime'] = this.createdTime;
} else {
json[r'createdTime'] = null;
}
if (this.dataset != null) {
json[r'dataset'] = this.dataset;
} else {
json[r'dataset'] = null;
}
if (this.deployUrl != null) {
json[r'deployUrl'] = this.deployUrl;
} else {
json[r'deployUrl'] = null;
}
if (this.deployedModel != null) {
json[r'deployedModel'] = this.deployedModel;
} else {
json[r'deployedModel'] = null;
}
if (this.displayName != null) {
json[r'displayName'] = this.displayName;
} else {
json[r'displayName'] = null;
}
if (this.error != null) {
json[r'error'] = this.error;
} else {
json[r'error'] = null;
}
if (this.finishedTime != null) {
json[r'finishedTime'] = this.finishedTime;
} else {
json[r'finishedTime'] = null;
}
if (this.gpuCount != null) {
json[r'gpuCount'] = this.gpuCount;
} else {
json[r'gpuCount'] = null;
}
if (this.gpuSeconds != null) {
json[r'gpuSeconds'] = this.gpuSeconds;
} else {
json[r'gpuSeconds'] = null;
}
if (this.gpuType != null) {
json[r'gpuType'] = this.gpuType;
} else {
json[r'gpuType'] = null;
}
if (this.hyperparams != null) {
json[r'hyperparams'] = this.hyperparams;
} else {
json[r'hyperparams'] = null;
}
if (this.message != null) {
json[r'message'] = this.message;
} else {
json[r'message'] = null;
}
if (this.metered != null) {
json[r'metered'] = this.metered;
} else {
json[r'metered'] = null;
}
if (this.method != null) {
json[r'method'] = this.method;
} else {
json[r'method'] = null;
}
if (this.name != null) {
json[r'name'] = this.name;
} else {
json[r'name'] = null;
}
if (this.namespace != null) {
json[r'namespace'] = this.namespace;
} else {
json[r'namespace'] = null;
}
if (this.numNodes != null) {
json[r'numNodes'] = this.numNodes;
} else {
json[r'numNodes'] = null;
}
if (this.outputUri != null) {
json[r'outputUri'] = this.outputUri;
} else {
json[r'outputUri'] = null;
}
if (this.owner != null) {
json[r'owner'] = this.owner;
} else {
json[r'owner'] = null;
}
if (this.preset != null) {
json[r'preset'] = this.preset;
} else {
json[r'preset'] = null;
}
if (this.progress != null) {
json[r'progress'] = this.progress;
} else {
json[r'progress'] = null;
}
if (this.runtime != null) {
json[r'runtime'] = this.runtime;
} else {
json[r'runtime'] = null;
}
if (this.startedTime != null) {
json[r'startedTime'] = this.startedTime;
} else {
json[r'startedTime'] = null;
}
if (this.status != null) {
json[r'status'] = this.status;
} else {
json[r'status'] = null;
}
if (this.task != null) {
json[r'task'] = this.task;
} else {
json[r'task'] = null;
}
if (this.updatedTime != null) {
json[r'updatedTime'] = this.updatedTime;
} else {
json[r'updatedTime'] = null;
}
return json;
}
/// Returns a new [FinetuneJob] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static FinetuneJob? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
requiredKeys.forEach((key) {
assert(json.containsKey(key), 'Required key "FinetuneJob[$key]" is missing from JSON.');
assert(json[key] != null, 'Required key "FinetuneJob[$key]" has a null value in JSON.');
});
return true;
}());
return FinetuneJob(
baseModel: mapValueOfType<String>(json, r'baseModel'),
costCents: mapValueOfType<int>(json, r'costCents'),
crName: mapValueOfType<String>(json, r'crName'),
createdBy: mapValueOfType<String>(json, r'createdBy'),
createdTime: mapValueOfType<String>(json, r'createdTime'),
dataset: mapValueOfType<String>(json, r'dataset'),
deployUrl: mapValueOfType<String>(json, r'deployUrl'),
deployedModel: mapValueOfType<String>(json, r'deployedModel'),
displayName: mapValueOfType<String>(json, r'displayName'),
error: mapValueOfType<String>(json, r'error'),
finishedTime: mapValueOfType<String>(json, r'finishedTime'),
gpuCount: mapValueOfType<int>(json, r'gpuCount'),
gpuSeconds: mapValueOfType<int>(json, r'gpuSeconds'),
gpuType: mapValueOfType<String>(json, r'gpuType'),
hyperparams: mapValueOfType<String>(json, r'hyperparams'),
message: mapValueOfType<String>(json, r'message'),
metered: mapValueOfType<bool>(json, r'metered'),
method: mapValueOfType<String>(json, r'method'),
name: mapValueOfType<String>(json, r'name'),
namespace: mapValueOfType<String>(json, r'namespace'),
numNodes: mapValueOfType<int>(json, r'numNodes'),
outputUri: mapValueOfType<String>(json, r'outputUri'),
owner: mapValueOfType<String>(json, r'owner'),
preset: mapValueOfType<String>(json, r'preset'),
progress: mapValueOfType<int>(json, r'progress'),
runtime: mapValueOfType<String>(json, r'runtime'),
startedTime: mapValueOfType<String>(json, r'startedTime'),
status: mapValueOfType<String>(json, r'status'),
task: mapValueOfType<String>(json, r'task'),
updatedTime: mapValueOfType<String>(json, r'updatedTime'),
);
}
return null;
}
static List<FinetuneJob> listFromJson(dynamic json, {bool growable = false,}) {
final result = <FinetuneJob>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = FinetuneJob.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, FinetuneJob> mapFromJson(dynamic json) {
final map = <String, FinetuneJob>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = FinetuneJob.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of FinetuneJob-objects as value to a dart map
static Map<String, List<FinetuneJob>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<FinetuneJob>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = FinetuneJob.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
};
}