manager-app/manager_api_new/lib/model/instance_dto.dart
Thomas Fransolet c8947880ba Ecran VR, section Scene3D et medias immersifs
Canal VR
- L'entree VR affiche VrScreen au lieu de « non configuree » : sous-onglet
  Configuration (AppConfigurationLinkScreen reutilise) et sous-onglet Casques
  (pincode d'appairage, etat, batterie, version, dernier vu).
- Le dialogue de plan SuperAdmin porte aussi les canaux et les add-ons
  (assistant, contenu immersif). Activer un canal cree son
  ApplicationInstance s'il n'existe pas ; le desactiver ne supprime rien.

Medias immersifs
- Types Image360, Video360, Model3D : icones, libelles, extensions, apercu
  dans la Mediatheque et facettes.
- Au depot, la pastille de type bascule Image <-> Image 360 et
  Video <-> Video 360 : rien dans un .jpg ne dit qu'il est
  equirectangulaire. Un .glb est reconnu seul.
- ImageCompressor ne touche plus aux 360 ni aux GLB, sur les deux chemins
  d'upload : ramenee a 2560 px, une equirectangulaire devient illisible dans
  un casque.

Scene3D
- Nouveau type de section (famille des lieux) et son ecran de configuration :
  modele, mode objet/decor, points d'interet.
- Fond immersif d'une configuration, visible si l'instance a l'add-on : le
  type est deduit de la ressource choisie, avec une image de repli.

Client API edite a la main en miroir du backend : SectionScene3DApi,
Scene3DDTO, ImmersiveBackgroundDTO, Position3D, AppType sur les devices,
ResourceType etendu. Libelles FR/EN/NL.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-13 16:54:13 +02:00

472 lines
16 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 openapi.api;
class InstanceDTO {
/// Returns a new [InstanceDTO] instance.
InstanceDTO({
this.id,
this.name,
this.dateCreation,
this.pinCode,
this.isPushNotification,
this.isMobile,
this.isTablet,
this.isWeb,
this.isVR,
this.isAssistant,
this.hasImmersiveContent,
this.guideName,
this.guidePersonaPrompt,
this.guideVoiceId,
this.isVisitorQuestionCollectionEnabled,
this.guideFallbackMessages = const [],
this.subscriptionPlanId,
this.subscriptionPlan,
this.aiTokensThisMonth,
this.aiUsageMonthKey,
this.storageQuotaBytes,
this.aiTokensPerMonth,
this.hasStats,
this.statsHistoryDays,
this.hasAdvancedStats,
this.applicationInstanceDTOs = const [],
this.webSlug,
this.publicApiKey,
this.isTrialActive,
this.trialEndsAt,
});
String? id;
String? name;
DateTime? dateCreation;
String? pinCode;
///
/// 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? isPushNotification;
///
/// 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.
///
///
/// 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? isMobile;
///
/// 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? isTablet;
///
/// 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? isWeb;
///
/// 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? isVR;
bool? isAssistant;
/// Add-on « Contenu immersif » : image 360, video 360 et modeles 3D.
bool? hasImmersiveContent;
/// Nom du guide affiché au visiteur, libre.
String? guideName;
/// Personnalité du guide : instruction au modèle, jamais affichée au visiteur.
String? guidePersonaPrompt;
/// Voix Gemini TTS : "Sulafat" (Viva) ou "Umbriel" (Marco).
String? guideVoiceId;
/// Le client autorise-t-il l'enregistrement des questions de ses visiteurs ? (RGPD)
/// Couper la collecte n'efface rien : les questions déjà là vivent jusqu'à leur purge.
bool? isVisitorQuestionCollectionEnabled;
/// Formulations de repli. Liste à plat : plusieurs entrées peuvent partager la même langue.
List<TranslationDTO> guideFallbackMessages;
String? subscriptionPlanId;
SubscriptionPlanDTO? subscriptionPlan;
int? aiTokensThisMonth;
String? aiUsageMonthKey;
int? storageQuotaBytes;
int? aiTokensPerMonth;
bool? hasStats;
int? statsHistoryDays;
bool? hasAdvancedStats;
List<ApplicationInstanceDTO>? applicationInstanceDTOs;
String? webSlug;
String? publicApiKey;
bool? isTrialActive;
DateTime? trialEndsAt;
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is InstanceDTO &&
other.id == id &&
other.name == name &&
other.dateCreation == dateCreation &&
other.pinCode == pinCode &&
other.isPushNotification == isPushNotification &&
other.isMobile == isMobile &&
other.isTablet == isTablet &&
other.isWeb == isWeb &&
other.isVR == isVR &&
other.isAssistant == isAssistant &&
other.hasImmersiveContent == hasImmersiveContent &&
other.guideName == guideName &&
other.guidePersonaPrompt == guidePersonaPrompt &&
other.guideVoiceId == guideVoiceId &&
_deepEquality.equals(other.guideFallbackMessages, guideFallbackMessages) &&
other.subscriptionPlanId == subscriptionPlanId &&
other.subscriptionPlan == subscriptionPlan &&
other.aiTokensThisMonth == aiTokensThisMonth &&
other.aiUsageMonthKey == aiUsageMonthKey &&
other.storageQuotaBytes == storageQuotaBytes &&
other.aiTokensPerMonth == aiTokensPerMonth &&
other.hasStats == hasStats &&
other.statsHistoryDays == statsHistoryDays &&
other.hasAdvancedStats == hasAdvancedStats &&
_deepEquality.equals(
other.applicationInstanceDTOs, applicationInstanceDTOs);
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(id == null ? 0 : id!.hashCode) +
(name == null ? 0 : name!.hashCode) +
(dateCreation == null ? 0 : dateCreation!.hashCode) +
(pinCode == null ? 0 : pinCode!.hashCode) +
(isPushNotification == null ? 0 : isPushNotification!.hashCode) +
(isMobile == null ? 0 : isMobile!.hashCode) +
(isTablet == null ? 0 : isTablet!.hashCode) +
(isWeb == null ? 0 : isWeb!.hashCode) +
(isVR == null ? 0 : isVR!.hashCode) +
(isAssistant == null ? 0 : isAssistant!.hashCode) +
(hasImmersiveContent == null ? 0 : hasImmersiveContent!.hashCode) +
(guideName == null ? 0 : guideName!.hashCode) +
(guidePersonaPrompt == null ? 0 : guidePersonaPrompt!.hashCode) +
(guideVoiceId == null ? 0 : guideVoiceId!.hashCode) +
(guideFallbackMessages.hashCode) +
(subscriptionPlanId == null ? 0 : subscriptionPlanId!.hashCode) +
(subscriptionPlan == null ? 0 : subscriptionPlan!.hashCode) +
(aiTokensThisMonth == null ? 0 : aiTokensThisMonth!.hashCode) +
(aiUsageMonthKey == null ? 0 : aiUsageMonthKey!.hashCode) +
(applicationInstanceDTOs == null ? 0 : applicationInstanceDTOs!.hashCode);
@override
String toString() =>
'InstanceDTO[id=$id, name=$name, dateCreation=$dateCreation, pinCode=$pinCode, isPushNotification=$isPushNotification, isMobile=$isMobile, isTablet=$isTablet, isWeb=$isWeb, isVR=$isVR, isAssistant=$isAssistant, guideName=$guideName, guideVoiceId=$guideVoiceId, subscriptionPlanId=$subscriptionPlanId, subscriptionPlan=$subscriptionPlan, aiTokensThisMonth=$aiTokensThisMonth, aiUsageMonthKey=$aiUsageMonthKey, applicationInstanceDTOs=$applicationInstanceDTOs]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (this.id != null) {
json[r'id'] = this.id;
} else {
json[r'id'] = null;
}
if (this.name != null) {
json[r'name'] = this.name;
} else {
json[r'name'] = null;
}
if (this.dateCreation != null) {
json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String();
} else {
json[r'dateCreation'] = null;
}
if (this.pinCode != null) {
json[r'pinCode'] = this.pinCode;
} else {
json[r'pinCode'] = null;
}
if (this.isPushNotification != null) {
json[r'isPushNotification'] = this.isPushNotification;
} else {
json[r'isPushNotification'] = null;
}
if (this.isMobile != null) {
json[r'isMobile'] = this.isMobile;
} else {
json[r'isMobile'] = null;
}
if (this.isTablet != null) {
json[r'isTablet'] = this.isTablet;
} else {
json[r'isTablet'] = null;
}
if (this.isWeb != null) {
json[r'isWeb'] = this.isWeb;
} else {
json[r'isWeb'] = null;
}
if (this.isVR != null) {
json[r'isVR'] = this.isVR;
} else {
json[r'isVR'] = null;
}
if (this.hasImmersiveContent != null) {
json[r'hasImmersiveContent'] = this.hasImmersiveContent;
} else {
json[r'hasImmersiveContent'] = null;
}
if (this.isAssistant != null) {
json[r'isAssistant'] = this.isAssistant;
} else {
json[r'isAssistant'] = null;
}
if (this.guideName != null) {
json[r'guideName'] = this.guideName;
} else {
json[r'guideName'] = null;
}
if (this.guidePersonaPrompt != null) {
json[r'guidePersonaPrompt'] = this.guidePersonaPrompt;
} else {
json[r'guidePersonaPrompt'] = null;
}
if (this.guideVoiceId != null) {
json[r'guideVoiceId'] = this.guideVoiceId;
} else {
json[r'guideVoiceId'] = null;
}
if (this.isVisitorQuestionCollectionEnabled != null) {
json[r'isVisitorQuestionCollectionEnabled'] = this.isVisitorQuestionCollectionEnabled;
} else {
json[r'isVisitorQuestionCollectionEnabled'] = null;
}
json[r'guideFallbackMessages'] = this.guideFallbackMessages;
if (this.subscriptionPlanId != null) {
json[r'subscriptionPlanId'] = this.subscriptionPlanId;
} else {
json[r'subscriptionPlanId'] = null;
}
if (this.subscriptionPlan != null) {
json[r'subscriptionPlan'] = this.subscriptionPlan;
} else {
json[r'subscriptionPlan'] = null;
}
if (this.aiTokensThisMonth != null) {
json[r'aiTokensThisMonth'] = this.aiTokensThisMonth;
} else {
json[r'aiTokensThisMonth'] = null;
}
if (this.aiUsageMonthKey != null) {
json[r'aiUsageMonthKey'] = this.aiUsageMonthKey;
} else {
json[r'aiUsageMonthKey'] = null;
}
if (this.storageQuotaBytes != null) {
json[r'storageQuotaBytes'] = this.storageQuotaBytes;
} else {
json[r'storageQuotaBytes'] = null;
}
if (this.aiTokensPerMonth != null) {
json[r'aiTokensPerMonth'] = this.aiTokensPerMonth;
} else {
json[r'aiTokensPerMonth'] = null;
}
if (this.hasStats != null) {
json[r'hasStats'] = this.hasStats;
} else {
json[r'hasStats'] = null;
}
if (this.statsHistoryDays != null) {
json[r'statsHistoryDays'] = this.statsHistoryDays;
} else {
json[r'statsHistoryDays'] = null;
}
if (this.hasAdvancedStats != null) {
json[r'hasAdvancedStats'] = this.hasAdvancedStats;
} else {
json[r'hasAdvancedStats'] = null;
}
if (this.applicationInstanceDTOs != null) {
json[r'applicationInstanceDTOs'] = this.applicationInstanceDTOs;
} else {
json[r'applicationInstanceDTOs'] = null;
}
if (this.webSlug != null) {
json[r'webSlug'] = this.webSlug;
} else {
json[r'webSlug'] = null;
}
if (this.publicApiKey != null) {
json[r'publicApiKey'] = this.publicApiKey;
} else {
json[r'publicApiKey'] = null;
}
if (this.isTrialActive != null) {
json[r'isTrialActive'] = this.isTrialActive;
} else {
json[r'isTrialActive'] = null;
}
if (this.trialEndsAt != null) {
json[r'trialEndsAt'] = this.trialEndsAt!.toUtc().toIso8601String();
} else {
json[r'trialEndsAt'] = null;
}
return json;
}
/// Returns a new [InstanceDTO] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static InstanceDTO? 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 "InstanceDTO[$key]" is missing from JSON.');
assert(json[key] != null,
'Required key "InstanceDTO[$key]" has a null value in JSON.');
});
return true;
}());
return InstanceDTO(
id: mapValueOfType<String>(json, r'id'),
name: mapValueOfType<String>(json, r'name'),
dateCreation: mapDateTime(json, r'dateCreation', r''),
pinCode: mapValueOfType<String>(json, r'pinCode'),
isPushNotification: mapValueOfType<bool>(json, r'isPushNotification'),
isMobile: mapValueOfType<bool>(json, r'isMobile'),
isTablet: mapValueOfType<bool>(json, r'isTablet'),
isWeb: mapValueOfType<bool>(json, r'isWeb'),
isVR: mapValueOfType<bool>(json, r'isVR'),
isAssistant: mapValueOfType<bool>(json, r'isAssistant'),
hasImmersiveContent: mapValueOfType<bool>(json, r'hasImmersiveContent'),
guideName: mapValueOfType<String>(json, r'guideName'),
guidePersonaPrompt: mapValueOfType<String>(json, r'guidePersonaPrompt'),
guideVoiceId: mapValueOfType<String>(json, r'guideVoiceId'),
isVisitorQuestionCollectionEnabled:
mapValueOfType<bool>(json, r'isVisitorQuestionCollectionEnabled'),
guideFallbackMessages: TranslationDTO.listFromJson(json[r'guideFallbackMessages']),
subscriptionPlanId: mapValueOfType<String>(json, r'subscriptionPlanId'),
subscriptionPlan: SubscriptionPlanDTO.fromJson(json[r'subscriptionPlan']),
aiTokensThisMonth: mapValueOfType<int>(json, r'aiTokensThisMonth'),
aiUsageMonthKey: mapValueOfType<String>(json, r'aiUsageMonthKey'),
storageQuotaBytes: mapValueOfType<int>(json, r'storageQuotaBytes'),
aiTokensPerMonth: mapValueOfType<int>(json, r'aiTokensPerMonth'),
hasStats: mapValueOfType<bool>(json, r'hasStats'),
statsHistoryDays: mapValueOfType<int>(json, r'statsHistoryDays'),
hasAdvancedStats: mapValueOfType<bool>(json, r'hasAdvancedStats'),
applicationInstanceDTOs: ApplicationInstanceDTO.listFromJson(
json[r'applicationInstanceDTOs']),
webSlug: mapValueOfType<String>(json, r'webSlug'),
publicApiKey: mapValueOfType<String>(json, r'publicApiKey'),
isTrialActive: mapValueOfType<bool>(json, r'isTrialActive'),
trialEndsAt: mapDateTime(json, r'trialEndsAt', r''),
);
}
return null;
}
static List<InstanceDTO> listFromJson(
dynamic json, {
bool growable = false,
}) {
final result = <InstanceDTO>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = InstanceDTO.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, InstanceDTO> mapFromJson(dynamic json) {
final map = <String, InstanceDTO>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = InstanceDTO.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of InstanceDTO-objects as value to a dart map
static Map<String, List<InstanceDTO>> mapListFromJson(
dynamic json, {
bool growable = false,
}) {
final map = <String, List<InstanceDTO>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = InstanceDTO.listFromJson(
entry.value,
growable: growable,
);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{};
}