feat(web,server)!: configure machine learning via the UI (#3768)

This commit is contained in:
Jason Rasmussen 2023-08-25 00:15:03 -04:00 committed by GitHub
parent 2cccef174a
commit 8211afb726
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
52 changed files with 831 additions and 649 deletions

View file

@ -13,14 +13,19 @@ part of openapi.api;
class ServerFeaturesDto {
/// Returns a new [ServerFeaturesDto] instance.
ServerFeaturesDto({
required this.machineLearning,
required this.clipEncode,
required this.facialRecognition,
required this.oauth,
required this.oauthAutoLaunch,
required this.passwordLogin,
required this.search,
required this.sidecar,
required this.tagImage,
});
bool machineLearning;
bool clipEncode;
bool facialRecognition;
bool oauth;
@ -30,33 +35,46 @@ class ServerFeaturesDto {
bool search;
bool sidecar;
bool tagImage;
@override
bool operator ==(Object other) => identical(this, other) || other is ServerFeaturesDto &&
other.machineLearning == machineLearning &&
other.clipEncode == clipEncode &&
other.facialRecognition == facialRecognition &&
other.oauth == oauth &&
other.oauthAutoLaunch == oauthAutoLaunch &&
other.passwordLogin == passwordLogin &&
other.search == search;
other.search == search &&
other.sidecar == sidecar &&
other.tagImage == tagImage;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(machineLearning.hashCode) +
(clipEncode.hashCode) +
(facialRecognition.hashCode) +
(oauth.hashCode) +
(oauthAutoLaunch.hashCode) +
(passwordLogin.hashCode) +
(search.hashCode);
(search.hashCode) +
(sidecar.hashCode) +
(tagImage.hashCode);
@override
String toString() => 'ServerFeaturesDto[machineLearning=$machineLearning, oauth=$oauth, oauthAutoLaunch=$oauthAutoLaunch, passwordLogin=$passwordLogin, search=$search]';
String toString() => 'ServerFeaturesDto[clipEncode=$clipEncode, facialRecognition=$facialRecognition, oauth=$oauth, oauthAutoLaunch=$oauthAutoLaunch, passwordLogin=$passwordLogin, search=$search, sidecar=$sidecar, tagImage=$tagImage]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'machineLearning'] = this.machineLearning;
json[r'clipEncode'] = this.clipEncode;
json[r'facialRecognition'] = this.facialRecognition;
json[r'oauth'] = this.oauth;
json[r'oauthAutoLaunch'] = this.oauthAutoLaunch;
json[r'passwordLogin'] = this.passwordLogin;
json[r'search'] = this.search;
json[r'sidecar'] = this.sidecar;
json[r'tagImage'] = this.tagImage;
return json;
}
@ -68,11 +86,14 @@ class ServerFeaturesDto {
final json = value.cast<String, dynamic>();
return ServerFeaturesDto(
machineLearning: mapValueOfType<bool>(json, r'machineLearning')!,
clipEncode: mapValueOfType<bool>(json, r'clipEncode')!,
facialRecognition: mapValueOfType<bool>(json, r'facialRecognition')!,
oauth: mapValueOfType<bool>(json, r'oauth')!,
oauthAutoLaunch: mapValueOfType<bool>(json, r'oauthAutoLaunch')!,
passwordLogin: mapValueOfType<bool>(json, r'passwordLogin')!,
search: mapValueOfType<bool>(json, r'search')!,
sidecar: mapValueOfType<bool>(json, r'sidecar')!,
tagImage: mapValueOfType<bool>(json, r'tagImage')!,
);
}
return null;
@ -120,11 +141,14 @@ class ServerFeaturesDto {
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'machineLearning',
'clipEncode',
'facialRecognition',
'oauth',
'oauthAutoLaunch',
'passwordLogin',
'search',
'sidecar',
'tagImage',
};
}