pidginhost-sdk 0.2.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pidginhost_sdk/__init__.py +467 -0
- pidginhost_sdk/api/__init__.py +14 -0
- pidginhost_sdk/api/account_api.py +10267 -0
- pidginhost_sdk/api/billing_api.py +9644 -0
- pidginhost_sdk/api/cloud_api.py +43062 -0
- pidginhost_sdk/api/dedicated_api.py +2838 -0
- pidginhost_sdk/api/domain_api.py +10505 -0
- pidginhost_sdk/api/freedns_api.py +3440 -0
- pidginhost_sdk/api/hosting_api.py +1674 -0
- pidginhost_sdk/api/kubernetes_api.py +31395 -0
- pidginhost_sdk/api/schema_api.py +605 -0
- pidginhost_sdk/api/support_api.py +4324 -0
- pidginhost_sdk/api_client.py +806 -0
- pidginhost_sdk/api_response.py +21 -0
- pidginhost_sdk/client.py +50 -0
- pidginhost_sdk/configuration.py +617 -0
- pidginhost_sdk/exceptions.py +219 -0
- pidginhost_sdk/models/__init__.py +217 -0
- pidginhost_sdk/models/activate_free_dns.py +93 -0
- pidginhost_sdk/models/activate_free_dns_response.py +92 -0
- pidginhost_sdk/models/activity_log_entry.py +90 -0
- pidginhost_sdk/models/activity_log_response.py +96 -0
- pidginhost_sdk/models/add_server_response.py +88 -0
- pidginhost_sdk/models/address.py +116 -0
- pidginhost_sdk/models/api_token_create.py +105 -0
- pidginhost_sdk/models/api_token_list.py +121 -0
- pidginhost_sdk/models/attach_ipv4.py +88 -0
- pidginhost_sdk/models/attach_ipv6.py +88 -0
- pidginhost_sdk/models/attach_volume.py +88 -0
- pidginhost_sdk/models/cancel_service_response.py +90 -0
- pidginhost_sdk/models/change_billing_cycle.py +88 -0
- pidginhost_sdk/models/change_billing_cycle_response.py +90 -0
- pidginhost_sdk/models/change_company.py +93 -0
- pidginhost_sdk/models/change_company_response.py +95 -0
- pidginhost_sdk/models/change_password.py +89 -0
- pidginhost_sdk/models/check_availability.py +89 -0
- pidginhost_sdk/models/cluster_add.py +104 -0
- pidginhost_sdk/models/cluster_add_response.py +88 -0
- pidginhost_sdk/models/cluster_detail.py +148 -0
- pidginhost_sdk/models/cluster_package.py +104 -0
- pidginhost_sdk/models/cluster_type.py +104 -0
- pidginhost_sdk/models/cluster_type_enum.py +38 -0
- pidginhost_sdk/models/company.py +111 -0
- pidginhost_sdk/models/connect_vm_request.py +88 -0
- pidginhost_sdk/models/connect_vm_response.py +90 -0
- pidginhost_sdk/models/connected_vm.py +92 -0
- pidginhost_sdk/models/connected_vms_response.py +96 -0
- pidginhost_sdk/models/console_token.py +90 -0
- pidginhost_sdk/models/contact_type_enum.py +40 -0
- pidginhost_sdk/models/contacts_update.py +91 -0
- pidginhost_sdk/models/contacts_update_response.py +88 -0
- pidginhost_sdk/models/country_enum.py +290 -0
- pidginhost_sdk/models/deactivate_free_dns.py +91 -0
- pidginhost_sdk/models/deactivate_free_dns_response.py +88 -0
- pidginhost_sdk/models/dedicated_rdns.py +91 -0
- pidginhost_sdk/models/dedicated_server.py +136 -0
- pidginhost_sdk/models/delete_record.py +88 -0
- pidginhost_sdk/models/delete_record_response.py +90 -0
- pidginhost_sdk/models/department.py +94 -0
- pidginhost_sdk/models/deposit.py +138 -0
- pidginhost_sdk/models/deposit_create.py +88 -0
- pidginhost_sdk/models/deposit_status_enum.py +40 -0
- pidginhost_sdk/models/destroy_protection.py +88 -0
- pidginhost_sdk/models/detach_ipv4.py +88 -0
- pidginhost_sdk/models/detach_ipv4_response.py +88 -0
- pidginhost_sdk/models/detach_ipv6.py +88 -0
- pidginhost_sdk/models/detach_ipv6_response.py +88 -0
- pidginhost_sdk/models/detach_volume.py +88 -0
- pidginhost_sdk/models/disconnect_vm_request.py +88 -0
- pidginhost_sdk/models/disconnect_vm_response.py +90 -0
- pidginhost_sdk/models/dns_record.py +154 -0
- pidginhost_sdk/models/dns_record_create.py +121 -0
- pidginhost_sdk/models/dns_record_create_type_enum.py +43 -0
- pidginhost_sdk/models/dns_record_mutate_response.py +94 -0
- pidginhost_sdk/models/domain.py +152 -0
- pidginhost_sdk/models/domain_cancel_response.py +90 -0
- pidginhost_sdk/models/domain_create.py +93 -0
- pidginhost_sdk/models/domain_registrant.py +131 -0
- pidginhost_sdk/models/email_history.py +107 -0
- pidginhost_sdk/models/feature_upgrade_request.py +90 -0
- pidginhost_sdk/models/feature_upgrade_response.py +90 -0
- pidginhost_sdk/models/features_enum.py +41 -0
- pidginhost_sdk/models/firewall_rule.py +119 -0
- pidginhost_sdk/models/firewall_rule_direction_enum.py +38 -0
- pidginhost_sdk/models/firewall_rules_set.py +114 -0
- pidginhost_sdk/models/firewall_rules_set_status_enum.py +39 -0
- pidginhost_sdk/models/free_dns_domain.py +98 -0
- pidginhost_sdk/models/funds_balance_response.py +122 -0
- pidginhost_sdk/models/funds_log.py +117 -0
- pidginhost_sdk/models/fw_policy_out_enum.py +39 -0
- pidginhost_sdk/models/hosting_change_password_response.py +88 -0
- pidginhost_sdk/models/hosting_service.py +136 -0
- pidginhost_sdk/models/http_route.py +129 -0
- pidginhost_sdk/models/invoice_detail.py +199 -0
- pidginhost_sdk/models/invoice_list.py +164 -0
- pidginhost_sdk/models/kube_upgrade_response.py +88 -0
- pidginhost_sdk/models/kube_version_enum.py +39 -0
- pidginhost_sdk/models/lb_firewall_rule.py +122 -0
- pidginhost_sdk/models/lb_firewall_rule_action_enum.py +39 -0
- pidginhost_sdk/models/lb_firewall_rule_direction_enum.py +38 -0
- pidginhost_sdk/models/low_balance_settings.py +114 -0
- pidginhost_sdk/models/nameservers_update.py +89 -0
- pidginhost_sdk/models/nameservers_update_response.py +88 -0
- pidginhost_sdk/models/node_metrics_response.py +100 -0
- pidginhost_sdk/models/node_rrd_response.py +90 -0
- pidginhost_sdk/models/notification_settings_response.py +115 -0
- pidginhost_sdk/models/operation_enum.py +46 -0
- pidginhost_sdk/models/os_image.py +108 -0
- pidginhost_sdk/models/paginated_api_token_list_list.py +112 -0
- pidginhost_sdk/models/paginated_cluster_detail_list.py +112 -0
- pidginhost_sdk/models/paginated_cluster_type_list.py +112 -0
- pidginhost_sdk/models/paginated_company_list.py +112 -0
- pidginhost_sdk/models/paginated_dedicated_server_list.py +112 -0
- pidginhost_sdk/models/paginated_deposit_list.py +112 -0
- pidginhost_sdk/models/paginated_domain_list.py +112 -0
- pidginhost_sdk/models/paginated_domain_registrant_list.py +112 -0
- pidginhost_sdk/models/paginated_email_history_list.py +112 -0
- pidginhost_sdk/models/paginated_funds_log_list.py +112 -0
- pidginhost_sdk/models/paginated_hosting_service_list.py +112 -0
- pidginhost_sdk/models/paginated_invoice_list_list.py +112 -0
- pidginhost_sdk/models/paginated_lb_firewall_rule_list.py +112 -0
- pidginhost_sdk/models/paginated_os_image_list.py +112 -0
- pidginhost_sdk/models/paginated_private_network_list.py +112 -0
- pidginhost_sdk/models/paginated_public_ipv4_list.py +112 -0
- pidginhost_sdk/models/paginated_public_ipv6_list.py +112 -0
- pidginhost_sdk/models/paginated_resource_pool_list.py +112 -0
- pidginhost_sdk/models/paginated_resource_pool_node_list.py +112 -0
- pidginhost_sdk/models/paginated_server_list.py +112 -0
- pidginhost_sdk/models/paginated_server_product_list.py +112 -0
- pidginhost_sdk/models/paginated_service_list_list.py +112 -0
- pidginhost_sdk/models/paginated_snapshot_list.py +112 -0
- pidginhost_sdk/models/paginated_ssh_key_list.py +112 -0
- pidginhost_sdk/models/paginated_storage_product_list.py +112 -0
- pidginhost_sdk/models/paginated_subscription_list.py +112 -0
- pidginhost_sdk/models/paginated_ticket_list_list.py +112 -0
- pidginhost_sdk/models/paginated_tld_list.py +112 -0
- pidginhost_sdk/models/patched_cluster_detail.py +151 -0
- pidginhost_sdk/models/patched_company.py +111 -0
- pidginhost_sdk/models/patched_domain.py +152 -0
- pidginhost_sdk/models/patched_domain_registrant.py +131 -0
- pidginhost_sdk/models/patched_firewall_rule.py +119 -0
- pidginhost_sdk/models/patched_firewall_rules_set.py +114 -0
- pidginhost_sdk/models/patched_http_route.py +129 -0
- pidginhost_sdk/models/patched_lb_firewall_rule.py +122 -0
- pidginhost_sdk/models/patched_private_network.py +112 -0
- pidginhost_sdk/models/patched_profile.py +107 -0
- pidginhost_sdk/models/patched_resource_pool.py +113 -0
- pidginhost_sdk/models/patched_ssh_key.py +101 -0
- pidginhost_sdk/models/patched_tcp_route.py +125 -0
- pidginhost_sdk/models/patched_udp_route.py +125 -0
- pidginhost_sdk/models/patched_volume.py +107 -0
- pidginhost_sdk/models/pay_with_funds_response.py +98 -0
- pidginhost_sdk/models/power_action.py +89 -0
- pidginhost_sdk/models/power_action_action_enum.py +40 -0
- pidginhost_sdk/models/power_action_response.py +88 -0
- pidginhost_sdk/models/power_management.py +88 -0
- pidginhost_sdk/models/power_management_request.py +89 -0
- pidginhost_sdk/models/power_management_request_action_enum.py +40 -0
- pidginhost_sdk/models/priority3cd_enum.py +39 -0
- pidginhost_sdk/models/private_network.py +112 -0
- pidginhost_sdk/models/private_network_add_host.py +90 -0
- pidginhost_sdk/models/private_network_remove_host.py +88 -0
- pidginhost_sdk/models/profile.py +104 -0
- pidginhost_sdk/models/public_interface.py +110 -0
- pidginhost_sdk/models/public_ipv4.py +114 -0
- pidginhost_sdk/models/public_ipv6.py +114 -0
- pidginhost_sdk/models/rdns_update_response.py +88 -0
- pidginhost_sdk/models/reinstall.py +88 -0
- pidginhost_sdk/models/reinstall_response.py +88 -0
- pidginhost_sdk/models/remove_server_response.py +88 -0
- pidginhost_sdk/models/renew_domain.py +89 -0
- pidginhost_sdk/models/resource_pool.py +113 -0
- pidginhost_sdk/models/resource_pool_add.py +91 -0
- pidginhost_sdk/models/resource_pool_add_response.py +88 -0
- pidginhost_sdk/models/resource_pool_node.py +96 -0
- pidginhost_sdk/models/retry_provision.py +88 -0
- pidginhost_sdk/models/reverse_dns.py +89 -0
- pidginhost_sdk/models/scope_enum.py +38 -0
- pidginhost_sdk/models/server.py +130 -0
- pidginhost_sdk/models/server_add.py +128 -0
- pidginhost_sdk/models/server_add_response.py +88 -0
- pidginhost_sdk/models/server_product.py +104 -0
- pidginhost_sdk/models/server_product_upgrade.py +88 -0
- pidginhost_sdk/models/server_upgrade_response.py +88 -0
- pidginhost_sdk/models/server_usage_response.py +96 -0
- pidginhost_sdk/models/service.py +153 -0
- pidginhost_sdk/models/service_list.py +132 -0
- pidginhost_sdk/models/snapshot.py +104 -0
- pidginhost_sdk/models/snapshot_create.py +100 -0
- pidginhost_sdk/models/snapshot_create_queued.py +88 -0
- pidginhost_sdk/models/snapshot_delete_queued.py +88 -0
- pidginhost_sdk/models/snapshot_rollback_queued.py +88 -0
- pidginhost_sdk/models/source_enum.py +38 -0
- pidginhost_sdk/models/ssh_key.py +101 -0
- pidginhost_sdk/models/status03c_enum.py +43 -0
- pidginhost_sdk/models/status63a_enum.py +44 -0
- pidginhost_sdk/models/status_a57_enum.py +48 -0
- pidginhost_sdk/models/status_ef2_enum.py +40 -0
- pidginhost_sdk/models/storage_product.py +129 -0
- pidginhost_sdk/models/subscription.py +142 -0
- pidginhost_sdk/models/subscription_status_enum.py +40 -0
- pidginhost_sdk/models/talos_upgrade_response.py +88 -0
- pidginhost_sdk/models/tcp_route.py +125 -0
- pidginhost_sdk/models/threshold_type_enum.py +39 -0
- pidginhost_sdk/models/ticket_close_response.py +90 -0
- pidginhost_sdk/models/ticket_create.py +110 -0
- pidginhost_sdk/models/ticket_create_priority_enum.py +39 -0
- pidginhost_sdk/models/ticket_detail.py +125 -0
- pidginhost_sdk/models/ticket_list.py +117 -0
- pidginhost_sdk/models/ticket_reopen_response.py +90 -0
- pidginhost_sdk/models/ticket_reply.py +95 -0
- pidginhost_sdk/models/ticket_reply_response.py +88 -0
- pidginhost_sdk/models/tld.py +146 -0
- pidginhost_sdk/models/toggle_auto_payment_response.py +90 -0
- pidginhost_sdk/models/transfer_ro_domain.py +91 -0
- pidginhost_sdk/models/type2fa_enum.py +38 -0
- pidginhost_sdk/models/udp_route.py +125 -0
- pidginhost_sdk/models/volume.py +107 -0
- pidginhost_sdk/py.typed +0 -0
- pidginhost_sdk/rest.py +264 -0
- pidginhost_sdk-0.2.0.dist-info/METADATA +805 -0
- pidginhost_sdk-0.2.0.dist-info/RECORD +224 -0
- pidginhost_sdk-0.2.0.dist-info/WHEEL +5 -0
- pidginhost_sdk-0.2.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Pidgin Host API
|
|
5
|
+
|
|
6
|
+
The Pidgin Host API allows you to manage Services and resources within the Pidgin Host cloud in a simple, programmatic way using conventional HTTP requests. All of the functionality that you are familiar with in the Pidgin Host control panel is also available through the API, allowing you to script the complex actions that your situation requires.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0 (v1)
|
|
9
|
+
Contact: support@pidginhost.com
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class TicketReply(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
TicketReply
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
message: StrictStr
|
|
31
|
+
attachment: Optional[StrictStr] = None
|
|
32
|
+
__properties: ClassVar[List[str]] = ["message", "attachment"]
|
|
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 TicketReply 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
|
+
# set to None if attachment (nullable) is None
|
|
74
|
+
# and model_fields_set contains the field
|
|
75
|
+
if self.attachment is None and "attachment" in self.model_fields_set:
|
|
76
|
+
_dict['attachment'] = None
|
|
77
|
+
|
|
78
|
+
return _dict
|
|
79
|
+
|
|
80
|
+
@classmethod
|
|
81
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
82
|
+
"""Create an instance of TicketReply 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
|
+
"message": obj.get("message"),
|
|
91
|
+
"attachment": obj.get("attachment")
|
|
92
|
+
})
|
|
93
|
+
return _obj
|
|
94
|
+
|
|
95
|
+
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Pidgin Host API
|
|
5
|
+
|
|
6
|
+
The Pidgin Host API allows you to manage Services and resources within the Pidgin Host cloud in a simple, programmatic way using conventional HTTP requests. All of the functionality that you are familiar with in the Pidgin Host control panel is also available through the API, allowing you to script the complex actions that your situation requires.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0 (v1)
|
|
9
|
+
Contact: support@pidginhost.com
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class TicketReplyResponse(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
TicketReplyResponse
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
message: StrictStr
|
|
31
|
+
__properties: ClassVar[List[str]] = ["message"]
|
|
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 TicketReplyResponse 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
|
+
return _dict
|
|
73
|
+
|
|
74
|
+
@classmethod
|
|
75
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
76
|
+
"""Create an instance of TicketReplyResponse from a dict"""
|
|
77
|
+
if obj is None:
|
|
78
|
+
return None
|
|
79
|
+
|
|
80
|
+
if not isinstance(obj, dict):
|
|
81
|
+
return cls.model_validate(obj)
|
|
82
|
+
|
|
83
|
+
_obj = cls.model_validate({
|
|
84
|
+
"message": obj.get("message")
|
|
85
|
+
})
|
|
86
|
+
return _obj
|
|
87
|
+
|
|
88
|
+
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Pidgin Host API
|
|
5
|
+
|
|
6
|
+
The Pidgin Host API allows you to manage Services and resources within the Pidgin Host cloud in a simple, programmatic way using conventional HTTP requests. All of the functionality that you are familiar with in the Pidgin Host control panel is also available through the API, allowing you to script the complex actions that your situation requires.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0 (v1)
|
|
9
|
+
Contact: support@pidginhost.com
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, field_validator
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from typing_extensions import Annotated
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class TLD(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
TLD
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
id: StrictInt
|
|
32
|
+
tld: Annotated[str, Field(strict=True, max_length=200)]
|
|
33
|
+
price: Annotated[str, Field(strict=True)] = Field(description="Euro without TVA")
|
|
34
|
+
renew_price: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Euro without TVA")
|
|
35
|
+
transfer_price: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Euro without TVA")
|
|
36
|
+
registrar: Annotated[str, Field(strict=True, max_length=200)]
|
|
37
|
+
api_renewable: Optional[StrictBool] = None
|
|
38
|
+
idna_support: Optional[StrictBool] = None
|
|
39
|
+
wg_support: Optional[StrictBool] = None
|
|
40
|
+
reactivate_max_days: Optional[Annotated[int, Field(le=32767, strict=True, ge=0)]] = None
|
|
41
|
+
__properties: ClassVar[List[str]] = ["id", "tld", "price", "renew_price", "transfer_price", "registrar", "api_renewable", "idna_support", "wg_support", "reactivate_max_days"]
|
|
42
|
+
|
|
43
|
+
@field_validator('price')
|
|
44
|
+
def price_validate_regular_expression(cls, value):
|
|
45
|
+
"""Validates the regular expression"""
|
|
46
|
+
if not re.match(r"^-?\d{0,8}(?:\.\d{0,2})?$", value):
|
|
47
|
+
raise ValueError(r"must validate the regular expression /^-?\d{0,8}(?:\.\d{0,2})?$/")
|
|
48
|
+
return value
|
|
49
|
+
|
|
50
|
+
@field_validator('renew_price')
|
|
51
|
+
def renew_price_validate_regular_expression(cls, value):
|
|
52
|
+
"""Validates the regular expression"""
|
|
53
|
+
if value is None:
|
|
54
|
+
return value
|
|
55
|
+
|
|
56
|
+
if not re.match(r"^-?\d{0,8}(?:\.\d{0,2})?$", value):
|
|
57
|
+
raise ValueError(r"must validate the regular expression /^-?\d{0,8}(?:\.\d{0,2})?$/")
|
|
58
|
+
return value
|
|
59
|
+
|
|
60
|
+
@field_validator('transfer_price')
|
|
61
|
+
def transfer_price_validate_regular_expression(cls, value):
|
|
62
|
+
"""Validates the regular expression"""
|
|
63
|
+
if value is None:
|
|
64
|
+
return value
|
|
65
|
+
|
|
66
|
+
if not re.match(r"^-?\d{0,8}(?:\.\d{0,2})?$", value):
|
|
67
|
+
raise ValueError(r"must validate the regular expression /^-?\d{0,8}(?:\.\d{0,2})?$/")
|
|
68
|
+
return value
|
|
69
|
+
|
|
70
|
+
model_config = ConfigDict(
|
|
71
|
+
populate_by_name=True,
|
|
72
|
+
validate_assignment=True,
|
|
73
|
+
protected_namespaces=(),
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
def to_str(self) -> str:
|
|
78
|
+
"""Returns the string representation of the model using alias"""
|
|
79
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
80
|
+
|
|
81
|
+
def to_json(self) -> str:
|
|
82
|
+
"""Returns the JSON representation of the model using alias"""
|
|
83
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
84
|
+
return json.dumps(self.to_dict())
|
|
85
|
+
|
|
86
|
+
@classmethod
|
|
87
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
88
|
+
"""Create an instance of TLD from a JSON string"""
|
|
89
|
+
return cls.from_dict(json.loads(json_str))
|
|
90
|
+
|
|
91
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
92
|
+
"""Return the dictionary representation of the model using alias.
|
|
93
|
+
|
|
94
|
+
This has the following differences from calling pydantic's
|
|
95
|
+
`self.model_dump(by_alias=True)`:
|
|
96
|
+
|
|
97
|
+
* `None` is only added to the output dict for nullable fields that
|
|
98
|
+
were set at model initialization. Other fields with value `None`
|
|
99
|
+
are ignored.
|
|
100
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
101
|
+
"""
|
|
102
|
+
excluded_fields: Set[str] = set([
|
|
103
|
+
"id",
|
|
104
|
+
])
|
|
105
|
+
|
|
106
|
+
_dict = self.model_dump(
|
|
107
|
+
by_alias=True,
|
|
108
|
+
exclude=excluded_fields,
|
|
109
|
+
exclude_none=True,
|
|
110
|
+
)
|
|
111
|
+
# set to None if renew_price (nullable) is None
|
|
112
|
+
# and model_fields_set contains the field
|
|
113
|
+
if self.renew_price is None and "renew_price" in self.model_fields_set:
|
|
114
|
+
_dict['renew_price'] = None
|
|
115
|
+
|
|
116
|
+
# set to None if transfer_price (nullable) is None
|
|
117
|
+
# and model_fields_set contains the field
|
|
118
|
+
if self.transfer_price is None and "transfer_price" in self.model_fields_set:
|
|
119
|
+
_dict['transfer_price'] = None
|
|
120
|
+
|
|
121
|
+
return _dict
|
|
122
|
+
|
|
123
|
+
@classmethod
|
|
124
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
125
|
+
"""Create an instance of TLD from a dict"""
|
|
126
|
+
if obj is None:
|
|
127
|
+
return None
|
|
128
|
+
|
|
129
|
+
if not isinstance(obj, dict):
|
|
130
|
+
return cls.model_validate(obj)
|
|
131
|
+
|
|
132
|
+
_obj = cls.model_validate({
|
|
133
|
+
"id": obj.get("id"),
|
|
134
|
+
"tld": obj.get("tld"),
|
|
135
|
+
"price": obj.get("price"),
|
|
136
|
+
"renew_price": obj.get("renew_price"),
|
|
137
|
+
"transfer_price": obj.get("transfer_price"),
|
|
138
|
+
"registrar": obj.get("registrar"),
|
|
139
|
+
"api_renewable": obj.get("api_renewable"),
|
|
140
|
+
"idna_support": obj.get("idna_support"),
|
|
141
|
+
"wg_support": obj.get("wg_support"),
|
|
142
|
+
"reactivate_max_days": obj.get("reactivate_max_days")
|
|
143
|
+
})
|
|
144
|
+
return _obj
|
|
145
|
+
|
|
146
|
+
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Pidgin Host API
|
|
5
|
+
|
|
6
|
+
The Pidgin Host API allows you to manage Services and resources within the Pidgin Host cloud in a simple, programmatic way using conventional HTTP requests. All of the functionality that you are familiar with in the Pidgin Host control panel is also available through the API, allowing you to script the complex actions that your situation requires.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0 (v1)
|
|
9
|
+
Contact: support@pidginhost.com
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class ToggleAutoPaymentResponse(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
ToggleAutoPaymentResponse
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
message: StrictStr
|
|
31
|
+
auto_payment: StrictBool
|
|
32
|
+
__properties: ClassVar[List[str]] = ["message", "auto_payment"]
|
|
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 ToggleAutoPaymentResponse 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 ToggleAutoPaymentResponse 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
|
+
"message": obj.get("message"),
|
|
86
|
+
"auto_payment": obj.get("auto_payment")
|
|
87
|
+
})
|
|
88
|
+
return _obj
|
|
89
|
+
|
|
90
|
+
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Pidgin Host API
|
|
5
|
+
|
|
6
|
+
The Pidgin Host API allows you to manage Services and resources within the Pidgin Host cloud in a simple, programmatic way using conventional HTTP requests. All of the functionality that you are familiar with in the Pidgin Host control panel is also available through the API, allowing you to script the complex actions that your situation requires.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0 (v1)
|
|
9
|
+
Contact: support@pidginhost.com
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field
|
|
22
|
+
from typing import Any, ClassVar, Dict, List
|
|
23
|
+
from typing_extensions import Annotated
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class TransferRoDomain(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
TransferRoDomain
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
domain: Annotated[str, Field(strict=True, max_length=255)] = Field(description="Domain with tld, ex: example.com")
|
|
32
|
+
auth_code: Annotated[str, Field(strict=True, max_length=255)] = Field(description="Auth code")
|
|
33
|
+
__properties: ClassVar[List[str]] = ["domain", "auth_code"]
|
|
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 TransferRoDomain 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 TransferRoDomain 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
|
+
"domain": obj.get("domain"),
|
|
87
|
+
"auth_code": obj.get("auth_code")
|
|
88
|
+
})
|
|
89
|
+
return _obj
|
|
90
|
+
|
|
91
|
+
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Pidgin Host API
|
|
5
|
+
|
|
6
|
+
The Pidgin Host API allows you to manage Services and resources within the Pidgin Host cloud in a simple, programmatic way using conventional HTTP requests. All of the functionality that you are familiar with in the Pidgin Host control panel is also available through the API, allowing you to script the complex actions that your situation requires.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0 (v1)
|
|
9
|
+
Contact: support@pidginhost.com
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import json
|
|
18
|
+
from enum import Enum
|
|
19
|
+
from typing_extensions import Self
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class Type2faEnum(str, Enum):
|
|
23
|
+
"""
|
|
24
|
+
* `dev` - Development * `prod` - Production
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
"""
|
|
28
|
+
allowed enum values
|
|
29
|
+
"""
|
|
30
|
+
DEV = 'dev'
|
|
31
|
+
PROD = 'prod'
|
|
32
|
+
|
|
33
|
+
@classmethod
|
|
34
|
+
def from_json(cls, json_str: str) -> Self:
|
|
35
|
+
"""Create an instance of Type2faEnum from a JSON string"""
|
|
36
|
+
return cls(json.loads(json_str))
|
|
37
|
+
|
|
38
|
+
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Pidgin Host API
|
|
5
|
+
|
|
6
|
+
The Pidgin Host API allows you to manage Services and resources within the Pidgin Host cloud in a simple, programmatic way using conventional HTTP requests. All of the functionality that you are familiar with in the Pidgin Host control panel is also available through the API, allowing you to script the complex actions that your situation requires.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0 (v1)
|
|
9
|
+
Contact: support@pidginhost.com
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from datetime import datetime
|
|
22
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
|
|
23
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
24
|
+
from typing_extensions import Annotated
|
|
25
|
+
from typing import Optional, Set
|
|
26
|
+
from typing_extensions import Self
|
|
27
|
+
|
|
28
|
+
class UDPRoute(BaseModel):
|
|
29
|
+
"""
|
|
30
|
+
Serializer for UDPRoute resources with port validation.
|
|
31
|
+
""" # noqa: E501
|
|
32
|
+
id: StrictInt
|
|
33
|
+
name: Annotated[str, Field(strict=True, max_length=253)]
|
|
34
|
+
namespace: Optional[Annotated[str, Field(strict=True, max_length=253)]] = None
|
|
35
|
+
port: Annotated[int, Field(le=65535, strict=True, ge=1)] = Field(description="External port to expose")
|
|
36
|
+
backend_service_name: Annotated[str, Field(strict=True, max_length=253)] = Field(description="Name of the backend Kubernetes Service")
|
|
37
|
+
backend_service_port: Annotated[int, Field(le=65535, strict=True, ge=1)] = Field(description="Port of the backend Service")
|
|
38
|
+
backend_namespace: Optional[Annotated[str, Field(strict=True, max_length=253)]] = Field(default='default', description="Namespace of the backend Service")
|
|
39
|
+
status_ready: Optional[StrictBool]
|
|
40
|
+
status_message: StrictStr
|
|
41
|
+
created: datetime
|
|
42
|
+
updated: datetime
|
|
43
|
+
__properties: ClassVar[List[str]] = ["id", "name", "namespace", "port", "backend_service_name", "backend_service_port", "backend_namespace", "status_ready", "status_message", "created", "updated"]
|
|
44
|
+
|
|
45
|
+
model_config = ConfigDict(
|
|
46
|
+
populate_by_name=True,
|
|
47
|
+
validate_assignment=True,
|
|
48
|
+
protected_namespaces=(),
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def to_str(self) -> str:
|
|
53
|
+
"""Returns the string representation of the model using alias"""
|
|
54
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
55
|
+
|
|
56
|
+
def to_json(self) -> str:
|
|
57
|
+
"""Returns the JSON representation of the model using alias"""
|
|
58
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
59
|
+
return json.dumps(self.to_dict())
|
|
60
|
+
|
|
61
|
+
@classmethod
|
|
62
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
63
|
+
"""Create an instance of UDPRoute from a JSON string"""
|
|
64
|
+
return cls.from_dict(json.loads(json_str))
|
|
65
|
+
|
|
66
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
67
|
+
"""Return the dictionary representation of the model using alias.
|
|
68
|
+
|
|
69
|
+
This has the following differences from calling pydantic's
|
|
70
|
+
`self.model_dump(by_alias=True)`:
|
|
71
|
+
|
|
72
|
+
* `None` is only added to the output dict for nullable fields that
|
|
73
|
+
were set at model initialization. Other fields with value `None`
|
|
74
|
+
are ignored.
|
|
75
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
76
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
77
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
78
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
79
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
80
|
+
"""
|
|
81
|
+
excluded_fields: Set[str] = set([
|
|
82
|
+
"id",
|
|
83
|
+
"status_ready",
|
|
84
|
+
"status_message",
|
|
85
|
+
"created",
|
|
86
|
+
"updated",
|
|
87
|
+
])
|
|
88
|
+
|
|
89
|
+
_dict = self.model_dump(
|
|
90
|
+
by_alias=True,
|
|
91
|
+
exclude=excluded_fields,
|
|
92
|
+
exclude_none=True,
|
|
93
|
+
)
|
|
94
|
+
# set to None if status_ready (nullable) is None
|
|
95
|
+
# and model_fields_set contains the field
|
|
96
|
+
if self.status_ready is None and "status_ready" in self.model_fields_set:
|
|
97
|
+
_dict['status_ready'] = None
|
|
98
|
+
|
|
99
|
+
return _dict
|
|
100
|
+
|
|
101
|
+
@classmethod
|
|
102
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
103
|
+
"""Create an instance of UDPRoute from a dict"""
|
|
104
|
+
if obj is None:
|
|
105
|
+
return None
|
|
106
|
+
|
|
107
|
+
if not isinstance(obj, dict):
|
|
108
|
+
return cls.model_validate(obj)
|
|
109
|
+
|
|
110
|
+
_obj = cls.model_validate({
|
|
111
|
+
"id": obj.get("id"),
|
|
112
|
+
"name": obj.get("name"),
|
|
113
|
+
"namespace": obj.get("namespace"),
|
|
114
|
+
"port": obj.get("port"),
|
|
115
|
+
"backend_service_name": obj.get("backend_service_name"),
|
|
116
|
+
"backend_service_port": obj.get("backend_service_port"),
|
|
117
|
+
"backend_namespace": obj.get("backend_namespace") if obj.get("backend_namespace") is not None else 'default',
|
|
118
|
+
"status_ready": obj.get("status_ready"),
|
|
119
|
+
"status_message": obj.get("status_message"),
|
|
120
|
+
"created": obj.get("created"),
|
|
121
|
+
"updated": obj.get("updated")
|
|
122
|
+
})
|
|
123
|
+
return _obj
|
|
124
|
+
|
|
125
|
+
|