funapi-sciencedb 1.0.1__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 (54) hide show
  1. funapi_sciencedb-1.0.1.dist-info/LICENSE +21 -0
  2. funapi_sciencedb-1.0.1.dist-info/METADATA +10 -0
  3. funapi_sciencedb-1.0.1.dist-info/RECORD +54 -0
  4. funapi_sciencedb-1.0.1.dist-info/WHEEL +5 -0
  5. funapi_sciencedb-1.0.1.dist-info/top_level.txt +1 -0
  6. sciencedb/__init__.py +8 -0
  7. sciencedb/api/__init__.py +1 -0
  8. sciencedb/api/open_api_controller/__init__.py +0 -0
  9. sciencedb/api/open_api_controller/harvest_using_get.py +211 -0
  10. sciencedb/api/open_api_controller/json_using_get.py +164 -0
  11. sciencedb/api/open_api_controller/metrics_using_get.py +166 -0
  12. sciencedb/api/open_api_controller/search_using_get.py +196 -0
  13. sciencedb/api/sushi_controller/__init__.py +0 -0
  14. sciencedb/api/sushi_controller/get_api_status.py +171 -0
  15. sciencedb/api/sushi_controller/get_report_by_id_using_get.py +173 -0
  16. sciencedb/api/sushi_controller/get_reports.py +181 -0
  17. sciencedb/client.py +286 -0
  18. sciencedb/errors.py +16 -0
  19. sciencedb/models/__init__.py +75 -0
  20. sciencedb/models/api_result_metrics_result.py +99 -0
  21. sciencedb/models/api_result_search_result.py +99 -0
  22. sciencedb/models/counter_dataset_attributes.py +69 -0
  23. sciencedb/models/counter_dataset_attributes_type.py +10 -0
  24. sciencedb/models/counter_dataset_contributors.py +68 -0
  25. sciencedb/models/counter_dataset_contributors_type.py +10 -0
  26. sciencedb/models/counter_dataset_dates.py +68 -0
  27. sciencedb/models/counter_dataset_dates_type.py +10 -0
  28. sciencedb/models/counter_dataset_identifiers.py +68 -0
  29. sciencedb/models/counter_dataset_identifiers_type.py +10 -0
  30. sciencedb/models/counter_dataset_instance.py +98 -0
  31. sciencedb/models/counter_dataset_instance_access_method.py +9 -0
  32. sciencedb/models/counter_dataset_instance_metric_type.py +11 -0
  33. sciencedb/models/counter_dataset_performance.py +82 -0
  34. sciencedb/models/counter_dataset_period.py +83 -0
  35. sciencedb/models/counter_dataset_report.py +106 -0
  36. sciencedb/models/counter_dataset_usage.py +230 -0
  37. sciencedb/models/counter_dataset_usage_data_type.py +8 -0
  38. sciencedb/models/counter_publisher_identifiers.py +68 -0
  39. sciencedb/models/counter_publisher_identifiers_type.py +10 -0
  40. sciencedb/models/metrics_result.py +95 -0
  41. sciencedb/models/search_record.py +150 -0
  42. sciencedb/models/search_result.py +111 -0
  43. sciencedb/models/sushi_error_model.py +97 -0
  44. sciencedb/models/sushi_error_model_severity.py +11 -0
  45. sciencedb/models/sushi_page_meta.py +77 -0
  46. sciencedb/models/sushi_report.py +72 -0
  47. sciencedb/models/sushi_report_header.py +189 -0
  48. sciencedb/models/sushi_report_header_report_attributes_item.py +43 -0
  49. sciencedb/models/sushi_report_header_report_filters_item.py +43 -0
  50. sciencedb/models/sushi_report_list.py +82 -0
  51. sciencedb/models/sushi_report_page.py +93 -0
  52. sciencedb/models/sushi_service_status.py +118 -0
  53. sciencedb/models/sushi_service_status_alerts_item.py +43 -0
  54. sciencedb/types.py +53 -0
@@ -0,0 +1,97 @@
1
+ from typing import Any, Dict, List, Type, TypeVar, Union
2
+
3
+ from attrs import define as _attrs_define
4
+ from attrs import field as _attrs_field
5
+
6
+ from ..models.sushi_error_model_severity import SUSHIErrorModelSeverity
7
+ from ..types import UNSET, Unset
8
+
9
+ T = TypeVar("T", bound="SUSHIErrorModel")
10
+
11
+
12
+ @_attrs_define
13
+ class SUSHIErrorModel:
14
+ """Generalized format for presenting errors and exceptions.
15
+
16
+ Attributes:
17
+ code (int): Error number. See table of error. Example: 3040.
18
+ message (str): Text describing the error. Example: Partial Data Returned..
19
+ severity (SUSHIErrorModelSeverity): Severity of the error. Example: Warning.
20
+ data (Union[Unset, str]): Additional data provided by the server to clarify the error. Example: Usage data has
21
+ not been processed for all requested months..
22
+ help_url (Union[Unset, str]): URL describing error details.
23
+ """
24
+
25
+ code: int
26
+ message: str
27
+ severity: SUSHIErrorModelSeverity
28
+ data: Union[Unset, str] = UNSET
29
+ help_url: Union[Unset, str] = UNSET
30
+ additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
31
+
32
+ def to_dict(self) -> Dict[str, Any]:
33
+ code = self.code
34
+
35
+ message = self.message
36
+
37
+ severity = self.severity.value
38
+
39
+ data = self.data
40
+
41
+ help_url = self.help_url
42
+
43
+ field_dict: Dict[str, Any] = {}
44
+ field_dict.update(self.additional_properties)
45
+ field_dict.update(
46
+ {
47
+ "Code": code,
48
+ "Message": message,
49
+ "Severity": severity,
50
+ }
51
+ )
52
+ if data is not UNSET:
53
+ field_dict["Data"] = data
54
+ if help_url is not UNSET:
55
+ field_dict["Help_URL"] = help_url
56
+
57
+ return field_dict
58
+
59
+ @classmethod
60
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
61
+ d = src_dict.copy()
62
+ code = d.pop("Code")
63
+
64
+ message = d.pop("Message")
65
+
66
+ severity = SUSHIErrorModelSeverity(d.pop("Severity"))
67
+
68
+ data = d.pop("Data", UNSET)
69
+
70
+ help_url = d.pop("Help_URL", UNSET)
71
+
72
+ sushi_error_model = cls(
73
+ code=code,
74
+ message=message,
75
+ severity=severity,
76
+ data=data,
77
+ help_url=help_url,
78
+ )
79
+
80
+ sushi_error_model.additional_properties = d
81
+ return sushi_error_model
82
+
83
+ @property
84
+ def additional_keys(self) -> List[str]:
85
+ return list(self.additional_properties.keys())
86
+
87
+ def __getitem__(self, key: str) -> Any:
88
+ return self.additional_properties[key]
89
+
90
+ def __setitem__(self, key: str, value: Any) -> None:
91
+ self.additional_properties[key] = value
92
+
93
+ def __delitem__(self, key: str) -> None:
94
+ del self.additional_properties[key]
95
+
96
+ def __contains__(self, key: str) -> bool:
97
+ return key in self.additional_properties
@@ -0,0 +1,11 @@
1
+ from enum import Enum
2
+
3
+
4
+ class SUSHIErrorModelSeverity(str, Enum):
5
+ DEBUG = "Debug"
6
+ FATAL = "Fatal"
7
+ INFO = "Info"
8
+ WARNING = "Warning"
9
+
10
+ def __str__(self) -> str:
11
+ return str(self.value)
@@ -0,0 +1,77 @@
1
+ from typing import Any, Dict, List, Type, TypeVar, Union
2
+
3
+ from attrs import define as _attrs_define
4
+ from attrs import field as _attrs_field
5
+
6
+ from ..types import UNSET, Unset
7
+
8
+ T = TypeVar("T", bound="SUSHIPageMeta")
9
+
10
+
11
+ @_attrs_define
12
+ class SUSHIPageMeta:
13
+ """page wrapper of reports
14
+
15
+ Attributes:
16
+ page (Union[Unset, int]): page number. Example: 1.
17
+ total (Union[Unset, int]): count of reports. Example: 100.
18
+ total_pages (Union[Unset, int]): count of pages. Example: 10.
19
+ """
20
+
21
+ page: Union[Unset, int] = UNSET
22
+ total: Union[Unset, int] = UNSET
23
+ total_pages: Union[Unset, int] = UNSET
24
+ additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
25
+
26
+ def to_dict(self) -> Dict[str, Any]:
27
+ page = self.page
28
+
29
+ total = self.total
30
+
31
+ total_pages = self.total_pages
32
+
33
+ field_dict: Dict[str, Any] = {}
34
+ field_dict.update(self.additional_properties)
35
+ field_dict.update({})
36
+ if page is not UNSET:
37
+ field_dict["page"] = page
38
+ if total is not UNSET:
39
+ field_dict["total"] = total
40
+ if total_pages is not UNSET:
41
+ field_dict["totalPages"] = total_pages
42
+
43
+ return field_dict
44
+
45
+ @classmethod
46
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
47
+ d = src_dict.copy()
48
+ page = d.pop("page", UNSET)
49
+
50
+ total = d.pop("total", UNSET)
51
+
52
+ total_pages = d.pop("totalPages", UNSET)
53
+
54
+ sushi_page_meta = cls(
55
+ page=page,
56
+ total=total,
57
+ total_pages=total_pages,
58
+ )
59
+
60
+ sushi_page_meta.additional_properties = d
61
+ return sushi_page_meta
62
+
63
+ @property
64
+ def additional_keys(self) -> List[str]:
65
+ return list(self.additional_properties.keys())
66
+
67
+ def __getitem__(self, key: str) -> Any:
68
+ return self.additional_properties[key]
69
+
70
+ def __setitem__(self, key: str, value: Any) -> None:
71
+ self.additional_properties[key] = value
72
+
73
+ def __delitem__(self, key: str) -> None:
74
+ del self.additional_properties[key]
75
+
76
+ def __contains__(self, key: str) -> bool:
77
+ return key in self.additional_properties
@@ -0,0 +1,72 @@
1
+ from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union
2
+
3
+ from attrs import define as _attrs_define
4
+ from attrs import field as _attrs_field
5
+
6
+ from ..types import UNSET, Unset
7
+
8
+ if TYPE_CHECKING:
9
+ from ..models.counter_dataset_report import COUNTERDatasetReport
10
+
11
+
12
+ T = TypeVar("T", bound="SUSHIReport")
13
+
14
+
15
+ @_attrs_define
16
+ class SUSHIReport:
17
+ """
18
+ Attributes:
19
+ report (Union[Unset, COUNTERDatasetReport]): Describes the formatting needs for the COUNTER Dataset Report.
20
+ Response may include the Report_Header (optional), Report_Datasets (usage stats).
21
+ """
22
+
23
+ report: Union[Unset, "COUNTERDatasetReport"] = UNSET
24
+ additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
25
+
26
+ def to_dict(self) -> Dict[str, Any]:
27
+ report: Union[Unset, Dict[str, Any]] = UNSET
28
+ if not isinstance(self.report, Unset):
29
+ report = self.report.to_dict()
30
+
31
+ field_dict: Dict[str, Any] = {}
32
+ field_dict.update(self.additional_properties)
33
+ field_dict.update({})
34
+ if report is not UNSET:
35
+ field_dict["report"] = report
36
+
37
+ return field_dict
38
+
39
+ @classmethod
40
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
41
+ from ..models.counter_dataset_report import COUNTERDatasetReport
42
+
43
+ d = src_dict.copy()
44
+ _report = d.pop("report", UNSET)
45
+ report: Union[Unset, COUNTERDatasetReport]
46
+ if isinstance(_report, Unset):
47
+ report = UNSET
48
+ else:
49
+ report = COUNTERDatasetReport.from_dict(_report)
50
+
51
+ sushi_report = cls(
52
+ report=report,
53
+ )
54
+
55
+ sushi_report.additional_properties = d
56
+ return sushi_report
57
+
58
+ @property
59
+ def additional_keys(self) -> List[str]:
60
+ return list(self.additional_properties.keys())
61
+
62
+ def __getitem__(self, key: str) -> Any:
63
+ return self.additional_properties[key]
64
+
65
+ def __setitem__(self, key: str, value: Any) -> None:
66
+ self.additional_properties[key] = value
67
+
68
+ def __delitem__(self, key: str) -> None:
69
+ del self.additional_properties[key]
70
+
71
+ def __contains__(self, key: str) -> bool:
72
+ return key in self.additional_properties
@@ -0,0 +1,189 @@
1
+ import datetime
2
+ from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union
3
+
4
+ from attrs import define as _attrs_define
5
+ from attrs import field as _attrs_field
6
+ from dateutil.parser import isoparse
7
+
8
+ from ..types import UNSET, Unset
9
+
10
+ if TYPE_CHECKING:
11
+ from ..models.sushi_error_model import SUSHIErrorModel
12
+ from ..models.sushi_report_header_report_attributes_item import (
13
+ SUSHIReportHeaderReportAttributesItem,
14
+ )
15
+ from ..models.sushi_report_header_report_filters_item import (
16
+ SUSHIReportHeaderReportFiltersItem,
17
+ )
18
+
19
+
20
+ T = TypeVar("T", bound="SUSHIReportHeader")
21
+
22
+
23
+ @_attrs_define
24
+ class SUSHIReportHeader:
25
+ """Generalized report header that defines the requested report, the requestor, the customer, filters applied,
26
+ reportAttributes applied and any exceptions.
27
+
28
+ Attributes:
29
+ release (str): The release or version of the report. Example: RD1.
30
+ report_id (str): The report ID or code or shortname. Typically this will be the same code provided in the Report
31
+ parameter of the request. Example: DSR.
32
+ report_name (str): The long name of the report. Example: Dataset Report.
33
+ created (Union[Unset, datetime.datetime]): Time the report was prepared
34
+ created_by (Union[Unset, str]): Name of the organization producing the report. Example: Science Data Bank.
35
+ exceptions (Union[Unset, List['SUSHIErrorModel']]): Series of exceptions encounted when preparing the report.
36
+ report_attributes (Union[Unset, List['SUSHIReportHeaderReportAttributesItem']]): Zero or more additional
37
+ attributes applied to the report. Attributes inform the level of detail in the report.
38
+ report_filters (Union[Unset, List['SUSHIReportHeaderReportFiltersItem']]): Zero or more report filters used for
39
+ this report. Typically reflect filters provided on the Request. Filters limit the data to be reported on.
40
+ """
41
+
42
+ release: str
43
+ report_id: str
44
+ report_name: str
45
+ created: Union[Unset, datetime.datetime] = UNSET
46
+ created_by: Union[Unset, str] = UNSET
47
+ exceptions: Union[Unset, List["SUSHIErrorModel"]] = UNSET
48
+ report_attributes: Union[Unset, List["SUSHIReportHeaderReportAttributesItem"]] = (
49
+ UNSET
50
+ )
51
+ report_filters: Union[Unset, List["SUSHIReportHeaderReportFiltersItem"]] = UNSET
52
+ additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
53
+
54
+ def to_dict(self) -> Dict[str, Any]:
55
+ release = self.release
56
+
57
+ report_id = self.report_id
58
+
59
+ report_name = self.report_name
60
+
61
+ created: Union[Unset, str] = UNSET
62
+ if not isinstance(self.created, Unset):
63
+ created = self.created.isoformat()
64
+
65
+ created_by = self.created_by
66
+
67
+ exceptions: Union[Unset, List[Dict[str, Any]]] = UNSET
68
+ if not isinstance(self.exceptions, Unset):
69
+ exceptions = []
70
+ for exceptions_item_data in self.exceptions:
71
+ exceptions_item = exceptions_item_data.to_dict()
72
+ exceptions.append(exceptions_item)
73
+
74
+ report_attributes: Union[Unset, List[Dict[str, Any]]] = UNSET
75
+ if not isinstance(self.report_attributes, Unset):
76
+ report_attributes = []
77
+ for report_attributes_item_data in self.report_attributes:
78
+ report_attributes_item = report_attributes_item_data.to_dict()
79
+ report_attributes.append(report_attributes_item)
80
+
81
+ report_filters: Union[Unset, List[Dict[str, Any]]] = UNSET
82
+ if not isinstance(self.report_filters, Unset):
83
+ report_filters = []
84
+ for report_filters_item_data in self.report_filters:
85
+ report_filters_item = report_filters_item_data.to_dict()
86
+ report_filters.append(report_filters_item)
87
+
88
+ field_dict: Dict[str, Any] = {}
89
+ field_dict.update(self.additional_properties)
90
+ field_dict.update(
91
+ {
92
+ "release": release,
93
+ "report-id": report_id,
94
+ "report-name": report_name,
95
+ }
96
+ )
97
+ if created is not UNSET:
98
+ field_dict["created"] = created
99
+ if created_by is not UNSET:
100
+ field_dict["created-by"] = created_by
101
+ if exceptions is not UNSET:
102
+ field_dict["exceptions"] = exceptions
103
+ if report_attributes is not UNSET:
104
+ field_dict["report-attributes"] = report_attributes
105
+ if report_filters is not UNSET:
106
+ field_dict["report-filters"] = report_filters
107
+
108
+ return field_dict
109
+
110
+ @classmethod
111
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
112
+ from ..models.sushi_error_model import SUSHIErrorModel
113
+ from ..models.sushi_report_header_report_attributes_item import (
114
+ SUSHIReportHeaderReportAttributesItem,
115
+ )
116
+ from ..models.sushi_report_header_report_filters_item import (
117
+ SUSHIReportHeaderReportFiltersItem,
118
+ )
119
+
120
+ d = src_dict.copy()
121
+ release = d.pop("release")
122
+
123
+ report_id = d.pop("report-id")
124
+
125
+ report_name = d.pop("report-name")
126
+
127
+ _created = d.pop("created", UNSET)
128
+ created: Union[Unset, datetime.datetime]
129
+ if isinstance(_created, Unset):
130
+ created = UNSET
131
+ else:
132
+ created = isoparse(_created)
133
+
134
+ created_by = d.pop("created-by", UNSET)
135
+
136
+ exceptions = []
137
+ _exceptions = d.pop("exceptions", UNSET)
138
+ for exceptions_item_data in _exceptions or []:
139
+ exceptions_item = SUSHIErrorModel.from_dict(exceptions_item_data)
140
+
141
+ exceptions.append(exceptions_item)
142
+
143
+ report_attributes = []
144
+ _report_attributes = d.pop("report-attributes", UNSET)
145
+ for report_attributes_item_data in _report_attributes or []:
146
+ report_attributes_item = SUSHIReportHeaderReportAttributesItem.from_dict(
147
+ report_attributes_item_data
148
+ )
149
+
150
+ report_attributes.append(report_attributes_item)
151
+
152
+ report_filters = []
153
+ _report_filters = d.pop("report-filters", UNSET)
154
+ for report_filters_item_data in _report_filters or []:
155
+ report_filters_item = SUSHIReportHeaderReportFiltersItem.from_dict(
156
+ report_filters_item_data
157
+ )
158
+
159
+ report_filters.append(report_filters_item)
160
+
161
+ sushi_report_header = cls(
162
+ release=release,
163
+ report_id=report_id,
164
+ report_name=report_name,
165
+ created=created,
166
+ created_by=created_by,
167
+ exceptions=exceptions,
168
+ report_attributes=report_attributes,
169
+ report_filters=report_filters,
170
+ )
171
+
172
+ sushi_report_header.additional_properties = d
173
+ return sushi_report_header
174
+
175
+ @property
176
+ def additional_keys(self) -> List[str]:
177
+ return list(self.additional_properties.keys())
178
+
179
+ def __getitem__(self, key: str) -> Any:
180
+ return self.additional_properties[key]
181
+
182
+ def __setitem__(self, key: str, value: Any) -> None:
183
+ self.additional_properties[key] = value
184
+
185
+ def __delitem__(self, key: str) -> None:
186
+ del self.additional_properties[key]
187
+
188
+ def __contains__(self, key: str) -> bool:
189
+ return key in self.additional_properties
@@ -0,0 +1,43 @@
1
+ from typing import Any, Dict, List, Type, TypeVar
2
+
3
+ from attrs import define as _attrs_define
4
+ from attrs import field as _attrs_field
5
+
6
+ T = TypeVar("T", bound="SUSHIReportHeaderReportAttributesItem")
7
+
8
+
9
+ @_attrs_define
10
+ class SUSHIReportHeaderReportAttributesItem:
11
+ """ """
12
+
13
+ additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
14
+
15
+ def to_dict(self) -> Dict[str, Any]:
16
+ field_dict: Dict[str, Any] = {}
17
+ field_dict.update(self.additional_properties)
18
+
19
+ return field_dict
20
+
21
+ @classmethod
22
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
23
+ d = src_dict.copy()
24
+ sushi_report_header_report_attributes_item = cls()
25
+
26
+ sushi_report_header_report_attributes_item.additional_properties = d
27
+ return sushi_report_header_report_attributes_item
28
+
29
+ @property
30
+ def additional_keys(self) -> List[str]:
31
+ return list(self.additional_properties.keys())
32
+
33
+ def __getitem__(self, key: str) -> Any:
34
+ return self.additional_properties[key]
35
+
36
+ def __setitem__(self, key: str, value: Any) -> None:
37
+ self.additional_properties[key] = value
38
+
39
+ def __delitem__(self, key: str) -> None:
40
+ del self.additional_properties[key]
41
+
42
+ def __contains__(self, key: str) -> bool:
43
+ return key in self.additional_properties
@@ -0,0 +1,43 @@
1
+ from typing import Any, Dict, List, Type, TypeVar
2
+
3
+ from attrs import define as _attrs_define
4
+ from attrs import field as _attrs_field
5
+
6
+ T = TypeVar("T", bound="SUSHIReportHeaderReportFiltersItem")
7
+
8
+
9
+ @_attrs_define
10
+ class SUSHIReportHeaderReportFiltersItem:
11
+ """ """
12
+
13
+ additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
14
+
15
+ def to_dict(self) -> Dict[str, Any]:
16
+ field_dict: Dict[str, Any] = {}
17
+ field_dict.update(self.additional_properties)
18
+
19
+ return field_dict
20
+
21
+ @classmethod
22
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
23
+ d = src_dict.copy()
24
+ sushi_report_header_report_filters_item = cls()
25
+
26
+ sushi_report_header_report_filters_item.additional_properties = d
27
+ return sushi_report_header_report_filters_item
28
+
29
+ @property
30
+ def additional_keys(self) -> List[str]:
31
+ return list(self.additional_properties.keys())
32
+
33
+ def __getitem__(self, key: str) -> Any:
34
+ return self.additional_properties[key]
35
+
36
+ def __setitem__(self, key: str, value: Any) -> None:
37
+ self.additional_properties[key] = value
38
+
39
+ def __delitem__(self, key: str) -> None:
40
+ del self.additional_properties[key]
41
+
42
+ def __contains__(self, key: str) -> bool:
43
+ return key in self.additional_properties
@@ -0,0 +1,82 @@
1
+ from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union
2
+
3
+ from attrs import define as _attrs_define
4
+ from attrs import field as _attrs_field
5
+
6
+ from ..types import UNSET, Unset
7
+
8
+ if TYPE_CHECKING:
9
+ from ..models.sushi_report_header import SUSHIReportHeader
10
+
11
+
12
+ T = TypeVar("T", bound="SUSHIReportList")
13
+
14
+
15
+ @_attrs_define
16
+ class SUSHIReportList:
17
+ """list wrapper of reports
18
+
19
+ Attributes:
20
+ id (Union[Unset, str]): report id. Example: sciencedb-2022-01.
21
+ report_header (Union[Unset, SUSHIReportHeader]): Generalized report header that defines the requested report,
22
+ the requestor, the customer, filters applied, reportAttributes applied and any exceptions.
23
+ """
24
+
25
+ id: Union[Unset, str] = UNSET
26
+ report_header: Union[Unset, "SUSHIReportHeader"] = UNSET
27
+ additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
28
+
29
+ def to_dict(self) -> Dict[str, Any]:
30
+ id = self.id
31
+
32
+ report_header: Union[Unset, Dict[str, Any]] = UNSET
33
+ if not isinstance(self.report_header, Unset):
34
+ report_header = self.report_header.to_dict()
35
+
36
+ field_dict: Dict[str, Any] = {}
37
+ field_dict.update(self.additional_properties)
38
+ field_dict.update({})
39
+ if id is not UNSET:
40
+ field_dict["id"] = id
41
+ if report_header is not UNSET:
42
+ field_dict["report-header"] = report_header
43
+
44
+ return field_dict
45
+
46
+ @classmethod
47
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
48
+ from ..models.sushi_report_header import SUSHIReportHeader
49
+
50
+ d = src_dict.copy()
51
+ id = d.pop("id", UNSET)
52
+
53
+ _report_header = d.pop("report-header", UNSET)
54
+ report_header: Union[Unset, SUSHIReportHeader]
55
+ if isinstance(_report_header, Unset):
56
+ report_header = UNSET
57
+ else:
58
+ report_header = SUSHIReportHeader.from_dict(_report_header)
59
+
60
+ sushi_report_list = cls(
61
+ id=id,
62
+ report_header=report_header,
63
+ )
64
+
65
+ sushi_report_list.additional_properties = d
66
+ return sushi_report_list
67
+
68
+ @property
69
+ def additional_keys(self) -> List[str]:
70
+ return list(self.additional_properties.keys())
71
+
72
+ def __getitem__(self, key: str) -> Any:
73
+ return self.additional_properties[key]
74
+
75
+ def __setitem__(self, key: str, value: Any) -> None:
76
+ self.additional_properties[key] = value
77
+
78
+ def __delitem__(self, key: str) -> None:
79
+ del self.additional_properties[key]
80
+
81
+ def __contains__(self, key: str) -> bool:
82
+ return key in self.additional_properties