graphiant-sdk 25.9.2__py3-none-any.whl → 25.10.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.
- graphiant_sdk/__init__.py +154 -28
- graphiant_sdk/api/default_api.py +13428 -6650
- graphiant_sdk/api_client.py +1 -1
- graphiant_sdk/configuration.py +1 -1
- graphiant_sdk/models/__init__.py +102 -18
- graphiant_sdk/models/v1_auth_login_temp_post200_response.py +91 -0
- graphiant_sdk/models/v1_auth_login_temp_post_request.py +89 -0
- graphiant_sdk/models/v1_b2b_extranet_monitoring_filter_post200_response.py +91 -0
- graphiant_sdk/models/v1_b2b_extranet_monitoring_filter_post200_response_filters.py +104 -0
- graphiant_sdk/models/v1_b2b_extranet_monitoring_filter_post200_response_filters_customers_inner.py +93 -0
- graphiant_sdk/models/v1_b2b_extranet_monitoring_filter_post_request.py +91 -0
- graphiant_sdk/models/v1_devices_device_id_config_put_request_core_core_vrf_bgp_neighbors_value_neighbor.py +6 -6
- graphiant_sdk/models/v1_devices_device_id_config_put_request_edge_site_to_site_vpn_value_site_to_site_vpn.py +3 -3
- graphiant_sdk/models/v1_enterprises_get200_response_enterprises_inner.py +3 -1
- graphiant_sdk/models/v1_enterprises_patch_request.py +3 -1
- graphiant_sdk/models/v1_extranet_b2b_monitoring_peering_service_service_customer_list_post200_response.py +87 -0
- graphiant_sdk/models/v1_extranet_b2b_monitoring_peering_service_service_customer_list_post_request.py +95 -0
- graphiant_sdk/models/v1_extranets_b2b_general_customers_summary_get200_response.py +95 -0
- graphiant_sdk/models/v1_extranets_b2b_general_customers_summary_get200_response_customers_inner.py +104 -0
- graphiant_sdk/models/v1_extranets_b2b_peering_consumer_customer_id_match_details_get200_response.py +95 -0
- graphiant_sdk/models/v1_extranets_b2b_peering_consumer_customer_id_match_details_get200_response_details_inner.py +109 -0
- graphiant_sdk/models/v1_extranets_b2b_peering_consumer_customer_id_match_details_get200_response_details_inner_customer.py +94 -0
- graphiant_sdk/models/v1_extranets_b2b_peering_consumer_customer_id_match_details_get200_response_details_inner_service.py +93 -0
- graphiant_sdk/models/v1_extranets_b2b_peering_consumer_id_post200_response.py +109 -0
- graphiant_sdk/models/v1_extranets_b2b_peering_consumer_id_post_request.py +123 -0
- graphiant_sdk/models/v1_extranets_b2b_peering_consumer_id_post_request_policy_inner.py +89 -0
- graphiant_sdk/models/v1_extranets_b2b_peering_consumer_id_post_request_site_to_site_vpn.py +95 -0
- graphiant_sdk/models/v1_extranets_b2b_peering_consumer_id_post_request_site_to_site_vpn_ipsec_gateway_details.py +117 -0
- graphiant_sdk/models/v1_extranets_b2b_peering_consumer_id_post_request_site_to_site_vpn_ipsec_gateway_details_routing.py +97 -0
- graphiant_sdk/models/v1_extranets_b2b_peering_consumer_id_post_request_site_to_site_vpn_ipsec_gateway_details_routing_bgp.py +115 -0
- graphiant_sdk/models/v1_extranets_b2b_peering_consumer_id_post_request_site_to_site_vpn_ipsec_gateway_details_routing_bgp_address_families_value.py +91 -0
- graphiant_sdk/models/v1_extranets_b2b_peering_consumer_id_post_request_site_to_site_vpn_ipsec_gateway_details_routing_bgp_address_families_value_family.py +98 -0
- graphiant_sdk/models/v1_extranets_b2b_peering_consumer_id_post_request_site_to_site_vpn_ipsec_gateway_details_routing_bgp_md5_password.py +87 -0
- graphiant_sdk/models/v1_extranets_b2b_peering_consumer_id_post_request_site_to_site_vpn_ipsec_gateway_details_routing_static.py +87 -0
- graphiant_sdk/models/v1_extranets_b2b_peering_consumer_id_post_request_site_to_site_vpn_ipsec_gateway_details_tunnel1.py +93 -0
- graphiant_sdk/models/v1_extranets_b2b_peering_customer_id_get200_response.py +96 -0
- graphiant_sdk/models/v1_extranets_b2b_peering_customer_id_put_request.py +87 -0
- graphiant_sdk/models/v1_extranets_b2b_peering_customer_post200_response.py +93 -0
- graphiant_sdk/models/v1_extranets_b2b_peering_customer_post_request.py +95 -0
- graphiant_sdk/models/v1_extranets_b2b_peering_customer_post_request_invite.py +90 -0
- graphiant_sdk/models/v1_extranets_b2b_peering_match_customers_post200_response.py +95 -0
- graphiant_sdk/models/v1_extranets_b2b_peering_match_customers_post_request.py +97 -0
- graphiant_sdk/models/v1_extranets_b2b_peering_match_customers_post_request_info_inner.py +104 -0
- graphiant_sdk/models/v1_extranets_b2b_peering_match_service_to_customer_post200_response.py +95 -0
- graphiant_sdk/models/v1_extranets_b2b_peering_match_service_to_customer_put200_response.py +91 -0
- graphiant_sdk/models/v1_extranets_b2b_peering_match_service_to_customer_put_request.py +93 -0
- graphiant_sdk/models/v1_extranets_b2b_peering_match_service_to_customer_put_request_service.py +112 -0
- graphiant_sdk/models/v1_extranets_b2b_peering_match_service_to_customer_put_request_service_nat_inner.py +89 -0
- graphiant_sdk/models/v1_extranets_b2b_peering_match_service_to_customer_put_request_service_service_prefixes_inner.py +89 -0
- graphiant_sdk/models/v1_extranets_b2b_peering_match_services_summary_get200_response.py +95 -0
- graphiant_sdk/models/v1_extranets_b2b_peering_match_services_summary_get200_response_services_inner.py +104 -0
- graphiant_sdk/models/v1_extranets_b2b_peering_producer_id_get200_response.py +95 -0
- graphiant_sdk/models/v1_extranets_b2b_peering_producer_id_put_request.py +91 -0
- graphiant_sdk/models/v1_extranets_b2b_peering_producer_post200_response.py +93 -0
- graphiant_sdk/models/v1_extranets_b2b_peering_producer_post200_response_policy.py +93 -0
- graphiant_sdk/models/v1_extranets_b2b_peering_producer_post_request.py +95 -0
- graphiant_sdk/models/v1_extranets_b2b_peering_producer_post_request_policy.py +111 -0
- graphiant_sdk/models/v1_extranets_b2b_post_request_policy.py +19 -2
- graphiant_sdk/models/v1_extranets_b2b_producers_summary_get200_response_info_inner.py +16 -3
- graphiant_sdk/models/v1_extranets_get200_response_policies_inner_branches_excluded_devices_inner_ipsec_tunnels_inner.py +3 -3
- graphiant_sdk/models/v1_gateways_guest_consumer_get200_response.py +91 -0
- graphiant_sdk/models/v1_gateways_put_request_details.py +3 -3
- graphiant_sdk/models/v1_groups_get200_response_groups_inner_permissions.py +3 -1
- graphiant_sdk/models/v1_invitation_email_post_request.py +95 -0
- graphiant_sdk/models/v1_temp_password_put_request.py +91 -0
- {graphiant_sdk-25.9.2.dist-info → graphiant_sdk-25.10.1.dist-info}/METADATA +3 -3
- {graphiant_sdk-25.9.2.dist-info → graphiant_sdk-25.10.1.dist-info}/RECORD +121 -19
- test/test_v1_auth_login_temp_post200_response.py +53 -0
- test/test_v1_auth_login_temp_post_request.py +52 -0
- test/test_v1_b2b_extranet_monitoring_filter_post200_response.py +65 -0
- test/test_v1_b2b_extranet_monitoring_filter_post200_response_filters.py +64 -0
- test/test_v1_b2b_extranet_monitoring_filter_post200_response_filters_customers_inner.py +54 -0
- test/test_v1_b2b_extranet_monitoring_filter_post_request.py +53 -0
- test/test_v1_extranet_b2b_monitoring_peering_service_service_customer_list_post200_response.py +53 -0
- test/test_v1_extranet_b2b_monitoring_peering_service_service_customer_list_post_request.py +60 -0
- test/test_v1_extranets_b2b_general_customers_summary_get200_response.py +64 -0
- test/test_v1_extranets_b2b_general_customers_summary_get200_response_customers_inner.py +61 -0
- test/test_v1_extranets_b2b_peering_consumer_customer_id_match_details_get200_response.py +75 -0
- test/test_v1_extranets_b2b_peering_consumer_customer_id_match_details_get200_response_details_inner.py +72 -0
- test/test_v1_extranets_b2b_peering_consumer_customer_id_match_details_get200_response_details_inner_customer.py +56 -0
- test/test_v1_extranets_b2b_peering_consumer_customer_id_match_details_get200_response_details_inner_service.py +56 -0
- test/test_v1_extranets_b2b_peering_consumer_id_post200_response.py +74 -0
- test/test_v1_extranets_b2b_peering_consumer_id_post_request.py +123 -0
- test/test_v1_extranets_b2b_peering_consumer_id_post_request_policy_inner.py +54 -0
- test/test_v1_extranets_b2b_peering_consumer_id_post_request_site_to_site_vpn.py +92 -0
- test/test_v1_extranets_b2b_peering_consumer_id_post_request_site_to_site_vpn_ipsec_gateway_details.py +87 -0
- test/test_v1_extranets_b2b_peering_consumer_id_post_request_site_to_site_vpn_ipsec_gateway_details_routing.py +69 -0
- test/test_v1_extranets_b2b_peering_consumer_id_post_request_site_to_site_vpn_ipsec_gateway_details_routing_bgp.py +64 -0
- test/test_v1_extranets_b2b_peering_consumer_id_post_request_site_to_site_vpn_ipsec_gateway_details_routing_bgp_address_families_value.py +56 -0
- test/test_v1_extranets_b2b_peering_consumer_id_post_request_site_to_site_vpn_ipsec_gateway_details_routing_bgp_address_families_value_family.py +55 -0
- test/test_v1_extranets_b2b_peering_consumer_id_post_request_site_to_site_vpn_ipsec_gateway_details_routing_bgp_md5_password.py +51 -0
- test/test_v1_extranets_b2b_peering_consumer_id_post_request_site_to_site_vpn_ipsec_gateway_details_routing_static.py +53 -0
- test/test_v1_extranets_b2b_peering_consumer_id_post_request_site_to_site_vpn_ipsec_gateway_details_tunnel1.py +54 -0
- test/test_v1_extranets_b2b_peering_customer_id_get200_response.py +57 -0
- test/test_v1_extranets_b2b_peering_customer_id_put_request.py +51 -0
- test/test_v1_extranets_b2b_peering_customer_post200_response.py +56 -0
- test/test_v1_extranets_b2b_peering_customer_post_request.py +57 -0
- test/test_v1_extranets_b2b_peering_customer_post_request_invite.py +54 -0
- test/test_v1_extranets_b2b_peering_match_customers_post200_response.py +64 -0
- test/test_v1_extranets_b2b_peering_match_customers_post_request.py +65 -0
- test/test_v1_extranets_b2b_peering_match_customers_post_request_info_inner.py +61 -0
- test/test_v1_extranets_b2b_peering_match_service_to_customer_post200_response.py +66 -0
- test/test_v1_extranets_b2b_peering_match_service_to_customer_put200_response.py +64 -0
- test/test_v1_extranets_b2b_peering_match_service_to_customer_put_request.py +65 -0
- test/test_v1_extranets_b2b_peering_match_service_to_customer_put_request_service.py +63 -0
- test/test_v1_extranets_b2b_peering_match_service_to_customer_put_request_service_nat_inner.py +52 -0
- test/test_v1_extranets_b2b_peering_match_service_to_customer_put_request_service_service_prefixes_inner.py +52 -0
- test/test_v1_extranets_b2b_peering_match_services_summary_get200_response.py +62 -0
- test/test_v1_extranets_b2b_peering_match_services_summary_get200_response_services_inner.py +59 -0
- test/test_v1_extranets_b2b_peering_producer_id_get200_response.py +80 -0
- test/test_v1_extranets_b2b_peering_producer_id_put_request.py +76 -0
- test/test_v1_extranets_b2b_peering_producer_post200_response.py +79 -0
- test/test_v1_extranets_b2b_peering_producer_post200_response_policy.py +77 -0
- test/test_v1_extranets_b2b_peering_producer_post_request.py +78 -0
- test/test_v1_extranets_b2b_peering_producer_post_request_policy.py +75 -0
- test/test_v1_gateways_guest_consumer_get200_response.py +93 -0
- test/test_v1_invitation_email_post_request.py +55 -0
- test/test_v1_temp_password_put_request.py +55 -0
- {graphiant_sdk-25.9.2.dist-info → graphiant_sdk-25.10.1.dist-info}/WHEEL +0 -0
- {graphiant_sdk-25.9.2.dist-info → graphiant_sdk-25.10.1.dist-info}/licenses/LICENSE +0 -0
- {graphiant_sdk-25.9.2.dist-info → graphiant_sdk-25.10.1.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,115 @@
|
|
|
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, StrictBool
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from typing_extensions import Annotated
|
|
23
|
+
from graphiant_sdk.models.v1_extranets_b2b_peering_consumer_id_post_request_site_to_site_vpn_ipsec_gateway_details_routing_bgp_address_families_value import V1ExtranetsB2bPeeringConsumerIdPostRequestSiteToSiteVpnIpsecGatewayDetailsRoutingBgpAddressFamiliesValue
|
|
24
|
+
from graphiant_sdk.models.v1_extranets_b2b_peering_consumer_id_post_request_site_to_site_vpn_ipsec_gateway_details_routing_bgp_md5_password import V1ExtranetsB2bPeeringConsumerIdPostRequestSiteToSiteVpnIpsecGatewayDetailsRoutingBgpMd5Password
|
|
25
|
+
from typing import Optional, Set
|
|
26
|
+
from typing_extensions import Self
|
|
27
|
+
|
|
28
|
+
class V1ExtranetsB2bPeeringConsumerIdPostRequestSiteToSiteVpnIpsecGatewayDetailsRoutingBgp(BaseModel):
|
|
29
|
+
"""
|
|
30
|
+
V1ExtranetsB2bPeeringConsumerIdPostRequestSiteToSiteVpnIpsecGatewayDetailsRoutingBgp
|
|
31
|
+
""" # noqa: E501
|
|
32
|
+
address_families: Optional[Dict[str, V1ExtranetsB2bPeeringConsumerIdPostRequestSiteToSiteVpnIpsecGatewayDetailsRoutingBgpAddressFamiliesValue]] = Field(default=None, alias="addressFamilies")
|
|
33
|
+
hold_timer: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, alias="holdTimer")
|
|
34
|
+
keepalive_timer: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, alias="keepaliveTimer")
|
|
35
|
+
md5_password: Optional[V1ExtranetsB2bPeeringConsumerIdPostRequestSiteToSiteVpnIpsecGatewayDetailsRoutingBgpMd5Password] = Field(default=None, alias="md5Password")
|
|
36
|
+
peer_asn: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, alias="peerAsn")
|
|
37
|
+
send_community: Optional[StrictBool] = Field(default=None, alias="sendCommunity")
|
|
38
|
+
__properties: ClassVar[List[str]] = ["addressFamilies", "holdTimer", "keepaliveTimer", "md5Password", "peerAsn", "sendCommunity"]
|
|
39
|
+
|
|
40
|
+
model_config = ConfigDict(
|
|
41
|
+
populate_by_name=True,
|
|
42
|
+
validate_assignment=True,
|
|
43
|
+
protected_namespaces=(),
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def to_str(self) -> str:
|
|
48
|
+
"""Returns the string representation of the model using alias"""
|
|
49
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
50
|
+
|
|
51
|
+
def to_json(self) -> str:
|
|
52
|
+
"""Returns the JSON representation of the model using alias"""
|
|
53
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
54
|
+
return json.dumps(self.to_dict())
|
|
55
|
+
|
|
56
|
+
@classmethod
|
|
57
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
58
|
+
"""Create an instance of V1ExtranetsB2bPeeringConsumerIdPostRequestSiteToSiteVpnIpsecGatewayDetailsRoutingBgp from a JSON string"""
|
|
59
|
+
return cls.from_dict(json.loads(json_str))
|
|
60
|
+
|
|
61
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
62
|
+
"""Return the dictionary representation of the model using alias.
|
|
63
|
+
|
|
64
|
+
This has the following differences from calling pydantic's
|
|
65
|
+
`self.model_dump(by_alias=True)`:
|
|
66
|
+
|
|
67
|
+
* `None` is only added to the output dict for nullable fields that
|
|
68
|
+
were set at model initialization. Other fields with value `None`
|
|
69
|
+
are ignored.
|
|
70
|
+
"""
|
|
71
|
+
excluded_fields: Set[str] = set([
|
|
72
|
+
])
|
|
73
|
+
|
|
74
|
+
_dict = self.model_dump(
|
|
75
|
+
by_alias=True,
|
|
76
|
+
exclude=excluded_fields,
|
|
77
|
+
exclude_none=True,
|
|
78
|
+
)
|
|
79
|
+
# override the default output from pydantic by calling `to_dict()` of each value in address_families (dict)
|
|
80
|
+
_field_dict = {}
|
|
81
|
+
if self.address_families:
|
|
82
|
+
for _key_address_families in self.address_families:
|
|
83
|
+
if self.address_families[_key_address_families]:
|
|
84
|
+
_field_dict[_key_address_families] = self.address_families[_key_address_families].to_dict()
|
|
85
|
+
_dict['addressFamilies'] = _field_dict
|
|
86
|
+
# override the default output from pydantic by calling `to_dict()` of md5_password
|
|
87
|
+
if self.md5_password:
|
|
88
|
+
_dict['md5Password'] = self.md5_password.to_dict()
|
|
89
|
+
return _dict
|
|
90
|
+
|
|
91
|
+
@classmethod
|
|
92
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
93
|
+
"""Create an instance of V1ExtranetsB2bPeeringConsumerIdPostRequestSiteToSiteVpnIpsecGatewayDetailsRoutingBgp from a dict"""
|
|
94
|
+
if obj is None:
|
|
95
|
+
return None
|
|
96
|
+
|
|
97
|
+
if not isinstance(obj, dict):
|
|
98
|
+
return cls.model_validate(obj)
|
|
99
|
+
|
|
100
|
+
_obj = cls.model_validate({
|
|
101
|
+
"addressFamilies": dict(
|
|
102
|
+
(_k, V1ExtranetsB2bPeeringConsumerIdPostRequestSiteToSiteVpnIpsecGatewayDetailsRoutingBgpAddressFamiliesValue.from_dict(_v))
|
|
103
|
+
for _k, _v in obj["addressFamilies"].items()
|
|
104
|
+
)
|
|
105
|
+
if obj.get("addressFamilies") is not None
|
|
106
|
+
else None,
|
|
107
|
+
"holdTimer": obj.get("holdTimer"),
|
|
108
|
+
"keepaliveTimer": obj.get("keepaliveTimer"),
|
|
109
|
+
"md5Password": V1ExtranetsB2bPeeringConsumerIdPostRequestSiteToSiteVpnIpsecGatewayDetailsRoutingBgpMd5Password.from_dict(obj["md5Password"]) if obj.get("md5Password") is not None else None,
|
|
110
|
+
"peerAsn": obj.get("peerAsn"),
|
|
111
|
+
"sendCommunity": obj.get("sendCommunity")
|
|
112
|
+
})
|
|
113
|
+
return _obj
|
|
114
|
+
|
|
115
|
+
|
|
@@ -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
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from graphiant_sdk.models.v1_extranets_b2b_peering_consumer_id_post_request_site_to_site_vpn_ipsec_gateway_details_routing_bgp_address_families_value_family import V1ExtranetsB2bPeeringConsumerIdPostRequestSiteToSiteVpnIpsecGatewayDetailsRoutingBgpAddressFamiliesValueFamily
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class V1ExtranetsB2bPeeringConsumerIdPostRequestSiteToSiteVpnIpsecGatewayDetailsRoutingBgpAddressFamiliesValue(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
V1ExtranetsB2bPeeringConsumerIdPostRequestSiteToSiteVpnIpsecGatewayDetailsRoutingBgpAddressFamiliesValue
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
family: Optional[V1ExtranetsB2bPeeringConsumerIdPostRequestSiteToSiteVpnIpsecGatewayDetailsRoutingBgpAddressFamiliesValueFamily] = None
|
|
31
|
+
__properties: ClassVar[List[str]] = ["family"]
|
|
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 V1ExtranetsB2bPeeringConsumerIdPostRequestSiteToSiteVpnIpsecGatewayDetailsRoutingBgpAddressFamiliesValue 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 family
|
|
73
|
+
if self.family:
|
|
74
|
+
_dict['family'] = self.family.to_dict()
|
|
75
|
+
return _dict
|
|
76
|
+
|
|
77
|
+
@classmethod
|
|
78
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
79
|
+
"""Create an instance of V1ExtranetsB2bPeeringConsumerIdPostRequestSiteToSiteVpnIpsecGatewayDetailsRoutingBgpAddressFamiliesValue from a dict"""
|
|
80
|
+
if obj is None:
|
|
81
|
+
return None
|
|
82
|
+
|
|
83
|
+
if not isinstance(obj, dict):
|
|
84
|
+
return cls.model_validate(obj)
|
|
85
|
+
|
|
86
|
+
_obj = cls.model_validate({
|
|
87
|
+
"family": V1ExtranetsB2bPeeringConsumerIdPostRequestSiteToSiteVpnIpsecGatewayDetailsRoutingBgpAddressFamiliesValueFamily.from_dict(obj["family"]) if obj.get("family") is not None else None
|
|
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_global_config_patch_request_routing_policies_value_policy_statements_value_statement_actions_value_action_call_policy import V1GlobalConfigPatchRequestRoutingPoliciesValuePolicyStatementsValueStatementActionsValueActionCallPolicy
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class V1ExtranetsB2bPeeringConsumerIdPostRequestSiteToSiteVpnIpsecGatewayDetailsRoutingBgpAddressFamiliesValueFamily(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
V1ExtranetsB2bPeeringConsumerIdPostRequestSiteToSiteVpnIpsecGatewayDetailsRoutingBgpAddressFamiliesValueFamily
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
address_family: Optional[StrictStr] = Field(default=None, alias="addressFamily")
|
|
31
|
+
inbound_policy: Optional[V1GlobalConfigPatchRequestRoutingPoliciesValuePolicyStatementsValueStatementActionsValueActionCallPolicy] = Field(default=None, alias="inboundPolicy")
|
|
32
|
+
outbound_policy: Optional[V1GlobalConfigPatchRequestRoutingPoliciesValuePolicyStatementsValueStatementActionsValueActionCallPolicy] = Field(default=None, alias="outboundPolicy")
|
|
33
|
+
__properties: ClassVar[List[str]] = ["addressFamily", "inboundPolicy", "outboundPolicy"]
|
|
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 V1ExtranetsB2bPeeringConsumerIdPostRequestSiteToSiteVpnIpsecGatewayDetailsRoutingBgpAddressFamiliesValueFamily 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 inbound_policy
|
|
75
|
+
if self.inbound_policy:
|
|
76
|
+
_dict['inboundPolicy'] = self.inbound_policy.to_dict()
|
|
77
|
+
# override the default output from pydantic by calling `to_dict()` of outbound_policy
|
|
78
|
+
if self.outbound_policy:
|
|
79
|
+
_dict['outboundPolicy'] = self.outbound_policy.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 V1ExtranetsB2bPeeringConsumerIdPostRequestSiteToSiteVpnIpsecGatewayDetailsRoutingBgpAddressFamiliesValueFamily 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
|
+
"addressFamily": obj.get("addressFamily"),
|
|
93
|
+
"inboundPolicy": V1GlobalConfigPatchRequestRoutingPoliciesValuePolicyStatementsValueStatementActionsValueActionCallPolicy.from_dict(obj["inboundPolicy"]) if obj.get("inboundPolicy") is not None else None,
|
|
94
|
+
"outboundPolicy": V1GlobalConfigPatchRequestRoutingPoliciesValuePolicyStatementsValueStatementActionsValueActionCallPolicy.from_dict(obj["outboundPolicy"]) if obj.get("outboundPolicy") is not None else None
|
|
95
|
+
})
|
|
96
|
+
return _obj
|
|
97
|
+
|
|
98
|
+
|
|
@@ -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 V1ExtranetsB2bPeeringConsumerIdPostRequestSiteToSiteVpnIpsecGatewayDetailsRoutingBgpMd5Password(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
V1ExtranetsB2bPeeringConsumerIdPostRequestSiteToSiteVpnIpsecGatewayDetailsRoutingBgpMd5Password
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
md5_password: Optional[StrictStr] = Field(default=None, alias="md5Password")
|
|
30
|
+
__properties: ClassVar[List[str]] = ["md5Password"]
|
|
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 V1ExtranetsB2bPeeringConsumerIdPostRequestSiteToSiteVpnIpsecGatewayDetailsRoutingBgpMd5Password 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 V1ExtranetsB2bPeeringConsumerIdPostRequestSiteToSiteVpnIpsecGatewayDetailsRoutingBgpMd5Password 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
|
+
"md5Password": obj.get("md5Password")
|
|
84
|
+
})
|
|
85
|
+
return _obj
|
|
86
|
+
|
|
87
|
+
|
|
@@ -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 V1ExtranetsB2bPeeringConsumerIdPostRequestSiteToSiteVpnIpsecGatewayDetailsRoutingStatic(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
V1ExtranetsB2bPeeringConsumerIdPostRequestSiteToSiteVpnIpsecGatewayDetailsRoutingStatic
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
destination_prefix: Optional[List[StrictStr]] = Field(default=None, alias="destinationPrefix")
|
|
30
|
+
__properties: ClassVar[List[str]] = ["destinationPrefix"]
|
|
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 V1ExtranetsB2bPeeringConsumerIdPostRequestSiteToSiteVpnIpsecGatewayDetailsRoutingStatic 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 V1ExtranetsB2bPeeringConsumerIdPostRequestSiteToSiteVpnIpsecGatewayDetailsRoutingStatic 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
|
+
"destinationPrefix": obj.get("destinationPrefix")
|
|
84
|
+
})
|
|
85
|
+
return _obj
|
|
86
|
+
|
|
87
|
+
|
|
@@ -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, 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 V1ExtranetsB2bPeeringConsumerIdPostRequestSiteToSiteVpnIpsecGatewayDetailsTunnel1(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
V1ExtranetsB2bPeeringConsumerIdPostRequestSiteToSiteVpnIpsecGatewayDetailsTunnel1
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
inside_ipv4_cidr: Optional[StrictStr] = Field(default=None, alias="insideIpv4Cidr")
|
|
30
|
+
inside_ipv6_cidr: Optional[StrictStr] = Field(default=None, alias="insideIpv6Cidr")
|
|
31
|
+
local_ike_peer_identity: Optional[StrictStr] = Field(default=None, alias="localIkePeerIdentity")
|
|
32
|
+
psk: Optional[StrictStr] = None
|
|
33
|
+
__properties: ClassVar[List[str]] = ["insideIpv4Cidr", "insideIpv6Cidr", "localIkePeerIdentity", "psk"]
|
|
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 V1ExtranetsB2bPeeringConsumerIdPostRequestSiteToSiteVpnIpsecGatewayDetailsTunnel1 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 V1ExtranetsB2bPeeringConsumerIdPostRequestSiteToSiteVpnIpsecGatewayDetailsTunnel1 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
|
+
"insideIpv4Cidr": obj.get("insideIpv4Cidr"),
|
|
87
|
+
"insideIpv6Cidr": obj.get("insideIpv6Cidr"),
|
|
88
|
+
"localIkePeerIdentity": obj.get("localIkePeerIdentity"),
|
|
89
|
+
"psk": obj.get("psk")
|
|
90
|
+
})
|
|
91
|
+
return _obj
|
|
92
|
+
|
|
93
|
+
|
|
@@ -0,0 +1,96 @@
|
|
|
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_extensions import Annotated
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class V1ExtranetsB2bPeeringCustomerIdGet200Response(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
V1ExtranetsB2bPeeringCustomerIdGet200Response
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
customer_name: Optional[StrictStr] = Field(default=None, alias="customerName")
|
|
31
|
+
emails: Optional[List[StrictStr]] = None
|
|
32
|
+
num_sites: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, alias="numSites")
|
|
33
|
+
status: Optional[StrictStr] = None
|
|
34
|
+
type: Optional[StrictStr] = None
|
|
35
|
+
__properties: ClassVar[List[str]] = ["customerName", "emails", "numSites", "status", "type"]
|
|
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 V1ExtranetsB2bPeeringCustomerIdGet200Response 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
|
+
return _dict
|
|
77
|
+
|
|
78
|
+
@classmethod
|
|
79
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
80
|
+
"""Create an instance of V1ExtranetsB2bPeeringCustomerIdGet200Response from a dict"""
|
|
81
|
+
if obj is None:
|
|
82
|
+
return None
|
|
83
|
+
|
|
84
|
+
if not isinstance(obj, dict):
|
|
85
|
+
return cls.model_validate(obj)
|
|
86
|
+
|
|
87
|
+
_obj = cls.model_validate({
|
|
88
|
+
"customerName": obj.get("customerName"),
|
|
89
|
+
"emails": obj.get("emails"),
|
|
90
|
+
"numSites": obj.get("numSites"),
|
|
91
|
+
"status": obj.get("status"),
|
|
92
|
+
"type": obj.get("type")
|
|
93
|
+
})
|
|
94
|
+
return _obj
|
|
95
|
+
|
|
96
|
+
|