ffbb-api-client-v2 1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. ffbb_api_client_v2/Affiche.py +34 -0
  2. ffbb_api_client_v2/Cartographie.py +120 -0
  3. ffbb_api_client_v2/Categorie.py +60 -0
  4. ffbb_api_client_v2/Code.py +7 -0
  5. ffbb_api_client_v2/Commune.py +95 -0
  6. ffbb_api_client_v2/CompetitionID.py +170 -0
  7. ffbb_api_client_v2/CompetitionIDCategorie.py +34 -0
  8. ffbb_api_client_v2/CompetitionIDSexe.py +34 -0
  9. ffbb_api_client_v2/CompetitionIDTypeCompetition.py +27 -0
  10. ffbb_api_client_v2/CompetitionIDTypeCompetitionGenerique.py +27 -0
  11. ffbb_api_client_v2/CompetitionOrigine.py +86 -0
  12. ffbb_api_client_v2/CompetitionOrigineCategorie.py +22 -0
  13. ffbb_api_client_v2/CompetitionOrigineTypeCompetition.py +14 -0
  14. ffbb_api_client_v2/CompetitionOrigineTypeCompetitionGenerique.py +25 -0
  15. ffbb_api_client_v2/Coordonnees.py +31 -0
  16. ffbb_api_client_v2/CoordonneesType.py +5 -0
  17. ffbb_api_client_v2/DocumentFlyer.py +243 -0
  18. ffbb_api_client_v2/DocumentFlyerType.py +6 -0
  19. ffbb_api_client_v2/Etat.py +6 -0
  20. ffbb_api_client_v2/FacetDistribution.py +12 -0
  21. ffbb_api_client_v2/FacetStats.py +12 -0
  22. ffbb_api_client_v2/Folder.py +28 -0
  23. ffbb_api_client_v2/Geo.py +27 -0
  24. ffbb_api_client_v2/GradientColor.py +27 -0
  25. ffbb_api_client_v2/Hit.py +16 -0
  26. ffbb_api_client_v2/IDEngagementEquipe.py +33 -0
  27. ffbb_api_client_v2/IDOrganismeEquipe.py +60 -0
  28. ffbb_api_client_v2/IDOrganismeEquipe1Logo.py +30 -0
  29. ffbb_api_client_v2/IDPoule.py +27 -0
  30. ffbb_api_client_v2/Jour.py +11 -0
  31. ffbb_api_client_v2/Label.py +15 -0
  32. ffbb_api_client_v2/Labellisation.py +37 -0
  33. ffbb_api_client_v2/MultiSearchResultCompetitions.py +25 -0
  34. ffbb_api_client_v2/MultiSearchResultOrganismes.py +23 -0
  35. ffbb_api_client_v2/MultiSearchResultPratiques.py +23 -0
  36. ffbb_api_client_v2/MultiSearchResultRencontres.py +23 -0
  37. ffbb_api_client_v2/MultiSearchResultSalles.py +23 -0
  38. ffbb_api_client_v2/MultiSearchResultTerrains.py +23 -0
  39. ffbb_api_client_v2/MultiSearchResultTournois.py +23 -0
  40. ffbb_api_client_v2/MultiSearchResults.py +81 -0
  41. ffbb_api_client_v2/NatureSol.py +68 -0
  42. ffbb_api_client_v2/Niveau.py +9 -0
  43. ffbb_api_client_v2/NiveauClass.py +29 -0
  44. ffbb_api_client_v2/NiveauEnum.py +8 -0
  45. ffbb_api_client_v2/Objectif.py +7 -0
  46. ffbb_api_client_v2/Organisateur.py +310 -0
  47. ffbb_api_client_v2/OrganisateurType.py +6 -0
  48. ffbb_api_client_v2/OrganismeIDPere.py +279 -0
  49. ffbb_api_client_v2/PhaseCode.py +20 -0
  50. ffbb_api_client_v2/Poule.py +44 -0
  51. ffbb_api_client_v2/Pratique.py +5 -0
  52. ffbb_api_client_v2/PublicationInternet.py +6 -0
  53. ffbb_api_client_v2/PurpleLogo.py +23 -0
  54. ffbb_api_client_v2/Saison.py +22 -0
  55. ffbb_api_client_v2/Sexe.py +26 -0
  56. ffbb_api_client_v2/Source.py +5 -0
  57. ffbb_api_client_v2/Status.py +5 -0
  58. ffbb_api_client_v2/TeamEngagement.py +63 -0
  59. ffbb_api_client_v2/TournoiTypeClass.py +41 -0
  60. ffbb_api_client_v2/TournoiTypeEnum.py +7 -0
  61. ffbb_api_client_v2/TypeAssociation.py +22 -0
  62. ffbb_api_client_v2/TypeAssociationLibelle.py +33 -0
  63. ffbb_api_client_v2/TypeClass.py +22 -0
  64. ffbb_api_client_v2/TypeCompetition.py +8 -0
  65. ffbb_api_client_v2/TypeCompetitionGenerique.py +32 -0
  66. ffbb_api_client_v2/TypeEnum.py +7 -0
  67. ffbb_api_client_v2/TypeLeague.py +6 -0
  68. ffbb_api_client_v2/__init__.py +52 -0
  69. ffbb_api_client_v2/api_ffbb_app_client.py +60 -0
  70. ffbb_api_client_v2/competition_type.py +29 -0
  71. ffbb_api_client_v2/converters.py +126 -0
  72. ffbb_api_client_v2/external_id.py +164 -0
  73. ffbb_api_client_v2/ffbb_api_client_v2.py +194 -0
  74. ffbb_api_client_v2/from_dict.py +0 -0
  75. ffbb_api_client_v2/http_requests_helper.py +50 -0
  76. ffbb_api_client_v2/http_requests_utils.py +205 -0
  77. ffbb_api_client_v2/lives.py +347 -0
  78. ffbb_api_client_v2/logo.py +30 -0
  79. ffbb_api_client_v2/meilisearch_client.py +61 -0
  80. ffbb_api_client_v2/meilisearch_client_extension.py +64 -0
  81. ffbb_api_client_v2/meilisearch_ffbb_client.py +15 -0
  82. ffbb_api_client_v2/multi_search_queries.py +37 -0
  83. ffbb_api_client_v2/multi_search_query.py +375 -0
  84. ffbb_api_client_v2/multi_search_query_helper.py +23 -0
  85. ffbb_api_client_v2/multi_search_result_competitions.py +476 -0
  86. ffbb_api_client_v2/multi_search_result_organismes.py +358 -0
  87. ffbb_api_client_v2/multi_search_result_pratiques.py +843 -0
  88. ffbb_api_client_v2/multi_search_result_rencontres.py +523 -0
  89. ffbb_api_client_v2/multi_search_result_salles.py +224 -0
  90. ffbb_api_client_v2/multi_search_result_terrains.py +618 -0
  91. ffbb_api_client_v2/multi_search_result_tournois.py +285 -0
  92. ffbb_api_client_v2/multi_search_results.py +122 -0
  93. ffbb_api_client_v2/salle.py +65 -0
  94. ffbb_api_client_v2-1.0.dist-info/LICENSE.txt +201 -0
  95. ffbb_api_client_v2-1.0.dist-info/METADATA +145 -0
  96. ffbb_api_client_v2-1.0.dist-info/RECORD +98 -0
  97. ffbb_api_client_v2-1.0.dist-info/WHEEL +5 -0
  98. ffbb_api_client_v2-1.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,34 @@
1
+ from typing import Any, Optional
2
+ from uuid import UUID
3
+
4
+ from .converters import from_int, from_none, from_str, from_union
5
+
6
+
7
+ class Affiche:
8
+ affiche_id: Optional[UUID] = None
9
+ gradient_color: Optional[str] = None
10
+ width: Optional[int] = None
11
+ height: Optional[int] = None
12
+
13
+ @staticmethod
14
+ def from_dict(obj: Any) -> "Affiche":
15
+ assert isinstance(obj, dict)
16
+ affiche_id = from_union([lambda x: UUID(x), from_none], obj.get("id"))
17
+ gradient_color = from_union([from_none, from_str], obj.get("gradient_color"))
18
+ width = from_union([from_int, from_none], obj.get("width"))
19
+ height = from_union([from_int, from_none], obj.get("height"))
20
+ return Affiche(affiche_id, gradient_color, width, height)
21
+
22
+ def to_dict(self) -> dict:
23
+ result: dict = {}
24
+ if self.affiche_id is not None:
25
+ result["id"] = from_union([lambda x: str(x), from_none], self.affiche_id)
26
+ if self.gradient_color is not None:
27
+ result["gradient_color"] = from_union(
28
+ [from_none, from_str], self.gradient_color
29
+ )
30
+ if self.width is not None:
31
+ result["width"] = from_union([from_int, from_none], self.width)
32
+ if self.height is not None:
33
+ result["height"] = from_union([from_int, from_none], self.height)
34
+ return result
@@ -0,0 +1,120 @@
1
+ from typing import Any, Optional
2
+
3
+ from .converters import (
4
+ from_float,
5
+ from_none,
6
+ from_str,
7
+ from_union,
8
+ is_type,
9
+ to_class,
10
+ to_float,
11
+ )
12
+ from .Coordonnees import Coordonnees
13
+
14
+
15
+ class Cartographie:
16
+ adresse: Optional[str] = None
17
+ code_postal: Optional[int] = None
18
+ coordonnees: Optional[Coordonnees] = None
19
+ date_created: None
20
+ date_updated: None
21
+ cartographie_id: Optional[str] = None
22
+ latitude: Optional[float] = None
23
+ longitude: Optional[float] = None
24
+ title: Optional[str] = None
25
+ ville: Optional[str] = None
26
+ status: Optional[str] = None
27
+
28
+ def __init__(
29
+ self,
30
+ adresse: Optional[str],
31
+ code_postal: Optional[int],
32
+ coordonnees: Optional[Coordonnees],
33
+ date_created: None,
34
+ date_updated: None,
35
+ id: Optional[str],
36
+ latitude: Optional[float],
37
+ longitude: Optional[float],
38
+ title: Optional[str],
39
+ ville: Optional[str],
40
+ status: Optional[str],
41
+ ):
42
+ self.adresse = adresse
43
+ self.code_postal = code_postal
44
+ self.coordonnees = coordonnees
45
+ self.date_created = date_created
46
+ self.date_updated = date_updated
47
+ self.cartographie_id = id
48
+ self.latitude = latitude
49
+ self.longitude = longitude
50
+ self.title = title
51
+ self.ville = ville
52
+ self.status = status
53
+
54
+ @staticmethod
55
+ def from_dict(obj: Any) -> "Cartographie":
56
+ assert isinstance(obj, dict)
57
+ adresse = from_union([from_str, from_none], obj.get("adresse"))
58
+ code_postal = from_union(
59
+ [lambda x: int(from_str(x)), from_none], obj.get("codePostal")
60
+ )
61
+ coordonnees = from_union(
62
+ [Coordonnees.from_dict, from_none], obj.get("coordonnees")
63
+ )
64
+ date_created = from_none(obj.get("date_created"))
65
+ date_updated = from_none(obj.get("date_updated"))
66
+ cartographie_id = from_union([from_str, from_none], obj.get("id"))
67
+ latitude = from_union([from_float, from_none], obj.get("latitude"))
68
+ longitude = from_union([from_float, from_none], obj.get("longitude"))
69
+ title = from_union([from_str, from_none], obj.get("title"))
70
+ ville = from_union([from_str, from_none], obj.get("ville"))
71
+ status = from_union([from_str, from_none], obj.get("status"))
72
+ return Cartographie(
73
+ adresse,
74
+ code_postal,
75
+ coordonnees,
76
+ date_created,
77
+ date_updated,
78
+ cartographie_id,
79
+ latitude,
80
+ longitude,
81
+ title,
82
+ ville,
83
+ status,
84
+ )
85
+
86
+ def to_dict(self) -> dict:
87
+ result: dict = {}
88
+ if self.adresse is not None:
89
+ result["adresse"] = from_union([from_str, from_none], self.adresse)
90
+ if self.code_postal is not None:
91
+ result["codePostal"] = from_union(
92
+ [
93
+ lambda x: from_none((lambda x: is_type(type(None), x))(x)),
94
+ lambda x: from_str(
95
+ (lambda x: str((lambda x: is_type(int, x))(x)))(x)
96
+ ),
97
+ ],
98
+ self.code_postal,
99
+ )
100
+ if self.coordonnees is not None:
101
+ result["coordonnees"] = from_union(
102
+ [lambda x: to_class(Coordonnees, x), from_none], self.coordonnees
103
+ )
104
+ if self.date_created is not None:
105
+ result["date_created"] = from_none(self.date_created)
106
+ if self.date_updated is not None:
107
+ result["date_updated"] = from_none(self.date_updated)
108
+ if self.cartographie_id is not None:
109
+ result["id"] = from_union([from_str, from_none], self.cartographie_id)
110
+ if self.latitude is not None:
111
+ result["latitude"] = from_union([to_float, from_none], self.latitude)
112
+ if self.longitude is not None:
113
+ result["longitude"] = from_union([to_float, from_none], self.longitude)
114
+ if self.title is not None:
115
+ result["title"] = from_union([from_str, from_none], self.title)
116
+ if self.ville is not None:
117
+ result["ville"] = from_union([from_str, from_none], self.ville)
118
+ if self.status is not None:
119
+ result["status"] = from_union([from_str, from_none], self.status)
120
+ return result
@@ -0,0 +1,60 @@
1
+ from datetime import datetime
2
+ from typing import Any, Optional
3
+
4
+ from .converters import from_datetime, from_int, from_none, from_str, from_union
5
+
6
+
7
+ class Categorie:
8
+ code: Optional[str] = None
9
+ date_created: Optional[datetime] = None
10
+ date_updated: Optional[datetime] = None
11
+ categorie_id: Optional[str] = None
12
+ libelle: Optional[str] = None
13
+ ordre: Optional[int] = None
14
+
15
+ def __init__(
16
+ self,
17
+ code: Optional[str] = None,
18
+ date_created: Optional[datetime] = None,
19
+ date_updated: Optional[datetime] = None,
20
+ id: Optional[str] = None,
21
+ libelle: Optional[str] = None,
22
+ ordre: Optional[int] = None,
23
+ ) -> None:
24
+ self.code = code
25
+ self.date_created = date_created
26
+ self.date_updated = date_updated
27
+ self.categorie_id = id
28
+ self.libelle = libelle
29
+ self.ordre = ordre
30
+
31
+ @staticmethod
32
+ def from_dict(obj: Any) -> "Categorie":
33
+ assert isinstance(obj, dict)
34
+ code = from_union([from_str, from_none], obj.get("code"))
35
+ date_created = from_union([from_datetime, from_none], obj.get("date_created"))
36
+ date_updated = from_union([from_datetime, from_none], obj.get("date_updated"))
37
+ categorie_id = from_union([from_str, from_none], obj.get("id"))
38
+ libelle = from_union([from_str, from_none], obj.get("libelle"))
39
+ ordre = from_union([from_int, from_none], obj.get("ordre"))
40
+ return Categorie(code, date_created, date_updated, categorie_id, libelle, ordre)
41
+
42
+ def to_dict(self) -> dict:
43
+ result: dict = {}
44
+ if self.code is not None:
45
+ result["code"] = from_union([from_str, from_none], self.code)
46
+ if self.date_created is not None:
47
+ result["date_created"] = from_union(
48
+ [lambda x: x.isoformat(), from_none], self.date_created
49
+ )
50
+ if self.date_updated is not None:
51
+ result["date_updated"] = from_union(
52
+ [lambda x: x.isoformat(), from_none], self.date_updated
53
+ )
54
+ if self.categorie_id is not None:
55
+ result["id"] = from_union([from_str, from_none], self.categorie_id)
56
+ if self.libelle is not None:
57
+ result["libelle"] = from_union([from_str, from_none], self.libelle)
58
+ if self.ordre is not None:
59
+ result["ordre"] = from_union([from_int, from_none], self.ordre)
60
+ return result
@@ -0,0 +1,7 @@
1
+ from enum import Enum
2
+
3
+
4
+ class Code(Enum):
5
+ BIT = "BIT"
6
+ BT = "BT"
7
+ SS = "SS"
@@ -0,0 +1,95 @@
1
+ from datetime import datetime
2
+ from typing import Any, Optional
3
+
4
+ from .converters import from_datetime, from_none, from_str, from_union, is_type
5
+
6
+
7
+ class Commune:
8
+ code_insee: None
9
+ code_postal: Optional[int] = None
10
+ date_created: Optional[datetime] = None
11
+ date_updated: Optional[datetime] = None
12
+ commune_id: Optional[int] = None
13
+ libelle: Optional[str] = None
14
+ departement: Optional[str] = None
15
+
16
+ def __init__(
17
+ self,
18
+ code_insee: None,
19
+ code_postal: Optional[int],
20
+ date_created: Optional[datetime],
21
+ date_updated: Optional[datetime],
22
+ id: Optional[int],
23
+ libelle: Optional[str],
24
+ departement: Optional[str],
25
+ ):
26
+ self.code_insee = code_insee
27
+ self.code_postal = code_postal
28
+ self.date_created = date_created
29
+ self.date_updated = date_updated
30
+ self.commune_id = id
31
+ self.libelle = libelle
32
+ self.lower_libelle = libelle.lower() if libelle else None
33
+
34
+ self.departement = departement
35
+ self.lower_departement = departement.lower() if departement else None
36
+
37
+ @staticmethod
38
+ def from_dict(obj: Any) -> "Commune":
39
+ assert isinstance(obj, dict)
40
+ code_insee = from_none(obj.get("codeInsee"))
41
+ code_postal = from_union(
42
+ [lambda x: int(from_str(x)), from_none], obj.get("codePostal")
43
+ )
44
+ date_created = from_union([from_datetime, from_none], obj.get("date_created"))
45
+ date_updated = from_union([from_datetime, from_none], obj.get("date_updated"))
46
+ commune_id = from_union([lambda x: int(from_str(x)), from_none], obj.get("id"))
47
+ libelle = from_union([from_str, from_none], obj.get("libelle"))
48
+ departement = from_union([from_str, from_none], obj.get("departement"))
49
+ return Commune(
50
+ code_insee,
51
+ code_postal,
52
+ date_created,
53
+ date_updated,
54
+ commune_id,
55
+ libelle,
56
+ departement,
57
+ )
58
+
59
+ def to_dict(self) -> dict:
60
+ result: dict = {}
61
+ if self.code_insee is not None:
62
+ result["codeInsee"] = from_none(self.code_insee)
63
+ if self.code_postal is not None:
64
+ result["codePostal"] = from_union(
65
+ [
66
+ lambda x: from_none((lambda x: is_type(type(None), x))(x)),
67
+ lambda x: from_str(
68
+ (lambda x: str((lambda x: is_type(int, x))(x)))(x)
69
+ ),
70
+ ],
71
+ self.code_postal,
72
+ )
73
+ if self.date_created is not None:
74
+ result["date_created"] = from_union(
75
+ [lambda x: x.isoformat(), from_none], self.date_created
76
+ )
77
+ if self.date_updated is not None:
78
+ result["date_updated"] = from_union(
79
+ [lambda x: x.isoformat(), from_none], self.date_updated
80
+ )
81
+ if self.commune_id is not None:
82
+ result["id"] = from_union(
83
+ [
84
+ lambda x: from_none((lambda x: is_type(type(None), x))(x)),
85
+ lambda x: from_str(
86
+ (lambda x: str((lambda x: is_type(int, x))(x)))(x)
87
+ ),
88
+ ],
89
+ self.commune_id,
90
+ )
91
+ if self.libelle is not None:
92
+ result["libelle"] = from_union([from_str, from_none], self.libelle)
93
+ if self.departement is not None:
94
+ result["departement"] = from_union([from_str, from_none], self.departement)
95
+ return result
@@ -0,0 +1,170 @@
1
+ from typing import Any, Optional
2
+
3
+ from .CompetitionIDCategorie import CompetitionIDCategorie
4
+ from .CompetitionIDTypeCompetitionGenerique import CompetitionIDTypeCompetitionGenerique
5
+ from .CompetitionOrigine import CompetitionOrigine
6
+ from .converters import from_bool, from_none, from_str, from_union, to_class
7
+ from .logo import Logo
8
+
9
+
10
+ class CompetitionID:
11
+ id: Optional[str] = None
12
+ nom: Optional[str] = None
13
+ competition_origine_nom: Optional[str] = None
14
+ code: Optional[str] = None
15
+ creation_en_cours: Optional[bool] = None
16
+ live_stat: Optional[bool] = None
17
+ publication_internet: Optional[str] = None
18
+ sexe: Optional[str] = None
19
+ type_competition: Optional[str] = None
20
+ pro: Optional[bool] = None
21
+ logo: Logo
22
+ categorie: Optional[str] = None
23
+ type_competition_generique: Optional[CompetitionIDTypeCompetitionGenerique] = None
24
+ competition_origine: Optional[CompetitionOrigine] = None
25
+ nom_extended: Optional[str] = None
26
+
27
+ def __init__(
28
+ self,
29
+ id: Optional[str],
30
+ nom: Optional[str],
31
+ competition_origine_nom: Optional[str],
32
+ code: Optional[str],
33
+ creation_en_cours: Optional[bool],
34
+ live_stat: Optional[bool],
35
+ publication_internet: Optional[str],
36
+ sexe: Optional[str],
37
+ type_competition: Optional[str],
38
+ pro: Optional[bool],
39
+ logo: Logo,
40
+ categorie: Optional[str],
41
+ type_competition_generique: Optional[CompetitionIDTypeCompetitionGenerique],
42
+ competition_origine: Optional[CompetitionOrigine],
43
+ nom_extended: Optional[str],
44
+ ) -> None:
45
+ self.id = id
46
+ self.nom = nom
47
+ self.competition_origine_nom = competition_origine_nom
48
+ self.code = code
49
+ self.creation_en_cours = creation_en_cours
50
+ self.live_stat = live_stat
51
+ self.publication_internet = publication_internet
52
+ self.sexe = sexe
53
+ self.type_competition = type_competition
54
+ self.pro = pro
55
+ self.logo = logo
56
+ self.categorie = categorie
57
+ self.type_competition_generique = type_competition_generique
58
+ self.competition_origine = competition_origine
59
+ self.nom_extended = nom_extended
60
+
61
+ @staticmethod
62
+ def from_dict(obj: Any) -> "CompetitionID":
63
+ try:
64
+ assert isinstance(obj, dict)
65
+ id = from_union([from_str, from_none], obj.get("id"))
66
+ nom = from_union([from_str, from_none], obj.get("nom"))
67
+ competition_origine_nom = from_union(
68
+ [from_str, from_none], obj.get("competition_origine_nom")
69
+ )
70
+ code = from_union([from_str, from_none], obj.get("code"))
71
+ creation_en_cours = from_union(
72
+ [from_bool, from_none], obj.get("creationEnCours")
73
+ )
74
+ live_stat = from_union([from_bool, from_none], obj.get("liveStat"))
75
+ publication_internet = from_union(
76
+ [from_str, from_none], obj.get("publicationInternet")
77
+ )
78
+ sexe = from_union([from_str, from_none], obj.get("sexe"))
79
+ type_competition = from_union(
80
+ [from_str, from_none], obj.get("typeCompetition")
81
+ )
82
+ pro = from_union([from_bool, from_none], obj.get("pro"))
83
+ logo = from_union([Logo.from_dict, from_none], obj.get("logo"))
84
+ categorie = from_union(
85
+ [CompetitionIDCategorie.from_dict, from_none], obj.get("categorie")
86
+ )
87
+ type_competition_generique = from_union(
88
+ [CompetitionIDTypeCompetitionGenerique.from_dict, from_none],
89
+ obj.get("typeCompetitionGenerique"),
90
+ )
91
+ competition_origine = from_union(
92
+ [CompetitionOrigine.from_dict, from_none],
93
+ obj.get("competition_origine"),
94
+ )
95
+ nom_extended = from_union([from_str, from_none], obj.get("nomExtended"))
96
+ return CompetitionID(
97
+ id,
98
+ nom,
99
+ competition_origine_nom,
100
+ code,
101
+ creation_en_cours,
102
+ live_stat,
103
+ publication_internet,
104
+ sexe,
105
+ type_competition,
106
+ pro,
107
+ logo,
108
+ categorie,
109
+ type_competition_generique,
110
+ competition_origine,
111
+ nom_extended,
112
+ )
113
+ except Exception as e:
114
+ raise ValueError("Invalid CompetitionID object") from e
115
+
116
+ def to_dict(self) -> dict:
117
+ result: dict = {}
118
+ if self.id is not None:
119
+ result["id"] = from_union([from_str, from_none], self.id)
120
+ if self.nom is not None:
121
+ result["nom"] = from_union([from_str, from_none], self.nom)
122
+ if self.competition_origine_nom is not None:
123
+ result["competition_origine_nom"] = from_union(
124
+ [from_str, from_none], self.competition_origine_nom
125
+ )
126
+ if self.code is not None:
127
+ result["code"] = from_union([from_str, from_none], self.code)
128
+ if self.creation_en_cours is not None:
129
+ result["creationEnCours"] = from_union(
130
+ [from_bool, from_none], self.creation_en_cours
131
+ )
132
+ if self.live_stat is not None:
133
+ result["liveStat"] = from_union([from_bool, from_none], self.live_stat)
134
+ if self.publication_internet is not None:
135
+ result["publicationInternet"] = from_union(
136
+ [from_str, from_none],
137
+ self.publication_internet,
138
+ )
139
+ if self.sexe is not None:
140
+ result["sexe"] = from_union([from_str, from_none], self.sexe)
141
+ if self.type_competition is not None:
142
+ result["typeCompetition"] = from_union(
143
+ [from_str, from_none],
144
+ self.type_competition,
145
+ )
146
+ if self.pro is not None:
147
+ result["pro"] = from_union([from_bool, from_none], self.pro)
148
+ if self.logo is not None:
149
+ result["logo"] = from_none(self.logo)
150
+ if self.categorie is not None:
151
+ result["categorie"] = from_union(
152
+ [lambda x: to_class(CompetitionIDCategorie, x), from_none],
153
+ self.categorie,
154
+ )
155
+ if self.type_competition_generique is not None:
156
+ result["typeCompetitionGenerique"] = from_union(
157
+ [
158
+ lambda x: to_class(CompetitionIDTypeCompetitionGenerique, x),
159
+ from_none,
160
+ ],
161
+ self.type_competition_generique,
162
+ )
163
+ if self.competition_origine is not None:
164
+ result["competition_origine"] = from_union(
165
+ [lambda x: to_class(CompetitionOrigine, x), from_none],
166
+ self.competition_origine,
167
+ )
168
+ if self.nom_extended is not None:
169
+ result["nomExtended"] = from_union([from_str, from_none], self.nom_extended)
170
+ return result
@@ -0,0 +1,34 @@
1
+ from typing import Any, Optional
2
+
3
+ from .converters import from_int, from_none, from_str, from_union
4
+
5
+
6
+ class CompetitionIDCategorie:
7
+ code: Optional[str] = None
8
+ libelle: Optional[str] = None
9
+ ordre: Optional[int] = None
10
+
11
+ def __init__(
12
+ self, code: Optional[str], libelle: Optional[str], ordre: Optional[int]
13
+ ) -> None:
14
+ self.code = code
15
+ self.libelle = libelle
16
+ self.ordre = ordre
17
+
18
+ @staticmethod
19
+ def from_dict(obj: Any) -> "CompetitionIDCategorie":
20
+ assert isinstance(obj, dict)
21
+ code = from_union([from_str, from_none], obj.get("code"))
22
+ libelle = from_union([from_str, from_none], obj.get("libelle"))
23
+ ordre = from_union([from_int, from_none], obj.get("ordre"))
24
+ return CompetitionIDCategorie(code, libelle, ordre)
25
+
26
+ def to_dict(self) -> dict:
27
+ result: dict = {}
28
+ if self.code is not None:
29
+ result["code"] = from_union([from_str, from_none], self.code)
30
+ if self.libelle is not None:
31
+ result["libelle"] = from_union([from_str, from_none], self.libelle)
32
+ if self.ordre is not None:
33
+ result["ordre"] = from_union([from_int, from_none], self.ordre)
34
+ return result
@@ -0,0 +1,34 @@
1
+ from typing import Any, Optional
2
+
3
+ from .converters import from_int, from_none, from_union
4
+
5
+
6
+ class CompetitionIDSexe:
7
+ féminin: Optional[int] = None
8
+ masculin: Optional[int] = None
9
+ mixte: Optional[int] = None
10
+
11
+ def __init__(
12
+ self, féminin: Optional[int], masculin: Optional[int], mixte: Optional[int]
13
+ ) -> None:
14
+ self.féminin = féminin
15
+ self.masculin = masculin
16
+ self.mixte = mixte
17
+
18
+ @staticmethod
19
+ def from_dict(obj: Any) -> "CompetitionIDSexe":
20
+ assert isinstance(obj, dict)
21
+ féminin = from_union([from_int, from_none], obj.get("Féminin"))
22
+ masculin = from_union([from_int, from_none], obj.get("Masculin"))
23
+ mixte = from_union([from_int, from_none], obj.get("Mixte"))
24
+ return CompetitionIDSexe(féminin, masculin, mixte)
25
+
26
+ def to_dict(self) -> dict:
27
+ result: dict = {}
28
+ if self.féminin is not None:
29
+ result["Féminin"] = from_union([from_int, from_none], self.féminin)
30
+ if self.masculin is not None:
31
+ result["Masculin"] = from_union([from_int, from_none], self.masculin)
32
+ if self.mixte is not None:
33
+ result["Mixte"] = from_union([from_int, from_none], self.mixte)
34
+ return result
@@ -0,0 +1,27 @@
1
+ from typing import Any, Optional
2
+
3
+ from .converters import from_int, from_none, from_union
4
+
5
+
6
+ class CompetitionIDTypeCompetition:
7
+ championnat: Optional[int] = None
8
+ coupe: Optional[int] = None
9
+
10
+ def __init__(self, championnat: Optional[int], coupe: Optional[int]) -> None:
11
+ self.championnat = championnat
12
+ self.coupe = coupe
13
+
14
+ @staticmethod
15
+ def from_dict(obj: Any) -> "CompetitionIDTypeCompetition":
16
+ assert isinstance(obj, dict)
17
+ championnat = from_union([from_int, from_none], obj.get("Championnat"))
18
+ coupe = from_union([from_int, from_none], obj.get("Coupe"))
19
+ return CompetitionIDTypeCompetition(championnat, coupe)
20
+
21
+ def to_dict(self) -> dict:
22
+ result: dict = {}
23
+ if self.championnat is not None:
24
+ result["Championnat"] = from_union([from_int, from_none], self.championnat)
25
+ if self.coupe is not None:
26
+ result["Coupe"] = from_union([from_int, from_none], self.coupe)
27
+ return result
@@ -0,0 +1,27 @@
1
+ from typing import Any, Optional
2
+
3
+ from .converters import from_none, from_union, to_class
4
+ from .IDOrganismeEquipe1Logo import IDOrganismeEquipe1Logo
5
+
6
+
7
+ class CompetitionIDTypeCompetitionGenerique:
8
+ logo: Optional[IDOrganismeEquipe1Logo] = None
9
+
10
+ def __init__(self, logo: Optional[IDOrganismeEquipe1Logo]) -> None:
11
+ self.logo = logo
12
+
13
+ @staticmethod
14
+ def from_dict(obj: Any) -> "CompetitionIDTypeCompetitionGenerique":
15
+ assert isinstance(obj, dict)
16
+ logo = from_union(
17
+ [IDOrganismeEquipe1Logo.from_dict, from_none], obj.get("logo")
18
+ )
19
+ return CompetitionIDTypeCompetitionGenerique(logo)
20
+
21
+ def to_dict(self) -> dict:
22
+ result: dict = {}
23
+ if self.logo is not None:
24
+ result["logo"] = from_union(
25
+ [lambda x: to_class(IDOrganismeEquipe1Logo, x), from_none], self.logo
26
+ )
27
+ return result