mirror of
https://bitbucket.org/FransoletThomas/tablet-app.git
synced 2025-12-06 08:31:19 +00:00
update service generation
This commit is contained in:
parent
5ebc782591
commit
e67880bc50
@ -2175,12 +2175,24 @@ components:
|
|||||||
type: object
|
type: object
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
properties:
|
properties:
|
||||||
name:
|
label:
|
||||||
type: string
|
type: array
|
||||||
nullable: true
|
nullable: true
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/TranslationDTO'
|
||||||
icon:
|
icon:
|
||||||
type: string
|
type: string
|
||||||
nullable: true
|
nullable: true
|
||||||
|
iconResourceId:
|
||||||
|
type: string
|
||||||
|
nullable: true
|
||||||
|
iconUrl:
|
||||||
|
type: string
|
||||||
|
nullable: true
|
||||||
|
order:
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
|
nullable: true
|
||||||
SliderDTO:
|
SliderDTO:
|
||||||
type: object
|
type: object
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
@ -2279,12 +2291,33 @@ components:
|
|||||||
type: array
|
type: array
|
||||||
nullable: true
|
nullable: true
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/TranslationDTO'
|
$ref: '#/components/schemas/TranslationAndResourceDTO'
|
||||||
responses:
|
responses:
|
||||||
type: array
|
type: array
|
||||||
nullable: true
|
nullable: true
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/ResponseDTO'
|
$ref: '#/components/schemas/ResponseDTO'
|
||||||
|
imageBackgroundResourceId:
|
||||||
|
type: string
|
||||||
|
nullable: true
|
||||||
|
imageBackgroundResourceType:
|
||||||
|
$ref: '#/components/schemas/ResourceType'
|
||||||
|
imageBackgroundResourceUrl:
|
||||||
|
type: string
|
||||||
|
nullable: true
|
||||||
|
order:
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
|
TranslationAndResourceDTO:
|
||||||
|
type: object
|
||||||
|
additionalProperties: false
|
||||||
|
properties:
|
||||||
|
language:
|
||||||
|
type: string
|
||||||
|
nullable: true
|
||||||
|
value:
|
||||||
|
type: string
|
||||||
|
nullable: true
|
||||||
resourceId:
|
resourceId:
|
||||||
type: string
|
type: string
|
||||||
nullable: true
|
nullable: true
|
||||||
@ -2293,9 +2326,6 @@ components:
|
|||||||
resourceUrl:
|
resourceUrl:
|
||||||
type: string
|
type: string
|
||||||
nullable: true
|
nullable: true
|
||||||
order:
|
|
||||||
type: integer
|
|
||||||
format: int32
|
|
||||||
ResponseDTO:
|
ResponseDTO:
|
||||||
type: object
|
type: object
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
@ -2304,17 +2334,9 @@ components:
|
|||||||
type: array
|
type: array
|
||||||
nullable: true
|
nullable: true
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/TranslationDTO'
|
$ref: '#/components/schemas/TranslationAndResourceDTO'
|
||||||
isGood:
|
isGood:
|
||||||
type: boolean
|
type: boolean
|
||||||
resourceId:
|
|
||||||
type: string
|
|
||||||
nullable: true
|
|
||||||
resourceType:
|
|
||||||
$ref: '#/components/schemas/ResourceType'
|
|
||||||
resourceUrl:
|
|
||||||
type: string
|
|
||||||
nullable: true
|
|
||||||
order:
|
order:
|
||||||
type: integer
|
type: integer
|
||||||
format: int32
|
format: int32
|
||||||
@ -2326,15 +2348,7 @@ components:
|
|||||||
type: array
|
type: array
|
||||||
nullable: true
|
nullable: true
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/TranslationDTO'
|
$ref: '#/components/schemas/TranslationAndResourceDTO'
|
||||||
resourceId:
|
|
||||||
type: string
|
|
||||||
nullable: true
|
|
||||||
resourceType:
|
|
||||||
$ref: '#/components/schemas/ResourceType'
|
|
||||||
resourceUrl:
|
|
||||||
type: string
|
|
||||||
nullable: true
|
|
||||||
ArticleDTO:
|
ArticleDTO:
|
||||||
type: object
|
type: object
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
@ -2376,12 +2390,12 @@ components:
|
|||||||
type: array
|
type: array
|
||||||
nullable: true
|
nullable: true
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/TranslationDTO'
|
$ref: '#/components/schemas/TranslationAndResourceDTO'
|
||||||
messageFin:
|
messageFin:
|
||||||
type: array
|
type: array
|
||||||
nullable: true
|
nullable: true
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/TranslationDTO'
|
$ref: '#/components/schemas/TranslationAndResourceDTO'
|
||||||
image:
|
image:
|
||||||
nullable: true
|
nullable: true
|
||||||
oneOf:
|
oneOf:
|
||||||
|
|||||||
@ -42,6 +42,7 @@ doc/SectionDTO.md
|
|||||||
doc/SectionType.md
|
doc/SectionType.md
|
||||||
doc/SliderDTO.md
|
doc/SliderDTO.md
|
||||||
doc/TokenDTO.md
|
doc/TokenDTO.md
|
||||||
|
doc/TranslationAndResourceDTO.md
|
||||||
doc/TranslationDTO.md
|
doc/TranslationDTO.md
|
||||||
doc/User.md
|
doc/User.md
|
||||||
doc/UserApi.md
|
doc/UserApi.md
|
||||||
@ -99,6 +100,7 @@ lib/model/section_dto.dart
|
|||||||
lib/model/section_type.dart
|
lib/model/section_type.dart
|
||||||
lib/model/slider_dto.dart
|
lib/model/slider_dto.dart
|
||||||
lib/model/token_dto.dart
|
lib/model/token_dto.dart
|
||||||
|
lib/model/translation_and_resource_dto.dart
|
||||||
lib/model/translation_dto.dart
|
lib/model/translation_dto.dart
|
||||||
lib/model/user.dart
|
lib/model/user.dart
|
||||||
lib/model/user_detail_dto.dart
|
lib/model/user_detail_dto.dart
|
||||||
|
|||||||
@ -157,6 +157,7 @@ Class | Method | HTTP request | Description
|
|||||||
- [SectionType](doc\/SectionType.md)
|
- [SectionType](doc\/SectionType.md)
|
||||||
- [SliderDTO](doc\/SliderDTO.md)
|
- [SliderDTO](doc\/SliderDTO.md)
|
||||||
- [TokenDTO](doc\/TokenDTO.md)
|
- [TokenDTO](doc\/TokenDTO.md)
|
||||||
|
- [TranslationAndResourceDTO](doc\/TranslationAndResourceDTO.md)
|
||||||
- [TranslationDTO](doc\/TranslationDTO.md)
|
- [TranslationDTO](doc\/TranslationDTO.md)
|
||||||
- [User](doc\/User.md)
|
- [User](doc\/User.md)
|
||||||
- [UserDetailDTO](doc\/UserDetailDTO.md)
|
- [UserDetailDTO](doc\/UserDetailDTO.md)
|
||||||
|
|||||||
@ -8,8 +8,11 @@ import 'package:manager_api/api.dart';
|
|||||||
## Properties
|
## Properties
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**name** | **String** | | [optional]
|
**label** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
|
||||||
**icon** | **String** | | [optional]
|
**icon** | **String** | | [optional]
|
||||||
|
**iconResourceId** | **String** | | [optional]
|
||||||
|
**iconUrl** | **String** | | [optional]
|
||||||
|
**order** | **int** | | [optional]
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|||||||
@ -8,8 +8,11 @@ import 'package:manager_api/api.dart';
|
|||||||
## Properties
|
## Properties
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**name** | **String** | | [optional]
|
**label** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
|
||||||
**icon** | **String** | | [optional]
|
**icon** | **String** | | [optional]
|
||||||
|
**iconResourceId** | **String** | | [optional]
|
||||||
|
**iconUrl** | **String** | | [optional]
|
||||||
|
**order** | **int** | | [optional]
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|||||||
@ -8,10 +8,7 @@ import 'package:manager_api/api.dart';
|
|||||||
## Properties
|
## Properties
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**label** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
|
**label** | [**List<TranslationAndResourceDTO>**](TranslationAndResourceDTO.md) | | [optional] [default to const []]
|
||||||
**resourceId** | **String** | | [optional]
|
|
||||||
**resourceType** | [**ResourceType**](ResourceType.md) | | [optional]
|
|
||||||
**resourceUrl** | **String** | | [optional]
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|||||||
@ -8,8 +8,8 @@ import 'package:manager_api/api.dart';
|
|||||||
## Properties
|
## Properties
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**messageDebut** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
|
**messageDebut** | [**List<TranslationAndResourceDTO>**](TranslationAndResourceDTO.md) | | [optional] [default to const []]
|
||||||
**messageFin** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
|
**messageFin** | [**List<TranslationAndResourceDTO>**](TranslationAndResourceDTO.md) | | [optional] [default to const []]
|
||||||
**image** | [**PuzzleDTOImage**](PuzzleDTOImage.md) | | [optional]
|
**image** | [**PuzzleDTOImage**](PuzzleDTOImage.md) | | [optional]
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|||||||
@ -8,11 +8,11 @@ import 'package:manager_api/api.dart';
|
|||||||
## Properties
|
## Properties
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**label** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
|
**label** | [**List<TranslationAndResourceDTO>**](TranslationAndResourceDTO.md) | | [optional] [default to const []]
|
||||||
**responses** | [**List<ResponseDTO>**](ResponseDTO.md) | | [optional] [default to const []]
|
**responses** | [**List<ResponseDTO>**](ResponseDTO.md) | | [optional] [default to const []]
|
||||||
**resourceId** | **String** | | [optional]
|
**imageBackgroundResourceId** | **String** | | [optional]
|
||||||
**resourceType** | [**ResourceType**](ResourceType.md) | | [optional]
|
**imageBackgroundResourceType** | [**ResourceType**](ResourceType.md) | | [optional]
|
||||||
**resourceUrl** | **String** | | [optional]
|
**imageBackgroundResourceUrl** | **String** | | [optional]
|
||||||
**order** | **int** | | [optional]
|
**order** | **int** | | [optional]
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|||||||
@ -8,10 +8,7 @@ import 'package:manager_api/api.dart';
|
|||||||
## Properties
|
## Properties
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**label** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
|
**label** | [**List<TranslationAndResourceDTO>**](TranslationAndResourceDTO.md) | | [optional] [default to const []]
|
||||||
**resourceId** | **String** | | [optional]
|
|
||||||
**resourceType** | [**ResourceType**](ResourceType.md) | | [optional]
|
|
||||||
**resourceUrl** | **String** | | [optional]
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|||||||
@ -8,11 +8,8 @@ import 'package:manager_api/api.dart';
|
|||||||
## Properties
|
## Properties
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**label** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
|
**label** | [**List<TranslationAndResourceDTO>**](TranslationAndResourceDTO.md) | | [optional] [default to const []]
|
||||||
**isGood** | **bool** | | [optional]
|
**isGood** | **bool** | | [optional]
|
||||||
**resourceId** | **String** | | [optional]
|
|
||||||
**resourceType** | [**ResourceType**](ResourceType.md) | | [optional]
|
|
||||||
**resourceUrl** | **String** | | [optional]
|
|
||||||
**order** | **int** | | [optional]
|
**order** | **int** | | [optional]
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|||||||
19
manager_api/doc/TranslationAndResourceDTO.md
Normal file
19
manager_api/doc/TranslationAndResourceDTO.md
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# manager_api.model.TranslationAndResourceDTO
|
||||||
|
|
||||||
|
## Load the model package
|
||||||
|
```dart
|
||||||
|
import 'package:manager_api/api.dart';
|
||||||
|
```
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**language** | **String** | | [optional]
|
||||||
|
**value** | **String** | | [optional]
|
||||||
|
**resourceId** | **String** | | [optional]
|
||||||
|
**resourceType** | [**ResourceType**](ResourceType.md) | | [optional]
|
||||||
|
**resourceUrl** | **String** | | [optional]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
@ -69,6 +69,7 @@ part 'model/section_dto.dart';
|
|||||||
part 'model/section_type.dart';
|
part 'model/section_type.dart';
|
||||||
part 'model/slider_dto.dart';
|
part 'model/slider_dto.dart';
|
||||||
part 'model/token_dto.dart';
|
part 'model/token_dto.dart';
|
||||||
|
part 'model/translation_and_resource_dto.dart';
|
||||||
part 'model/translation_dto.dart';
|
part 'model/translation_dto.dart';
|
||||||
part 'model/user.dart';
|
part 'model/user.dart';
|
||||||
part 'model/user_detail_dto.dart';
|
part 'model/user_detail_dto.dart';
|
||||||
|
|||||||
@ -249,6 +249,8 @@ class ApiClient {
|
|||||||
return SliderDTO.fromJson(value);
|
return SliderDTO.fromJson(value);
|
||||||
case 'TokenDTO':
|
case 'TokenDTO':
|
||||||
return TokenDTO.fromJson(value);
|
return TokenDTO.fromJson(value);
|
||||||
|
case 'TranslationAndResourceDTO':
|
||||||
|
return TranslationAndResourceDTO.fromJson(value);
|
||||||
case 'TranslationDTO':
|
case 'TranslationDTO':
|
||||||
return TranslationDTO.fromJson(value);
|
return TranslationDTO.fromJson(value);
|
||||||
case 'User':
|
case 'User':
|
||||||
|
|||||||
@ -13,40 +13,70 @@ part of openapi.api;
|
|||||||
class CategorieDTO {
|
class CategorieDTO {
|
||||||
/// Returns a new [CategorieDTO] instance.
|
/// Returns a new [CategorieDTO] instance.
|
||||||
CategorieDTO({
|
CategorieDTO({
|
||||||
this.name,
|
this.label = const [],
|
||||||
this.icon,
|
this.icon,
|
||||||
|
this.iconResourceId,
|
||||||
|
this.iconUrl,
|
||||||
|
this.order,
|
||||||
});
|
});
|
||||||
|
|
||||||
String? name;
|
List<TranslationDTO>? label;
|
||||||
|
|
||||||
String? icon;
|
String? icon;
|
||||||
|
|
||||||
|
String? iconResourceId;
|
||||||
|
|
||||||
|
String? iconUrl;
|
||||||
|
|
||||||
|
int? order;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) => identical(this, other) || other is CategorieDTO &&
|
bool operator ==(Object other) => identical(this, other) || other is CategorieDTO &&
|
||||||
other.name == name &&
|
other.label == label &&
|
||||||
other.icon == icon;
|
other.icon == icon &&
|
||||||
|
other.iconResourceId == iconResourceId &&
|
||||||
|
other.iconUrl == iconUrl &&
|
||||||
|
other.order == order;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode =>
|
int get hashCode =>
|
||||||
// ignore: unnecessary_parenthesis
|
// ignore: unnecessary_parenthesis
|
||||||
(name == null ? 0 : name!.hashCode) +
|
(label == null ? 0 : label!.hashCode) +
|
||||||
(icon == null ? 0 : icon!.hashCode);
|
(icon == null ? 0 : icon!.hashCode) +
|
||||||
|
(iconResourceId == null ? 0 : iconResourceId!.hashCode) +
|
||||||
|
(iconUrl == null ? 0 : iconUrl!.hashCode) +
|
||||||
|
(order == null ? 0 : order!.hashCode);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() => 'CategorieDTO[name=$name, icon=$icon]';
|
String toString() => 'CategorieDTO[label=$label, icon=$icon, iconResourceId=$iconResourceId, iconUrl=$iconUrl, order=$order]';
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
final json = <String, dynamic>{};
|
final json = <String, dynamic>{};
|
||||||
if (this.name != null) {
|
if (this.label != null) {
|
||||||
json[r'name'] = this.name;
|
json[r'label'] = this.label;
|
||||||
} else {
|
} else {
|
||||||
json[r'name'] = null;
|
json[r'label'] = null;
|
||||||
}
|
}
|
||||||
if (this.icon != null) {
|
if (this.icon != null) {
|
||||||
json[r'icon'] = this.icon;
|
json[r'icon'] = this.icon;
|
||||||
} else {
|
} else {
|
||||||
json[r'icon'] = null;
|
json[r'icon'] = null;
|
||||||
}
|
}
|
||||||
|
if (this.iconResourceId != null) {
|
||||||
|
json[r'iconResourceId'] = this.iconResourceId;
|
||||||
|
} else {
|
||||||
|
json[r'iconResourceId'] = null;
|
||||||
|
}
|
||||||
|
if (this.iconUrl != null) {
|
||||||
|
json[r'iconUrl'] = this.iconUrl;
|
||||||
|
} else {
|
||||||
|
json[r'iconUrl'] = null;
|
||||||
|
}
|
||||||
|
if (this.order != null) {
|
||||||
|
json[r'order'] = this.order;
|
||||||
|
} else {
|
||||||
|
json[r'order'] = null;
|
||||||
|
}
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -69,8 +99,11 @@ class CategorieDTO {
|
|||||||
}());
|
}());
|
||||||
|
|
||||||
return CategorieDTO(
|
return CategorieDTO(
|
||||||
name: mapValueOfType<String>(json, r'name'),
|
label: TranslationDTO.listFromJson(json[r'label']),
|
||||||
icon: mapValueOfType<String>(json, r'icon'),
|
icon: mapValueOfType<String>(json, r'icon'),
|
||||||
|
iconResourceId: mapValueOfType<String>(json, r'iconResourceId'),
|
||||||
|
iconUrl: mapValueOfType<String>(json, r'iconUrl'),
|
||||||
|
order: mapValueOfType<int>(json, r'order'),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@ -13,40 +13,70 @@ part of openapi.api;
|
|||||||
class GeoPointDTOCategorie {
|
class GeoPointDTOCategorie {
|
||||||
/// Returns a new [GeoPointDTOCategorie] instance.
|
/// Returns a new [GeoPointDTOCategorie] instance.
|
||||||
GeoPointDTOCategorie({
|
GeoPointDTOCategorie({
|
||||||
this.name,
|
this.label = const [],
|
||||||
this.icon,
|
this.icon,
|
||||||
|
this.iconResourceId,
|
||||||
|
this.iconUrl,
|
||||||
|
this.order,
|
||||||
});
|
});
|
||||||
|
|
||||||
String? name;
|
List<TranslationDTO>? label;
|
||||||
|
|
||||||
String? icon;
|
String? icon;
|
||||||
|
|
||||||
|
String? iconResourceId;
|
||||||
|
|
||||||
|
String? iconUrl;
|
||||||
|
|
||||||
|
int? order;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) => identical(this, other) || other is GeoPointDTOCategorie &&
|
bool operator ==(Object other) => identical(this, other) || other is GeoPointDTOCategorie &&
|
||||||
other.name == name &&
|
other.label == label &&
|
||||||
other.icon == icon;
|
other.icon == icon &&
|
||||||
|
other.iconResourceId == iconResourceId &&
|
||||||
|
other.iconUrl == iconUrl &&
|
||||||
|
other.order == order;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode =>
|
int get hashCode =>
|
||||||
// ignore: unnecessary_parenthesis
|
// ignore: unnecessary_parenthesis
|
||||||
(name == null ? 0 : name!.hashCode) +
|
(label == null ? 0 : label!.hashCode) +
|
||||||
(icon == null ? 0 : icon!.hashCode);
|
(icon == null ? 0 : icon!.hashCode) +
|
||||||
|
(iconResourceId == null ? 0 : iconResourceId!.hashCode) +
|
||||||
|
(iconUrl == null ? 0 : iconUrl!.hashCode) +
|
||||||
|
(order == null ? 0 : order!.hashCode);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() => 'GeoPointDTOCategorie[name=$name, icon=$icon]';
|
String toString() => 'GeoPointDTOCategorie[label=$label, icon=$icon, iconResourceId=$iconResourceId, iconUrl=$iconUrl, order=$order]';
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
final json = <String, dynamic>{};
|
final json = <String, dynamic>{};
|
||||||
if (this.name != null) {
|
if (this.label != null) {
|
||||||
json[r'name'] = this.name;
|
json[r'label'] = this.label;
|
||||||
} else {
|
} else {
|
||||||
json[r'name'] = null;
|
json[r'label'] = null;
|
||||||
}
|
}
|
||||||
if (this.icon != null) {
|
if (this.icon != null) {
|
||||||
json[r'icon'] = this.icon;
|
json[r'icon'] = this.icon;
|
||||||
} else {
|
} else {
|
||||||
json[r'icon'] = null;
|
json[r'icon'] = null;
|
||||||
}
|
}
|
||||||
|
if (this.iconResourceId != null) {
|
||||||
|
json[r'iconResourceId'] = this.iconResourceId;
|
||||||
|
} else {
|
||||||
|
json[r'iconResourceId'] = null;
|
||||||
|
}
|
||||||
|
if (this.iconUrl != null) {
|
||||||
|
json[r'iconUrl'] = this.iconUrl;
|
||||||
|
} else {
|
||||||
|
json[r'iconUrl'] = null;
|
||||||
|
}
|
||||||
|
if (this.order != null) {
|
||||||
|
json[r'order'] = this.order;
|
||||||
|
} else {
|
||||||
|
json[r'order'] = null;
|
||||||
|
}
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -69,8 +99,11 @@ class GeoPointDTOCategorie {
|
|||||||
}());
|
}());
|
||||||
|
|
||||||
return GeoPointDTOCategorie(
|
return GeoPointDTOCategorie(
|
||||||
name: mapValueOfType<String>(json, r'name'),
|
label: TranslationDTO.listFromJson(json[r'label']),
|
||||||
icon: mapValueOfType<String>(json, r'icon'),
|
icon: mapValueOfType<String>(json, r'icon'),
|
||||||
|
iconResourceId: mapValueOfType<String>(json, r'iconResourceId'),
|
||||||
|
iconUrl: mapValueOfType<String>(json, r'iconUrl'),
|
||||||
|
order: mapValueOfType<int>(json, r'order'),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@ -14,42 +14,21 @@ class LevelDTO {
|
|||||||
/// Returns a new [LevelDTO] instance.
|
/// Returns a new [LevelDTO] instance.
|
||||||
LevelDTO({
|
LevelDTO({
|
||||||
this.label = const [],
|
this.label = const [],
|
||||||
this.resourceId,
|
|
||||||
this.resourceType,
|
|
||||||
this.resourceUrl,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
List<TranslationDTO>? label;
|
List<TranslationAndResourceDTO>? label;
|
||||||
|
|
||||||
String? resourceId;
|
|
||||||
|
|
||||||
///
|
|
||||||
/// 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.
|
|
||||||
///
|
|
||||||
ResourceType? resourceType;
|
|
||||||
|
|
||||||
String? resourceUrl;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) => identical(this, other) || other is LevelDTO &&
|
bool operator ==(Object other) => identical(this, other) || other is LevelDTO &&
|
||||||
other.label == label &&
|
other.label == label;
|
||||||
other.resourceId == resourceId &&
|
|
||||||
other.resourceType == resourceType &&
|
|
||||||
other.resourceUrl == resourceUrl;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode =>
|
int get hashCode =>
|
||||||
// ignore: unnecessary_parenthesis
|
// ignore: unnecessary_parenthesis
|
||||||
(label == null ? 0 : label!.hashCode) +
|
(label == null ? 0 : label!.hashCode);
|
||||||
(resourceId == null ? 0 : resourceId!.hashCode) +
|
|
||||||
(resourceType == null ? 0 : resourceType!.hashCode) +
|
|
||||||
(resourceUrl == null ? 0 : resourceUrl!.hashCode);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() => 'LevelDTO[label=$label, resourceId=$resourceId, resourceType=$resourceType, resourceUrl=$resourceUrl]';
|
String toString() => 'LevelDTO[label=$label]';
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
final json = <String, dynamic>{};
|
final json = <String, dynamic>{};
|
||||||
@ -58,21 +37,6 @@ class LevelDTO {
|
|||||||
} else {
|
} else {
|
||||||
json[r'label'] = null;
|
json[r'label'] = null;
|
||||||
}
|
}
|
||||||
if (this.resourceId != null) {
|
|
||||||
json[r'resourceId'] = this.resourceId;
|
|
||||||
} else {
|
|
||||||
json[r'resourceId'] = null;
|
|
||||||
}
|
|
||||||
if (this.resourceType != null) {
|
|
||||||
json[r'resourceType'] = this.resourceType;
|
|
||||||
} else {
|
|
||||||
json[r'resourceType'] = null;
|
|
||||||
}
|
|
||||||
if (this.resourceUrl != null) {
|
|
||||||
json[r'resourceUrl'] = this.resourceUrl;
|
|
||||||
} else {
|
|
||||||
json[r'resourceUrl'] = null;
|
|
||||||
}
|
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -95,10 +59,7 @@ class LevelDTO {
|
|||||||
}());
|
}());
|
||||||
|
|
||||||
return LevelDTO(
|
return LevelDTO(
|
||||||
label: TranslationDTO.listFromJson(json[r'label']),
|
label: TranslationAndResourceDTO.listFromJson(json[r'label']),
|
||||||
resourceId: mapValueOfType<String>(json, r'resourceId'),
|
|
||||||
resourceType: ResourceType.fromJson(json[r'resourceType']),
|
|
||||||
resourceUrl: mapValueOfType<String>(json, r'resourceUrl'),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@ -18,9 +18,9 @@ class PuzzleDTO {
|
|||||||
this.image,
|
this.image,
|
||||||
});
|
});
|
||||||
|
|
||||||
List<TranslationDTO>? messageDebut;
|
List<TranslationAndResourceDTO>? messageDebut;
|
||||||
|
|
||||||
List<TranslationDTO>? messageFin;
|
List<TranslationAndResourceDTO>? messageFin;
|
||||||
|
|
||||||
PuzzleDTOImage? image;
|
PuzzleDTOImage? image;
|
||||||
|
|
||||||
@ -79,8 +79,8 @@ class PuzzleDTO {
|
|||||||
}());
|
}());
|
||||||
|
|
||||||
return PuzzleDTO(
|
return PuzzleDTO(
|
||||||
messageDebut: TranslationDTO.listFromJson(json[r'messageDebut']),
|
messageDebut: TranslationAndResourceDTO.listFromJson(json[r'messageDebut']),
|
||||||
messageFin: TranslationDTO.listFromJson(json[r'messageFin']),
|
messageFin: TranslationAndResourceDTO.listFromJson(json[r'messageFin']),
|
||||||
image: PuzzleDTOImage.fromJson(json[r'image']),
|
image: PuzzleDTOImage.fromJson(json[r'image']),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -15,17 +15,17 @@ class QuestionDTO {
|
|||||||
QuestionDTO({
|
QuestionDTO({
|
||||||
this.label = const [],
|
this.label = const [],
|
||||||
this.responses = const [],
|
this.responses = const [],
|
||||||
this.resourceId,
|
this.imageBackgroundResourceId,
|
||||||
this.resourceType,
|
this.imageBackgroundResourceType,
|
||||||
this.resourceUrl,
|
this.imageBackgroundResourceUrl,
|
||||||
this.order,
|
this.order,
|
||||||
});
|
});
|
||||||
|
|
||||||
List<TranslationDTO>? label;
|
List<TranslationAndResourceDTO>? label;
|
||||||
|
|
||||||
List<ResponseDTO>? responses;
|
List<ResponseDTO>? responses;
|
||||||
|
|
||||||
String? resourceId;
|
String? imageBackgroundResourceId;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Please note: This property should have been non-nullable! Since the specification file
|
/// Please note: This property should have been non-nullable! Since the specification file
|
||||||
@ -33,9 +33,9 @@ class QuestionDTO {
|
|||||||
/// source code must fall back to having a nullable type.
|
/// source code must fall back to having a nullable type.
|
||||||
/// Consider adding a "default:" property in the specification file to hide this note.
|
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||||
///
|
///
|
||||||
ResourceType? resourceType;
|
ResourceType? imageBackgroundResourceType;
|
||||||
|
|
||||||
String? resourceUrl;
|
String? imageBackgroundResourceUrl;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Please note: This property should have been non-nullable! Since the specification file
|
/// Please note: This property should have been non-nullable! Since the specification file
|
||||||
@ -49,9 +49,9 @@ class QuestionDTO {
|
|||||||
bool operator ==(Object other) => identical(this, other) || other is QuestionDTO &&
|
bool operator ==(Object other) => identical(this, other) || other is QuestionDTO &&
|
||||||
other.label == label &&
|
other.label == label &&
|
||||||
other.responses == responses &&
|
other.responses == responses &&
|
||||||
other.resourceId == resourceId &&
|
other.imageBackgroundResourceId == imageBackgroundResourceId &&
|
||||||
other.resourceType == resourceType &&
|
other.imageBackgroundResourceType == imageBackgroundResourceType &&
|
||||||
other.resourceUrl == resourceUrl &&
|
other.imageBackgroundResourceUrl == imageBackgroundResourceUrl &&
|
||||||
other.order == order;
|
other.order == order;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -59,13 +59,13 @@ class QuestionDTO {
|
|||||||
// ignore: unnecessary_parenthesis
|
// ignore: unnecessary_parenthesis
|
||||||
(label == null ? 0 : label!.hashCode) +
|
(label == null ? 0 : label!.hashCode) +
|
||||||
(responses == null ? 0 : responses!.hashCode) +
|
(responses == null ? 0 : responses!.hashCode) +
|
||||||
(resourceId == null ? 0 : resourceId!.hashCode) +
|
(imageBackgroundResourceId == null ? 0 : imageBackgroundResourceId!.hashCode) +
|
||||||
(resourceType == null ? 0 : resourceType!.hashCode) +
|
(imageBackgroundResourceType == null ? 0 : imageBackgroundResourceType!.hashCode) +
|
||||||
(resourceUrl == null ? 0 : resourceUrl!.hashCode) +
|
(imageBackgroundResourceUrl == null ? 0 : imageBackgroundResourceUrl!.hashCode) +
|
||||||
(order == null ? 0 : order!.hashCode);
|
(order == null ? 0 : order!.hashCode);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() => 'QuestionDTO[label=$label, responses=$responses, resourceId=$resourceId, resourceType=$resourceType, resourceUrl=$resourceUrl, order=$order]';
|
String toString() => 'QuestionDTO[label=$label, responses=$responses, imageBackgroundResourceId=$imageBackgroundResourceId, imageBackgroundResourceType=$imageBackgroundResourceType, imageBackgroundResourceUrl=$imageBackgroundResourceUrl, order=$order]';
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
final json = <String, dynamic>{};
|
final json = <String, dynamic>{};
|
||||||
@ -79,20 +79,20 @@ class QuestionDTO {
|
|||||||
} else {
|
} else {
|
||||||
json[r'responses'] = null;
|
json[r'responses'] = null;
|
||||||
}
|
}
|
||||||
if (this.resourceId != null) {
|
if (this.imageBackgroundResourceId != null) {
|
||||||
json[r'resourceId'] = this.resourceId;
|
json[r'imageBackgroundResourceId'] = this.imageBackgroundResourceId;
|
||||||
} else {
|
} else {
|
||||||
json[r'resourceId'] = null;
|
json[r'imageBackgroundResourceId'] = null;
|
||||||
}
|
}
|
||||||
if (this.resourceType != null) {
|
if (this.imageBackgroundResourceType != null) {
|
||||||
json[r'resourceType'] = this.resourceType;
|
json[r'imageBackgroundResourceType'] = this.imageBackgroundResourceType;
|
||||||
} else {
|
} else {
|
||||||
json[r'resourceType'] = null;
|
json[r'imageBackgroundResourceType'] = null;
|
||||||
}
|
}
|
||||||
if (this.resourceUrl != null) {
|
if (this.imageBackgroundResourceUrl != null) {
|
||||||
json[r'resourceUrl'] = this.resourceUrl;
|
json[r'imageBackgroundResourceUrl'] = this.imageBackgroundResourceUrl;
|
||||||
} else {
|
} else {
|
||||||
json[r'resourceUrl'] = null;
|
json[r'imageBackgroundResourceUrl'] = null;
|
||||||
}
|
}
|
||||||
if (this.order != null) {
|
if (this.order != null) {
|
||||||
json[r'order'] = this.order;
|
json[r'order'] = this.order;
|
||||||
@ -121,11 +121,11 @@ class QuestionDTO {
|
|||||||
}());
|
}());
|
||||||
|
|
||||||
return QuestionDTO(
|
return QuestionDTO(
|
||||||
label: TranslationDTO.listFromJson(json[r'label']),
|
label: TranslationAndResourceDTO.listFromJson(json[r'label']),
|
||||||
responses: ResponseDTO.listFromJson(json[r'responses']),
|
responses: ResponseDTO.listFromJson(json[r'responses']),
|
||||||
resourceId: mapValueOfType<String>(json, r'resourceId'),
|
imageBackgroundResourceId: mapValueOfType<String>(json, r'imageBackgroundResourceId'),
|
||||||
resourceType: ResourceType.fromJson(json[r'resourceType']),
|
imageBackgroundResourceType: ResourceType.fromJson(json[r'imageBackgroundResourceType']),
|
||||||
resourceUrl: mapValueOfType<String>(json, r'resourceUrl'),
|
imageBackgroundResourceUrl: mapValueOfType<String>(json, r'imageBackgroundResourceUrl'),
|
||||||
order: mapValueOfType<int>(json, r'order'),
|
order: mapValueOfType<int>(json, r'order'),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,42 +14,21 @@ class QuizzDTOBadLevel {
|
|||||||
/// Returns a new [QuizzDTOBadLevel] instance.
|
/// Returns a new [QuizzDTOBadLevel] instance.
|
||||||
QuizzDTOBadLevel({
|
QuizzDTOBadLevel({
|
||||||
this.label = const [],
|
this.label = const [],
|
||||||
this.resourceId,
|
|
||||||
this.resourceType,
|
|
||||||
this.resourceUrl,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
List<TranslationDTO>? label;
|
List<TranslationAndResourceDTO>? label;
|
||||||
|
|
||||||
String? resourceId;
|
|
||||||
|
|
||||||
///
|
|
||||||
/// 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.
|
|
||||||
///
|
|
||||||
ResourceType? resourceType;
|
|
||||||
|
|
||||||
String? resourceUrl;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) => identical(this, other) || other is QuizzDTOBadLevel &&
|
bool operator ==(Object other) => identical(this, other) || other is QuizzDTOBadLevel &&
|
||||||
other.label == label &&
|
other.label == label;
|
||||||
other.resourceId == resourceId &&
|
|
||||||
other.resourceType == resourceType &&
|
|
||||||
other.resourceUrl == resourceUrl;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode =>
|
int get hashCode =>
|
||||||
// ignore: unnecessary_parenthesis
|
// ignore: unnecessary_parenthesis
|
||||||
(label == null ? 0 : label!.hashCode) +
|
(label == null ? 0 : label!.hashCode);
|
||||||
(resourceId == null ? 0 : resourceId!.hashCode) +
|
|
||||||
(resourceType == null ? 0 : resourceType!.hashCode) +
|
|
||||||
(resourceUrl == null ? 0 : resourceUrl!.hashCode);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() => 'QuizzDTOBadLevel[label=$label, resourceId=$resourceId, resourceType=$resourceType, resourceUrl=$resourceUrl]';
|
String toString() => 'QuizzDTOBadLevel[label=$label]';
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
final json = <String, dynamic>{};
|
final json = <String, dynamic>{};
|
||||||
@ -58,21 +37,6 @@ class QuizzDTOBadLevel {
|
|||||||
} else {
|
} else {
|
||||||
json[r'label'] = null;
|
json[r'label'] = null;
|
||||||
}
|
}
|
||||||
if (this.resourceId != null) {
|
|
||||||
json[r'resourceId'] = this.resourceId;
|
|
||||||
} else {
|
|
||||||
json[r'resourceId'] = null;
|
|
||||||
}
|
|
||||||
if (this.resourceType != null) {
|
|
||||||
json[r'resourceType'] = this.resourceType;
|
|
||||||
} else {
|
|
||||||
json[r'resourceType'] = null;
|
|
||||||
}
|
|
||||||
if (this.resourceUrl != null) {
|
|
||||||
json[r'resourceUrl'] = this.resourceUrl;
|
|
||||||
} else {
|
|
||||||
json[r'resourceUrl'] = null;
|
|
||||||
}
|
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -95,10 +59,7 @@ class QuizzDTOBadLevel {
|
|||||||
}());
|
}());
|
||||||
|
|
||||||
return QuizzDTOBadLevel(
|
return QuizzDTOBadLevel(
|
||||||
label: TranslationDTO.listFromJson(json[r'label']),
|
label: TranslationAndResourceDTO.listFromJson(json[r'label']),
|
||||||
resourceId: mapValueOfType<String>(json, r'resourceId'),
|
|
||||||
resourceType: ResourceType.fromJson(json[r'resourceType']),
|
|
||||||
resourceUrl: mapValueOfType<String>(json, r'resourceUrl'),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@ -15,13 +15,10 @@ class ResponseDTO {
|
|||||||
ResponseDTO({
|
ResponseDTO({
|
||||||
this.label = const [],
|
this.label = const [],
|
||||||
this.isGood,
|
this.isGood,
|
||||||
this.resourceId,
|
|
||||||
this.resourceType,
|
|
||||||
this.resourceUrl,
|
|
||||||
this.order,
|
this.order,
|
||||||
});
|
});
|
||||||
|
|
||||||
List<TranslationDTO>? label;
|
List<TranslationAndResourceDTO>? label;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Please note: This property should have been non-nullable! Since the specification file
|
/// Please note: This property should have been non-nullable! Since the specification file
|
||||||
@ -31,18 +28,6 @@ class ResponseDTO {
|
|||||||
///
|
///
|
||||||
bool? isGood;
|
bool? isGood;
|
||||||
|
|
||||||
String? resourceId;
|
|
||||||
|
|
||||||
///
|
|
||||||
/// 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.
|
|
||||||
///
|
|
||||||
ResourceType? resourceType;
|
|
||||||
|
|
||||||
String? resourceUrl;
|
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Please note: This property should have been non-nullable! Since the specification file
|
/// 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
|
/// does not include a default value (using the "default:" property), however, the generated
|
||||||
@ -55,9 +40,6 @@ class ResponseDTO {
|
|||||||
bool operator ==(Object other) => identical(this, other) || other is ResponseDTO &&
|
bool operator ==(Object other) => identical(this, other) || other is ResponseDTO &&
|
||||||
other.label == label &&
|
other.label == label &&
|
||||||
other.isGood == isGood &&
|
other.isGood == isGood &&
|
||||||
other.resourceId == resourceId &&
|
|
||||||
other.resourceType == resourceType &&
|
|
||||||
other.resourceUrl == resourceUrl &&
|
|
||||||
other.order == order;
|
other.order == order;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -65,13 +47,10 @@ class ResponseDTO {
|
|||||||
// ignore: unnecessary_parenthesis
|
// ignore: unnecessary_parenthesis
|
||||||
(label == null ? 0 : label!.hashCode) +
|
(label == null ? 0 : label!.hashCode) +
|
||||||
(isGood == null ? 0 : isGood!.hashCode) +
|
(isGood == null ? 0 : isGood!.hashCode) +
|
||||||
(resourceId == null ? 0 : resourceId!.hashCode) +
|
|
||||||
(resourceType == null ? 0 : resourceType!.hashCode) +
|
|
||||||
(resourceUrl == null ? 0 : resourceUrl!.hashCode) +
|
|
||||||
(order == null ? 0 : order!.hashCode);
|
(order == null ? 0 : order!.hashCode);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() => 'ResponseDTO[label=$label, isGood=$isGood, resourceId=$resourceId, resourceType=$resourceType, resourceUrl=$resourceUrl, order=$order]';
|
String toString() => 'ResponseDTO[label=$label, isGood=$isGood, order=$order]';
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
final json = <String, dynamic>{};
|
final json = <String, dynamic>{};
|
||||||
@ -85,21 +64,6 @@ class ResponseDTO {
|
|||||||
} else {
|
} else {
|
||||||
json[r'isGood'] = null;
|
json[r'isGood'] = null;
|
||||||
}
|
}
|
||||||
if (this.resourceId != null) {
|
|
||||||
json[r'resourceId'] = this.resourceId;
|
|
||||||
} else {
|
|
||||||
json[r'resourceId'] = null;
|
|
||||||
}
|
|
||||||
if (this.resourceType != null) {
|
|
||||||
json[r'resourceType'] = this.resourceType;
|
|
||||||
} else {
|
|
||||||
json[r'resourceType'] = null;
|
|
||||||
}
|
|
||||||
if (this.resourceUrl != null) {
|
|
||||||
json[r'resourceUrl'] = this.resourceUrl;
|
|
||||||
} else {
|
|
||||||
json[r'resourceUrl'] = null;
|
|
||||||
}
|
|
||||||
if (this.order != null) {
|
if (this.order != null) {
|
||||||
json[r'order'] = this.order;
|
json[r'order'] = this.order;
|
||||||
} else {
|
} else {
|
||||||
@ -127,11 +91,8 @@ class ResponseDTO {
|
|||||||
}());
|
}());
|
||||||
|
|
||||||
return ResponseDTO(
|
return ResponseDTO(
|
||||||
label: TranslationDTO.listFromJson(json[r'label']),
|
label: TranslationAndResourceDTO.listFromJson(json[r'label']),
|
||||||
isGood: mapValueOfType<bool>(json, r'isGood'),
|
isGood: mapValueOfType<bool>(json, r'isGood'),
|
||||||
resourceId: mapValueOfType<String>(json, r'resourceId'),
|
|
||||||
resourceType: ResourceType.fromJson(json[r'resourceType']),
|
|
||||||
resourceUrl: mapValueOfType<String>(json, r'resourceUrl'),
|
|
||||||
order: mapValueOfType<int>(json, r'order'),
|
order: mapValueOfType<int>(json, r'order'),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
162
manager_api/lib/model/translation_and_resource_dto.dart
Normal file
162
manager_api/lib/model/translation_and_resource_dto.dart
Normal file
@ -0,0 +1,162 @@
|
|||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
// @dart=2.12
|
||||||
|
|
||||||
|
// 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 TranslationAndResourceDTO {
|
||||||
|
/// Returns a new [TranslationAndResourceDTO] instance.
|
||||||
|
TranslationAndResourceDTO({
|
||||||
|
this.language,
|
||||||
|
this.value,
|
||||||
|
this.resourceId,
|
||||||
|
this.resourceType,
|
||||||
|
this.resourceUrl,
|
||||||
|
});
|
||||||
|
|
||||||
|
String? language;
|
||||||
|
|
||||||
|
String? value;
|
||||||
|
|
||||||
|
String? resourceId;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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.
|
||||||
|
///
|
||||||
|
ResourceType? resourceType;
|
||||||
|
|
||||||
|
String? resourceUrl;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) => identical(this, other) || other is TranslationAndResourceDTO &&
|
||||||
|
other.language == language &&
|
||||||
|
other.value == value &&
|
||||||
|
other.resourceId == resourceId &&
|
||||||
|
other.resourceType == resourceType &&
|
||||||
|
other.resourceUrl == resourceUrl;
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode =>
|
||||||
|
// ignore: unnecessary_parenthesis
|
||||||
|
(language == null ? 0 : language!.hashCode) +
|
||||||
|
(value == null ? 0 : value!.hashCode) +
|
||||||
|
(resourceId == null ? 0 : resourceId!.hashCode) +
|
||||||
|
(resourceType == null ? 0 : resourceType!.hashCode) +
|
||||||
|
(resourceUrl == null ? 0 : resourceUrl!.hashCode);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() => 'TranslationAndResourceDTO[language=$language, value=$value, resourceId=$resourceId, resourceType=$resourceType, resourceUrl=$resourceUrl]';
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final json = <String, dynamic>{};
|
||||||
|
if (this.language != null) {
|
||||||
|
json[r'language'] = this.language;
|
||||||
|
} else {
|
||||||
|
json[r'language'] = null;
|
||||||
|
}
|
||||||
|
if (this.value != null) {
|
||||||
|
json[r'value'] = this.value;
|
||||||
|
} else {
|
||||||
|
json[r'value'] = null;
|
||||||
|
}
|
||||||
|
if (this.resourceId != null) {
|
||||||
|
json[r'resourceId'] = this.resourceId;
|
||||||
|
} else {
|
||||||
|
json[r'resourceId'] = null;
|
||||||
|
}
|
||||||
|
if (this.resourceType != null) {
|
||||||
|
json[r'resourceType'] = this.resourceType;
|
||||||
|
} else {
|
||||||
|
json[r'resourceType'] = null;
|
||||||
|
}
|
||||||
|
if (this.resourceUrl != null) {
|
||||||
|
json[r'resourceUrl'] = this.resourceUrl;
|
||||||
|
} else {
|
||||||
|
json[r'resourceUrl'] = null;
|
||||||
|
}
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns a new [TranslationAndResourceDTO] instance and imports its values from
|
||||||
|
/// [value] if it's a [Map], null otherwise.
|
||||||
|
// ignore: prefer_constructors_over_static_methods
|
||||||
|
static TranslationAndResourceDTO? 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 "TranslationAndResourceDTO[$key]" is missing from JSON.');
|
||||||
|
assert(json[key] != null, 'Required key "TranslationAndResourceDTO[$key]" has a null value in JSON.');
|
||||||
|
});
|
||||||
|
return true;
|
||||||
|
}());
|
||||||
|
|
||||||
|
return TranslationAndResourceDTO(
|
||||||
|
language: mapValueOfType<String>(json, r'language'),
|
||||||
|
value: mapValueOfType<String>(json, r'value'),
|
||||||
|
resourceId: mapValueOfType<String>(json, r'resourceId'),
|
||||||
|
resourceType: ResourceType.fromJson(json[r'resourceType']),
|
||||||
|
resourceUrl: mapValueOfType<String>(json, r'resourceUrl'),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<TranslationAndResourceDTO> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
|
final result = <TranslationAndResourceDTO>[];
|
||||||
|
if (json is List && json.isNotEmpty) {
|
||||||
|
for (final row in json) {
|
||||||
|
final value = TranslationAndResourceDTO.fromJson(row);
|
||||||
|
if (value != null) {
|
||||||
|
result.add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.toList(growable: growable);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Map<String, TranslationAndResourceDTO> mapFromJson(dynamic json) {
|
||||||
|
final map = <String, TranslationAndResourceDTO>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
final value = TranslationAndResourceDTO.fromJson(entry.value);
|
||||||
|
if (value != null) {
|
||||||
|
map[entry.key] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
// maps a json object with a list of TranslationAndResourceDTO-objects as value to a dart map
|
||||||
|
static Map<String, List<TranslationAndResourceDTO>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
|
final map = <String, List<TranslationAndResourceDTO>>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
map[entry.key] = TranslationAndResourceDTO.listFromJson(entry.value, growable: growable,);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The list of required keys that must be present in a JSON.
|
||||||
|
static const requiredKeys = <String>{
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
47
manager_api/test/translation_and_resource_dto_test.dart
Normal file
47
manager_api/test/translation_and_resource_dto_test.dart
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
// @dart=2.12
|
||||||
|
|
||||||
|
// 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
|
||||||
|
|
||||||
|
import 'package:manager_api/api.dart';
|
||||||
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
|
// tests for TranslationAndResourceDTO
|
||||||
|
void main() {
|
||||||
|
// final instance = TranslationAndResourceDTO();
|
||||||
|
|
||||||
|
group('test TranslationAndResourceDTO', () {
|
||||||
|
// String language
|
||||||
|
test('to test the property `language`', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
// String value
|
||||||
|
test('to test the property `value`', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
// String resourceId
|
||||||
|
test('to test the property `resourceId`', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
// ResourceType resourceType
|
||||||
|
test('to test the property `resourceType`', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
// String resourceUrl
|
||||||
|
test('to test the property `resourceUrl`', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user