graphiant-sdk 25.7.1__py3-none-any.whl → 25.8.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 (67) hide show
  1. graphiant_sdk/__init__.py +21 -6
  2. graphiant_sdk/api/default_api.py +15423 -9804
  3. graphiant_sdk/api_client.py +1 -1
  4. graphiant_sdk/configuration.py +1 -1
  5. graphiant_sdk/models/__init__.py +20 -5
  6. graphiant_sdk/models/v1_auth_mfa_patch_request.py +87 -0
  7. graphiant_sdk/models/v1_backbone_health_device_device_id_post200_response.py +3 -3
  8. graphiant_sdk/models/v1_bwtracker_enterprise_details_post200_response_bwusage_details.py +11 -2
  9. graphiant_sdk/models/v1_bwtracker_region_site_gateway_summary_post200_response.py +91 -0
  10. graphiant_sdk/models/v1_bwtracker_region_site_gateway_summary_post200_response_bwusage_summary.py +102 -0
  11. graphiant_sdk/models/v1_devices_device_id_config_put_request_edge_interfaces_value_interface.py +6 -2
  12. graphiant_sdk/models/v1_devices_running_version_post200_response_versions_inner.py +3 -3
  13. graphiant_sdk/models/v1_devices_upgrade_schedule_put_request.py +14 -4
  14. graphiant_sdk/models/v1_edges_hardware_assigned_get200_response_edges_summary_inner_upgrade_summary.py +17 -5
  15. graphiant_sdk/models/v1_edges_hardware_assigned_get200_response_edges_summary_inner_upgrade_summary_last_running_version.py +91 -0
  16. graphiant_sdk/models/v1_edges_hardware_assigned_get200_response_edges_summary_inner_upgrade_summary_schedule.py +3 -3
  17. graphiant_sdk/models/v1_global_site_lists_get200_response.py +97 -0
  18. graphiant_sdk/models/v1_global_site_lists_get200_response_entries_inner.py +103 -0
  19. graphiant_sdk/models/v1_global_site_lists_id_get200_response.py +97 -0
  20. graphiant_sdk/models/v1_global_site_lists_id_sites_get200_response_entries_inner.py +3 -3
  21. graphiant_sdk/models/v1_global_site_lists_post_request.py +99 -0
  22. graphiant_sdk/models/v1_global_site_lists_post_request_entries_inner.py +93 -0
  23. graphiant_sdk/models/v1_global_site_lists_post_request_entries_inner_tag.py +91 -0
  24. graphiant_sdk/models/v1_groups_id_members_delete_post_request.py +87 -0
  25. graphiant_sdk/models/v1_groups_id_members_get200_response_users_inner.py +7 -1
  26. graphiant_sdk/models/v1_groups_id_members_post_request.py +5 -3
  27. graphiant_sdk/models/v1_onboarding_cloudinit_get200_response.py +95 -0
  28. graphiant_sdk/models/v1_onboarding_cloudinit_get200_response_cloudinit_tokens_inner.py +105 -0
  29. graphiant_sdk/models/v1_onboarding_cloudinit_get200_response_cloudinit_tokens_inner_cloudinit_config.py +103 -0
  30. graphiant_sdk/models/v1_onboarding_cloudinit_get200_response_cloudinit_tokens_inner_cloudinit_config_interfaces_inner.py +100 -0
  31. graphiant_sdk/models/v1_onboarding_cloudinit_get200_response_cloudinit_tokens_inner_cloudinit_config_interfaces_inner_ipv4.py +91 -0
  32. graphiant_sdk/models/v1_onboarding_cloudinit_get200_response_cloudinit_tokens_inner_token.py +98 -0
  33. graphiant_sdk/models/v1_software_auto_upgrade_default_get200_response.py +7 -7
  34. graphiant_sdk/models/v1_software_auto_upgrade_default_get200_response_profile.py +97 -0
  35. graphiant_sdk/models/v1_software_auto_upgrade_default_get200_response_profile_occurrence.py +93 -0
  36. graphiant_sdk/models/v1_software_releases_summary_get200_response_summaries_inner.py +6 -1
  37. graphiant_sdk/models/v1_troubleshooting_device_device_id_post200_response.py +3 -3
  38. graphiant_sdk/models/v2_assistant_add_to_conversation_post200_response.py +4 -2
  39. graphiant_sdk/models/v2_assistant_conversation_context_history_post_request.py +87 -0
  40. graphiant_sdk/models/v2_assistant_get_conversations_post200_response.py +5 -3
  41. graphiant_sdk/models/v2_assistant_get_conversations_post200_response_conversation_list_inner.py +5 -3
  42. graphiant_sdk-25.8.1.dist-info/METADATA +384 -0
  43. {graphiant_sdk-25.7.1.dist-info → graphiant_sdk-25.8.1.dist-info}/RECORD +66 -26
  44. test/test_v1_auth_mfa_patch_request.py +53 -0
  45. test/test_v1_bwtracker_region_site_gateway_summary_post200_response.py +61 -0
  46. test/test_v1_bwtracker_region_site_gateway_summary_post200_response_bwusage_summary.py +60 -0
  47. test/test_v1_edges_hardware_assigned_get200_response_edges_summary_inner_upgrade_summary_last_running_version.py +53 -0
  48. test/test_v1_global_site_lists_get200_response.py +63 -0
  49. test/test_v1_global_site_lists_get200_response_entries_inner.py +59 -0
  50. test/test_v1_global_site_lists_id_get200_response.py +59 -0
  51. test/test_v1_global_site_lists_post_request.py +60 -0
  52. test/test_v1_global_site_lists_post_request_entries_inner.py +55 -0
  53. test/test_v1_global_site_lists_post_request_entries_inner_tag.py +53 -0
  54. test/test_v1_groups_id_members_delete_post_request.py +53 -0
  55. test/test_v1_onboarding_cloudinit_get200_response.py +82 -0
  56. test/test_v1_onboarding_cloudinit_get200_response_cloudinit_tokens_inner.py +79 -0
  57. test/test_v1_onboarding_cloudinit_get200_response_cloudinit_tokens_inner_cloudinit_config.py +67 -0
  58. test/test_v1_onboarding_cloudinit_get200_response_cloudinit_tokens_inner_cloudinit_config_interfaces_inner.py +60 -0
  59. test/test_v1_onboarding_cloudinit_get200_response_cloudinit_tokens_inner_cloudinit_config_interfaces_inner_ipv4.py +53 -0
  60. test/test_v1_onboarding_cloudinit_get200_response_cloudinit_tokens_inner_token.py +57 -0
  61. test/test_v1_software_auto_upgrade_default_get200_response_profile.py +58 -0
  62. test/test_v1_software_auto_upgrade_default_get200_response_profile_occurrence.py +54 -0
  63. test/test_v2_assistant_conversation_context_history_post_request.py +51 -0
  64. graphiant_sdk-25.7.1.dist-info/METADATA +0 -119
  65. {graphiant_sdk-25.7.1.dist-info → graphiant_sdk-25.8.1.dist-info}/WHEEL +0 -0
  66. {graphiant_sdk-25.7.1.dist-info → graphiant_sdk-25.8.1.dist-info}/licenses/LICENSE +0 -0
  67. {graphiant_sdk-25.7.1.dist-info → graphiant_sdk-25.8.1.dist-info}/top_level.txt +0 -0
@@ -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, StrictInt
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class V1GlobalSiteListsPostRequestEntriesInnerTag(BaseModel):
26
+ """
27
+ V1GlobalSiteListsPostRequestEntriesInnerTag
28
+ """ # noqa: E501
29
+ level_one: Optional[StrictInt] = Field(default=None, alias="levelOne")
30
+ level_two: Optional[StrictInt] = Field(default=None, alias="levelTwo")
31
+ level_zero: Optional[StrictInt] = Field(default=None, alias="levelZero")
32
+ __properties: ClassVar[List[str]] = ["levelOne", "levelTwo", "levelZero"]
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 V1GlobalSiteListsPostRequestEntriesInnerTag 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 V1GlobalSiteListsPostRequestEntriesInnerTag 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
+ "levelOne": obj.get("levelOne"),
86
+ "levelTwo": obj.get("levelTwo"),
87
+ "levelZero": obj.get("levelZero")
88
+ })
89
+ return _obj
90
+
91
+
@@ -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, 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 V1GroupsIdMembersDeletePostRequest(BaseModel):
26
+ """
27
+ V1GroupsIdMembersDeletePostRequest
28
+ """ # noqa: E501
29
+ member_ids: Optional[List[StrictStr]] = Field(default=None, alias="memberIds")
30
+ __properties: ClassVar[List[str]] = ["memberIds"]
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 V1GroupsIdMembersDeletePostRequest 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 V1GroupsIdMembersDeletePostRequest 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
+ "memberIds": obj.get("memberIds")
84
+ })
85
+ return _obj
86
+
87
+
@@ -19,6 +19,7 @@ import json
19
19
 
20
20
  from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
21
21
  from typing import Any, ClassVar, Dict, List, Optional
22
+ from graphiant_sdk.models.v1_alarm_history_get200_response_history_inner_time import V1AlarmHistoryGet200ResponseHistoryInnerTime
22
23
  from typing import Optional, Set
23
24
  from typing_extensions import Self
24
25
 
@@ -29,13 +30,14 @@ class V1GroupsIdMembersGet200ResponseUsersInner(BaseModel):
29
30
  email: Optional[StrictStr] = None
30
31
  enterprise_id: Optional[StrictInt] = Field(default=None, alias="enterpriseId")
31
32
  first_name: Optional[StrictStr] = Field(default=None, alias="firstName")
33
+ last_active_at: Optional[V1AlarmHistoryGet200ResponseHistoryInnerTime] = Field(default=None, alias="lastActiveAt")
32
34
  last_name: Optional[StrictStr] = Field(default=None, alias="lastName")
33
35
  mfa_factor: Optional[StrictStr] = Field(default=None, alias="mfaFactor")
34
36
  phone_number: Optional[StrictStr] = Field(default=None, alias="phoneNumber")
35
37
  time_zone: Optional[StrictStr] = Field(default=None, alias="timeZone")
36
38
  user_id: Optional[StrictStr] = Field(default=None, alias="userId")
37
39
  verified: Optional[StrictBool] = None
38
- __properties: ClassVar[List[str]] = ["email", "enterpriseId", "firstName", "lastName", "mfaFactor", "phoneNumber", "timeZone", "userId", "verified"]
40
+ __properties: ClassVar[List[str]] = ["email", "enterpriseId", "firstName", "lastActiveAt", "lastName", "mfaFactor", "phoneNumber", "timeZone", "userId", "verified"]
39
41
 
40
42
  model_config = ConfigDict(
41
43
  populate_by_name=True,
@@ -76,6 +78,9 @@ class V1GroupsIdMembersGet200ResponseUsersInner(BaseModel):
76
78
  exclude=excluded_fields,
77
79
  exclude_none=True,
78
80
  )
81
+ # override the default output from pydantic by calling `to_dict()` of last_active_at
82
+ if self.last_active_at:
83
+ _dict['lastActiveAt'] = self.last_active_at.to_dict()
79
84
  return _dict
80
85
 
81
86
  @classmethod
@@ -91,6 +96,7 @@ class V1GroupsIdMembersGet200ResponseUsersInner(BaseModel):
91
96
  "email": obj.get("email"),
92
97
  "enterpriseId": obj.get("enterpriseId"),
93
98
  "firstName": obj.get("firstName"),
99
+ "lastActiveAt": V1AlarmHistoryGet200ResponseHistoryInnerTime.from_dict(obj["lastActiveAt"]) if obj.get("lastActiveAt") is not None else None,
94
100
  "lastName": obj.get("lastName"),
95
101
  "mfaFactor": obj.get("mfaFactor"),
96
102
  "phoneNumber": obj.get("phoneNumber"),
@@ -17,7 +17,7 @@ import pprint
17
17
  import re # noqa: F401
18
18
  import json
19
19
 
20
- from pydantic import BaseModel, ConfigDict, Field, StrictStr
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
21
21
  from typing import Any, ClassVar, Dict, List, Optional
22
22
  from typing import Optional, Set
23
23
  from typing_extensions import Self
@@ -27,7 +27,8 @@ class V1GroupsIdMembersPostRequest(BaseModel):
27
27
  V1GroupsIdMembersPostRequest
28
28
  """ # noqa: E501
29
29
  member_ids: Optional[List[StrictStr]] = Field(default=None, alias="memberIds")
30
- __properties: ClassVar[List[str]] = ["memberIds"]
30
+ replace_existing: Optional[StrictBool] = Field(default=None, alias="replaceExisting")
31
+ __properties: ClassVar[List[str]] = ["memberIds", "replaceExisting"]
31
32
 
32
33
  model_config = ConfigDict(
33
34
  populate_by_name=True,
@@ -80,7 +81,8 @@ class V1GroupsIdMembersPostRequest(BaseModel):
80
81
  return cls.model_validate(obj)
81
82
 
82
83
  _obj = cls.model_validate({
83
- "memberIds": obj.get("memberIds")
84
+ "memberIds": obj.get("memberIds"),
85
+ "replaceExisting": obj.get("replaceExisting")
84
86
  })
85
87
  return _obj
86
88
 
@@ -0,0 +1,95 @@
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
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from graphiant_sdk.models.v1_onboarding_cloudinit_get200_response_cloudinit_tokens_inner import V1OnboardingCloudinitGet200ResponseCloudinitTokensInner
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class V1OnboardingCloudinitGet200Response(BaseModel):
27
+ """
28
+ V1OnboardingCloudinitGet200Response
29
+ """ # noqa: E501
30
+ cloudinit_tokens: Optional[List[V1OnboardingCloudinitGet200ResponseCloudinitTokensInner]] = Field(default=None, alias="cloudinitTokens")
31
+ __properties: ClassVar[List[str]] = ["cloudinitTokens"]
32
+
33
+ model_config = ConfigDict(
34
+ populate_by_name=True,
35
+ validate_assignment=True,
36
+ protected_namespaces=(),
37
+ )
38
+
39
+
40
+ def to_str(self) -> str:
41
+ """Returns the string representation of the model using alias"""
42
+ return pprint.pformat(self.model_dump(by_alias=True))
43
+
44
+ def to_json(self) -> str:
45
+ """Returns the JSON representation of the model using alias"""
46
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
47
+ return json.dumps(self.to_dict())
48
+
49
+ @classmethod
50
+ def from_json(cls, json_str: str) -> Optional[Self]:
51
+ """Create an instance of V1OnboardingCloudinitGet200Response from a JSON string"""
52
+ return cls.from_dict(json.loads(json_str))
53
+
54
+ def to_dict(self) -> Dict[str, Any]:
55
+ """Return the dictionary representation of the model using alias.
56
+
57
+ This has the following differences from calling pydantic's
58
+ `self.model_dump(by_alias=True)`:
59
+
60
+ * `None` is only added to the output dict for nullable fields that
61
+ were set at model initialization. Other fields with value `None`
62
+ are ignored.
63
+ """
64
+ excluded_fields: Set[str] = set([
65
+ ])
66
+
67
+ _dict = self.model_dump(
68
+ by_alias=True,
69
+ exclude=excluded_fields,
70
+ exclude_none=True,
71
+ )
72
+ # override the default output from pydantic by calling `to_dict()` of each item in cloudinit_tokens (list)
73
+ _items = []
74
+ if self.cloudinit_tokens:
75
+ for _item_cloudinit_tokens in self.cloudinit_tokens:
76
+ if _item_cloudinit_tokens:
77
+ _items.append(_item_cloudinit_tokens.to_dict())
78
+ _dict['cloudinitTokens'] = _items
79
+ return _dict
80
+
81
+ @classmethod
82
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
83
+ """Create an instance of V1OnboardingCloudinitGet200Response from a dict"""
84
+ if obj is None:
85
+ return None
86
+
87
+ if not isinstance(obj, dict):
88
+ return cls.model_validate(obj)
89
+
90
+ _obj = cls.model_validate({
91
+ "cloudinitTokens": [V1OnboardingCloudinitGet200ResponseCloudinitTokensInner.from_dict(_item) for _item in obj["cloudinitTokens"]] if obj.get("cloudinitTokens") is not None else None
92
+ })
93
+ return _obj
94
+
95
+
@@ -0,0 +1,105 @@
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 graphiant_sdk.models.v1_onboarding_cloudinit_get200_response_cloudinit_tokens_inner_cloudinit_config import V1OnboardingCloudinitGet200ResponseCloudinitTokensInnerCloudinitConfig
23
+ from graphiant_sdk.models.v1_onboarding_cloudinit_get200_response_cloudinit_tokens_inner_token import V1OnboardingCloudinitGet200ResponseCloudinitTokensInnerToken
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+
27
+ class V1OnboardingCloudinitGet200ResponseCloudinitTokensInner(BaseModel):
28
+ """
29
+ V1OnboardingCloudinitGet200ResponseCloudinitTokensInner
30
+ """ # noqa: E501
31
+ cloudinit_config: Optional[V1OnboardingCloudinitGet200ResponseCloudinitTokensInnerCloudinitConfig] = Field(default=None, alias="cloudinitConfig")
32
+ device_id: Optional[StrictInt] = Field(default=None, alias="deviceId")
33
+ device_serial: Optional[StrictStr] = Field(default=None, alias="deviceSerial")
34
+ name: Optional[StrictStr] = None
35
+ role: Optional[StrictStr] = None
36
+ token: Optional[V1OnboardingCloudinitGet200ResponseCloudinitTokensInnerToken] = None
37
+ __properties: ClassVar[List[str]] = ["cloudinitConfig", "deviceId", "deviceSerial", "name", "role", "token"]
38
+
39
+ model_config = ConfigDict(
40
+ populate_by_name=True,
41
+ validate_assignment=True,
42
+ protected_namespaces=(),
43
+ )
44
+
45
+
46
+ def to_str(self) -> str:
47
+ """Returns the string representation of the model using alias"""
48
+ return pprint.pformat(self.model_dump(by_alias=True))
49
+
50
+ def to_json(self) -> str:
51
+ """Returns the JSON representation of the model using alias"""
52
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
53
+ return json.dumps(self.to_dict())
54
+
55
+ @classmethod
56
+ def from_json(cls, json_str: str) -> Optional[Self]:
57
+ """Create an instance of V1OnboardingCloudinitGet200ResponseCloudinitTokensInner from a JSON string"""
58
+ return cls.from_dict(json.loads(json_str))
59
+
60
+ def to_dict(self) -> Dict[str, Any]:
61
+ """Return the dictionary representation of the model using alias.
62
+
63
+ This has the following differences from calling pydantic's
64
+ `self.model_dump(by_alias=True)`:
65
+
66
+ * `None` is only added to the output dict for nullable fields that
67
+ were set at model initialization. Other fields with value `None`
68
+ are ignored.
69
+ """
70
+ excluded_fields: Set[str] = set([
71
+ ])
72
+
73
+ _dict = self.model_dump(
74
+ by_alias=True,
75
+ exclude=excluded_fields,
76
+ exclude_none=True,
77
+ )
78
+ # override the default output from pydantic by calling `to_dict()` of cloudinit_config
79
+ if self.cloudinit_config:
80
+ _dict['cloudinitConfig'] = self.cloudinit_config.to_dict()
81
+ # override the default output from pydantic by calling `to_dict()` of token
82
+ if self.token:
83
+ _dict['token'] = self.token.to_dict()
84
+ return _dict
85
+
86
+ @classmethod
87
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
88
+ """Create an instance of V1OnboardingCloudinitGet200ResponseCloudinitTokensInner from a dict"""
89
+ if obj is None:
90
+ return None
91
+
92
+ if not isinstance(obj, dict):
93
+ return cls.model_validate(obj)
94
+
95
+ _obj = cls.model_validate({
96
+ "cloudinitConfig": V1OnboardingCloudinitGet200ResponseCloudinitTokensInnerCloudinitConfig.from_dict(obj["cloudinitConfig"]) if obj.get("cloudinitConfig") is not None else None,
97
+ "deviceId": obj.get("deviceId"),
98
+ "deviceSerial": obj.get("deviceSerial"),
99
+ "name": obj.get("name"),
100
+ "role": obj.get("role"),
101
+ "token": V1OnboardingCloudinitGet200ResponseCloudinitTokensInnerToken.from_dict(obj["token"]) if obj.get("token") is not None else None
102
+ })
103
+ return _obj
104
+
105
+
@@ -0,0 +1,103 @@
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_onboarding_cloudinit_get200_response_cloudinit_tokens_inner_cloudinit_config_interfaces_inner import V1OnboardingCloudinitGet200ResponseCloudinitTokensInnerCloudinitConfigInterfacesInner
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class V1OnboardingCloudinitGet200ResponseCloudinitTokensInnerCloudinitConfig(BaseModel):
27
+ """
28
+ V1OnboardingCloudinitGet200ResponseCloudinitTokensInnerCloudinitConfig
29
+ """ # noqa: E501
30
+ device_type: Optional[StrictStr] = Field(default=None, alias="deviceType")
31
+ dns_servers: Optional[StrictStr] = Field(default=None, alias="dnsServers")
32
+ hostname: Optional[StrictStr] = None
33
+ interfaces: Optional[List[V1OnboardingCloudinitGet200ResponseCloudinitTokensInnerCloudinitConfigInterfacesInner]] = None
34
+ local_web_password: Optional[StrictStr] = Field(default=None, alias="localWebPassword")
35
+ __properties: ClassVar[List[str]] = ["deviceType", "dnsServers", "hostname", "interfaces", "localWebPassword"]
36
+
37
+ model_config = ConfigDict(
38
+ populate_by_name=True,
39
+ validate_assignment=True,
40
+ protected_namespaces=(),
41
+ )
42
+
43
+
44
+ def to_str(self) -> str:
45
+ """Returns the string representation of the model using alias"""
46
+ return pprint.pformat(self.model_dump(by_alias=True))
47
+
48
+ def to_json(self) -> str:
49
+ """Returns the JSON representation of the model using alias"""
50
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
51
+ return json.dumps(self.to_dict())
52
+
53
+ @classmethod
54
+ def from_json(cls, json_str: str) -> Optional[Self]:
55
+ """Create an instance of V1OnboardingCloudinitGet200ResponseCloudinitTokensInnerCloudinitConfig from a JSON string"""
56
+ return cls.from_dict(json.loads(json_str))
57
+
58
+ def to_dict(self) -> Dict[str, Any]:
59
+ """Return the dictionary representation of the model using alias.
60
+
61
+ This has the following differences from calling pydantic's
62
+ `self.model_dump(by_alias=True)`:
63
+
64
+ * `None` is only added to the output dict for nullable fields that
65
+ were set at model initialization. Other fields with value `None`
66
+ are ignored.
67
+ """
68
+ excluded_fields: Set[str] = set([
69
+ ])
70
+
71
+ _dict = self.model_dump(
72
+ by_alias=True,
73
+ exclude=excluded_fields,
74
+ exclude_none=True,
75
+ )
76
+ # override the default output from pydantic by calling `to_dict()` of each item in interfaces (list)
77
+ _items = []
78
+ if self.interfaces:
79
+ for _item_interfaces in self.interfaces:
80
+ if _item_interfaces:
81
+ _items.append(_item_interfaces.to_dict())
82
+ _dict['interfaces'] = _items
83
+ return _dict
84
+
85
+ @classmethod
86
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
87
+ """Create an instance of V1OnboardingCloudinitGet200ResponseCloudinitTokensInnerCloudinitConfig from a dict"""
88
+ if obj is None:
89
+ return None
90
+
91
+ if not isinstance(obj, dict):
92
+ return cls.model_validate(obj)
93
+
94
+ _obj = cls.model_validate({
95
+ "deviceType": obj.get("deviceType"),
96
+ "dnsServers": obj.get("dnsServers"),
97
+ "hostname": obj.get("hostname"),
98
+ "interfaces": [V1OnboardingCloudinitGet200ResponseCloudinitTokensInnerCloudinitConfigInterfacesInner.from_dict(_item) for _item in obj["interfaces"]] if obj.get("interfaces") is not None else None,
99
+ "localWebPassword": obj.get("localWebPassword")
100
+ })
101
+ return _obj
102
+
103
+
@@ -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
+