Files
sdk/lib/model/connection.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

484 lines
18 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 Connection {
/// Returns a new [Connection] instance.
Connection({
this.clientIp,
this.clientIpDesc,
this.code,
this.commandCount,
this.connectionId,
this.createdTime,
this.creator,
this.endTime,
this.height,
this.message,
this.mode,
this.name,
this.node,
this.operations = const [],
this.owner,
this.protocol,
this.recording,
this.reviewed,
this.startTime,
this.status,
this.userAgent,
this.userAgentDesc,
this.width,
});
///
/// 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? clientIp;
///
/// 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? clientIpDesc;
///
/// 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? code;
///
/// 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? commandCount;
///
/// 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? connectionId;
///
/// 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? creator;
///
/// 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? endTime;
///
/// 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? height;
///
/// 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.
///
String? mode;
///
/// 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? node;
List<String> operations;
///
/// 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? protocol;
///
/// 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? recording;
///
/// 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? reviewed;
///
/// 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? startTime;
///
/// 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? userAgent;
///
/// 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? userAgentDesc;
///
/// 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? width;
@override
bool operator ==(Object other) => identical(this, other) || other is Connection &&
other.clientIp == clientIp &&
other.clientIpDesc == clientIpDesc &&
other.code == code &&
other.commandCount == commandCount &&
other.connectionId == connectionId &&
other.createdTime == createdTime &&
other.creator == creator &&
other.endTime == endTime &&
other.height == height &&
other.message == message &&
other.mode == mode &&
other.name == name &&
other.node == node &&
_deepEquality.equals(other.operations, operations) &&
other.owner == owner &&
other.protocol == protocol &&
other.recording == recording &&
other.reviewed == reviewed &&
other.startTime == startTime &&
other.status == status &&
other.userAgent == userAgent &&
other.userAgentDesc == userAgentDesc &&
other.width == width;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(clientIp == null ? 0 : clientIp!.hashCode) +
(clientIpDesc == null ? 0 : clientIpDesc!.hashCode) +
(code == null ? 0 : code!.hashCode) +
(commandCount == null ? 0 : commandCount!.hashCode) +
(connectionId == null ? 0 : connectionId!.hashCode) +
(createdTime == null ? 0 : createdTime!.hashCode) +
(creator == null ? 0 : creator!.hashCode) +
(endTime == null ? 0 : endTime!.hashCode) +
(height == null ? 0 : height!.hashCode) +
(message == null ? 0 : message!.hashCode) +
(mode == null ? 0 : mode!.hashCode) +
(name == null ? 0 : name!.hashCode) +
(node == null ? 0 : node!.hashCode) +
(operations.hashCode) +
(owner == null ? 0 : owner!.hashCode) +
(protocol == null ? 0 : protocol!.hashCode) +
(recording == null ? 0 : recording!.hashCode) +
(reviewed == null ? 0 : reviewed!.hashCode) +
(startTime == null ? 0 : startTime!.hashCode) +
(status == null ? 0 : status!.hashCode) +
(userAgent == null ? 0 : userAgent!.hashCode) +
(userAgentDesc == null ? 0 : userAgentDesc!.hashCode) +
(width == null ? 0 : width!.hashCode);
@override
String toString() => 'Connection[clientIp=$clientIp, clientIpDesc=$clientIpDesc, code=$code, commandCount=$commandCount, connectionId=$connectionId, createdTime=$createdTime, creator=$creator, endTime=$endTime, height=$height, message=$message, mode=$mode, name=$name, node=$node, operations=$operations, owner=$owner, protocol=$protocol, recording=$recording, reviewed=$reviewed, startTime=$startTime, status=$status, userAgent=$userAgent, userAgentDesc=$userAgentDesc, width=$width]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (this.clientIp != null) {
json[r'clientIp'] = this.clientIp;
} else {
json[r'clientIp'] = null;
}
if (this.clientIpDesc != null) {
json[r'clientIpDesc'] = this.clientIpDesc;
} else {
json[r'clientIpDesc'] = null;
}
if (this.code != null) {
json[r'code'] = this.code;
} else {
json[r'code'] = null;
}
if (this.commandCount != null) {
json[r'commandCount'] = this.commandCount;
} else {
json[r'commandCount'] = null;
}
if (this.connectionId != null) {
json[r'connectionId'] = this.connectionId;
} else {
json[r'connectionId'] = null;
}
if (this.createdTime != null) {
json[r'createdTime'] = this.createdTime;
} else {
json[r'createdTime'] = null;
}
if (this.creator != null) {
json[r'creator'] = this.creator;
} else {
json[r'creator'] = null;
}
if (this.endTime != null) {
json[r'endTime'] = this.endTime;
} else {
json[r'endTime'] = null;
}
if (this.height != null) {
json[r'height'] = this.height;
} else {
json[r'height'] = null;
}
if (this.message != null) {
json[r'message'] = this.message;
} else {
json[r'message'] = null;
}
if (this.mode != null) {
json[r'mode'] = this.mode;
} else {
json[r'mode'] = null;
}
if (this.name != null) {
json[r'name'] = this.name;
} else {
json[r'name'] = null;
}
if (this.node != null) {
json[r'node'] = this.node;
} else {
json[r'node'] = null;
}
json[r'operations'] = this.operations;
if (this.owner != null) {
json[r'owner'] = this.owner;
} else {
json[r'owner'] = null;
}
if (this.protocol != null) {
json[r'protocol'] = this.protocol;
} else {
json[r'protocol'] = null;
}
if (this.recording != null) {
json[r'recording'] = this.recording;
} else {
json[r'recording'] = null;
}
if (this.reviewed != null) {
json[r'reviewed'] = this.reviewed;
} else {
json[r'reviewed'] = null;
}
if (this.startTime != null) {
json[r'startTime'] = this.startTime;
} else {
json[r'startTime'] = null;
}
if (this.status != null) {
json[r'status'] = this.status;
} else {
json[r'status'] = null;
}
if (this.userAgent != null) {
json[r'userAgent'] = this.userAgent;
} else {
json[r'userAgent'] = null;
}
if (this.userAgentDesc != null) {
json[r'userAgentDesc'] = this.userAgentDesc;
} else {
json[r'userAgentDesc'] = null;
}
if (this.width != null) {
json[r'width'] = this.width;
} else {
json[r'width'] = null;
}
return json;
}
/// Returns a new [Connection] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static Connection? 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 "Connection[$key]" is missing from JSON.');
assert(json[key] != null, 'Required key "Connection[$key]" has a null value in JSON.');
});
return true;
}());
return Connection(
clientIp: mapValueOfType<String>(json, r'clientIp'),
clientIpDesc: mapValueOfType<String>(json, r'clientIpDesc'),
code: mapValueOfType<int>(json, r'code'),
commandCount: mapValueOfType<int>(json, r'commandCount'),
connectionId: mapValueOfType<String>(json, r'connectionId'),
createdTime: mapValueOfType<String>(json, r'createdTime'),
creator: mapValueOfType<String>(json, r'creator'),
endTime: mapValueOfType<String>(json, r'endTime'),
height: mapValueOfType<int>(json, r'height'),
message: mapValueOfType<String>(json, r'message'),
mode: mapValueOfType<String>(json, r'mode'),
name: mapValueOfType<String>(json, r'name'),
node: mapValueOfType<String>(json, r'node'),
operations: json[r'operations'] is Iterable
? (json[r'operations'] as Iterable).cast<String>().toList(growable: false)
: const [],
owner: mapValueOfType<String>(json, r'owner'),
protocol: mapValueOfType<String>(json, r'protocol'),
recording: mapValueOfType<String>(json, r'recording'),
reviewed: mapValueOfType<bool>(json, r'reviewed'),
startTime: mapValueOfType<String>(json, r'startTime'),
status: mapValueOfType<String>(json, r'status'),
userAgent: mapValueOfType<String>(json, r'userAgent'),
userAgentDesc: mapValueOfType<String>(json, r'userAgentDesc'),
width: mapValueOfType<int>(json, r'width'),
);
}
return null;
}
static List<Connection> listFromJson(dynamic json, {bool growable = false,}) {
final result = <Connection>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = Connection.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, Connection> mapFromJson(dynamic json) {
final map = <String, Connection>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = Connection.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of Connection-objects as value to a dart map
static Map<String, List<Connection>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<Connection>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = Connection.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
};
}