graphiant-sdk 25.7.1__py3-none-any.whl → 25.9.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 (51) hide show
  1. graphiant_sdk/__init__.py +3468 -1149
  2. graphiant_sdk/api/__init__.py +16 -1
  3. graphiant_sdk/api_client.py +9 -2
  4. graphiant_sdk/configuration.py +1 -1
  5. graphiant_sdk/models/__init__.py +1153 -1
  6. graphiant_sdk/models/v1_auth_mfa_patch_request.py +87 -0
  7. graphiant_sdk/models/v1_bwtracker_region_site_gateway_summary_post200_response.py +91 -0
  8. graphiant_sdk/models/v1_bwtracker_region_site_gateway_summary_post200_response_bwusage_summary.py +102 -0
  9. graphiant_sdk/models/v1_edges_hardware_assigned_get200_response_edges_summary_inner_upgrade_summary_last_running_version.py +91 -0
  10. graphiant_sdk/models/v1_global_site_lists_get200_response.py +97 -0
  11. graphiant_sdk/models/v1_global_site_lists_get200_response_entries_inner.py +103 -0
  12. graphiant_sdk/models/v1_global_site_lists_id_get200_response.py +97 -0
  13. graphiant_sdk/models/v1_global_site_lists_post_request.py +99 -0
  14. graphiant_sdk/models/v1_global_site_lists_post_request_entries_inner.py +93 -0
  15. graphiant_sdk/models/v1_global_site_lists_post_request_entries_inner_tag.py +91 -0
  16. graphiant_sdk/models/v1_groups_id_members_delete_post_request.py +87 -0
  17. graphiant_sdk/models/v1_onboarding_cloudinit_get200_response.py +95 -0
  18. graphiant_sdk/models/v1_onboarding_cloudinit_get200_response_cloudinit_tokens_inner.py +105 -0
  19. graphiant_sdk/models/v1_onboarding_cloudinit_get200_response_cloudinit_tokens_inner_cloudinit_config.py +103 -0
  20. graphiant_sdk/models/v1_onboarding_cloudinit_get200_response_cloudinit_tokens_inner_cloudinit_config_interfaces_inner.py +100 -0
  21. graphiant_sdk/models/v1_onboarding_cloudinit_get200_response_cloudinit_tokens_inner_cloudinit_config_interfaces_inner_ipv4.py +91 -0
  22. graphiant_sdk/models/v1_onboarding_cloudinit_get200_response_cloudinit_tokens_inner_token.py +98 -0
  23. graphiant_sdk/models/v1_software_auto_upgrade_default_get200_response_profile.py +97 -0
  24. graphiant_sdk/models/v1_software_auto_upgrade_default_get200_response_profile_occurrence.py +93 -0
  25. graphiant_sdk/models/v2_assistant_conversation_context_history_post_request.py +87 -0
  26. graphiant_sdk-25.9.1.dist-info/METADATA +373 -0
  27. {graphiant_sdk-25.7.1.dist-info → graphiant_sdk-25.9.1.dist-info}/RECORD +50 -10
  28. test/test_v1_auth_mfa_patch_request.py +53 -0
  29. test/test_v1_bwtracker_region_site_gateway_summary_post200_response.py +61 -0
  30. test/test_v1_bwtracker_region_site_gateway_summary_post200_response_bwusage_summary.py +60 -0
  31. test/test_v1_edges_hardware_assigned_get200_response_edges_summary_inner_upgrade_summary_last_running_version.py +53 -0
  32. test/test_v1_global_site_lists_get200_response.py +63 -0
  33. test/test_v1_global_site_lists_get200_response_entries_inner.py +59 -0
  34. test/test_v1_global_site_lists_id_get200_response.py +59 -0
  35. test/test_v1_global_site_lists_post_request.py +60 -0
  36. test/test_v1_global_site_lists_post_request_entries_inner.py +55 -0
  37. test/test_v1_global_site_lists_post_request_entries_inner_tag.py +53 -0
  38. test/test_v1_groups_id_members_delete_post_request.py +53 -0
  39. test/test_v1_onboarding_cloudinit_get200_response.py +82 -0
  40. test/test_v1_onboarding_cloudinit_get200_response_cloudinit_tokens_inner.py +79 -0
  41. test/test_v1_onboarding_cloudinit_get200_response_cloudinit_tokens_inner_cloudinit_config.py +67 -0
  42. test/test_v1_onboarding_cloudinit_get200_response_cloudinit_tokens_inner_cloudinit_config_interfaces_inner.py +60 -0
  43. test/test_v1_onboarding_cloudinit_get200_response_cloudinit_tokens_inner_cloudinit_config_interfaces_inner_ipv4.py +53 -0
  44. test/test_v1_onboarding_cloudinit_get200_response_cloudinit_tokens_inner_token.py +57 -0
  45. test/test_v1_software_auto_upgrade_default_get200_response_profile.py +58 -0
  46. test/test_v1_software_auto_upgrade_default_get200_response_profile_occurrence.py +54 -0
  47. test/test_v2_assistant_conversation_context_history_post_request.py +51 -0
  48. graphiant_sdk-25.7.1.dist-info/METADATA +0 -119
  49. {graphiant_sdk-25.7.1.dist-info → graphiant_sdk-25.9.1.dist-info}/WHEEL +0 -0
  50. {graphiant_sdk-25.7.1.dist-info → graphiant_sdk-25.9.1.dist-info}/licenses/LICENSE +0 -0
  51. {graphiant_sdk-25.7.1.dist-info → graphiant_sdk-25.9.1.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,100 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Graphiant APIs
5
+
6
+ Graphiant API documentation.
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, StrictStr
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from graphiant_sdk.models.v1_onboarding_cloudinit_get200_response_cloudinit_tokens_inner_cloudinit_config_interfaces_inner_ipv4 import V1OnboardingCloudinitGet200ResponseCloudinitTokensInnerCloudinitConfigInterfacesInnerIpv4
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class V1OnboardingCloudinitGet200ResponseCloudinitTokensInnerCloudinitConfigInterfacesInner(BaseModel):
27
+ """
28
+ V1OnboardingCloudinitGet200ResponseCloudinitTokensInnerCloudinitConfigInterfacesInner
29
+ """ # noqa: E501
30
+ ipv4: Optional[V1OnboardingCloudinitGet200ResponseCloudinitTokensInnerCloudinitConfigInterfacesInnerIpv4] = None
31
+ ipv6: Optional[V1OnboardingCloudinitGet200ResponseCloudinitTokensInnerCloudinitConfigInterfacesInnerIpv4] = None
32
+ name: Optional[StrictStr] = None
33
+ type: Optional[StrictStr] = None
34
+ __properties: ClassVar[List[str]] = ["ipv4", "ipv6", "name", "type"]
35
+
36
+ model_config = ConfigDict(
37
+ populate_by_name=True,
38
+ validate_assignment=True,
39
+ protected_namespaces=(),
40
+ )
41
+
42
+
43
+ def to_str(self) -> str:
44
+ """Returns the string representation of the model using alias"""
45
+ return pprint.pformat(self.model_dump(by_alias=True))
46
+
47
+ def to_json(self) -> str:
48
+ """Returns the JSON representation of the model using alias"""
49
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
50
+ return json.dumps(self.to_dict())
51
+
52
+ @classmethod
53
+ def from_json(cls, json_str: str) -> Optional[Self]:
54
+ """Create an instance of V1OnboardingCloudinitGet200ResponseCloudinitTokensInnerCloudinitConfigInterfacesInner from a JSON string"""
55
+ return cls.from_dict(json.loads(json_str))
56
+
57
+ def to_dict(self) -> Dict[str, Any]:
58
+ """Return the dictionary representation of the model using alias.
59
+
60
+ This has the following differences from calling pydantic's
61
+ `self.model_dump(by_alias=True)`:
62
+
63
+ * `None` is only added to the output dict for nullable fields that
64
+ were set at model initialization. Other fields with value `None`
65
+ are ignored.
66
+ """
67
+ excluded_fields: Set[str] = set([
68
+ ])
69
+
70
+ _dict = self.model_dump(
71
+ by_alias=True,
72
+ exclude=excluded_fields,
73
+ exclude_none=True,
74
+ )
75
+ # override the default output from pydantic by calling `to_dict()` of ipv4
76
+ if self.ipv4:
77
+ _dict['ipv4'] = self.ipv4.to_dict()
78
+ # override the default output from pydantic by calling `to_dict()` of ipv6
79
+ if self.ipv6:
80
+ _dict['ipv6'] = self.ipv6.to_dict()
81
+ return _dict
82
+
83
+ @classmethod
84
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
85
+ """Create an instance of V1OnboardingCloudinitGet200ResponseCloudinitTokensInnerCloudinitConfigInterfacesInner from a dict"""
86
+ if obj is None:
87
+ return None
88
+
89
+ if not isinstance(obj, dict):
90
+ return cls.model_validate(obj)
91
+
92
+ _obj = cls.model_validate({
93
+ "ipv4": V1OnboardingCloudinitGet200ResponseCloudinitTokensInnerCloudinitConfigInterfacesInnerIpv4.from_dict(obj["ipv4"]) if obj.get("ipv4") is not None else None,
94
+ "ipv6": V1OnboardingCloudinitGet200ResponseCloudinitTokensInnerCloudinitConfigInterfacesInnerIpv4.from_dict(obj["ipv6"]) if obj.get("ipv6") is not None else None,
95
+ "name": obj.get("name"),
96
+ "type": obj.get("type")
97
+ })
98
+ return _obj
99
+
100
+
@@ -0,0 +1,91 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Graphiant APIs
5
+
6
+ Graphiant API documentation.
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class V1OnboardingCloudinitGet200ResponseCloudinitTokensInnerCloudinitConfigInterfacesInnerIpv4(BaseModel):
26
+ """
27
+ V1OnboardingCloudinitGet200ResponseCloudinitTokensInnerCloudinitConfigInterfacesInnerIpv4
28
+ """ # noqa: E501
29
+ gateway_addr: Optional[StrictStr] = Field(default=None, alias="gatewayAddr")
30
+ ip_addr: Optional[StrictStr] = Field(default=None, alias="ipAddr")
31
+ type: Optional[StrictStr] = None
32
+ __properties: ClassVar[List[str]] = ["gatewayAddr", "ipAddr", "type"]
33
+
34
+ model_config = ConfigDict(
35
+ populate_by_name=True,
36
+ validate_assignment=True,
37
+ protected_namespaces=(),
38
+ )
39
+
40
+
41
+ def to_str(self) -> str:
42
+ """Returns the string representation of the model using alias"""
43
+ return pprint.pformat(self.model_dump(by_alias=True))
44
+
45
+ def to_json(self) -> str:
46
+ """Returns the JSON representation of the model using alias"""
47
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
48
+ return json.dumps(self.to_dict())
49
+
50
+ @classmethod
51
+ def from_json(cls, json_str: str) -> Optional[Self]:
52
+ """Create an instance of V1OnboardingCloudinitGet200ResponseCloudinitTokensInnerCloudinitConfigInterfacesInnerIpv4 from a JSON string"""
53
+ return cls.from_dict(json.loads(json_str))
54
+
55
+ def to_dict(self) -> Dict[str, Any]:
56
+ """Return the dictionary representation of the model using alias.
57
+
58
+ This has the following differences from calling pydantic's
59
+ `self.model_dump(by_alias=True)`:
60
+
61
+ * `None` is only added to the output dict for nullable fields that
62
+ were set at model initialization. Other fields with value `None`
63
+ are ignored.
64
+ """
65
+ excluded_fields: Set[str] = set([
66
+ ])
67
+
68
+ _dict = self.model_dump(
69
+ by_alias=True,
70
+ exclude=excluded_fields,
71
+ exclude_none=True,
72
+ )
73
+ return _dict
74
+
75
+ @classmethod
76
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
77
+ """Create an instance of V1OnboardingCloudinitGet200ResponseCloudinitTokensInnerCloudinitConfigInterfacesInnerIpv4 from a dict"""
78
+ if obj is None:
79
+ return None
80
+
81
+ if not isinstance(obj, dict):
82
+ return cls.model_validate(obj)
83
+
84
+ _obj = cls.model_validate({
85
+ "gatewayAddr": obj.get("gatewayAddr"),
86
+ "ipAddr": obj.get("ipAddr"),
87
+ "type": obj.get("type")
88
+ })
89
+ return _obj
90
+
91
+
@@ -0,0 +1,98 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Graphiant APIs
5
+
6
+ Graphiant API documentation.
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from graphiant_sdk.models.v1_alarm_history_get200_response_history_inner_time import V1AlarmHistoryGet200ResponseHistoryInnerTime
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class V1OnboardingCloudinitGet200ResponseCloudinitTokensInnerToken(BaseModel):
27
+ """
28
+ V1OnboardingCloudinitGet200ResponseCloudinitTokensInnerToken
29
+ """ # noqa: E501
30
+ created_by_ts: Optional[V1AlarmHistoryGet200ResponseHistoryInnerTime] = Field(default=None, alias="createdByTs")
31
+ expiry_by_ts: Optional[V1AlarmHistoryGet200ResponseHistoryInnerTime] = Field(default=None, alias="expiryByTs")
32
+ token: Optional[StrictStr] = None
33
+ __properties: ClassVar[List[str]] = ["createdByTs", "expiryByTs", "token"]
34
+
35
+ model_config = ConfigDict(
36
+ populate_by_name=True,
37
+ validate_assignment=True,
38
+ protected_namespaces=(),
39
+ )
40
+
41
+
42
+ def to_str(self) -> str:
43
+ """Returns the string representation of the model using alias"""
44
+ return pprint.pformat(self.model_dump(by_alias=True))
45
+
46
+ def to_json(self) -> str:
47
+ """Returns the JSON representation of the model using alias"""
48
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
49
+ return json.dumps(self.to_dict())
50
+
51
+ @classmethod
52
+ def from_json(cls, json_str: str) -> Optional[Self]:
53
+ """Create an instance of V1OnboardingCloudinitGet200ResponseCloudinitTokensInnerToken from a JSON string"""
54
+ return cls.from_dict(json.loads(json_str))
55
+
56
+ def to_dict(self) -> Dict[str, Any]:
57
+ """Return the dictionary representation of the model using alias.
58
+
59
+ This has the following differences from calling pydantic's
60
+ `self.model_dump(by_alias=True)`:
61
+
62
+ * `None` is only added to the output dict for nullable fields that
63
+ were set at model initialization. Other fields with value `None`
64
+ are ignored.
65
+ """
66
+ excluded_fields: Set[str] = set([
67
+ ])
68
+
69
+ _dict = self.model_dump(
70
+ by_alias=True,
71
+ exclude=excluded_fields,
72
+ exclude_none=True,
73
+ )
74
+ # override the default output from pydantic by calling `to_dict()` of created_by_ts
75
+ if self.created_by_ts:
76
+ _dict['createdByTs'] = self.created_by_ts.to_dict()
77
+ # override the default output from pydantic by calling `to_dict()` of expiry_by_ts
78
+ if self.expiry_by_ts:
79
+ _dict['expiryByTs'] = self.expiry_by_ts.to_dict()
80
+ return _dict
81
+
82
+ @classmethod
83
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
84
+ """Create an instance of V1OnboardingCloudinitGet200ResponseCloudinitTokensInnerToken from a dict"""
85
+ if obj is None:
86
+ return None
87
+
88
+ if not isinstance(obj, dict):
89
+ return cls.model_validate(obj)
90
+
91
+ _obj = cls.model_validate({
92
+ "createdByTs": V1AlarmHistoryGet200ResponseHistoryInnerTime.from_dict(obj["createdByTs"]) if obj.get("createdByTs") is not None else None,
93
+ "expiryByTs": V1AlarmHistoryGet200ResponseHistoryInnerTime.from_dict(obj["expiryByTs"]) if obj.get("expiryByTs") is not None else None,
94
+ "token": obj.get("token")
95
+ })
96
+ return _obj
97
+
98
+
@@ -0,0 +1,97 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Graphiant APIs
5
+
6
+ Graphiant API documentation.
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, StrictStr
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from graphiant_sdk.models.v1_software_auto_upgrade_default_get200_response_profile_occurrence import V1SoftwareAutoUpgradeDefaultGet200ResponseProfileOccurrence
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class V1SoftwareAutoUpgradeDefaultGet200ResponseProfile(BaseModel):
27
+ """
28
+ V1SoftwareAutoUpgradeDefaultGet200ResponseProfile
29
+ """ # noqa: E501
30
+ action: Optional[StrictStr] = None
31
+ name: Optional[StrictStr] = None
32
+ occurrence: Optional[V1SoftwareAutoUpgradeDefaultGet200ResponseProfileOccurrence] = None
33
+ release: Optional[StrictStr] = None
34
+ __properties: ClassVar[List[str]] = ["action", "name", "occurrence", "release"]
35
+
36
+ model_config = ConfigDict(
37
+ populate_by_name=True,
38
+ validate_assignment=True,
39
+ protected_namespaces=(),
40
+ )
41
+
42
+
43
+ def to_str(self) -> str:
44
+ """Returns the string representation of the model using alias"""
45
+ return pprint.pformat(self.model_dump(by_alias=True))
46
+
47
+ def to_json(self) -> str:
48
+ """Returns the JSON representation of the model using alias"""
49
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
50
+ return json.dumps(self.to_dict())
51
+
52
+ @classmethod
53
+ def from_json(cls, json_str: str) -> Optional[Self]:
54
+ """Create an instance of V1SoftwareAutoUpgradeDefaultGet200ResponseProfile from a JSON string"""
55
+ return cls.from_dict(json.loads(json_str))
56
+
57
+ def to_dict(self) -> Dict[str, Any]:
58
+ """Return the dictionary representation of the model using alias.
59
+
60
+ This has the following differences from calling pydantic's
61
+ `self.model_dump(by_alias=True)`:
62
+
63
+ * `None` is only added to the output dict for nullable fields that
64
+ were set at model initialization. Other fields with value `None`
65
+ are ignored.
66
+ """
67
+ excluded_fields: Set[str] = set([
68
+ ])
69
+
70
+ _dict = self.model_dump(
71
+ by_alias=True,
72
+ exclude=excluded_fields,
73
+ exclude_none=True,
74
+ )
75
+ # override the default output from pydantic by calling `to_dict()` of occurrence
76
+ if self.occurrence:
77
+ _dict['occurrence'] = self.occurrence.to_dict()
78
+ return _dict
79
+
80
+ @classmethod
81
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
82
+ """Create an instance of V1SoftwareAutoUpgradeDefaultGet200ResponseProfile from a dict"""
83
+ if obj is None:
84
+ return None
85
+
86
+ if not isinstance(obj, dict):
87
+ return cls.model_validate(obj)
88
+
89
+ _obj = cls.model_validate({
90
+ "action": obj.get("action"),
91
+ "name": obj.get("name"),
92
+ "occurrence": V1SoftwareAutoUpgradeDefaultGet200ResponseProfileOccurrence.from_dict(obj["occurrence"]) if obj.get("occurrence") is not None else None,
93
+ "release": obj.get("release")
94
+ })
95
+ return _obj
96
+
97
+
@@ -0,0 +1,93 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Graphiant APIs
5
+
6
+ Graphiant API documentation.
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class V1SoftwareAutoUpgradeDefaultGet200ResponseProfileOccurrence(BaseModel):
26
+ """
27
+ V1SoftwareAutoUpgradeDefaultGet200ResponseProfileOccurrence
28
+ """ # noqa: E501
29
+ day_of_week: Optional[StrictStr] = Field(default=None, alias="dayOfWeek")
30
+ hour: Optional[StrictInt] = None
31
+ minute: Optional[StrictInt] = None
32
+ occurrence_in_month: Optional[StrictInt] = Field(default=None, alias="occurrenceInMonth")
33
+ __properties: ClassVar[List[str]] = ["dayOfWeek", "hour", "minute", "occurrenceInMonth"]
34
+
35
+ model_config = ConfigDict(
36
+ populate_by_name=True,
37
+ validate_assignment=True,
38
+ protected_namespaces=(),
39
+ )
40
+
41
+
42
+ def to_str(self) -> str:
43
+ """Returns the string representation of the model using alias"""
44
+ return pprint.pformat(self.model_dump(by_alias=True))
45
+
46
+ def to_json(self) -> str:
47
+ """Returns the JSON representation of the model using alias"""
48
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
49
+ return json.dumps(self.to_dict())
50
+
51
+ @classmethod
52
+ def from_json(cls, json_str: str) -> Optional[Self]:
53
+ """Create an instance of V1SoftwareAutoUpgradeDefaultGet200ResponseProfileOccurrence from a JSON string"""
54
+ return cls.from_dict(json.loads(json_str))
55
+
56
+ def to_dict(self) -> Dict[str, Any]:
57
+ """Return the dictionary representation of the model using alias.
58
+
59
+ This has the following differences from calling pydantic's
60
+ `self.model_dump(by_alias=True)`:
61
+
62
+ * `None` is only added to the output dict for nullable fields that
63
+ were set at model initialization. Other fields with value `None`
64
+ are ignored.
65
+ """
66
+ excluded_fields: Set[str] = set([
67
+ ])
68
+
69
+ _dict = self.model_dump(
70
+ by_alias=True,
71
+ exclude=excluded_fields,
72
+ exclude_none=True,
73
+ )
74
+ return _dict
75
+
76
+ @classmethod
77
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
78
+ """Create an instance of V1SoftwareAutoUpgradeDefaultGet200ResponseProfileOccurrence from a dict"""
79
+ if obj is None:
80
+ return None
81
+
82
+ if not isinstance(obj, dict):
83
+ return cls.model_validate(obj)
84
+
85
+ _obj = cls.model_validate({
86
+ "dayOfWeek": obj.get("dayOfWeek"),
87
+ "hour": obj.get("hour"),
88
+ "minute": obj.get("minute"),
89
+ "occurrenceInMonth": obj.get("occurrenceInMonth")
90
+ })
91
+ return _obj
92
+
93
+
@@ -0,0 +1,87 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Graphiant APIs
5
+
6
+ Graphiant API documentation.
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, StrictBool
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class V2AssistantConversationContextHistoryPostRequest(BaseModel):
26
+ """
27
+ V2AssistantConversationContextHistoryPostRequest
28
+ """ # noqa: E501
29
+ enable: Optional[StrictBool] = None
30
+ __properties: ClassVar[List[str]] = ["enable"]
31
+
32
+ model_config = ConfigDict(
33
+ populate_by_name=True,
34
+ validate_assignment=True,
35
+ protected_namespaces=(),
36
+ )
37
+
38
+
39
+ def to_str(self) -> str:
40
+ """Returns the string representation of the model using alias"""
41
+ return pprint.pformat(self.model_dump(by_alias=True))
42
+
43
+ def to_json(self) -> str:
44
+ """Returns the JSON representation of the model using alias"""
45
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
46
+ return json.dumps(self.to_dict())
47
+
48
+ @classmethod
49
+ def from_json(cls, json_str: str) -> Optional[Self]:
50
+ """Create an instance of V2AssistantConversationContextHistoryPostRequest from a JSON string"""
51
+ return cls.from_dict(json.loads(json_str))
52
+
53
+ def to_dict(self) -> Dict[str, Any]:
54
+ """Return the dictionary representation of the model using alias.
55
+
56
+ This has the following differences from calling pydantic's
57
+ `self.model_dump(by_alias=True)`:
58
+
59
+ * `None` is only added to the output dict for nullable fields that
60
+ were set at model initialization. Other fields with value `None`
61
+ are ignored.
62
+ """
63
+ excluded_fields: Set[str] = set([
64
+ ])
65
+
66
+ _dict = self.model_dump(
67
+ by_alias=True,
68
+ exclude=excluded_fields,
69
+ exclude_none=True,
70
+ )
71
+ return _dict
72
+
73
+ @classmethod
74
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
75
+ """Create an instance of V2AssistantConversationContextHistoryPostRequest from a dict"""
76
+ if obj is None:
77
+ return None
78
+
79
+ if not isinstance(obj, dict):
80
+ return cls.model_validate(obj)
81
+
82
+ _obj = cls.model_validate({
83
+ "enable": obj.get("enable")
84
+ })
85
+ return _obj
86
+
87
+